Created attachment 221286 [details]
patch to add set interface dynamicly.
1. set interface 0 and alt number when headset stop/start working is quite standard on windows/Linux OS
2. set interface 0 when not headset doesn't work can help power save;
3. some Epos headset tool check will check the headset status by polling it's current alt interface, and "0" set interface alt stands that headset is idle, so EPOS application do can do firmware update for this device.
Base above comment, it's good deal to add this patch.
I'll have a look at your patch later today.
Can you explain briefly why you need a new channel method to support this new feature?
Cannot the current channel callback methods be used?
Have you tried:
usbconfig -d X.Y power_save
It will cause automatic suspend of the USB audio device when not in use? Can this be used instead of playing with the alternate settings?
Put this diff to Phabricator.
We are running Citrix VDI application on FreeBSD, and there will be audio choppy when playing short audio voice if set_interface in chn_start set when audio is playing by Citrix VDI application.
It seems that it need use as less as time in chn_start. So I add chn_prepare and do set_interface which need quite long time before chn_start.
It will make the headset situation more complicated if use "usbconfig -d X.Y power_save".
Power_save will not set interface, and the device may need longer time to recover working again.
It's not a standard method to support this feature.