Discussion:
[Alsa-user] rate coverter after dmix
remu kelly
2017-05-09 14:11:57 UTC
Permalink
Hi,

I need to implement a rate converter after dmix, means dmix will mix 3
channels as input, and the output will be of 48KHz, but then i need to
convert it to 96KHz output and send to HW.
How this can be achieved, seeing that we can't have a plugin after dmix.

or we can do somethings like below:-

pcm.sl1{
type hw
card 0
device 0
}

pcm_slave.sl2 {
pcm sl1
rate 96000
}

pcm.mix1{
type dmix
ipc_key 1024
slave sl2
}

pcm_slave.sl3{
pcm mix1
}

pcm.play{
type plug
slave sl3
rate_converter "myconverter"
}

here rate converter "myconverter" will be specific to my audio HW.

is the above config allowed?


Regards
Clemens Ladisch
2017-05-09 14:17:38 UTC
Permalink
Post by remu kelly
I need to implement a rate converter after dmix, means dmix will mix 3
channels as input, and the output will be of 48KHz, but then i need to
convert it to 96KHz output and send to HW.
Why do you think you need to do this?
Post by remu kelly
pcm.sl1{
type hw
card 0
device 0
}
pcm_slave.sl2 {
pcm sl1
rate 96000
}
This says that the the hardware device must run at 96 kHz.
Post by remu kelly
pcm.mix1 {
type dmix
ipc_key 1024
slave sl2
}
Because of the above, the dmix plugin also runs at 96 kHz.

Why don't you want this?


Regards,
Clemens
James Shatto
2017-05-10 20:54:30 UTC
Permalink
Post by remu kelly
How this can be achieved, seeing that we can't have a plugin after dmix.
Couldn't you use snd-aloop and have a plugin AFTER dmix? It basically
creates a loopback interface who's output channel is the input
channel. Although I've never used it (yet). But one way to pulse
over jack without using the jack module part of pulse.

Loading...