I have a couple of different applications running that rely on knowing the audio or recording device at startup, but every time I restart my raspi, the order of the devices changes. Looking for a way to set the order of devices (returned from aplay/arecord) permanently, if possible.
For anybody interested in the solution to this problem when two devices have the same snd_ identifier:
In alsa-base.conf, use the vid and pid attributes on options (they both accept comma-delimited array items, generally 0x1234 format)
You can get the vendor ID and Product ID of your device using lsusb, then set the device order normally in alsa-base.conf