mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
pcm: direct: don't return bogus buffer levels in xrun state
Signed-off-by: Andreas Pape <apape@de.adit-jv.com> Signed-off-by: Mounesh Sutar <mounesh_sutar@mentor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
789ee39727
commit
79a358ae26
3 changed files with 9 additions and 0 deletions
|
|
@ -882,6 +882,9 @@ static snd_pcm_sframes_t snd_pcm_dmix_avail_update(snd_pcm_t *pcm)
|
|||
if ((err = snd_pcm_dmix_sync_ptr(pcm)) < 0)
|
||||
return err;
|
||||
}
|
||||
if (dmix->state == SND_PCM_STATE_XRUN)
|
||||
return -EPIPE;
|
||||
|
||||
return snd_pcm_mmap_playback_avail(pcm);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -570,6 +570,9 @@ static snd_pcm_sframes_t snd_pcm_dshare_avail_update(snd_pcm_t *pcm)
|
|||
if ((err = snd_pcm_dshare_sync_ptr(pcm)) < 0)
|
||||
return err;
|
||||
}
|
||||
if (dshare->state == SND_PCM_STATE_XRUN)
|
||||
return -EPIPE;
|
||||
|
||||
return snd_pcm_mmap_playback_avail(pcm);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -454,6 +454,9 @@ static snd_pcm_sframes_t snd_pcm_dsnoop_avail_update(snd_pcm_t *pcm)
|
|||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
if (dsnoop->state == SND_PCM_STATE_XRUN)
|
||||
return -EPIPE;
|
||||
|
||||
return snd_pcm_mmap_capture_avail(pcm);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue