pcm: dmix: fix access to sum-buffer in non-interleaved mixing mode

GitHub pull_request - opened github at alsa-project.org
Thu Aug 13 15:29:51 CEST 2020


alsa-project/alsa-lib pull request #78 was opened from vijaypalaniswamy:

When dmix uses non-interleaved mixing mode the offset and step width
to sum_buffer was calculated by using the dmix channels instead of
the slave channels. This leads to audio distortions due to frame
corruption.

example:
- With below configuratio, Do aplay on both device in parallel for
audio distortion

pcm.dmix_2_channels {
        type dmix
        ipc_key 5678293
        ipc_perm 0660
        ipc_gid audio
        bindings [0 1]

        slave {
                pcm "hardware"
                channels 2
                periods  4
                period_time 40000
        }
}

pcm.dmix_1_channels {
        type dmix
        ipc_key 5678293
        ipc_perm 0660
        ipc_gid audio
        bindings [0]

        slave {
                pcm "hardware"
                channels 1
                periods  4
                period_time 40000
        }
}

pcm.hardware {
        type hw
        card 0
        channels 2
        rate 48000
        format S16_LE
}

Signed-off-by: Vijay Palaniswamy <vijay.palaniswamy at in.bosch.com>

Request URL   : https://github.com/alsa-project/alsa-lib/pull/78
Patch URL     : https://github.com/alsa-project/alsa-lib/pull/78.patch
Repository URL: https://github.com/alsa-project/alsa-lib


More information about the Alsa-devel mailing list