v17 Audio devices list not updating in real time (17.6 from Ubuntu 18.04)
#1
Hello everyone

For past 2 years I was using OpenELEC with Kodi 16 on RPi.
During the day I was using AVR/HDMI sound, and at night, I would connect USB headphones.
The switching between them was seamless. On rare occasion I would need to select correct Audio output device in settings.

Now I'm trying to setup real HTPC using Ubuntu 18.04 with Kodi 17.6 from package in standalone mode.

The thing is - an audio output devices list seems to be generated once during Kodi startup, and not updated on the fly, when something changes (USB soundcard plug/unplug).
Tried using both Pluse and ALSA - same behavior.

Is this by design, and OpenELEC build has some special patches to allow automatic list update during run-time?
Or maybe this a problem with Pulse/Alsa/Ubuntu?


Michal
Reply
#2
pulse should handle this, but might need some config that isn't there by default without a desktop
Reply
#3
Well, I just checked - same behavior with kodi lanuched from normal desktop - need to relanuch Kodi to see new audio devices on the list.

Before I start ripping it all apart and dive into pulse configuration - wanted to confirm that this is not designed behavior (for example related to new AE in V17 vs V16)
Reply
#4
I listen to changes of the sink: https://github.com/xbmc/xbmc/blob/master...E.cpp#L236 Please post a Debug Log that should "recognize" such change, please.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
And I don't get a single event without having changed this code for a very long time :-) Let's find out if it's an ubuntu regression.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#6
Fixed it: https://github.com/xbmc/xbmc/pull/14133 will push when it's build. Funny: I broke it more than 1.5 4 years ago :-) (Will be in tomorrow's nightly -> Leia v18)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#7
Reporting

1) After installing nightly: pulse hot plug is working - thanks. Any chance of backport for stable 17.6? I wonder how nobody noticed it for 4 years... Also it must have been fixed in OpenELEC builds, as I said in first post.
2) Problem with hotplug in ALSA mode persists:

Kodi launched with (from Wiki):
Code:
pasuspender -- env KODI_AE_SINK=ALSA kodi --standalone

Debug log:
http://paste.ubuntu.com/p/8cYTpmB379/

Behavior:
During session i plugged and unplugged USB audio device (Motorola D200) few times. No changes on audio devices list.

Bonus fact:
If I kill pulseaudio daemon completely (not easy without uninstalling), and start Kodi without pasuspender, then ALSA hot plug works as intended.
Reply
#8
Perfect - everything works as intended. For hackarounds fooling your pulseaudio daemon with pasuspender just for kodi to run ALSA I cannot support you. If you don't need pulseaudio, uninstall it.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
Well if this is not officially supported - fair enough.

What about backport?
Can this fix be patched directly to 17.6 source and just compiled?
Reply
#10
Yes, just cherry-pick it.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply

Logout Mark Read Team Forum Stats Members Help
Audio devices list not updating in real time (17.6 from Ubuntu 18.04)0