I've been hunting through the snd-powermac source trying to get sound to 
work on my Powerbook G4 (3,2).  This didn't get sound working, but I 
think I found an easily correctable bug in the code.

I'd like some input from anyone who might be more more familiar with 
than code than me.  The bug is in the function snd_pmac_awacs_put_switch 
defined in awacs.c at about line 214 (i've been adding snd_printk debug 
messages so my line numbers may be slightly off).  The function is 
similar to snd_pmac_awacs_put_volume which I believe is coded correctly.

The problem is that _put_switch doesn't allow a switch to write to any 
register but register 1.  It is hard coded.  At the very least though, 
one could expect desired writes to registers 0 and 1.  Besides, the 
switches themselves carry a parameter specifying which register to use. 
  I believe the code should be changed to allow writing to the specified 
register.  Also, to make the code more clear and I think more 
functional, the desired register and bitmask should be stripped off from 
kcontrol->private_value and stored in variables reg and bitmask.  Again, 
this is similar to _put_volume.

Any thoughts?

Dave Moylan



_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to