From: Takashi Iwai Date: Tue, 11 Jan 2005 17:42:49 +0000 (+0000) Subject: Fix handling of DISCONNECT state X-Git-Tag: v1.0.8~2 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=c83e9d74512810e83eeb7e90945429df5299f50a;p=alsa-lib.git Fix handling of DISCONNECT state Fixed the handling of DISCONNECT state in dmix (not to set bogus error values to state). --- diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c index 45a5b929..3fdbf4b2 100644 --- a/src/pcm/pcm_dmix.c +++ b/src/pcm/pcm_dmix.c @@ -405,7 +405,7 @@ static int snd_pcm_dmix_sync_ptr(snd_pcm_t *pcm) switch (snd_pcm_state(dmix->spcm)) { case SND_PCM_STATE_DISCONNECTED: - dmix->state = -ENOTTY; + dmix->state = SND_PCM_STATE_DISCONNECTED; return -ENOTTY; default: break; @@ -474,7 +474,7 @@ static snd_pcm_state_t snd_pcm_dmix_state(snd_pcm_t *pcm) case SND_PCM_STATE_SUSPENDED: return -ESTRPIPE; case SND_PCM_STATE_DISCONNECTED: - dmix->state = -ENOTTY; + dmix->state = SND_PCM_STATE_DISCONNECTED; return -ENOTTY; default: break;