Skip to contentSkip to conversation

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

DISCUSSION GitHub pull_request - opened 1 participant 1 message Aug 13, 2020 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

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
}

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