aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>2013-10-22 06:26:48 -0400
committerTakashi Iwai <tiwai@suse.de>2013-11-12 01:14:32 -0500
commitc15b149a301ca214ef7ee92e2527b655ad007bb1 (patch)
treeb462225191fad72c544afe884da9469c2ea7c06a /sound/core
parent679605c768e86ceba7b87b8390e1446be3753bfb (diff)
ALSA: compress_core: don't return -EBADFD from poll if paused
Pausing audio playback is not an illegal state so it doesn't seem sensible for poll() to return -EBADFD on a paused stream. There's also no reason to assume that we can't write more data to the DSP while playback is paused. Remove the -EBADFD so that a stream in paused state will still report the buffer availability from poll(). It is up to the user process to manage its state so that it knows whether it is paused or not. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by VInod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/compress_offload.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index d9af6387f37c..9d518ac73eea 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -384,8 +384,7 @@ static unsigned int snd_compr_poll(struct file *f, poll_table *wait)
384 return -EFAULT; 384 return -EFAULT;
385 385
386 mutex_lock(&stream->device->lock); 386 mutex_lock(&stream->device->lock);
387 if (stream->runtime->state == SNDRV_PCM_STATE_PAUSED || 387 if (stream->runtime->state == SNDRV_PCM_STATE_OPEN) {
388 stream->runtime->state == SNDRV_PCM_STATE_OPEN) {
389 retval = -EBADFD; 388 retval = -EBADFD;
390 goto out; 389 goto out;
391 } 390 }