All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations
@ 2015-11-09 18:19 ` Andreas Dannenberg
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Dannenberg @ 2015-11-09 18:19 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Peter Ujfalusi, Jyri Sarha
  Cc: Andreas Dannenberg, Misael Lopez Cruz, alsa-devel, linux-kernel,
	linux-omap

Fixes the associations between the tx_mask and rx_mask and the associated
playback / capture streams during setting of the TDM slot. With this
patch in place it is now possible for example to only populate tx_mask
(leaving rx_mask as 0) for output-only codecs to control the TDM slot(s)
the McASP serial port uses for transmit. Before that, this scenario
would incorrectly rely on the rx_mask for this.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
---
 sound/soc/davinci/davinci-mcasp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 4495a40..caa0beb 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -681,8 +681,8 @@ static int davinci_mcasp_set_tdm_slot(struct snd_soc_dai *dai,
 	}
 
 	mcasp->tdm_slots = slots;
-	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = rx_mask;
-	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = tx_mask;
+	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = tx_mask;
+	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = rx_mask;
 	mcasp->slot_width = slot_width;
 
 	return davinci_mcasp_set_ch_constraints(mcasp);
-- 
1.9.1


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

* [PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations
@ 2015-11-09 18:19 ` Andreas Dannenberg
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Dannenberg @ 2015-11-09 18:19 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Peter Ujfalusi, Jyri Sarha
  Cc: linux-kernel, Misael Lopez Cruz, linux-omap, alsa-devel,
	Andreas Dannenberg

Fixes the associations between the tx_mask and rx_mask and the associated
playback / capture streams during setting of the TDM slot. With this
patch in place it is now possible for example to only populate tx_mask
(leaving rx_mask as 0) for output-only codecs to control the TDM slot(s)
the McASP serial port uses for transmit. Before that, this scenario
would incorrectly rely on the rx_mask for this.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
---
 sound/soc/davinci/davinci-mcasp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 4495a40..caa0beb 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -681,8 +681,8 @@ static int davinci_mcasp_set_tdm_slot(struct snd_soc_dai *dai,
 	}
 
 	mcasp->tdm_slots = slots;
-	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = rx_mask;
-	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = tx_mask;
+	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = tx_mask;
+	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = rx_mask;
 	mcasp->slot_width = slot_width;
 
 	return davinci_mcasp_set_ch_constraints(mcasp);
-- 
1.9.1

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

