mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
pcm: fix the dshare delay reporting
Pulseaudio uses full ring buffer when the incorrect delay is reported. BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/198 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
d80616c0c1
commit
8033ff9996
2 changed files with 2 additions and 2 deletions
|
|
@ -229,7 +229,7 @@ static int snd_pcm_dshare_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
|
|||
case SNDRV_PCM_STATE_DRAINING:
|
||||
case SNDRV_PCM_STATE_RUNNING:
|
||||
snd_pcm_dshare_sync_ptr0(pcm, status->hw_ptr);
|
||||
status->delay += snd_pcm_mmap_playback_delay(pcm);
|
||||
status->delay = snd_pcm_mmap_playback_delay(pcm);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ static int snd_pcm_dsnoop_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
|
|||
/* Fall through */
|
||||
case SNDRV_PCM_STATE_PREPARED:
|
||||
case SNDRV_PCM_STATE_SUSPENDED:
|
||||
*delayp = snd_pcm_mmap_capture_avail(pcm);
|
||||
*delayp = snd_pcm_mmap_capture_delay(pcm);
|
||||
return 0;
|
||||
case SNDRV_PCM_STATE_XRUN:
|
||||
return -EPIPE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue