LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   weird alsa problems losing permissions when I plug/unplug usb headset (http://www.linuxquestions.org/questions/linux-general-1/weird-alsa-problems-losing-permissions-when-i-plug-unplug-usb-headset-4175447572/)

toolz 01-28-2013 02:23 PM

weird alsa problems losing permissions when I plug/unplug usb headset
 
I have a /etc/udev/rules.d/00-local.rules

Code:

KERNEL=="pcmC[D0-9cp]*", ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K > /etc/asound.conf; echo defaults.pcm.card $$K >>/etc/asound.conf'"
KERNEL=="pcmC[D0-9cp]*", ACTION=="remove", PROGRAM="/bin/sh -c 'echo defaults.ctl.card 0 > /etc/asound.conf; echo defaults.pcm.card 0 >>/etc/asound.conf'"

When headset is plugged in I can correctly type $: alsamixer and it brings up the volume adjustments etc.

but when I unplug the headset and type it, I get
Code:

cannot open mixer: No such file or directory
here are my permissions
Code:

-rw-r--r--  1 toolz users        40 Jan 25 08:29 .asoundrc
here are my groups

Code:

audio:x:92:toolz
also, when I unplug my headset and run alsamixer with root permission it works

/dev/snd permissions

Code:

drwxr-xr-x  4 root root      620 Jan 27 20:32 .
drwxr-xr-x  18 root root    3080 Jan 27 20:32 ..
drwxr-xr-x  2 root root      60 Jan 27 20:32 by-id
drwxr-xr-x  2 root root      120 Jan 27 20:32 by-path
crw-rw----+  1 root audio 116, 13 Jan 27 14:57 controlC0
crw-rw----+  1 root audio 116, 20 Jan 27 14:57 controlC1
crw-rw----+  1 root audio 116, 23 Jan 27 14:57 controlC2
crw-rw----+  1 root audio 116, 26 Jan 27 20:32 controlC3
crw-rw----+  1 root audio 116,  2 Jan 27 14:57 hwC0D0
crw-rw----+  1 root audio 116, 19 Jan 27 14:57 hwC1D0
crw-rw----+  1 root audio 116, 22 Jan 27 14:57 hwC2D0
crw-rw----+  1 root audio 116,  4 Jan 27 14:57 midiC0D0
crw-rw----+  1 root audio 116,  3 Jan 27 14:57 midiC0D1
crw-rw----+  1 root audio 116, 12 Jan 27 14:57 pcmC0D0c
crw-rw----+  1 root audio 116, 11 Jan 27 20:04 pcmC0D0p
crw-rw----+  1 root audio 116, 10 Jan 27 14:57 pcmC0D1c
crw-rw----+  1 root audio 116,  9 Jan 27 14:57 pcmC0D2c
crw-rw----+  1 root audio 116,  8 Jan 27 14:57 pcmC0D2p
crw-rw----+  1 root audio 116,  7 Jan 27 14:57 pcmC0D3p
crw-rw----+  1 root audio 116,  6 Jan 27 14:57 pcmC0D4c
crw-rw----+  1 root audio 116,  5 Jan 27 14:57 pcmC0D4p
crw-rw----+  1 root audio 116, 18 Jan 27 14:57 pcmC1D0c
crw-rw----+  1 root audio 116, 17 Jan 27 14:57 pcmC1D0p
crw-rw----+  1 root audio 116, 16 Jan 27 14:57 pcmC1D1c
crw-rw----+  1 root audio 116, 15 Jan 27 14:57 pcmC1D1p
crw-rw----+  1 root audio 116, 14 Jan 27 14:57 pcmC1D2c
crw-rw----+  1 root audio 116, 21 Jan 27 14:57 pcmC2D3p
crw-rw----+  1 root audio 116, 25 Jan 27 20:32 pcmC3D0c
crw-rw----+  1 root audio 116, 24 Jan 27 20:34 pcmC3D0p
crw-rw----  1 root audio 116,  1 Jan 27 14:57 seq
crw-rw----+  1 root audio 116, 33 Jan 27 14:57 timer


toolz 01-28-2013 05:25 PM

I copy/pasted that udev rule last night and didn't notice it was changing /etc/asound.com and I have my /home/toolz/.asoundrc over writing (I guess? I'm not 100% on linux yet)

On top of that when I manually set default card to 0 my speakers were slightly unplugged because of my cat...ugh talk about a headache to fix this.


All times are GMT -5. The time now is 04:52 PM.