* Re: [PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations
  2015-11-09 18:19 ` Andreas Dannenberg
@ 2015-11-09 21:38   ` Jyri Sarha
  -1 siblings, 0 replies; 7+ messages in thread
From: Jyri Sarha @ 2015-11-09 21:38 UTC (permalink / raw)
  To: Andreas Dannenberg, Liam Girdwood, Mark Brown, Peter Ujfalusi
  Cc: Misael Lopez Cruz, alsa-devel, linux-kernel, linux-omap

Reviewed-by: Jyri Sarha <jsarha@ti.com>

For what little there is to review.

I only had HW that worked with symmetric masks, so I did not hit this 
myself. Should have hacked something to codec end to be able to test 
asymetric masks at McASP end.

Thanks,
Jyri

On 11/09/15 20:19, Andreas Dannenberg wrote:
> Fixes the associations between the tx_mask and rx_mask and the associated
> playback / capture streams during setting of the TDM slot. With this
> patch in place it is now possible for example to only populate tx_mask
> (leaving rx_mask as 0) for output-only codecs to control the TDM slot(s)
> the McASP serial port uses for transmit. Before that, this scenario
> would incorrectly rely on the rx_mask for this.
>
> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
> ---
>   sound/soc/davinci/davinci-mcasp.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
> index 4495a40..caa0beb 100644
> --- a/sound/soc/davinci/davinci-mcasp.c
> +++ b/sound/soc/davinci/davinci-mcasp.c
> @@ -681,8 +681,8 @@ static int davinci_mcasp_set_tdm_slot(struct snd_soc_dai *dai,
>   	}
>
>   	mcasp->tdm_slots = slots;
> -	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = rx_mask;
> -	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = tx_mask;
> +	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = tx_mask;
> +	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = rx_mask;
>   	mcasp->slot_width = slot_width;
>
>   	return davinci_mcasp_set_ch_constraints(mcasp);
>


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

* Re: [PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations
@ 2015-11-09 21:38   ` Jyri Sarha
  0 siblings, 0 replies; 7+ messages in thread
From: Jyri Sarha @ 2015-11-09 21:38 UTC (permalink / raw)
  To: Andreas Dannenberg, Liam Girdwood, Mark Brown, Peter Ujfalusi
  Cc: Misael Lopez Cruz, linux-omap, alsa-devel, linux-kernel

Reviewed-by: Jyri Sarha <jsarha@ti.com>

For what little there is to review.

I only had HW that worked with symmetric masks, so I did not hit this 
myself. Should have hacked something to codec end to be able to test 
asymetric masks at McASP end.

Thanks,
Jyri

On 11/09/15 20:19, Andreas Dannenberg wrote:
> Fixes the associations between the tx_mask and rx_mask and the associated
> playback / capture streams during setting of the TDM slot. With this
> patch in place it is now possible for example to only populate tx_mask
> (leaving rx_mask as 0) for output-only codecs to control the TDM slot(s)
> the McASP serial port uses for transmit. Before that, this scenario
> would incorrectly rely on the rx_mask for this.
>
> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
> ---
>   sound/soc/davinci/davinci-mcasp.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
> index 4495a40..caa0beb 100644
> --- a/sound/soc/davinci/davinci-mcasp.c
> +++ b/sound/soc/davinci/davinci-mcasp.c
> @@ -681,8 +681,8 @@ static int davinci_mcasp_set_tdm_slot(struct snd_soc_dai *dai,
>   	}
>
>   	mcasp->tdm_slots = slots;
> -	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = rx_mask;
> -	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = tx_mask;
> +	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = tx_mask;
> +	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = rx_mask;
>   	mcasp->slot_width = slot_width;
>
>   	return davinci_mcasp_set_ch_constraints(mcasp);
>

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

* Re: [PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations
  2015-11-09 18:19 ` Andreas Dannenberg
@ 2015-11-10  7:51   ` Peter Ujfalusi
  -1 siblings, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2015-11-10  7:51 UTC (permalink / raw)
  To: Andreas Dannenberg, Liam Girdwood, Mark Brown, Jyri Sarha
  Cc: Misael Lopez Cruz, alsa-devel, linux-kernel, linux-omap

On 11/09/2015 08:19 PM, Andreas Dannenberg wrote:
> Fixes the associations between the tx_mask and rx_mask and the associated
> playback / capture streams during setting of the TDM slot. With this
> patch in place it is now possible for example to only populate tx_mask
> (leaving rx_mask as 0) for output-only codecs to control the TDM slot(s)
> the McASP serial port uses for transmit. Before that, this scenario
> would incorrectly rely on the rx_mask for this.
> 
> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> ---
>  sound/soc/davinci/davinci-mcasp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
> index 4495a40..caa0beb 100644
> --- a/sound/soc/davinci/davinci-mcasp.c
> +++ b/sound/soc/davinci/davinci-mcasp.c
> @@ -681,8 +681,8 @@ static int davinci_mcasp_set_tdm_slot(struct snd_soc_dai *dai,
>  	}
>  
>  	mcasp->tdm_slots = slots;
> -	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = rx_mask;
> -	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = tx_mask;
> +	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = tx_mask;
> +	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = rx_mask;
>  	mcasp->slot_width = slot_width;
>  
>  	return davinci_mcasp_set_ch_constraints(mcasp);
> 


-- 
Péter

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

* Re: [PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations
@ 2015-11-10  7:51   ` Peter Ujfalusi
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2015-11-10  7:51 UTC (permalink / raw)
  To: Andreas Dannenberg, Liam Girdwood, Mark Brown, Jyri Sarha
  Cc: Misael Lopez Cruz, alsa-devel, linux-kernel, linux-omap

On 11/09/2015 08:19 PM, Andreas Dannenberg wrote:
> Fixes the associations between the tx_mask and rx_mask and the associated
> playback / capture streams during setting of the TDM slot. With this
> patch in place it is now possible for example to only populate tx_mask
> (leaving rx_mask as 0) for output-only codecs to control the TDM slot(s)
> the McASP serial port uses for transmit. Before that, this scenario
> would incorrectly rely on the rx_mask for this.
> 
> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> ---
>  sound/soc/davinci/davinci-mcasp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
> index 4495a40..caa0beb 100644
> --- a/sound/soc/davinci/davinci-mcasp.c
> +++ b/sound/soc/davinci/davinci-mcasp.c
> @@ -681,8 +681,8 @@ static int davinci_mcasp_set_tdm_slot(struct snd_soc_dai *dai,
>  	}
>  
>  	mcasp->tdm_slots = slots;
> -	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = rx_mask;
> -	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = tx_mask;
> +	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = tx_mask;
> +	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = rx_mask;
>  	mcasp->slot_width = slot_width;
>  
>  	return davinci_mcasp_set_ch_constraints(mcasp);
> 


-- 
Péter

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

* Applied "ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations" to the asoc tree
  2015-11-09 18:19 ` Andreas Dannenberg
                   ` (2 preceding siblings ...)
  (?)
@ 2015-11-10 18:53 ` Mark Brown
  -1 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2015-11-10 18:53 UTC (permalink / raw)
  To: Andreas Dannenberg, Peter Ujfalusi, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations

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

>From 1bdd593247ee5a74eb58828a4cf18bdc8a5f1baa Mon Sep 17 00:00:00 2001
From: Andreas Dannenberg <dannenberg@ti.com>
Date: Mon, 9 Nov 2015 12:19:19 -0600
Subject: [PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations

Fixes the associations between the tx_mask and rx_mask and the associated
playback / capture streams during setting of the TDM slot. With this
patch in place it is now possible for example to only populate tx_mask
(leaving rx_mask as 0) for output-only codecs to control the TDM slot(s)
the McASP serial port uses for transmit. Before that, this scenario
would incorrectly rely on the rx_mask for this.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/davinci/davinci-mcasp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 4495a40a9468..caa0bebcd7f4 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -681,8 +681,8 @@ static int davinci_mcasp_set_tdm_slot(struct snd_soc_dai *dai,
 	}
 
 	mcasp->tdm_slots = slots;
-	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = rx_mask;
-	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = tx_mask;
+	mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = tx_mask;
+	mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = rx_mask;
 	mcasp->slot_width = slot_width;
 
 	return davinci_mcasp_set_ch_constraints(mcasp);
-- 
2.6.2

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

end of thread, other threads:[~2015-11-10 18:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09 18:19 [PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations Andreas Dannenberg
2015-11-09 18:19 ` Andreas Dannenberg
2015-11-09 21:38 ` Jyri Sarha
2015-11-09 21:38   ` Jyri Sarha
2015-11-10  7:51 ` Peter Ujfalusi
2015-11-10  7:51   ` Peter Ujfalusi
2015-11-10 18:53 ` Applied "ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations" to the asoc tree Mark Brown

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.