Re: A persistent name for a sound device.
- To: debian-user@lists.debian.org
- Subject: Re: A persistent name for a sound device.
- From: Alan Greenberger <alanjg@ptd.net>
- Date: Mon, 3 Feb 2014 09:34:42 -0500
- Message-id: <slrnleva82.3al.alanjg@archduke.router>
- References: <E1WAAtm-0001Mo-0A@dalton.invalid>
On 2014-02-03, peter@easthope.ca <peter@easthope.ca> wrote:
> I'm interested to make a persistent name for a sound device.
> The output of "udevadm info -a -p $(udevadm info -q path -n /dev/... )" follows.
> What exactly is meant by the last sentence of the introductory paragraph?
> Must the first match occur in the first stanza of the info? Does "one single
> parent device" allow the direct parent only? Can the attributes belong to the
> grandparent or great-grandparent?
>
> This is one rule I've tried.
> SUBSYSTEM=="sound", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="0008", SYMLINK+="USBspeakers"
> None of my rules have yielded a SYMLINK.
>
> Thanks for any ideas, ... Peter E.
As an alternative to udev, you may already have a persistent name. When
I plug in a Logitech C170 webcam, /proc/asound/cards shows:
0 [SB ]: HDA-Intel - HDA ATI SB
HDA ATI SB at 0xfbdf4000 irq 16
1 [HDMI ]: HDA-Intel - HDA ATI HDMI
HDA ATI HDMI at 0xfbeec000 irq 44
2 [C170 ]: USB-Audio - Webcam C170
Webcam C170 at usb-0000:00:13.2-4, high speed
Then I can record with the webcam microphone by:
arecord -f S16_LE -D hw:C170 filename
So take a look at /proc/asound/cards .
Reply to: