mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-12 13:30:12 -05:00
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>
This commit is contained in:
parent
b40fcda7fb
commit
2115cdb4dc
3 changed files with 71 additions and 13 deletions
|
|
@ -366,6 +366,8 @@ struct _snd_pcm {
|
|||
snd1_pcm_hw_param_get_max
|
||||
#define snd_pcm_hw_param_name \
|
||||
snd1_pcm_hw_param_name
|
||||
#define snd_pcm_sw_params_current_no_lock \
|
||||
snd1_pcm_sw_params_current_no_lock
|
||||
|
||||
int snd_pcm_new(snd_pcm_t **pcmp, snd_pcm_type_t type, const char *name,
|
||||
snd_pcm_stream_t stream, int mode);
|
||||
|
|
@ -390,6 +392,8 @@ void snd_pcm_mmap_appl_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames);
|
|||
void snd_pcm_mmap_hw_backward(snd_pcm_t *pcm, snd_pcm_uframes_t frames);
|
||||
void snd_pcm_mmap_hw_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames);
|
||||
|
||||
void snd_pcm_sw_params_current_no_lock(snd_pcm_t *pcm, snd_pcm_sw_params_t *params);
|
||||
|
||||
snd_pcm_sframes_t snd_pcm_mmap_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
|
||||
snd_pcm_sframes_t snd_pcm_mmap_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size);
|
||||
snd_pcm_sframes_t snd_pcm_mmap_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue