Sorry guys, I'm trying not to make too many doc issues,
but I keep finding stuff I've been advising against for years now :/
in here, you mention setting the default index in alsa.conf
... if you have 1 and only 1 sound card, then the issue doesn't concern you
but if you have 3 or more sound cards, then you may find yourself with shuffled devices
editing /etc/modprobe.d/alsa.conf
only sets the preferred card index,
it doesn't prevent your sound cards from changing order on boot.
something that does help that though is editing /etc/modprobe.d/alsa-base.conf
and specifying the order you want your drivers to load in, as mentioned in this old cringe-worthy askubuntu answer here
(ignore the comment in that answer, it actually does work)
there's something though that this won't fix
if you have multiple devices using the same driver in your system, and your preferred device is one of them, specifying the driver order will not stop your devices under that driver from shuffling about every reboot...
the only thing I can think of that would stop that is to disable the devices that aren't preferred
or take the cheap solution and use a device that uses a different driver as the preferred device.
not all apps allow you to specify an alsa device, and even some that do don't always work appropriately (utox)
so you're better off relying on a preferred device under alsa. ;)
TIP: if you're like me and rely purely on alsa for audio
these utilities are very helpful:
qastools volumeicon
QasMixer provides full control over your sound devices (better than Pulse)
volumeicon adds an interactive icon that allows you to quickly control your volume (useful for xfce)
the 1 disadvantage this has from Pulse is you can't control individual app streams
but for that you gain 2 advantages:
- if your card has separate mic-in and line-in ports, you can make use of both ports as they were intended to be used without configuration (pulse can only make use of 1 input and needs explicit loopback enable/disable)
- you don't run the risk of dropping all audio output when your CPU gets busy (pulse requires a system reboot)