Re: How to set USB-Headset volume with udev and amixer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jens Rutschmann wrote:
> I have a C-Media USB Headphone Set which is working well. One issue though is 
> that when plugging it in the mixer levels are initialized to bad values. The 
> "Speaker" level is set to 100% (*very* loud, like in "ouch !!!") while the "Mic 
> Capture" level is set to 0%.
> 
> Therefore I set the mixer levels by hand (using alsamixer) until now. So I wrote 
> a script which is invoked by udev. The script tries to set the levels using amixer.
> [...]
> So I wrote the following script and udev rule:
> 
> ATTR{idProduct}=="000c", ATTR{idVendor}=="0d8c", ACTION=="add", RUN+="/usr/local/bin/headset_volume.sh"
> ...
> The script is executed since I get the log file, but amixer obviously isn't 
> executed correctly,

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"


HTH
Clemens

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux