* How to apply rate conversion in asound.conf
@ 2013-11-06 15:02 Dolevo Jay
2013-11-06 16:30 ` Clemens Ladisch
0 siblings, 1 reply; 5+ messages in thread
From: Dolevo Jay @ 2013-11-06 15:02 UTC (permalink / raw)
To: alsa-devel@alsa-project.org
Hi experts,
I am currently using the following asound.conf, which is pretty much
copy-paste from the link below.
asound.conf
-------------------------------------
pcm.!default {
type plug
slave.pcm multi
}
pcm.multi {
type multi;
slaves.a.pcm "hw:0,1";
slaves.a.channels 2;
slaves.b.pcm "hw:1,1";
slaves.b.channels 2;
bindings.0.slave a;
bindings.0.channel 0;
bindings.1.slave a;
bindings.1.channel 1;
bindings.2.slave b;
bindings.2.channel 0;
bindings.3.slave b;
bindings.3.channel 1;
}
-------------------------------------
http://www.alsa-project.org/main/index.php/Asoundrc#Virtual_multi_channel_devices
-------------------------------------
My purpose is to apply rate conversion to the "hw:1,1" and have 44100 rate
out. There is a sample conversion like:
pcm.rate_convert {
type rate
slave sl2
}
but how can I attach this rate_convert code to the multi code?
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to apply rate conversion in asound.conf
2013-11-06 15:02 How to apply rate conversion in asound.conf Dolevo Jay
@ 2013-11-06 16:30 ` Clemens Ladisch
[not found] ` <DUB122-W390A38324ACF50DA28405BAAF20@phx.gbl>
0 siblings, 1 reply; 5+ messages in thread
From: Clemens Ladisch @ 2013-11-06 16:30 UTC (permalink / raw)
To: Dolevo Jay, alsa-devel@alsa-project.org
Dolevo Jay wrote:
> pcm.!default {
> type plug
> slave.pcm multi
> }
>
> pcm.multi {
> slaves.a.pcm "hw:0,1";
> slaves.b.pcm "hw:1,1";
> ...
>
> My purpose is to apply rate conversion to the "hw:1,1" and have 44100 rate
> out.
All slaves must use the same rate.
The easiest way is apply this to the plug plugin:
pcm.!default {
type plug
slave {
pcm multi
rate 44100
}
}
Regards,
Clemens
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to apply rate conversion in asound.conf
[not found] ` <DUB122-W390A38324ACF50DA28405BAAF20@phx.gbl>
@ 2013-11-08 14:15 ` Dolevo Jay
2013-11-12 9:02 ` Dolevo Jay
2013-11-12 10:00 ` Clemens Ladisch
0 siblings, 2 replies; 5+ messages in thread
From: Dolevo Jay @ 2013-11-08 14:15 UTC (permalink / raw)
To: alsa-devel@alsa-project.org
> Date: Wed, 6 Nov 2013 17:30:25 +0100
> From: clemens@ladisch.de
> To: cmst@live.com; alsa-devel@alsa-project.org
> Subject: Re: [alsa-devel] How to apply rate conversion in asound.conf
>
> Dolevo Jay wrote:
> > pcm.!default {
> > type plug
> > slave.pcm multi
> > }
> >
> > pcm.multi {
> > slaves.a.pcm "hw:0,1";
> > slaves.b.pcm "hw:1,1";
> > ...
> >
> > My purpose is to apply rate conversion to the "hw:1,1" and have 44100 rate
> > out.
>
> All slaves must use the same rate.
>
> The easiest way is apply this to the plug plugin:
>
> pcm.!default {
> type plug
> slave {
> pcm multi
> rate 44100
> }
> }
>
>
> Regards,
> Clemens
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Hi,
What you suggested worked perfect but I implemented the rate conversion in my software for some specific reasons.
What I need to do now is to have a aosund.conf which has dmix into multi plugins together.
So, here is my multi configuration:
--------------------------------
pcm.!default {
type plug
slave.pcm multi
}
pcm.multi {
type multi;
slaves.a.pcm "hw:0,1";
slaves.a.channels 2;
slaves.b.pcm "hw:1,1";
slaves.b.channels 2;
bindings.0.slave a;
bindings.0.channel 0;
bindings.1.slave a;
bindings.1.channel 1;
bindings.2.slave b;
bindings.2.channel 0;
bindings.3.slave b;
bindings.3.channel 1;
}
--------------------------------
The following dmix runs ok for 1,1 hardware:
--------------------------------
pcm.dmixer {
type dmix
ipc_key 2048
slave {
pcm "hw:1,1"
}
bindings {
0 0
1 1
}
}
pcm.!default {
type plug
slave.pcm dmixer
}
--------------------------------
Could you please tell me how I can implement the second configuration with dmixer into the first one which has multi.
So, basically how can I call a plugin inside of another plugin?
Thanks a lot.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to apply rate conversion in asound.conf
2013-11-08 14:15 ` Dolevo Jay
@ 2013-11-12 9:02 ` Dolevo Jay
2013-11-12 10:00 ` Clemens Ladisch
1 sibling, 0 replies; 5+ messages in thread
From: Dolevo Jay @ 2013-11-12 9:02 UTC (permalink / raw)
To: alsa-devel@alsa-project.org
> From: cmst@live.com
> To: alsa-devel@alsa-project.org
> Date: Fri, 8 Nov 2013 14:15:30 +0000
> Subject: Re: [alsa-devel] How to apply rate conversion in asound.conf
>
>
>
>
>
> > Date: Wed, 6 Nov 2013 17:30:25 +0100
> > From: clemens@ladisch.de
> > To: cmst@live.com; alsa-devel@alsa-project.org
> > Subject: Re: [alsa-devel] How to apply rate conversion in asound.conf
> >
> > Dolevo Jay wrote:
> > > pcm.!default {
> > > type plug
> > > slave.pcm multi
> > > }
> > >
> > > pcm.multi {
> > > slaves.a.pcm "hw:0,1";
> > > slaves.b.pcm "hw:1,1";
> > > ...
> > >
> > > My purpose is to apply rate conversion to the "hw:1,1" and have 44100 rate
> > > out.
> >
> > All slaves must use the same rate.
> >
> > The easiest way is apply this to the plug plugin:
> >
> > pcm.!default {
> > type plug
> > slave {
> > pcm multi
> > rate 44100
> > }
> > }
> >
> >
> > Regards,
> > Clemens
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@alsa-project.org
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
> Hi,
>
> What you suggested worked perfect but I implemented the rate conversion in my software for some specific reasons.
> What I need to do now is to have a aosund.conf which has dmix into multi plugins together.
> So, here is my multi configuration:
> --------------------------------
> pcm.!default {
> type plug
> slave.pcm multi
> }
>
> pcm.multi {
> type multi;
> slaves.a.pcm "hw:0,1";
> slaves.a.channels 2;
> slaves.b.pcm "hw:1,1";
> slaves.b.channels 2;
>
> bindings.0.slave a;
> bindings.0.channel 0;
> bindings.1.slave a;
> bindings.1.channel 1;
> bindings.2.slave b;
> bindings.2.channel 0;
> bindings.3.slave b;
> bindings.3.channel 1;
> }
>
> --------------------------------
> The following dmix runs ok for 1,1 hardware:
> --------------------------------
> pcm.dmixer {
> type dmix
> ipc_key 2048
> slave {
> pcm "hw:1,1"
> }
> bindings {
> 0 0
> 1 1
> }
> }
>
> pcm.!default {
> type plug
> slave.pcm dmixer
> }
> --------------------------------
>
> Could you please tell me how I can implement the second configuration with dmixer into the first one which has multi.
> So, basically how can I call a plugin inside of another plugin?
>
> Thanks a lot.
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Hello,
I'd appreciate if someone could tell me even this is possible or not?
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to apply rate conversion in asound.conf
2013-11-08 14:15 ` Dolevo Jay
2013-11-12 9:02 ` Dolevo Jay
@ 2013-11-12 10:00 ` Clemens Ladisch
1 sibling, 0 replies; 5+ messages in thread
From: Clemens Ladisch @ 2013-11-12 10:00 UTC (permalink / raw)
To: alsa-devel
Dolevo Jay wrote:
> how can I call a plugin inside of another plugin?
The slave PCM name is the name of some pcm.xxx device.
> What I need to do now is to have a aosund.conf which has dmix into multi plugins together.
pcm.!default {
type plug
slave.pcm multi
}
pcm.multi {
type multi
slaves {
a { pcm "hw:0,1" channels 2 }
b { pcm "dmixer" channels 2 }
}
bindings [
{ slave a channel 0 }
{ slave a channel 1 }
{ slave b channel 0 }
{ slave b channel 1 }
]
}
pcm.dmixer {
type dmix
...
}
But you need another dmix device for hw:0,1.
Regards,
Clemens
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-11-12 10:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 15:02 How to apply rate conversion in asound.conf Dolevo Jay
2013-11-06 16:30 ` Clemens Ladisch
[not found] ` <DUB122-W390A38324ACF50DA28405BAAF20@phx.gbl>
2013-11-08 14:15 ` Dolevo Jay
2013-11-12 9:02 ` Dolevo Jay
2013-11-12 10:00 ` Clemens Ladisch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.