aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorOla Lilja <ola.o.lilja@stericsson.com>2010-12-06 09:06:56 +0100
committerLinus WALLEIJ <linus.walleij@stericsson.com>2010-12-07 09:33:02 +0100
commit6a40c5147c57143e937360102b88834d60b0d420 (patch)
tree2cd30305826d5ffc2386fd34f8c58ffde751c875 /sound
parent8d622dec2851b1e755a2aca5655d1a60dc8a093d (diff)
Ux500 ASoC: Fix for for audio capture.
Flag added in private struct for audio capture. Change-Id: Icebb100d763e3ebf2448647ad5c6aed35a4e9853 Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/9988 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/ux500/ux500_msp_dai.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c
index 6a4574c0931..18aa608a602 100644
--- a/sound/soc/ux500/ux500_msp_dai.c
+++ b/sound/soc/ux500/ux500_msp_dai.c
@@ -85,6 +85,12 @@ int ux500_msp_dai_i2s_configure_sg(dma_addr_t dma_addr,
int i;
int ret = 0;
struct scatterlist *sg;
+ bool playback_req_valid =
+ (drvdata->playback_active &&
+ stream_id == SNDRV_PCM_STREAM_PLAYBACK);
+ bool capture_req_valid =
+ (drvdata->capture_active &&
+ stream_id == SNDRV_PCM_STREAM_CAPTURE);
pr_debug("%s: Enter (MSP Index: %u, SG-length: %u, SG-size: %u).\n",
__func__,
@@ -92,7 +98,7 @@ int ux500_msp_dai_i2s_configure_sg(dma_addr_t dma_addr,
sg_len,
sg_size);
- if (!drvdata->playback_active) {
+ if (!playback_req_valid && !capture_req_valid) {
pr_err("%s: The I2S controller is not available."
"MSP index:%d\n",
__func__,