All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: compress: Only mute playback streams
@ 2013-02-06 17:55 Mark Brown
  2013-02-07  8:58 ` Liam Girdwood
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2013-02-06 17:55 UTC (permalink / raw)
  To: Liam Girdwood, Vinod Koul; +Cc: alsa-devel, Mark Brown

Otherwise capture activity on a compressed DAI would mute any playback
on the same DAI.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/soc-compress.c |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index c81aeec..35726cb 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -116,13 +116,12 @@ static int soc_compr_free(struct snd_compr_stream *cstream)
 	if (cstream->direction == SND_COMPRESS_PLAYBACK) {
 		cpu_dai->playback_active--;
 		codec_dai->playback_active--;
+		snd_soc_dai_digital_mute(codec_dai, 1);
 	} else {
 		cpu_dai->capture_active--;
 		codec_dai->capture_active--;
 	}
 
-	snd_soc_dai_digital_mute(codec_dai, 1);
-
 	cpu_dai->active--;
 	codec_dai->active--;
 	codec->active--;
@@ -179,10 +178,16 @@ static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd)
 			goto out;
 	}
 
-	if (cmd == SNDRV_PCM_TRIGGER_START)
-		snd_soc_dai_digital_mute(codec_dai, 0);
-	else if (cmd == SNDRV_PCM_TRIGGER_STOP)
-		snd_soc_dai_digital_mute(codec_dai, 1);
+	if (cstream->direction == SND_COMPRESS_PLAYBACK) {
+		switch (cmd) {
+		case SNDRV_PCM_TRIGGER_START:
+			snd_soc_dai_digital_mute(codec_dai, 0);
+			break;
+		case SNDRV_PCM_TRIGGER_STOP:
+			snd_soc_dai_digital_mute(codec_dai, 1);
+			break;
+		}
+	}
 
 out:
 	mutex_unlock(&rtd->pcm_mutex);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: compress: Only mute playback streams
  2013-02-06 17:55 [PATCH] ASoC: compress: Only mute playback streams Mark Brown
@ 2013-02-07  8:58 ` Liam Girdwood
  2013-02-07 13:37   ` Vinod Koul
  0 siblings, 1 reply; 3+ messages in thread
From: Liam Girdwood @ 2013-02-07  8:58 UTC (permalink / raw)
  To: Mark Brown; +Cc: Vinod Koul, alsa-devel, Liam Girdwood

On Wed, 2013-02-06 at 17:55 +0000, Mark Brown wrote:
> Otherwise capture activity on a compressed DAI would mute any playback
> on the same DAI.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: compress: Only mute playback streams
  2013-02-07  8:58 ` Liam Girdwood
@ 2013-02-07 13:37   ` Vinod Koul
  0 siblings, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2013-02-07 13:37 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, Mark Brown, Liam Girdwood

On Thu, Feb 07, 2013 at 08:58:38AM +0000, Liam Girdwood wrote:
> On Wed, 2013-02-06 at 17:55 +0000, Mark Brown wrote:
> > Otherwise capture activity on a compressed DAI would mute any playback
> > on the same DAI.
> > 
> > Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-07 14:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 17:55 [PATCH] ASoC: compress: Only mute playback streams Mark Brown
2013-02-07  8:58 ` Liam Girdwood
2013-02-07 13:37   ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.