View previous topic :: View next topic |
Author |
Message |
Skotlex Guru

Joined: 13 Mar 2004 Posts: 313
|
Posted: Tue Jun 17, 2025 3:23 am Post subject: mpd configuration to share soundcard under ALSA? |
|
|
The Gentoo documentation for ALSA explains how to allow sound from multiple simultanous apps.
The Gentoo documentation for MPD doesn't.
I have the issue that nothing else can play sounds while MPD is playing. When MPD is stopped, I can have simultanous distinct sound courses (eg: mpv + http streaming).
My relevant section in the mpd.conf file is (got the information from here):
Code: |
audio_output {
type "alsa"
name "Speakers"
options "dev=dmixer"
device "plug:dmixer"
mixer_type "software"
}
|
And, asound.conf:
Code: |
pcm.dmixer {
type dmix
ipc_key 96
ipc_key_add_uid true
slave {
pcm "hw:1,0"
#To check supported sampling rates:
# arecord --dump-hw-params
rate 96000
}
}
pcm.!default {
type plug
slave.pcm "dmixer"
}
defaults.ctl.card 1
|
Thanks in advance for any hints. |
|
Back to top |
|
 |
nicop Tux's lil' helper

Joined: 10 Apr 2014 Posts: 126
|
Posted: Wed Jun 18, 2025 6:03 am Post subject: |
|
|
If your login-user is different from your mpd-user, you need to allow sharing between users.
Could you test with that ?:
Quote: | pcm.dmixer {
type dmix
ipc_key 96
ipc_key_add_uid false
ipc_perm 0660
slave {
pcm "hw:1,0"
#To check supported sampling rates:
# arecord --dump-hw-params
rate 96000
}
} |
|
|
Back to top |
|
 |
szatox Advocate

Joined: 27 Aug 2013 Posts: 3682
|
Posted: Wed Jun 25, 2025 3:29 pm Post subject: |
|
|
In case of pure ALSA mpd should "Just work"™ as long as mpd runs with audio group talks to dmix rather than the underlying hardware directly.
In fact, your ALSA configuration should already be routing all clients through dmix by default. One thing that tends to go wrong is that modern computers usually have several audio devices and alsa might want to use a wrong hardware for playback (resulting in no sound at all).
If setting group and dmix doesn't work for you, you'll need to provide more details about your setup and how it fails. _________________ Make Computing Fun Again |
|
Back to top |
|
 |
|