Don't use headset receiver when headset is turned off (wireless_status sysfs)
https://patchwork.kernel.org/project/linux-usb/patch/20230302105555.51417-4-hadess@hadess.net/ has one patch (out of a series) which implements the new wireless_status
sysfs attribute.
Pipewire should use the presence and value of this attribute in sibling sysfs devices to consider the presence of the headset.
For example, on the Logitech headset which I'm adding support for in the patch series, you would have a USB device with multiple interfaces (simplified):
USB device
|_> interface 1 (`snd_usb_audio`)
|_> alsa interface
|_> interface 2 (`hid-logitech-hidpp`)
|_> power_supply interface
|_> wireless_status sysfs attribute
When Pipewire consumes the ALSA device exported through interface 1, it should check and monitor the value of the wireless_status
on the sibling interface to figure out whether the device is actually available.
This would allow:
- not offering headset as an output if the headset is turned off
- removing the need to disconnect the receiver
- applying the same routing (or corking) when the headset is turned off as when a wired headset is disconnected
Now would also be a good time for any comments you might have about the interface, if any, before it's merged, or before it's available in stable releases.