Persistent device naming, alsa

Linux for blind general discussion blinux-list at redhat.com
Tue Sep 14 17:48:36 UTC 2021


I have a USB audio device that I use for system sounds via pulse, and speech.
In my default.pa, I have
set-default-sink alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo
I also have onboard audio, to which my surround speakers are connected.
For my mpv, I can use this line in ~/.config/mpv/mpv.conf:
audio-device=pulse/alsa_output.pci-0000_00_1f.3.analog-stereo
That's the onboard card.
I also use pianobar, which uses libao, to produce its audio. The problem is that
dev=hw:0
changes on each boot. I need a way to specify a device by it's name somewhere, so that I can call it in application, even if it's hw ID changes.
What can I do there?





More information about the Blinux-list mailing list