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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

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.
Issue happens while doing channel wise mixing of src and destination buffers.

Attached the patch to fix the offset and step width calculation based on slave channels for sum buffer. So mixed data will be saved in respective channels of sum buffer.

Steps to reproduce the issue:
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
}

Best regards

Palaniswamy Vijay

Attachment: 0001-pcm-dmix-fix-access-to-sum-buffer-in-non-interleaved.patch
Description: 0001-pcm-dmix-fix-access-to-sum-buffer-in-non-interleaved.patch


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux