[alsa-devel] [PATCH 2/4] ASoC: fsl: Update set_tdm_slot() semantics

Nicolin Chen nicoleotsuka at gmail.com
Tue Jan 13 10:58:34 CET 2015


On Mon, Jan 12, 2015 at 10:27:18AM +0100, Lars-Peter Clausen wrote:
> The fsl-ssi and imx-ssi drivers use inverted semantics for the tx_mask and
> rx_mask parameter of the set_tdm_slot() callback compared to rest of ASoC.
> This patch updates the driver's semantics to be consistent with the rest of
> ASoC, i.e. a set bit means a active slot and a cleared bit means a inactive
> slot.  This will allow us to use the set_tdm_slot() API in a more generic
> way.
> 
> Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
> ---
> Changes since v1:
>  * Don't change the esai driver as it does not use the inverted semantics.
> ---
>  sound/soc/fsl/eukrea-tlv320.c | 2 +-
>  sound/soc/fsl/fsl_ssi.c       | 4 ++--
>  sound/soc/fsl/fsl_utils.c     | 6 +++---
>  sound/soc/fsl/imx-mc13783.c   | 2 +-
>  sound/soc/fsl/imx-ssi.c       | 4 ++--
>  sound/soc/fsl/wm1133-ev1.c    | 4 ++--
>  6 files changed, 11 insertions(+), 11 deletions(-)

> diff --git a/sound/soc/fsl/imx-mc13783.c b/sound/soc/fsl/imx-mc13783.c
> index 9589452..9e6493d 100644
> --- a/sound/soc/fsl/imx-mc13783.c
> +++ b/sound/soc/fsl/imx-mc13783.c
> @@ -45,7 +45,7 @@ static int imx_mc13783_hifi_hw_params(struct snd_pcm_substream *substream,
>  	if (ret)
>  		return ret;
>  
> -	ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0x0, 0xfffffffc, 2, 16);
> +	ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0x3, 0x3, 2, 16);

Hmm..I just notice the original configuration was 0x0 with 0xfffffffc.
It doesn't look making sense to me by using 0x0 here but not sure if
it was intentional.

However, I suppose it should be fine since the time slot number was 2.

Acked-by: Nicolin Chen <nicoleotsuka at gmail.com>

Thank you


More information about the Alsa-devel mailing list