You are not logged in.
Ok, I have a set of USB headphones that are superb for listening to music on. Good bass, Treble spot on as default and very comfrontable!
I hated messing around getting ALSA and in turn MPD to get them to work, so here is some udev rules that will redirect to them automagically!
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'"
Add this to /etc/udev/rules.d/00_local.rules create it if it doesn't exist.
NOTE: This only works if the USB soundcard (Headphones) are plugged in after the machine is booted.
Hope this helps someone!
Offline