|September 10th, 2021|
hw:1,0, and vice-versa.
Here's someone else with the same problem in 2011.
Cheap USB devices don't have a serial number, and these two sound cards present identically. On the other hand, it's possible to identify them by their location in the USB tree:
$ for x in /sys/bus/usb/devices/*/product; do echo $x $(cat $x) done /sys/bus/usb/devices/1-126.96.36.199/product USB Audio Device /sys/bus/usb/devices/1-1.2.1/product 4-Port USB 2.0 Hub /sys/bus/usb/devices/1-1.2.2/product HP Elite USB Keyboard /sys/bus/usb/devices/1-1.2.4/product AXIS-49 2A /sys/bus/usb/devices/1-1.2/product 4-Port USB 2.0 Hub /sys/bus/usb/devices/1-1.3/product USB Audio Device /sys/bus/usb/devices/usb1/product DWC OTG Controller
lsusb --tree can do this too, but it's harder to read)
Since this is based on physical ports, it will be consistent across reboots.
It looks like you can write
udev rules to tell the system
how to map
hw:*,0 (docs). Unfortunately, this
was getting well beyond what I considered fun, so I gave up. I added
a key combination to swap the outputs (commit),
so if I notice it's wrong while setting up at a gig I can fix it.
Possibly at some point I'll come back and deal with