[PATCH v6 4/7] ASoC: tas2562: Add rx and tx slot programming
Dan Murphy
dmurphy at ti.com
Thu Jun 25 00:08:32 CEST 2020
Hello
On 6/24/20 12:49 PM, Dan Murphy wrote:
> Add programming for the tdm slots for both tx and rx offsets.
>
> Signed-off-by: Dan Murphy <dmurphy at ti.com>
> ---
> sound/soc/codecs/tas2562.c | 17 ++++++++++++++++-
> sound/soc/codecs/tas2562.h | 4 ++++
> 2 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/tas2562.c b/sound/soc/codecs/tas2562.c
> index d26e30a2948c..2f1d4b697f01 100644
> --- a/sound/soc/codecs/tas2562.c
> +++ b/sound/soc/codecs/tas2562.c
> @@ -208,6 +208,22 @@ static int tas2562_set_dai_tdm_slot(struct snd_soc_dai *dai,
> if (ret < 0)
> return ret;
>
> + if (tx_mask > TAS2562_TX_OFF_MAX) {
> + dev_err(tas2562->dev, "TX slot is larger then %d",
> + TAS2562_TX_OFF_MAX);
> + return -EINVAL;
> + }
> +
> + ret = snd_soc_component_update_bits(component, TAS2562_TDM_CFG1,
> + TAS2562_RX_OFF_MASK, rx_mask << 1);
> + if (ret < 0)
> + return ret;
> +
> + ret = snd_soc_component_update_bits(component, TAS2562_TDM_CFG4,
> + TAS2562_TX_OFF_MASK, tx_mask << 1);
> + if (ret < 0)
> + return ret;
> +
I need to fix this patch to remove the slot programming during dai_fmt
as the code is not correct and resets the slots
Dan
More information about the Alsa-devel
mailing list