[Question] USB Gadget sample rate auto switching
When using USB Audio Gadget, the device running pipewire is a USB device, accepting audio from USB Host.
Linux UAC2 gadget supports multiple sample rates, and the rate is controlled by the host machine. We can read the current rate from an ALSA mixer control:
$ amixer -c 2 contents
numid=8,iface=PCM,name='Capture Rate'
; type=INTEGER,access=r--v----,values=1,min=44100,max=96000,step=0
: values=0
When value of this control is 0, it means the host is not playing anything, and this device should not be opened. When the host starts playing, this value will be set to the sample rate, and only at that time, we should open this capture device with the given sample rate.
Currently, it seems that ALSA monitor will fail to open this device because of sample rate mismatch. Is it possible for wireplumber's ALSA monitor to open this device only after the host starts playing?