[pulseaudio-discuss] Keeping a USB mic selected when unplugged & plugged in again
Frode Severin Hatlevik
frodeseverin at gmail.com
Fri Sep 10 13:45:19 PDT 2010
2010/9/2 Whit Blauvelt <whit.pulse at transpect.com>:
> On Thu, Sep 02, 2010 at 08:45:18AM +0100, Colin Guthrie wrote:
> Or even better, there might be a way to piggyback on whatever is noticing
> the mic's been plugged in, and have it then turn it on by running the
> auxilliary script by default. Obviously this would be a kludge, not a
> universal solution. But I'd be happy.
>
The way to piggyback on plugging in hardware on Debian/Ubuntu is
writing udev rules. I recently had to teach myself a bit of
rulewriting to fix an issue with ConsoleKit and device node ACL
permissions.
If you venture into this, have a look at the manual for the
'--attribute-walk' command of udevadm. On my system the command
udevadm info --query=name --name=/dev/snd/controlC0 --attribute-walk
lists all the possible matching criteria for the controlC0 device node.
Also keep in mind that udev seems to only take the first two matching
kriteria in a rule into account, and in your case theese should
identify the mic uniquely. The rule could the trigger en external
script. The rule should be numbered somewhere in the 80's I suppose,
since by then most of the other rules dealing with sound have been
processed.
;)Frode
--
Da sa Gud: "Det bli lys!"
Og det ble lys.
1. Mosebok 1.3
And God said, "Let there be light,"
and there was light.
Genesis 1:3, NIV
More information about the pulseaudio-discuss
mailing list