Setting Soundcard names in Gnome
I have a couple of sound cards attached to my laptop at work and it gets confusing to know which one is which when they have names like "Analogue line out". So I set about changing them and struggled a bit in the process so I thought I would note it here for reference.
Gnome takes the name of the soundcards from pulseaudio. There does not seem to
be a way to rename them directly in gnome but you can do it from the command
line. The command pacmd list-sinks
will give you a list of the devices that
you have. Looking through that list at the 'name:' field are the identifiers
that you can use. ( You can also use the ID but I am not sure how stable they
are ) The man page for pulse-cli-syntax is the rather confusing location for
the commands that you can give the pacmd command.
Now we know which card we want we can change the description property that Gnome uses with the following command. Note the extra quotes are required if your description has spaces in it.
update-sink-proplist alsa_output.usb-Burr-Brown_from_TI_USB_Audio_DAC-00-DAC.analog-stereo 'device.description="External Blue headphones"'
Then you can run the pacmd list-sinks
command to check that works. At the
gnome level nothing will have changed. So now you need to add this to your
config file ~/.config/pulse/default.pa
which is just a list of pacmd
commands to run on startup. You can now drop the extra single quotes as it does
not need to be escaped for the shell prompt.
Update: You need to add the line below to your default.pa so that it knows about the default config. Pulseaudio only loads one config file by default so this just makes sure you get the default settings first.
Now it just remains to get pulseaudio to re-read it's config in the usual unix way by giving it a HUP.
Comments
Comments powered by Disqus