mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-09 13:30:03 -05:00
Fix handling of DISCONNECT state
Fixed the handling of DISCONNECT state in dmix (not to set bogus error values to state).
This commit is contained in:
parent
c67584ec65
commit
c83e9d7451
1 changed files with 2 additions and 2 deletions
|
|
@ -405,7 +405,7 @@ static int snd_pcm_dmix_sync_ptr(snd_pcm_t *pcm)
|
||||||
|
|
||||||
switch (snd_pcm_state(dmix->spcm)) {
|
switch (snd_pcm_state(dmix->spcm)) {
|
||||||
case SND_PCM_STATE_DISCONNECTED:
|
case SND_PCM_STATE_DISCONNECTED:
|
||||||
dmix->state = -ENOTTY;
|
dmix->state = SND_PCM_STATE_DISCONNECTED;
|
||||||
return -ENOTTY;
|
return -ENOTTY;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
@ -474,7 +474,7 @@ static snd_pcm_state_t snd_pcm_dmix_state(snd_pcm_t *pcm)
|
||||||
case SND_PCM_STATE_SUSPENDED:
|
case SND_PCM_STATE_SUSPENDED:
|
||||||
return -ESTRPIPE;
|
return -ESTRPIPE;
|
||||||
case SND_PCM_STATE_DISCONNECTED:
|
case SND_PCM_STATE_DISCONNECTED:
|
||||||
dmix->state = -ENOTTY;
|
dmix->state = SND_PCM_STATE_DISCONNECTED;
|
||||||
return -ENOTTY;
|
return -ENOTTY;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue