View previous topic :: View next topic |
Author |
Message |
tactless l33t
Joined: 14 Jul 2002 Posts: 642 Location: Mitzpe Adi, Israel
|
Posted: Sat Jul 31, 2004 10:33 am Post subject: Getting mpd to work with dmix |
|
|
I can get mpd to work with dmix - for listening to music while hearing my incoming messages on gaim (aplay), for example.
ogg123 and aplay - works.
xmms and aplay - works.
mpd (run as a service) and aplay - doesn't work.
Relevant lines from /etc/mpd.conf:
Code: | ao_driver "alsa09"
ao_driver_options "dev=default" |
(default is the same device I use in xmms)
/etc/asound.conf:
Code: | pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
rate 44800
}
}
pcm.dsp0 {
type plug
slave.pcm "dmixer"
}
pcm.!default {
type plug
slave.pcm "dmixer"
}
ctl.mixer0 {
type hw
car 0
} |
_________________ Tactless
"If it wasn't for fog, the world would run at a really crappy framerate."
Jabber: tactless@amessage.info |
|
Back to top |
|
|
Insanity5902 Veteran
Joined: 23 Jan 2004 Posts: 1228 Location: Fort Worth, Texas
|
Posted: Mon Aug 09, 2004 1:28 pm Post subject: |
|
|
I have never had a problem with mpd playing nice with dmix, here are my config for the two. I had to reformat I had a bit of a hard drive problem, all my fault So here they are before I reformated.
/etc/asound.conf Code: | pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
#rate 44100
rate 48000
}
}
pcm.dsp0 {
type plug
slave.pcm "dmixer"
}
pcm.!default {
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
}
|
/etc/mpd.conf Code: | well hell, it looks like my mpd.conf got corrupted |
I will see what I can find for the mpd.conf, I don't think I did anything speical just told it to use the defulat pcm device. _________________ Join the adopt an unanswered post initiative today |
|
Back to top |
|
|
shank n00b
Joined: 21 Mar 2004 Posts: 67
|
Posted: Tue Aug 10, 2004 3:41 am Post subject: Re: Getting mpd to work with dmix |
|
|
I don't think this is a valid sample rate, or at least a typical sample rate.
You prolly either want "44100" or "48000".
I don't know if this would really have anything todo with mpd not working with dmix. But dmix is known to cause problems. |
|
Back to top |
|
|
Sarus n00b
Joined: 21 Aug 2004 Posts: 2
|
Posted: Sat Aug 21, 2004 6:10 pm Post subject: |
|
|
By default a socket opened by dmix is only writable by the user who created it. So if you launch mpd as a service then try to access your soundcard as a regular user.. kaboom !
To fix that, add a 'ipc_perm 666' line to your user's .asoundrc, and make sure the owner of the mpd process (probably root) also have a correct .asoundrc.
That'll make your .asoundrc file look like :
Code: |
pcm.dmixer {
type dmix
ipc_key 1024
ipc_perm 666
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
rate 44800
}
}
pcm.dsp0 {
type plug
slave.pcm "dmixer"
}
pcm.!default {
type plug
slave.pcm "dmixer"
}
ctl.mixer0 {
type hw
car 0
}
|
|
|
Back to top |
|
|
Phreakazoid_ Tux's lil' helper
Joined: 11 Feb 2003 Posts: 76 Location: Sydney, Australia
|
Posted: Mon Jan 03, 2005 1:35 pm Post subject: |
|
|
I have this problem too, but using the ipc_perm option doesn't do anything to help. All that happens is that when something is playing in mpd, I can't play any sounds with my regular user... it hangs until mpd is stopped or paused. After that I can play sounds mixed together with my regular user, but if a sound played by my user is playing and mpd is started, then it hangs until the user's sound has stopped.
Any ideas anyone? |
|
Back to top |
|
|
hiroki Guru
Joined: 29 Jul 2003 Posts: 327 Location: @home in germany
|
Posted: Tue Feb 22, 2005 9:11 pm Post subject: |
|
|
hi!
i have the same problem right now (as i just decided to set up and use dmix).
are there any solutions to this issue? the only apps that don't work with dmix yet are MPD and mpg123 (while mpg321 works well).
any ideas?
i would appreciate any help, case this is annoying, usually i use MPD + glurp to play music
thanks in advance! |
|
Back to top |
|
|
btsht23 n00b
Joined: 25 Aug 2005 Posts: 37
|
Posted: Wed Feb 22, 2006 2:49 pm Post subject: |
|
|
i also have the same problem.
i can hear sounds from gaim when i play sounds with xmms but i cant hear any sound while playing sounds with mpd.
my mpd.conf:
Code: |
ao_driver "alsa09"
ao_driver_options "dev=default"
|
and my /etc/asound.conf:
Code: |
pcm.ossmix {
type dmix
ipc_key 1024 # must be unique!
ipc_perm 666 # sound for everybody (at least in your group)
slave {
pcm "hw:0,0" # you cannot use a "plug" device here, darn.
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192 # dito. It
#format "S32_LE"
#periods 128 # dito.
#rate 8000 # with rate 8000 you *will* hear,
# if ossmix is used :)
}
}
# bindings are cool. This says, that only the first
# two channels are to be used by dmix, which is enough for
# (most) oss apps and also lets multichannel chios work
# much faster:
bindings {
0 0 # from 0 => to 0
1 1 # from 1 => to 1
}
pcm.dsp0 {
type plug
slave.pcm "ossmix" # use our new PCM here
}
pcm.!default {
type plug
slave.pcm "ossmix"
}
# mixer0 like above
ctl.mixer0 {
type hw
card 0
}
|
is there anyone who could help me / us? |
|
Back to top |
|
|
|