mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
pcm: hw - fix snd_pcm_hw_state()
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>
This commit is contained in:
parent
6b72840569
commit
2c8e31f509
1 changed files with 3 additions and 3 deletions
|
|
@ -600,9 +600,9 @@ static int snd_pcm_hw_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
|
||||||
static snd_pcm_state_t snd_pcm_hw_state(snd_pcm_t *pcm)
|
static snd_pcm_state_t snd_pcm_hw_state(snd_pcm_t *pcm)
|
||||||
{
|
{
|
||||||
snd_pcm_hw_t *hw = pcm->private_data;
|
snd_pcm_hw_t *hw = pcm->private_data;
|
||||||
int err = query_status_data(hw);
|
/* no error checking, the mmap state should be correct
|
||||||
if (err < 0)
|
* after SNDRV_PCM_IOCTL_SYNC_PTR */
|
||||||
return err;
|
query_status_data(hw);
|
||||||
return (snd_pcm_state_t) hw->mmap_status->state;
|
return (snd_pcm_state_t) hw->mmap_status->state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue