In bash, how to determine which sound card is installed? I am trying to create a plugin for Rhythmbox and I would like to test it in a script configuration.
Edit: On my machine, I needed to use sudo to use lspci and lsmod . @ Quassnoi using cat worked without additional privileges.
sudo
lspci
lsmod
cat
cat /proc/asound/cards
lspci | grep -i audio
I have a list of known sounds that you will check in your script setup. So you can use grep and lsmod to check which one is loaded.
# lsmod | grep -q snd_hda_intel
# echo $?
0
# lsmod | grep -q snd_foo
1