Skip to content

Commit

Permalink
ALSA: Add SNDRV_PCM_STATE_PAUSED case in wait_for_avail function
Browse files Browse the repository at this point in the history
When the process is sleeping at the SNDRV_PCM_STATE_PAUSED
state from the wait_for_avail function, the sleep process will be woken by
timeout(10 seconds). Even if the sleep process wake up by timeout, by this
patch, the process will continue with sleep and wait for the other state.

Signed-off-by: JongHo Kim <furmuwon@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
JongHo Kim authored and Takashi Iwai committed Dec 17, 2013
1 parent afdcd43 commit ed697e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/core/pcm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,8 @@ static int wait_for_avail(struct snd_pcm_substream *substream,
case SNDRV_PCM_STATE_DISCONNECTED:
err = -EBADFD;
goto _endloop;
case SNDRV_PCM_STATE_PAUSED:
continue;
}
if (!tout) {
snd_printd("%s write error (DMA or IRQ trouble?)\n",
Expand Down

0 comments on commit ed697e1

Please sign in to comment.