0

I am trying to add a dix to my Alsa conf file, but when I playback using it the sample rate is wrong (it's too slow)

I have the following:

pcm.dmix0 {
type dmix
ipc_key 34521
slave {
    pcm "hw:0,0"
    format S16_LE
    rate 48000
}
    hint {
            description "DMix of Card0"
    }
}

pcm.asym51 {
       type asym
       playback.pcm "dmix0"
       capture.pcm "hw:0,0"
}
pcm.dsp0 {
     type plug
     slave.pcm "asym51"
}

When I play the audio back directly to the hardware, it plays fine, but I do miss a bit at the start.aplay -D hw:0,0 /usr/share/sounds/alsa/Front_Center.wav

When I use my dsp0 / dmix the rate is much slower than it should be:aplay -D dsp0 /usr/share/sounds/alsa/Front_Center.wav

What am I doing wrong?

geoffr98
  • 73
  • 1
  • 9
  • What is the complete output of the `aplay` command? – CL. Apr 17 '19 at 06:01
  • linaro@linaro-alip:~/Desktop$ aplay -D hw:0,0 /usr/share/sounds/alsa/Front_Center.wav Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono linaro@linaro-alip:~/Desktop$ aplay -D dsp0 /usr/share/sounds/alsa/Front_Center.wav Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono – geoffr98 Apr 18 '19 at 13:09
  • `linaro@linaro-alip:~/Desktop$ aplay -L null Discard all samples (playback) or generate zero samples (capture) dmix0 DMix of Card0 asym51 dsp0 Micsnoop Snoop of I2S_Mic swapL swapR asym1 Asym of Dmix1 and dsnoopRight ASR default:CARD=DB410c DB410c, Default Audio Device sysdefault:CARD=DB410c DB410c, Default Audio Device dmix:CARD=DB410c,DEV=0 DB410c, Direct sample mixing device dsnoop:CARD=DB410c,DEV=0` – geoffr98 Apr 18 '19 at 13:09
  • Sounds like a bug in the driver. – CL. Apr 18 '19 at 13:19
  • Is it the driver which implements the dmix? – geoffr98 Apr 19 '19 at 14:13
  • No. But dmix is likely to use smaller buffer/period sizes than 'normal' playback. – CL. Apr 19 '19 at 16:56

0 Answers0