mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
pcm: Fix snd_pcm_status() for dmix & co
Fetch the timestamp and other status fields by issuing snd_pcm_status() for the slave PCM. Also, fill the delay field properly. This should fix longstanding PA's complaints. Reported-by: Dan Hordern <danhordern@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
a5e5e3cd3c
commit
18ce3ec9ca
3 changed files with 6 additions and 3 deletions
|
|
@ -475,12 +475,13 @@ static int snd_pcm_dmix_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
|
|||
break;
|
||||
}
|
||||
memset(status, 0, sizeof(*status));
|
||||
snd_pcm_status(dmix->spcm, status);
|
||||
status->state = snd_pcm_dmix_state(pcm);
|
||||
status->trigger_tstamp = dmix->trigger_tstamp;
|
||||
gettimestamp(&status->tstamp, pcm->tstamp_type);
|
||||
status->avail = snd_pcm_mmap_playback_avail(pcm);
|
||||
status->avail_max = status->avail > dmix->avail_max ? status->avail : dmix->avail_max;
|
||||
dmix->avail_max = 0;
|
||||
status->delay = snd_pcm_mmap_playback_delay(pcm);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue