MPD
MPD copied to clipboard
(Reopen) "always_on" not working for ALSA devices
I'm not sure if #1599 gets attention since it is closed but the always_on
option currently doesn't work for ALSA. I have described in the last post of the issue that simple change in the code makes it work. Is it intended that ALSA doesn't support always_on
? From my experience everything works perfectly well with the above mentioned code change.
Yes, correct "always_on"does not work, reports as "closed". If this cannot cannot be controlled from within mpd it would preferable to remove the option.
Yes, in the way the code is compiled right now it does not work. But as explained in the linked issue, by modifying AlsaOutput::Pause()
to return true
, everything works great, as far as my tests have gone. So my question is why don't we simply change the return value of the method and make always_on
work with ALSA? Is there something I'm overlooking? Maybe something that will break down in this way, something that I haven't covered in my tests?
If you simply return "true", always_on "no" (or having it not defined at all) would not work, it would be "on" in any case, no? Or have I misunderstood this?
Please disregard my last comment. Just tried it and yes, this makes it work as expected.
Well, no. It keeps the output open but consumes 100% cpu when stopped. With always_on "no" it behaves normal. It´s probably not a good idea at all at least not for an USB audio device.
Hm, you are right. Since I use the device only for audio player I haven't noticed the high cpu. I'll try to look through the code if I can spot something. Most certainly the high cpu comes from some code that keeps looping as fast as the cpu allows.