[alsa-devel] [PATCH 2/5] ALSA: compress: Use snd_compr_get_poll on error path
Charles Keepax
ckeepax at opensource.wolfsonmicro.com
Wed May 4 15:59:08 CEST 2016
We have a function that returns the appropriate flags for the stream
direction, so we should use it.
Signed-off-by: Charles Keepax <ckeepax at opensource.wolfsonmicro.com>
---
sound/core/compress_offload.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index a9933c07..5268546 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -421,10 +421,7 @@ static unsigned int snd_compr_poll(struct file *f, poll_table *wait)
retval = snd_compr_get_poll(stream);
break;
default:
- if (stream->direction == SND_COMPRESS_PLAYBACK)
- retval = POLLOUT | POLLWRNORM | POLLERR;
- else
- retval = POLLIN | POLLRDNORM | POLLERR;
+ retval = snd_compr_get_poll(stream) | POLLERR;
break;
}
out:
--
2.1.4
More information about the Alsa-devel
mailing list