staging: vc4_services: bcm2835-audio: Add SNDRV_PCM_INFO_BATCH flag
Subsystems (3)
PATCH 1/1 staging: vc4_services: bcm2835-audio: Add SNDRV_PCM_INFO_BATCH flag
Playing audio with PulseAudio and the bcm2835-pcm driver results in distorted sound. Timer-based scheduling does not properly work with bcm2835-pcm since configuring PulseAudio with tsched=0 avoids this problem.
Setting the SNDRV_PCM_INFO_BATCH flag prevents PulseAudio to use timer-based scheduling by default. Settings this flag makes audio works out of the box.
Signed-off-by Dylan Van Assche <[email protected]>
---
Tested on my Raspberry Pi 3B+ with Kodi and postmarketOS.
drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c +2 -2
@@ -12,7 +12,7 @@static const struct snd_pcm_hardware snd_bcm2835_playback_hw = { .info = (SNDRV_PCM_INFO_INTERLEAVED |SNDRV_PCM_INFO_BLOCK_TRANSFER |SNDRV_PCM_INFO_MMAP |SNDRV_PCM_INFO_MMAP_VALID | -SNDRV_PCM_INFO_SYNC_APPLPTR ), +SNDRV_PCM_INFO_SYNC_APPLPTR |SNDRV_PCM_INFO_BATCH ), .formats =SNDRV_PCM_FMTBIT_U8 |SNDRV_PCM_FMTBIT_S16_LE , .rates =SNDRV_PCM_RATE_CONTINUOUS |SNDRV_PCM_RATE_8000_48000 , .rate_min =8000 ,
@@ -29,7 +29,7 @@ static const struct snd_pcm_hardware snd_bcm2835_playback_hw = {static const struct snd_pcm_hardware snd_bcm2835_playback_spdif_hw = { .info = (SNDRV_PCM_INFO_INTERLEAVED |SNDRV_PCM_INFO_BLOCK_TRANSFER |SNDRV_PCM_INFO_MMAP |SNDRV_PCM_INFO_MMAP_VALID | -SNDRV_PCM_INFO_SYNC_APPLPTR ), +SNDRV_PCM_INFO_SYNC_APPLPTR |SNDRV_PCM_INFO_BATCH ), .formats =SNDRV_PCM_FMTBIT_S16_LE , .rates =SNDRV_PCM_RATE_CONTINUOUS |SNDRV_PCM_RATE_44100 |SNDRV_PCM_RATE_48000 ,
Signature · 7 lines
2.30.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel