You are not logged in.

#1 2011-01-26 12:02:00

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,078

[SOLVED] dmix plugin + rate plugin ?

I'm trying to use the dmix plugin togheter with a higher quality resampler.
Here's my asoundrc:

pcm.!default {
        type rate
        slave.pcm {
                   type dmix
                   slave {
                          pcm "hw:0,0"
                          rate 96000
                          }
        }
       converter "samplerate_best"
}

And here's the output from aplay:

Gozer ~ # aplay  audiodump.wav 
ALSA lib pcm.c:6831:(snd_pcm_slave_conf) missing field rate
aplay: main:654: audio open error: Invalid argument

...Of course, rate plugin needs rate field, so i modify my .asoundrc this way:

pcm.!default {
        type rate
        rate 96000
        slave.pcm {
                   type dmix
                   slave {
                          pcm "hw:0,0"
                          rate 96000
                          }
        }
       converter "samplerate_best"
}
And guess what:
Gozer ~ # aplay  audiodump.wav 
ALSA lib pcm_rate.c:1510:(_snd_pcm_rate_open) Unknown field rate
aplay: main:654: audio open error: Invalid argument

What am i missing?

Last edited by kokoko3k (2011-01-26 13:53:13)


Help me to improve ssh-rdp !

Offline

#2 2011-01-26 12:43:09

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,078

Re: [SOLVED] dmix plugin + rate plugin ?

More synthetic approach, same results:

pcm.!default {
        type rate
        rate 96000
        slave.pcm dmix
        converter "samplerate_best"
}

With rate 96000 it says "unknown field rate",
without it it says "missing field rate"

...WT#!?


Help me to improve ssh-rdp !

Offline

#3 2011-01-26 13:52:36

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,078

Re: [SOLVED] dmix plugin + rate plugin ?

-edit-
Ok, self-solved, slave.rate was the key:

pcm.!default {
        type rate
        slave.pcm mix1
        slave.rate 192000
}

pcm.mix1 {
        type dmix
        ipc_key 1024
        slave {
            pcm "hw:0,0"
            rate 192000
        }
}

Why is necessary to specify the slave rate two times (in the slave definition itself and in the caller statement is a nice question)

Last edited by kokoko3k (2011-01-26 14:01:35)


Help me to improve ssh-rdp !

Offline

#4 2020-08-26 19:50:31

sunova
Member
Registered: 2020-08-26
Posts: 1

Re: [SOLVED] dmix plugin + rate plugin ?

Sorry for necrobumping, but it's 9 years later, and the problem persists! It's still not possible to define `rate` directly inside `dmix` definition. Is it more than changing a header file?
Btw this thread saved my time.

Offline

#5 2020-08-26 21:06:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 11,800

Re: [SOLVED] dmix plugin + rate plugin ?

Please don't do that, if you want help with your config, open your own thread.

https://wiki.archlinux.org/index.php/Co … bumping%22

FWIW If you want to change this in a way that keeps the general default dmix contract in tact, just change the existing

defaults.pcm.dmix.rate 192000

node. But that way you can't specify the converter to be used.

Closing.

Last edited by V1del (2020-08-26 21:12:55)

Online

Board footer

Powered by FluxBB