You are not logged in.

#1 2015-06-26 00:34:36

Jack450
Member
From: Los Angeles
Registered: 2010-07-11
Posts: 58

[Solved]Alsa and Dmix

I'm having issues setting up dmix so I can listen to different apps (mocp + steam), I've read the wiki and the Dmix section but it's still a no-go. I've added dmix in to my .asoundrc and asound.conf both seperate and together. It's outputting sound but only to the first application that grabs it first (if I start Steam first I can't hear music from mocp), am I missing a step or I'm just not setting dmix up right?

Last edited by Jack450 (2015-06-27 13:18:34)


Welcome to the Internet!

This isn't Daycare or the Justice System, here you're retarded until proven innocent.

Offline

#2 2015-06-26 06:08:58

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [Solved]Alsa and Dmix

See config in my signature.

How many speakers are you outputting to? Dmix only properly supports stereo - to support more speakers, use e.g. the config in my sig.

mocp needs configuring to use ALSA?

Offline

#3 2015-06-26 14:44:01

Jack450
Member
From: Los Angeles
Registered: 2010-07-11
Posts: 58

Re: [Solved]Alsa and Dmix

It's a HDMI TV through HDMI-DVI adapter, so two built in speakers for output. mocp works through ALSA like I said it just depends on what grabs the device/sound first. I start mocp and I get output though my speakers but if ;

$speaker-test -D plughw:1.9 -c 3

speaker-test 1.0.29

Playback device is plughw:1,9
Stream parameters are 48000Hz, S16_LE, 3 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy

mocp is just an example it can be any player like mplayer, cmus, or mocp but I can't get output simultaneously through player + steam or youtube + steam. I read the ArchWiki section of dmix;

To manually enable dmix, add the following to your ALSA configuration file:

/etc/asound.conf

pcm.dsp {
    type plug
    slave.pcm "dmix"
}

I've added it to my /etc/asound.conf but I still get the same results.


Welcome to the Internet!

This isn't Daycare or the Justice System, here you're retarded until proven innocent.

Offline

#4 2015-06-27 13:17:30

Jack450
Member
From: Los Angeles
Registered: 2010-07-11
Posts: 58

Re: [Solved]Alsa and Dmix

Hey Brebs, thanks for trying to help but I figured it out.


Welcome to the Internet!

This isn't Daycare or the Justice System, here you're retarded until proven innocent.

Offline

#5 2015-06-27 13:46:52

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,744
Website

Re: [Solved]Alsa and Dmix

Offline

#6 2015-06-28 23:02:54

Jack450
Member
From: Los Angeles
Registered: 2010-07-11
Posts: 58

Re: [Solved]Alsa and Dmix

Yeah, sorry, I've been trying to mess with dsnoop now...I did what the wiki suggest and it allowed output through my HDMI TV speaker but not simultaneously from different applicantions. If I played L4D2 I couldn't hear the notifications or either cmus/Steam music player, it didn't matter the order but only one could use the sound device at a time. In Alsa-Project.org in the Asoundrc sections it shows an example on how to use dmix :

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

pcm.dmixer  {
 	type dmix
 	ipc_key 1024
 	slave {
		pcm "hw:1,0"
		period_time 0
		period_size 1024
		buffer_size 4096
		rate 44100
	}
	bindings {
		0 0
		1 1
	}
}

ctl.dmixer {
	type hw
	card 0
}

I changed the "pcm hw:1,0" to the NVidia,9 in /etc/asound.conf which is the one I want to use for output to my HDMI TV and now I can listen to music while on steam. This is just a quick and dirty way of setting up Alsa with dmix


Welcome to the Internet!

This isn't Daycare or the Justice System, here you're retarded until proven innocent.

Offline

#7 2015-06-29 06:16:33

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [Solved]Alsa and Dmix

Should be "card 1", to match "hw:1", I think.

Offline

Board footer

Powered by FluxBB