arch/sim: ignore return value of snd_pcm_pause/resume

snd_pcm_pause, snd_pcm_resume failed with -5, -38 errno.

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
This commit is contained in:
qiaohaijiao1 2022-05-11 19:59:20 +08:00 committed by Petro Karashchenko
parent 05a12ba69e
commit adba1e5e19
1 changed files with 3 additions and 13 deletions

View File

@ -582,18 +582,13 @@ static int sim_audio_stop(struct audio_lowerhalf_s *dev)
static int sim_audio_pause(struct audio_lowerhalf_s *dev)
{
struct sim_audio_s *priv = (struct sim_audio_s *)dev;
int ret;
if (!priv->pcm)
{
return 0;
}
ret = snd_pcm_pause(priv->pcm, 0);
if (ret < 0)
{
return ret;
}
snd_pcm_pause(priv->pcm, 0);
return 0;
}
@ -601,20 +596,15 @@ static int sim_audio_pause(struct audio_lowerhalf_s *dev)
static int sim_audio_resume(struct audio_lowerhalf_s *dev)
{
struct sim_audio_s *priv = (struct sim_audio_s *)dev;
int ret;
if (!priv->pcm)
{
return 0;
}
ret = snd_pcm_resume(priv->pcm);
if (ret < 0)
{
return ret;
}
snd_pcm_resume(priv->pcm);
return ret;
return 0;
}
#endif