LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-06-2005, 02:30 PM   #1
Vookimedlo
Member
 
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Rep: Reputation: 34
Alsa: dmix and surround routing


Hi,

I have now these entries in my asoundrc

Code:
pcm.ca0106 {
 type hw
 card 0
}

ctl.ca0106 {
 type hw
 card 0
}

ctl.!default {
	type hw           
	card 0
}

pcm.!default {
	type hw           
	card 0
}

pcm.!default {
        type plug
        slave.pcm "dout"
    }
 
pcm.dout {
    type dmix
    ipc_key 1025
    slave {
        pcm "hw:0"
        period_time 0
        period_size 1024
        buffer_size 4096
        rate 44100
    }
}

ctl.dout {
type hw
card 0
}

pcm.duplicate {
type plug
slave.pcm "surround51"
slave.channels 6
route_policy duplicate
}
The last PCM "duplicate" is used for copying 2 channels stereo to 5.1 reproductors (Used in XMMS). I'd like to know if it's possible to join DMIX plugin with PCM.duplicate.



Thanks in advance.
 
Old 04-08-2005, 12:51 AM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
it may be possible ? but i'm just guessing and have never done it so this just an idea most likely a bad/stupid one

there is an operator "+" that you use like you have "!" to override default with the new settings
"+" merges or adds new settings to a device that exists already

so i would try at the bottom of the file
Code:
 
pcm.+duplicate {
        type plug
        slave.pcm "dout"
    }
it's worth a try anyway

rdit: that's not going to work is it because "dout" is hw0 and not surround51

Last edited by foo_bar_foo; 04-08-2005 at 01:22 AM.
 
Old 04-08-2005, 01:19 AM   #3
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
i came up with this as well most likely as useless as the first one but better
Code:
pcm.+duplicate {
    type dmix
    ipc_key 1025
    slave {
        pcm "surround51"
        period_time 0
        period_size 1024
        buffer_size 4096
        rate 44100
    }
}
or just
Code:
pcm.+duplicate {
    type dmix
    ipc_key 1025
    slave {
        pcm ...
        period_time 0
        period_size 1024
        buffer_size 4096
        rate 44100
    }
}
 
Old 04-08-2005, 02:06 AM   #4
Vookimedlo
Member
 
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Original Poster
Rep: Reputation: 34
Hi,
I tried it, but I wasn't successful.

Quote:
pcm.+duplicate {
type plug
slave.pcm "dout"
}
I get this error

Code:
ALSA lib pcm_params.c:2096:(snd_pcm_hw_refine_slave) Slave PCM not usable
aplay: set_params:835: Broken configuration for this PCM: no configurations available
and for this

Quote:
pcm.+duplicate {
type dmix
ipc_key 1025
slave {
pcm "surround51"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
}

I get this error

Code:
ALSA lib pcm_dmix.c:873:(snd_pcm_dmix_open) dmix plugin can be only connected to hw plugin
aplay: main:508: audio open error: Invalid argument

Maybe it's not possible join these plugins together, but I thank you anyway for you replay.
 
Old 05-04-2005, 03:04 PM   #5
BeeRockxs
LQ Newbie
 
Registered: May 2005
Posts: 1

Rep: Reputation: 0
I got it to work using this .asoundrc:
Code:
pcm.dmixs51 {
  type dmix
  ipc_key 1024
  slave {
    pcm "hw:0,1"
    rate 48000
    channels 6
    period_time 0
    period_size 1024
    buffer_time 0
    buffer_size 4096
  }
}
pcm.!default {
  type plug
  slave.pcm "dmixs51"
}
pcm.duplicate {
  type plug
  slave.pcm "dmixs51"
  slave.channels 6
  route_policy duplicate
}
You may need to change the 'pcm "hw:0,1"'line to 'pcm "hw:0,0"', I have to do it like that because of a certain quirkiness of my soundcard (CMI8378).
Using this, I get MP3s in XMMS on all my boxes and can watch a DVD in 5.1 in xine at the same time. just needed to change the 5.1 output device in xine to default instead of surround51.
 
Old 05-05-2005, 12:12 PM   #6
Vookimedlo
Member
 
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Original Poster
Rep: Reputation: 34
Thanks BeeRockxs,
it looks promisingly. I'll try it as soon as possible.
 
Old 05-06-2005, 02:56 PM   #7
Vookimedlo
Member
 
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Original Poster
Rep: Reputation: 34
hmmmm, I tried it and it doesn't work for me.


Code:
[test@iguana ~]$ aplay -D duplicate test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
ALSA lib pcm_params.c:2148:(snd_pcm_hw_refine_slave) Slave PCM not usable
aplay: set_params:835: Broken configuration for this PCM: no configurations available
Any suggestions?
 
Old 07-14-2006, 06:58 AM   #8
mutrix
LQ Newbie
 
Registered: Jul 2006
Posts: 1

Rep: Reputation: 0
I know this thread is very old but I have the same Problem like Vookimedlo.
Could anyone help?

mutrix.
 
Old 08-29-2010, 12:32 PM   #9
raven17a
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Rep: Reputation: 0
Tutorial how to solve this problem (dmix +surround 5.1 works perfectly):
http://newinubuntu.blogspot.com/2010...chipsetem.html
 
Old 08-29-2010, 12:39 PM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

It's not very advisable to reopen such old threads (last post July 2006) since most likely the OP has already solved the problem or moved on. Also if you mention another site as reference (your blog) make sure it's in English. I just looked and didn't find any other language beside Polish (which I don't understand). Or didn't I look hard enough and did you hide an English version of your blog?

Kind regards,

Eric
 
Old 08-30-2010, 01:05 AM   #11
raven17a
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Rep: Reputation: 0
I reopen that thread because so many people have problem with ca0106 cards and I don't find solution until now. And yes, site is in Polish, but only what you have to do is write in terminal:

gedit /home/yr_usr_name/.asoundrc

and paste the text in the border from that blog.
 
Old 08-30-2010, 01:14 AM   #12
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Seems fair to me. If it's not too much to ask, could you post the solution and how to do it here in this thread and then send a mail to the OP and ask him to mark the thread as solved? That way other users will find it faster with the solution included.

Kind regards,

Eric
 
Old 09-07-2010, 08:28 AM   #13
raven17a
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Rep: Reputation: 0
There was a bug in my solution
Now it works fine (and there is a instruction for english users). Sorry for my mistake.
http://newinubuntu.blogspot.com/2010...chipsetem.html
 
Old 09-07-2010, 12:46 PM   #14
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Quote:
Originally Posted by raven17a View Post
There was a bug in my solution
Now it works fine (and there is a instruction for english users). Sorry for my mistake.
http://newinubuntu.blogspot.com/2010...chipsetem.html
Hi,

No problem whatsoever Mistakes are only human, happen to all of us and the lucky ones learn from them. Thanks for sharing your solution.

Kind regards,

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ALSA dmix: Permission Denied Davidian1024 Linux - Software 0 10-09-2005 12:48 PM
alsa dmix in ubuntu compujas Linux - General 2 08-17-2005 08:54 AM
Alsa with Dmix -- Horrible stuttering Adrohak Linux - Software 0 07-25-2005 06:01 PM
ALSA dmix + Skype = no go zenith_zth Linux - Hardware 0 06-12-2005 04:38 PM
alsa and dmix for software mixing darkleaf Linux - Software 6 04-02-2005 02:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration