Skip to contentSkip to conversation

ASoC: davinci-mcasp: Do not allow multiple streams in one direction

PATCH In review Peter Ujfalusi 2 participants 2 messages May 9, 2016 – May 10, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: davinci-mcasp: Do not allow multiple streams in one direction

Make sure that the user can not start multiple streams with the same direction.

---
 sound/soc/davinci/davinci-mcasp.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
sound/soc/davinci/davinci-mcasp.c +6 -2
index c4cd8e4fff9a..50523e744483 100644
@@ -1252,11 +1252,15 @@ static int davinci_mcasp_startup(struct snd_pcm_substream *substream,
 	int i, dir;
 	int tdm_slots = mcasp->tdm_slots;
 
-	if (mcasp->tdm_mask[substream->stream])
-		tdm_slots = hweight32(mcasp->tdm_mask[substream->stream]);
+	/* Do not allow more then one stream per direction */
+	if (mcasp->substreams[substream->stream])
+		return -EBUSY;
 
 	mcasp->substreams[substream->stream] = substream;
 
+	if (mcasp->tdm_mask[substream->stream])
+		tdm_slots = hweight32(mcasp->tdm_mask[substream->stream]);
+
 	if (mcasp->op_mode == DAVINCI_MCASP_DIT_MODE)
 		return 0;
 
Signature · 1 line
2.8.1
maintainer
#1 lore raw

Applied "ASoC: davinci-mcasp: Do not allow multiple streams in one direction" to the asoc tree

The patch

ASoC: davinci-mcasp: Do not allow multiple streams in one direction

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 19357366633cfc53532b587180af3655f0e453f3 Mon Sep 17 00:00:00 2001

From: Peter Ujfalusi <[email protected]>
Date: Mon, 9 May 2016 13:39:14 +0300
Subject: [PATCH] ASoC: davinci-mcasp: Do not allow multiple streams in one
direction

Make sure that the user can not start multiple streams with the same direction.

---
 sound/soc/davinci/davinci-mcasp.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
sound/soc/davinci/davinci-mcasp.c +6 -2
index e1324989bd6b..020d8660e4e5 100644
@@ -1230,11 +1230,15 @@ static int davinci_mcasp_startup(struct snd_pcm_substream *substream,
 	int i, dir;
 	int tdm_slots = mcasp->tdm_slots;
 
-	if (mcasp->tdm_mask[substream->stream])
-		tdm_slots = hweight32(mcasp->tdm_mask[substream->stream]);
+	/* Do not allow more then one stream per direction */
+	if (mcasp->substreams[substream->stream])
+		return -EBUSY;
 
 	mcasp->substreams[substream->stream] = substream;
 
+	if (mcasp->tdm_mask[substream->stream])
+		tdm_slots = hweight32(mcasp->tdm_mask[substream->stream]);
+
 	if (mcasp->op_mode == DAVINCI_MCASP_DIT_MODE)
 		return 0;
 
Signature · 1 line
2.8.1