[Bug 886058] New: mpd ERROR: problems opening audio device
https://bugzilla.novell.com/show_bug.cgi?id=886058 https://bugzilla.novell.com/show_bug.cgi?id=886058#c0 Summary: mpd ERROR: problems opening audio device Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Sound AssignedTo: tiwai@suse.com ReportedBy: jmatejka@suse.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- running `mpc play` on mpd with default config results in ERROR: problems opening audio device -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c1
--- Comment #1 from Jan Matějka
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c2
Takashi Iwai
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c3
Jan Matějka
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c4
--- Comment #4 from Jan Matějka
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c5
--- Comment #5 from Jan Matějka
Can you play like % aplay -Dhw:0,0 -vv somefile.wav
yac@linux-1e2q.dhcp.scz.suse.com % aplay -Dhw:0,0 -vv ./lib64/libreoffice/share/gallery/sounds/cow.wav aplay: main:722: audio open error: No such file or directory yac@linux-1e2q.dhcp.scz.suse.com % id uid=1000(yac) gid=100(users) groups=100(users) test@linux-1e2q:/usr> id uid=1001(test) gid=100(users) groups=100(users),17(audio) test@linux-1e2q:/usr> aplay -Dhw:0,0 -vv ./lib64/libreoffice/share/gallery/sounds/cow.wav aplay: main:722: audio open error: No such file or directory -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c6
--- Comment #6 from Takashi Iwai
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c7
--- Comment #7 from Jan Matějka
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c8
--- Comment #8 from Takashi Iwai
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c9
--- Comment #9 from Jan Matějka
As I mentioned, PA accesses the sound device exclusively.
So? There must be a way to make the mpd connect to other PA
Basically mpd is designed to be exclusive.
Not really. You can configure it to use different audio outputs
If you want to mix the output from mpd with others, it must be configured specially, no matter whether you use PA or not.
False. If you use alsa with dmix (which is now default on distributions using alsa) then you don't need to configure anything to mix it with anything else. I tried giving appropriate permissions to /var/run/user/<my-uid>/pulse and then symlink the mpd there but it ends up starting new pulseaudio anyway. I have to get back to this later. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c10
--- Comment #10 from Takashi Iwai
(In reply to comment #8)
As I mentioned, PA accesses the sound device exclusively.
So? There must be a way to make the mpd connect to other PA
So? Such a thing is a special setup we won't take it as default.
Basically mpd is designed to be exclusive.
Not really. You can configure it to use different audio outputs
Well, I meant "exclusive" as a different meaning. Nevertheless...
If you want to mix the output from mpd with others, it must be configured specially, no matter whether you use PA or not.
False. If you use alsa with dmix (which is now default on distributions using alsa) then you don't need to configure anything to mix it with anything else.
Huh? You wrote that mpd uses hw:0,0 as default. Is it already a false information? (BTW, you don't need to explain about dmix; I'm one of the authors of ALSA core stuff :)
I tried giving appropriate permissions to /var/run/user/<my-uid>/pulse and then symlink the mpd there but it ends up starting new pulseaudio anyway.
I have to get back to this later.
It doesn't work in such a way, unfortunately. Sharing the sounds among different users is usually supported by the "system mode" of PA, i.e. starting it as a daemon. But, it's known that the system mode doesn't cope with some things on desktop usages (and might be buggy in some aspects, as it's been little used). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c11
--- Comment #11 from Takashi Iwai
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c12
--- Comment #12 from Jan Matějka
(In reply to comment #9)
(In reply to comment #8)
As I mentioned, PA accesses the sound device exclusively.
So? There must be a way to make the mpd connect to other PA
So? Such a thing is a special setup we won't take it as default.
Is it? I don't know. If there is sufficiently reasonable way to make it connect to PA properly automatically (like just modifying the default config and maybe fiddle with some permissions unless it's unsafe), we should do it.
If you want to mix the output from mpd with others, it must be configured specially, no matter whether you use PA or not.
False. If you use alsa with dmix (which is now default on distributions using alsa) then you don't need to configure anything to mix it with anything else.
Huh? You wrote that mpd uses hw:0,0 as default. Is it already a false information?
I didn't say that explicitly but comment #3 suggests I reconfigured it to PA.
(BTW, you don't need to explain about dmix; I'm one of the authors of ALSA core stuff :)
ok, cool.
I tried giving appropriate permissions to /var/run/user/<my-uid>/pulse and then symlink the mpd there but it ends up starting new pulseaudio anyway.
I have to get back to this later.
It doesn't work in such a way, unfortunately.
Sharing the sounds among different users is usually supported by the "system mode" of PA, i.e. starting it as a daemon. But, it's known that the system mode doesn't cope with some things on desktop usages (and might be buggy in some aspects, as it's been little used).
I have seen such warning somewhere. (In reply to comment #11)
Thinking of PA setup problem again, maybe the easiest option would be to use the network access of PA. You can allow PA to listen to the network socket (use papref program or such), and specify mpd configuration to the PA server ("localhost" should work in this case).
I failed setting this up so far.
Or, an alternative solution would be to start mpd as a normal user (your account) instead of the dedicated user.
I'd like to avoid this one. I don't yet know how the communication with pulseaudio works exactly but given that the run/ files are created in run/user/<uid>/... and PA seems to be spawned on demand this doesn't seem to be the to the default behavior, so I think we are left with two possibilities: 1. the network module. Since it should be able to be limited to loopback it think it should be a viable default config. 2. eliminating problems with system mode PA and making it default. I guess this could help with multiuser systems as well? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c13
--- Comment #13 from Takashi Iwai
(In reply to comment #10)
(In reply to comment #9)
(In reply to comment #8)
As I mentioned, PA accesses the sound device exclusively.
So? There must be a way to make the mpd connect to other PA
So? Such a thing is a special setup we won't take it as default.
Is it? I don't know. If there is sufficiently reasonable way to make it connect to PA properly automatically (like just modifying the default config and maybe fiddle with some permissions unless it's unsafe), we should do it.
It really depends on how to use it. There are several scenarios. IMO, running mpd as a normal user would be the best choice from the device management POV. Allowing the network access is always a security risk, and it's not what the upstream sets. We don't want to change it just because of MPD (especially if there is another way). (snip)
I don't yet know how the communication with pulseaudio works exactly but given that the run/ files are created in run/user/<uid>/... and PA seems to be spawned on demand this doesn't seem to be the to the default behavior, so I think we are left with two possibilities:
1. the network module. Since it should be able to be limited to loopback it think it should be a viable default config.
No, not as default, unless the upstream changes the policy. If you want to take it as default, please convince the PA upstream first.
2. eliminating problems with system mode PA and making it default. I guess this could help with multiuser systems as well?
Very unlikyl. Per user usage is chosen intentionally. For multi-user systems, you want to rather restrict the access from other users while you're using the desktop. The audio access is private, basically. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c14
Takashi Iwai
https://bugzilla.novell.com/show_bug.cgi?id=886058
https://bugzilla.novell.com/show_bug.cgi?id=886058#c15
--- Comment #15 from Jan Matějka
http://bugzilla.novell.com/show_bug.cgi?id=886058
Takashi Iwai
participants (1)
-
bugzilla_noreply@novell.com