diff options
author | Mark Brown <broonie@kernel.org> | 2022-07-11 15:51:01 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-07-11 15:51:01 +0100 |
commit | 39c5c44fc451c083908e77c3b2762fae2bf8acca (patch) | |
tree | 6e3c05c56e48fa9d29ad1f89614e9f0ef48459d4 /sound/soc/codecs/tlv320adcx140.c | |
parent | eaa27e7fe43f16fe587c3e93fd5c25ce86be3c43 (diff) | |
parent | 26b9f2fa7b1c6aba6fa9b83274a3e54868f69562 (diff) | |
download | linux-stable-39c5c44fc451c083908e77c3b2762fae2bf8acca.tar.gz linux-stable-39c5c44fc451c083908e77c3b2762fae2bf8acca.tar.bz2 linux-stable-39c5c44fc451c083908e77c3b2762fae2bf8acca.zip |
ASoC: Merge up fixes
Needed for the Rockchip driver.
Diffstat (limited to 'sound/soc/codecs/tlv320adcx140.c')
-rw-r--r-- | sound/soc/codecs/tlv320adcx140.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c index 6618ac4a7d5c..2844a9d2bc4a 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -33,7 +33,6 @@ struct adcx140_priv { bool micbias_vg; unsigned int dai_fmt; - unsigned int tdm_delay; unsigned int slot_width; }; @@ -790,12 +789,13 @@ static int adcx140_set_dai_tdm_slot(struct snd_soc_dai *codec_dai, { struct snd_soc_component *component = codec_dai->component; struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(component); - unsigned int lsb; - /* TDM based on DSP mode requires slots to be adjacent */ - lsb = __ffs(tx_mask); - if ((lsb + 1) != __fls(tx_mask)) { - dev_err(component->dev, "Invalid mask, slots must be adjacent\n"); + /* + * The chip itself supports arbitrary masks, but the driver currently + * only supports adjacent slots beginning at the first slot. + */ + if (tx_mask != GENMASK(__fls(tx_mask), 0)) { + dev_err(component->dev, "Only lower adjacent slots are supported\n"); return -EINVAL; } @@ -810,7 +810,6 @@ static int adcx140_set_dai_tdm_slot(struct snd_soc_dai *codec_dai, return -EINVAL; } - adcx140->tdm_delay = lsb; adcx140->slot_width = slot_width; return 0; |