Bug 304862 - Stop hogging every ALSA and OSS device.
Summary: Stop hogging every ALSA and OSS device.
Status: RESOLVED NOT A BUG
Alias: None
Product: phonon-backend-gstreamer
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.6.2
Platform: unspecified Linux
: NOR major
Target Milestone: 4.7
Assignee: Harald Sitter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-09 15:17 UTC by dE
Modified: 2013-04-13 13:42 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dE 2012-08-09 15:17:56 UTC
Apparently, KDE (maybe phonon) opens all audio devices all the time, resulting in applications giving "Device or resource busy", e.g. -- 

cat /dev/urandom > /dev/dsp
bash: /dev/dsp: Device or resource busy

After modification to the phonon configuration (which device to use) in systemsettings, the problem got partially solved (just after a reboot). After a while (opening a few kde applications, some notification sounds etc...), it again stops working with the above error.

I suggest, KDE should release the device when it's not in use and let other applications use it.

I'm not using a sound server.

Reproducible: Always
Comment 1 Martin Sandsmark 2012-08-21 02:10:13 UTC
phonon-avkode closes the sound output devices when stopped, but this is more of a power-saving issue, but would probably be nice to implement in other backends as well.

for your specific problem it sounds like a configuration issue, phonon shouldn't be able to get exclusive control of the device, I would suggest you look into fixing that first.

and lastly, what backend are you using?
Comment 2 Harald Sitter 2012-08-21 09:08:35 UTC
Actually...
Indeed that sounds like the wrong device is selected, or the config gets corrupted resulting in the reappearing wrong-selection, or something in ALSA's software mixing is broken. So to me that sounds a lot like it has little to do with Phonon, other than knotify4 repeatedly accessing the device which ought not be a problem as long as software mixing works.
Comment 3 dE 2012-08-22 04:15:30 UTC
Currently it's Gstreamer.

But killing knotify4 solves the problem (it respaws and doesn't hog the device for some time).
Comment 4 Harald Sitter 2012-08-22 08:13:22 UTC
Best Trever handles it then.
Comment 5 dE 2012-09-01 07:33:14 UTC
Is this still waitingforinfo?
Comment 6 Myriam Schweingruber 2012-09-02 09:02:09 UTC
No, setting status correctly.
Comment 7 Harald Sitter 2012-11-19 20:57:10 UTC
Phonon enabled debug log please http://techbase.kde.org/Development/Tutorials/Debugging/Phonon
Comment 8 dE 2012-11-26 15:09:07 UTC
This problem is kind of hard to reproduce now.

In the mean time, note -- the application here is not a phonon app. It uses /dev/dsp, i.e. OSS.
Comment 9 Myriam Schweingruber 2013-04-13 13:42:17 UTC
Closing for lack of feedback. Please feel free to reopen if you can reproduce this with phonon-backend-gstreamer version 4.6.3 or later and provide a valid debug log as requested in comment #7