The pcm status function should not return an error code.
Return always only the mmaped status.
Fixes: https://github.com/alsa-project/alsa-lib/issues/137
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
static snd_pcm_state_t snd_pcm_hw_state(snd_pcm_t *pcm)
{
snd_pcm_hw_t *hw = pcm->private_data;
- int err = query_status_data(hw);
- if (err < 0)
- return err;
+ /* no error checking, the mmap state should be correct
+ * after SNDRV_PCM_IOCTL_SYNC_PTR */
+ query_status_data(hw);
return (snd_pcm_state_t) hw->mmap_status->state;
}