Commit 9913b9f5 authored by Oder Chiou's avatar Oder Chiou Committed by Mark Brown

ASoC: rt5677: Add the slot_width "25" support in the TDM mode

Add the slot_width "25" support in the TDM mode for the Intel platform.
Signed-off-by: default avatarOder Chiou <oder_chiou@realtek.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e4b7e6a8
...@@ -4092,7 +4092,7 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, ...@@ -4092,7 +4092,7 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
{ {
struct snd_soc_codec *codec = dai->codec; struct snd_soc_codec *codec = dai->codec;
struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
unsigned int val = 0; unsigned int val = 0, slot_width_25 = 0;
if (rx_mask || tx_mask) if (rx_mask || tx_mask)
val |= (1 << 12); val |= (1 << 12);
...@@ -4116,6 +4116,8 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, ...@@ -4116,6 +4116,8 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
case 20: case 20:
val |= (1 << 8); val |= (1 << 8);
break; break;
case 25:
slot_width_25 = 0x8080;
case 24: case 24:
val |= (2 << 8); val |= (2 << 8);
break; break;
...@@ -4131,10 +4133,14 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, ...@@ -4131,10 +4133,14 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
case RT5677_AIF1: case RT5677_AIF1:
regmap_update_bits(rt5677->regmap, RT5677_TDM1_CTRL1, 0x1f00, regmap_update_bits(rt5677->regmap, RT5677_TDM1_CTRL1, 0x1f00,
val); val);
regmap_update_bits(rt5677->regmap, RT5677_DIG_MISC, 0x8000,
slot_width_25);
break; break;
case RT5677_AIF2: case RT5677_AIF2:
regmap_update_bits(rt5677->regmap, RT5677_TDM2_CTRL1, 0x1f00, regmap_update_bits(rt5677->regmap, RT5677_TDM2_CTRL1, 0x1f00,
val); val);
regmap_update_bits(rt5677->regmap, RT5677_DIG_MISC, 0x80,
slot_width_25);
break; break;
default: default:
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment