View previous topic :: View next topic |
Author |
Message |
zpon n00b
Joined: 16 Apr 2004 Posts: 51 Location: Denmark
|
Posted: Tue Jun 13, 2006 2:10 pm Post subject: dmix dos not work |
|
|
I have been following this guide http://gentoo-wiki.com/HOWTO_ALSA_Complete_%28includes_dmix%29 but i can still only play one stream at the time, although, when i use aoss in front of the programs there is no problem.
this is what happens when i try to start song number two i mplayer
Code: | [AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy
alsa-init: using device default
alsa-lib: pcm_hw.c:1246:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy
alsa-lib: pcm_dmix.c:862:(snd_pcm_dmix_open) unable to open slave
alsa-init: playback open error: Device or resource busy
/etc/host.conf: line 24: bad command `mdns off'
mcop warning: user defined signal handler found for SIG_PIPE, overriding
[AO ARTS] can't connect to aRts soundserver
[AO ESD] esd_open_sound failed: No child processes
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
alsa-lib: pcm_hw.c:1246:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy
alsa-lib: pcm_dmix.c:862:(snd_pcm_dmix_open) unable to open slave
mcop warning: user defined signal handler found for SIG_PIPE, overriding
[AO SDL] Unable to open audio: No available audio device
AO: [null] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 81.1 (01:21.0) of 295.0 (04:55.0) 0.5% 36%
MPlayer interrupted by signal 2 in module: play_audio
|
this is my ~/.asoundrc
Code: |
# ~/.asoundrc
pcm.dsp0 {
type plug
slave.pcm "dmix" # <-- this line has been altered!
}
# mixer0 can stay unchanged, because it isn't used anyway, I guess ;)
ctl.mixer0 {
type hw
card 0
}
# I also had to add/alter the following, making ALSA use dmix by default
pcm.!default {
type plug
slave.pcm "dmix"
}
|
_________________ //Rock on! |
|
Back to top |
|
|
kest n00b
Joined: 29 May 2006 Posts: 18 Location: Unknown
|
Posted: Tue Jun 13, 2006 5:29 pm Post subject: |
|
|
The way I understand it, you can't just use "dmix" as a slave; you have to have a device of the type dmix. For example, in my /etc/asound.conf (same as ~/.asoundrc but makes the settings system-wide) I have
Code: | pcm.ossmix {
type dmix
ipc_key 1024 # Must be present and "unique" (ie. whatever you want)
slave {
pcm "hw:0,1"
period_time 0
period_size 1024
buffer_size 16384
}
bindings {
0 0
1 1
}
}
pcm.!default {
type plug
slave.pcm "ossmix"
}
pcm.dsp0 {
type plug
slave.pcm "ossmix"
}
ctl.mixer0 {
type hw
card 0
} |
I named my dmix device ossmix and set its slave pcm to be the actual hardware device, yours would probably differ; plus a lot of those settings in ossmix will likely be superfluous, but I needed some of them to make aoss work. Then I made everything else use ossmix as their slave, just as you did with dmix. I don't know if this fixes it for you (I am a n00b after all!) but it's how I got dmix to work. |
|
Back to top |
|
|
zpon n00b
Joined: 16 Apr 2004 Posts: 51 Location: Denmark
|
Posted: Wed Jun 14, 2006 11:15 am Post subject: |
|
|
kest wrote: | The way I understand it, you can't just use "dmix" as a slave; you have to have a device of the type dmix. For example, in my /etc/asound.conf (same as ~/.asoundrc but makes the settings system-wide) I have
Code: | pcm.ossmix {
type dmix
ipc_key 1024 # Must be present and "unique" (ie. whatever you want)
slave {
pcm "hw:0,1"
period_time 0
period_size 1024
buffer_size 16384
}
bindings {
0 0
1 1
}
}
pcm.!default {
type plug
slave.pcm "ossmix"
}
pcm.dsp0 {
type plug
slave.pcm "ossmix"
}
ctl.mixer0 {
type hw
card 0
} |
I named my dmix device ossmix and set its slave pcm to be the actual hardware device, yours would probably differ; plus a lot of those settings in ossmix will likely be superfluous, but I needed some of them to make aoss work. Then I made everything else use ossmix as their slave, just as you did with dmix. I don't know if this fixes it for you (I am a n00b after all!) but it's how I got dmix to work. |
When i use your conf i get this error(s):
Code: | [AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy
alsa-init: using device default
alsa-lib: conf.c:1587:(snd_config_load1) _toplevel_:6:9:Unexpected char
alsa-lib: conf.c:2827:(snd_config_hook_load) /home/zpon/.asoundrc may be old or corrupted: consider to remove or fix it
alsa-lib: conf.c:2691:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
alsa-lib: conf.c:3054:(snd_config_update_r) hooks failed, removing configurationalsa-init: playback open error: Invalid argument
/etc/host.conf: line 24: bad command `mdns off'
mcop warning: user defined signal handler found for SIG_PIPE, overriding
[AO ARTS] can't connect to aRts soundserver
ALSA lib conf.c:1587:(snd_config_load1) _toplevel_:6:9:Unexpected char
ALSA lib conf.c:2827:(snd_config_hook_load) /home/zpon/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:2691:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3054:(snd_config_update_r) hooks failed, removing configuration
[AO ESD] esd_open_sound failed: Connection reset by peer
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
alsa-lib: conf.c:1587:(snd_config_load1) _toplevel_:6:9:Unexpected char
alsa-lib: conf.c:2827:(snd_config_hook_load) /home/zpon/.asoundrc may be old or corrupted: consider to remove or fix it
alsa-lib: conf.c:2691:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
alsa-lib: conf.c:3054:(snd_config_update_r) hooks failed, removing configurationmcop warning: user defined signal handler found for SIG_PIPE, overriding
[AO SDL] Unable to open audio: No available audio device
AO: [null] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 2.2 (02.1) of 217.0 (03:37.0) 1.1% 40%
|
Note this is only happening, when i try to play to streams at the time _________________ //Rock on! |
|
Back to top |
|
|
kest n00b
Joined: 29 May 2006 Posts: 18 Location: Unknown
|
Posted: Wed Jun 14, 2006 11:26 pm Post subject: |
|
|
Quote: | /home/zpon/.asoundrc may be old or corrupted: consider to remove or fix it | Ummm...
Come to think of it, this page does suggest my way is outdated. Works just fine for me in alsa 1.0.11 though, and didn't work out of the box.
Anyway, seems I misunderstood your problem. Forget the config file, use your old one if it works. Your mplayer only seems to use oss, which would be why dmixing only works through aoss. Did you emerge mplayer with alsa support? If so, you could try command line options to make mplayer use alsa directly (see man page for details). Sorry for the mixup. |
|
Back to top |
|
|
zpon n00b
Joined: 16 Apr 2004 Posts: 51 Location: Denmark
|
Posted: Thu Jun 15, 2006 1:24 pm Post subject: |
|
|
Okay, this is what i ended up with
~/.asoundrc
Code: | pcm.nforce-hw {
type hw
card 0
}
pcm.!default {
type plug
slave.pcm "nforce"
}
pcm.nforce {
type dmix
ipc_key 1234
ipc_perm 0660
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 4096
#rate 44100
rate 48000
}
}
ctl.nforce-hw {
type hw
card 0
}
|
This works although my soundcard is an onboard SIS on my ECS L7S7A2
/etc/mplayer.conf
Code: |
[...]
ao=alsa:device=dmix #beforer there was ao=oss
[...]
|
I got a other problem, i cant turn down the music, only full on or nothing
EDIT:
Just changed the ~/.asoundrc to:
Code: | pcm.intel8x0 {
type hw
card 0
}
ctl.intel8x0 {
type hw
card 0
} |
_________________ //Rock on! |
|
Back to top |
|
|
jmbsvicetto Moderator
Joined: 27 Apr 2005 Posts: 4734 Location: Angra do Heroísmo (PT)
|
Posted: Fri Aug 11, 2006 4:18 pm Post subject: |
|
|
Hi.
Anyone still facing the mdns=off error should look at this thread and check the bug report. _________________ Jorge.
Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|