USB Headset / Auto Switching Of Default Audio Device Question

  • I'm using LibreELEC 8.9.014 on a Rock64.

    Usually I have it output the sound directly through HDMI to my TV which is fine. However, I have a USB headset my kids use so they can watch their stuff and still be quiet enough that I can work.

    It's this headset if that changes anything.

    https://www.amazon.com/surround-microphone-isolating-breathing-electronic-games/dp/b01e8rs598/

    Is there a way to have LibreELEC default to HDMI but switch to USB audio when the headset is plugged in? It currently works fine if I go into settings and switch it manually. I'm just wondering if there's a way to have the system do it for me.

    Thank you for your time.

  • The short answer is no. However, in our add-on repo there's a Bluetooth audio device switcher that is functionally similar to what you need; it detects the connection of the BT device (over d-bus) and auto-switches the Kodi audio output from alsa to pulse-audio. It's probably not impossible to extend that or plagiarise the device switching code to work with other devices (USB devices don't generate d-bus events so another method of initiating the switch is required) but if you don't have the developer skills to do that yourself the challenge is always finding a willing volunteer who does.

  • The short answer is no. However, in our add-on repo there's a Bluetooth audio device switcher that is functionally similar to what you need; it detects the connection of the BT device (over d-bus) and auto-switches the Kodi audio output from alsa to pulse-audio. It's probably not impossible to extend that or plagiarise the device switching code to work with other devices (USB devices don't generate d-bus events so another method of initiating the switch is required) but if you don't have the developer skills to do that yourself the challenge is always finding a willing volunteer who does.

    Ah well. Thank you anyway.