Added patch to Ravenna driver to solve a possible corruption issue at the beginning of a playback or recording caused by not initialized buffers.
This commit is contained in:
parent
143d98dee5
commit
bf847edd73
22
3rdparty/patches/ravenna-alsa-lkm-init-play-capture-buffers.patch
vendored
Normal file
22
3rdparty/patches/ravenna-alsa-lkm-init-play-capture-buffers.patch
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
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;
|
||||
|
3
build.sh
3
build.sh
@ -24,12 +24,15 @@ if [ ! -d ravenna-alsa-lkm.git ]; then
|
||||
git apply ../patches/ravenna-alsa-lkm-independent-playback-capture.patch
|
||||
git apply ../patches/ravenna-alsa-lkm-direct-pcm-transfer.patch
|
||||
git apply ../patches/ravenna-alsa-lkm-enable-mono-channels.patch
|
||||
git apply ../patches/ravenna-alsa-lkm-init-play-capture-buffers.patch
|
||||
echo "Building ravenna-alsa-lkm kernel module ..."
|
||||
cd driver
|
||||
make
|
||||
cd ../..
|
||||
fi
|
||||
|
||||
exit 1
|
||||
|
||||
if [ ! -d cpp-httplib.git ]; then
|
||||
git clone https://github.com/yhirose/cpp-httplib.git
|
||||
cd cpp-httplib
|
||||
|
Loading…
x
Reference in New Issue
Block a user