I have a few usb cameras that have a built in microphone.
I would like to save the correct audio stream in the correct video file.
how do i match an alsa hw:2,1 device with the correct /dev/video0 device ?
v4l2-ctl --list-devices
UVC Camera (046d:0825) (usb-70090000.xusb-2.3):
/dev/video1
UVC Camera (046d:0825) (usb-70090000.xusb-2.4):
/dev/video0
arecord --list-devices
**** List of CAPTURE Hardware Devices ****
card 1: tegrasndt210ref [tegra-snd-t210ref-mobile-rt565x], device 0: ADMAIF1 CIF ADMAIF1-0 []
Subdevices: 1/1
........
card 1: tegrasndt210ref [tegra-snd-t210ref-mobile-rt565x], device 9: ADMAIF10 CIF ADMAIF10-9 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: U0x46d0x825 [USB Device 0x46d:0x825], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: U0x46d0x825_1 [USB Device 0x46d:0x825], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
so one is hw:2,0 and the other hw:3,0 … but which way around ?
of coarse i can disconnect one, see which one is left and use that. but i need to be able to do this automatically.
any hints ?