mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue