You are not logged in.

#1 2011-05-14 18:54:22

Dartoms
Member
Registered: 2011-05-03
Posts: 13

[Solved] Problem with MPD & Alsa (dmix)

EDIT 15/08/2011 : problem solved by the solution proposed by Arathis at the end of the topic !

Hello,

I've got a problem with MPD : when MPD is playing sound, I can't play any other sound with an other source (vlc, youtube...).
Then when I pause MPD, the other source manages to make sound but after MPD can't continue playing...

I read the wiki and added this to my /etc/mpd.conf :

audio_output {
        type                    "alsa"
        name                    "Sound Card"
        options                 "dev=dmixer"
        device                  "plug:dmix"
}

But it didn't solve my problem...

Here is the error in mpd.log :

May 14 20:28 : config: option 'options' on line 120 was not recognized
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
May 14 20:28 : output: Failed to open "Sound Card" [alsa]: Failed to open ALSA device "plug:dmix": Device or resource busy

I attach you my /etc/asound.conf :
(gnome3 installed pulseaudio but I came back to alsa because all was working before with alsa)

pcm.dmixer { 
    type dmix 
    ipc_key 1024
    ipc_key_add_uid false
    ipc_perm 0666            # mixing for all users
    slave { 
        pcm "hw:0,0" 
        period_time 0 
        period_size 1024 
        buffer_size 8192
        rate 44100
    }
    bindings { 
        0 0 
        1 1 
    } 
} 

pcm.dsp0 { 
    type plug 
    slave.pcm "dmixer" 
} 

pcm.!default { 
    type plug 
    slave.pcm "dmixer" 
} 

pcm.default { 
   type plug 
   slave.pcm "dmixer" 
} 

ctl.mixer0 { 
    type hw 
    card 0 
}

Thank you for your help.

Last edited by Dartoms (2011-08-15 13:05:05)


Arch 64 + XFCE

Offline

#2 2011-05-15 08:21:52

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: [Solved] Problem with MPD & Alsa (dmix)

Did you install alsa-plugins?

Offline

#3 2011-05-15 10:57:20

Dartoms
Member
Registered: 2011-05-03
Posts: 13

Re: [Solved] Problem with MPD & Alsa (dmix)

Yes alsa-plugins is installed.


Arch 64 + XFCE

Offline

#4 2011-05-19 00:40:17

manzdagratiano
Member
From: New Jersey, USA
Registered: 2010-10-08
Posts: 137

Re: [Solved] Problem with MPD & Alsa (dmix)

Set in your .mpdconf file:

mixer_type    "software"

and also use pulseaudio by default:

audio_output {
          type  "Pulse"
          name "pulseaudio"
}

Aside from these nothing needs to be changed - leave asound.conf the way it was. Since you have Gnome 3, this solution should work for you, since it works for me.


Be formless, shapeless... like water. Now you put water into a cup, it becomes the cup; you put water into a bottle it becomes the bottle; if you put it in a teapot it becomes the teapot... Now water can flow, or it can crash... Be water my friend

Offline

#5 2011-05-29 20:13:48

Dartoms
Member
Registered: 2011-05-03
Posts: 13

Re: [Solved] Problem with MPD & Alsa (dmix)

Sorry for my late answer, I was away.

I'm not running Gnome3 but XFCE.
I even tried the solution you proposed but it didn't solve my problem...

I really don't understand this problem...


Arch 64 + XFCE

Offline

#6 2011-07-16 16:05:52

Arathis
Member
Registered: 2009-12-28
Posts: 26

Re: [Solved] Problem with MPD & Alsa (dmix)

Hi,
I had the same error these days with mpd. Solved it similar to manzdagratiano's suggestion:

/etc/mpd.conf:

audio_output {
    type        "alsa"
    name        "doerks ALSA Device"
#    device        "hw:0,0"    # optional
#    format        "44100:16:2"    # optional
    mixer_type      "software"    # optional
    mixer_device    "default"    # optional
    mixer_control    "PCM"        # optional
#    mixer_index    "0"        # optional
}

Changing mixer_type to software did the thing. It was on hardware before.
I'm using Xfce with ALSA only, no pulseaudio. And I don't have any ~/.asoundrc and my /etc/asound.conf is empty. Simple reason: ALSA configures almost everything automatically if run as a daemon these days, so no need for any of these files actually.

Oh and MPD too does find the ALSA device automtically, which is why I only added the config lines needed and let the other commented.

Last edited by Arathis (2011-07-16 16:07:44)

Offline

#7 2011-08-15 13:03:50

Dartoms
Member
Registered: 2011-05-03
Posts: 13

Re: [Solved] Problem with MPD & Alsa (dmix)

Hi,
Sorry my late answer but I was on vacation...

Thanks a lot Arathis ! smile
Your solution solved my problem, it's working again !


Arch 64 + XFCE

Offline

#8 2014-09-11 07:06:38

Tofeeq
Member
Registered: 2014-09-01
Posts: 24

Re: [Solved] Problem with MPD & Alsa (dmix)

Solved my problem by following this link

-- url redacted - Trilby --

Last edited by Trilby (2014-09-11 13:37:21)

Offline

Board footer

Powered by FluxBB