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

Lars-Peter Clausen lars at metafoo.de
Sun Jan 11 12:45:35 CET 2015


On 01/10/2015 09:00 PM, Nicolin Chen wrote:
> Hi Lars,
>
> On Sat, Jan 10, 2015 at 11:52:35AM +0100, Lars-Peter Clausen wrote:
>> The fsl-esai, 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>
>> ---
>>   sound/soc/fsl/eukrea-tlv320.c | 2 +-
>>   sound/soc/fsl/fsl_esai.c      | 3 +++
>>   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 ++--
>
> The SSI part and these machine drivers (all of them using SSI) being
> patched should be okay because the SSI uses the inverted semantics.
>
> However, the mask for ESAI does follow the common semantics, that is,
> a set bit means a active slot and a cleared bit.
>
> After hardware or software reset, the ESAI_TSMA register is preset to
> 0x0000FFFF, which means that all 16 possible slots are enabled for data
> transmission.				-- From i.MX6 Reference Manual
>
> So I think ESAI doesn't need this change at all.

Thanks, will fix it and send a v2.

- Lars



More information about the Alsa-devel mailing list