mirror of
https://github.com/apache/nuttx.git
synced 2026-10-21 13:52:24 +00:00
sim/sim_alsa: reset alsa pcm device when snd_pcm_avail < 0
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
This commit is contained in:
parent
1532ccbd59
commit
9334ae47c7
1 changed files with 6 additions and 0 deletions
|
|
@ -934,6 +934,12 @@ static void sim_audio_process(struct sim_audio_s *priv)
|
|||
avail = host_uninterruptible(snd_pcm_avail, priv->pcm);
|
||||
if (avail < expect)
|
||||
{
|
||||
if (avail < 0)
|
||||
{
|
||||
ret = avail;
|
||||
goto out;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue