Skip to contentSkip to conversation

ASoC: soc-compress: Send correct stream event for capture start

PATCH Superseded Charles Keepax 2 participants 2 messages May 17, 2013

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: soc-compress: Send correct stream event for capture start

---

Sorry little bug I missed due to some integration bugs in our setup here. Again this applies onto Takashi's sound for-next branch.

Thanks,
Charles

 sound/soc/soc-compress.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
sound/soc/soc-compress.c +7 -2
index 3853f7e..a5107df 100644
@@ -220,8 +220,13 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
 			goto err;
 	}
 
-	snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
-				SND_SOC_DAPM_STREAM_START);
+	if (cstream->direction == SND_COMPRESS_PLAYBACK) {
+		snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
+					SND_SOC_DAPM_STREAM_START);
+	} else {
+		snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_CAPTURE,
+					SND_SOC_DAPM_STREAM_START);
+	}
 
 	/* cancel any delayed stream shutdown that is pending */
 	rtd->pop_wait = 0;
Signature · 1 line
1.7.2.5
maintainer
#1 lore raw
Quoted 3 lines · Charles Keepax

Sorry little bug I missed due to some integration bugs in our setup here. Again this applies onto Takashi's sound for-next branch.

Now the merge window is done this matters less.

sound/soc/soc-compress.c static int soc_compr_set_params(struct snd_compr_stream *cstream, · line 229

Quoted 7 lines
sound/soc/soc-compress.c +7 -0
+	if (cstream->direction == SND_COMPRESS_PLAYBACK) {
+		snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
+					SND_SOC_DAPM_STREAM_START);
+	} else {
+		snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_CAPTURE,
+					SND_SOC_DAPM_STREAM_START);
+	}

Coding style: no braces for single line if clauses unless there's a good reason.