mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
pcm: ioplug: Pass appl_ptr and hw_ptr in snd_pcm_status()
The snd_pcm_status() of the ioplug doesn't return the current positions of hw_ptr and appl_ptr as advertised. Fix it by copying the current values stored in the plugin data. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
f2c1a9f327
commit
26fdcb98e6
1 changed files with 2 additions and 0 deletions
|
|
@ -133,6 +133,8 @@ static int snd_pcm_ioplug_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
|
||||||
gettimestamp(&status->tstamp, pcm->tstamp_type);
|
gettimestamp(&status->tstamp, pcm->tstamp_type);
|
||||||
status->avail = snd_pcm_mmap_avail(pcm);
|
status->avail = snd_pcm_mmap_avail(pcm);
|
||||||
status->avail_max = io->avail_max;
|
status->avail_max = io->avail_max;
|
||||||
|
status->appl_ptr = *pcm->appl.ptr;
|
||||||
|
status->hw_ptr = *pcm->hw.ptr;
|
||||||
if (snd_pcm_ioplug_delay(pcm, &sd) < 0)
|
if (snd_pcm_ioplug_delay(pcm, &sd) < 0)
|
||||||
sd = snd_pcm_mmap_delay(pcm);
|
sd = snd_pcm_mmap_delay(pcm);
|
||||||
status->delay = sd;
|
status->delay = sd;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue