summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudheer Papothi <spapothi@codeaurora.org>2016-02-02 01:52:09 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:11:04 -0700
commitb21e23e099b166d54ff788a82e0e9addbd28cf62 (patch)
tree06fd7163c73f0a7b0222e004e337fec866362a4d
parent3dea4c44db1ebdf2e59356b589c3f9af389f07ad (diff)
ASoC: pcm: Check for capture path in all codec_dais
During soc_pcm_prepare, check for capture path for all the codec_dais instead of the last codec_dai. This is will help to set pcm start event for all the codec dais that has capture_active set to high. Change checks for all the codec_dais capture_active bit to set start stream event. Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
-rw-r--r--sound/soc/soc-pcm.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 709847e9915d..cd14cbad3482 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -817,10 +817,13 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
}
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
- if (codec_dai->capture_active == 1)
- snd_soc_dapm_stream_event(rtd,
- SNDRV_PCM_STREAM_CAPTURE,
- SND_SOC_DAPM_STREAM_START);
+ for (i = 0; i < rtd->num_codecs; i++) {
+ codec_dai = rtd->codec_dais[i];
+ if (codec_dai->capture_active == 1)
+ snd_soc_dapm_stream_event(rtd,
+ SNDRV_PCM_STREAM_CAPTURE,
+ SND_SOC_DAPM_STREAM_START);
+ }
}
for (i = 0; i < rtd->num_codecs; i++)