aes67-daemon/3rdparty/patches/ravenna-alsa-lkm-init-play-capture-buffers.patch

23 lines
1.1 KiB
Diff

diff --git a/driver/audio_driver.c b/driver/audio_driver.c
index 3d9debd..339327b 100644
--- a/driver/audio_driver.c
+++ b/driver/audio_driver.c
@@ -2441,7 +2142,7 @@ static int mr_alsa_audio_preallocate_memory(struct mr_alsa_audio_chip *chip)
printk(KERN_ERR "mr_alsa_audio_preallocate_memory: could not allocate playback buffer (%zd bytes vmalloc requested...\n", wanted);
goto _failed;
}
-
+ memset(chip->playback_buffer, 0, wanted);
wanted = mr_alsa_audio_pcm_hardware_capture.buffer_bytes_max; // MR_ALSA_RINGBUFFER_NB_FRAMES * MR_ALSA_NB_CHANNELS_MAX * 4;
@@ -2452,6 +2153,7 @@ static int mr_alsa_audio_preallocate_memory(struct mr_alsa_audio_chip *chip)
printk(KERN_ERR "mr_alsa_audio_preallocate_memory: could not allocate capture buffer (%zd bytes vmalloc requested...\n", wanted);
goto _failed;
}
+ memset(chip->capture_buffer, 0, wanted);
for (i = 0; i < MR_ALSA_NB_CHANNELS_MAX; i++)
{
chip->capture_buffer_channels_map[i] = (void*)chip->capture_buffer + MR_ALSA_RINGBUFFER_NB_FRAMES * i * 4;