From: Takashi Iwai Date: Thu, 10 Sep 2009 13:33:02 +0000 (+0200) Subject: Merge branch 'topic/pcm-estrpipe-in-pm' into for-linus X-Git-Tag: v2.6.32-rc1~732^2~5 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=df9200dd0454c91c5436c22072611f0edd3b5f42;hp=2c0d19a78de1ea5d0e92d86be0b16ccab0feccec Merge branch 'topic/pcm-estrpipe-in-pm' into for-linus * topic/pcm-estrpipe-in-pm: ALSA: pcm - Tell user that stream to be rewound is suspended --- diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index b08898cbfed3..59e5fbe6af51 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -2214,6 +2214,9 @@ static snd_pcm_sframes_t snd_pcm_playback_rewind(struct snd_pcm_substream *subst case SNDRV_PCM_STATE_XRUN: ret = -EPIPE; goto __end; + case SNDRV_PCM_STATE_SUSPENDED: + ret = -ESTRPIPE; + goto __end; default: ret = -EBADFD; goto __end; @@ -2259,6 +2262,9 @@ static snd_pcm_sframes_t snd_pcm_capture_rewind(struct snd_pcm_substream *substr case SNDRV_PCM_STATE_XRUN: ret = -EPIPE; goto __end; + case SNDRV_PCM_STATE_SUSPENDED: + ret = -ESTRPIPE; + goto __end; default: ret = -EBADFD; goto __end; @@ -2305,6 +2311,9 @@ static snd_pcm_sframes_t snd_pcm_playback_forward(struct snd_pcm_substream *subs case SNDRV_PCM_STATE_XRUN: ret = -EPIPE; goto __end; + case SNDRV_PCM_STATE_SUSPENDED: + ret = -ESTRPIPE; + goto __end; default: ret = -EBADFD; goto __end; @@ -2351,6 +2360,9 @@ static snd_pcm_sframes_t snd_pcm_capture_forward(struct snd_pcm_substream *subst case SNDRV_PCM_STATE_XRUN: ret = -EPIPE; goto __end; + case SNDRV_PCM_STATE_SUSPENDED: + ret = -ESTRPIPE; + goto __end; default: ret = -EBADFD; goto __end;