]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: hw: setup explicit silencing for snd_pcm_drain by default
authorJaroslav Kysela <perex@perex.cz>
Fri, 21 Apr 2023 14:12:24 +0000 (16:12 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 3 May 2023 11:50:56 +0000 (13:50 +0200)
commit2115cdb4dc314d66e92a9e04413bcedc543da007
tree073293d1f0bb3ade4cb89dde19ab2d3215101073
parentb40fcda7fb5583ce516cd585a5f8f25ec00aa80e
pcm: hw: setup explicit silencing for snd_pcm_drain by default

Some applications may not alignt transfers to the period size
and also the driver developers may not follow the consequeces of the
access beyond valid samples in the playback DMA buffer.

To avoid clicks, fill a little silence at the end of the playback
ring buffer when snd_pcm_drain() is called.

Related: https://lore.kernel.org/alsa-devel/20230420113324.877164-2-oswald.buddenhagen@gmx.de/
Related: https://lore.kernel.org/alsa-devel/20230405201219.2197789-2-oswald.buddenhagen@gmx.de/
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm.c
src/pcm/pcm_hw.c
src/pcm/pcm_local.h