diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-11-18 14:08:17 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-11-18 14:38:12 -0500 |
commit | 3027cead01d8aacce03dc360cedaa4cc44a062fc (patch) | |
tree | f7ff9d4fa1b4ab201580cb3468e36f705b0a9a8d /firmware/export | |
parent | 473aa615de2528e469a421d01be007e022d0a5b5 (diff) | |
download | rockbox-3027cead01d8aacce03dc360cedaa4cc44a062fc.tar.gz rockbox-3027cead01d8aacce03dc360cedaa4cc44a062fc.zip |
hosted: Improve buffer underrun handling in the ALSA driver
* Bump internal mix buffer size by 4x, to 1K frames (matching ALSA period)
* Handle an underrun that occurs when filling the audio buffer
* Log underruns and make them available in the debug info
Change-Id: I28d56dd35d88851fa167ad92368a5882937a758f
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/pcm_mixer.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/export/pcm_mixer.h b/firmware/export/pcm_mixer.h index 3d255a7345..39a814de6f 100644 --- a/firmware/export/pcm_mixer.h +++ b/firmware/export/pcm_mixer.h | |||
@@ -40,6 +40,10 @@ | |||
40 | /* iBasso Devices: Match Rockbox PCM buffer size to ALSA PCM buffer size | 40 | /* iBasso Devices: Match Rockbox PCM buffer size to ALSA PCM buffer size |
41 | to minimize memory transfers. */ | 41 | to minimize memory transfers. */ |
42 | #define MIX_FRAME_SAMPLES 2048 | 42 | #define MIX_FRAME_SAMPLES 2048 |
43 | #elif (CONFIG_PLATFORM & PLATFORM_HOSTED) | ||
44 | /* Hosted targets need larger buffers for decent performance due to | ||
45 | OS locking/scheduling overhead */ | ||
46 | #define MIX_FRAME_SAMPLES 1024 | ||
43 | #else | 47 | #else |
44 | /* Assume HW DMA engine is available or sufficient latency exists in the | 48 | /* Assume HW DMA engine is available or sufficient latency exists in the |
45 | PCM pathway */ | 49 | PCM pathway */ |