Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1265925 > unrolled thread

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

Started byAndreas Dannenberg <dannenberg@ti.com>
First post2015-11-09 19:20 +0100
Last post2015-11-10 09:00 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations Andreas Dannenberg <dannenberg@ti.com> - 2015-11-09 19:20 +0100
    Re: [PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations Jyri Sarha <jsarha@ti.com> - 2015-11-09 22:40 +0100
    Re: [PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-11-10 09:00 +0100

#1265925 — [PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations

FromAndreas Dannenberg <dannenberg@ti.com>
Date2015-11-09 19:20 +0100
Subject[PATCH] ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations
Message-ID<qsZcS-1uY-19@gated-at.bofh.it>
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1266038

FromJyri Sarha <jsarha@ti.com>
Date2015-11-09 22:40 +0100
Message-ID<qt2kq-3Dy-19@gated-at.bofh.it>
In reply to#1265925
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);
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1266303

FromPeter Ujfalusi <peter.ujfalusi@ti.com>
Date2015-11-10 09:00 +0100
Message-ID<qtc0q-2bh-17@gated-at.bofh.it>
In reply to#1265925
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web