Search code examples
linuxaudioalsa

Alsa conf different rate for playback and capture


For functionality reasons, I need to configure different rates for playback and recording. For capture I need force a rate of 16000 but for playblack I want to keep the default.

I use plugin asym to connect capture and playback parts. If I use individually aplay or arecord it works correctly but simultaneously I get errors and it does not work.

Would it be correct to use different frequencies for playback and capture for the same card?

/etc/asound.conf

pcm.!default {

        type asym

        playback.pcm {
                type hw
                card 0
                device 0
        }

        capture.pcm {
                type plug
                slave {
                        pcm {
                                type hw
                                card 0
                                device 0
                                rate 16000
                        }
                }
        }
}

Thanks!!


Solution

  • Many devices require symmetric configurations of capture and playback. This is defined in the codec itself by setting the symmetric_rates variable.

    In my case my codec forces symmetry so I can't have different capture and playback rates