Jens Rutschmann wrote on 24.03.2009 23:00:
> Clemens Ladisch wrote on 20.03.2009 08:45:
>> I don't know why your script doesn't work, but the following udev rule
>> works for me, and it does not need to be adjusted for the specific sound
>> device but just requires that you've previously saved the the correct
>> settings with "alsactl store":
>>
>> SUBSYSTEM=="sound", ACTION=="add", KERNEL=="controlC[0-9]*",
>> RUN+="/usr/sbin/alsactl restore $number"
>
> This one works perfectly.
I found out it did not work as perfectly as I thought in the first place:
Using the rule above made my built-in sound card (HDA Intel, with Analog
Devices
codec, in a Thinpad T61) create a cracking sound when (un)muting it.
So I refined the rule to only restore the mixer levels of the USB headset:
SUBSYSTEM=="sound", ACTION=="add", ATTRS{idProduct}=="000c",
ATTRS{idVendor}=="0d8c", KERNEL=="controlC1", RUN+="/usr/sbin/alsactl restore 1"
Perhaps this might help others.
Best regards,
Jens
------------------------------------------------------------------------------
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user