diff options
| author | Oder Chiou <oder_chiou@realtek.com> | 2015-01-12 22:13:15 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2015-01-14 12:19:51 -0500 |
| commit | 9913b9f549330e9b72945ec94cb9c7fe57d78cce (patch) | |
| tree | 23545a0d187d7b02e5730770635fc73ef8926db6 | |
| parent | e4b7e6a89955a27ccd608fce895b1b645c08deec (diff) | |
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: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/codecs/rt5677.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index f6affba734c3..88de759fb7fc 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c | |||
| @@ -4092,7 +4092,7 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, | |||
| 4092 | { | 4092 | { |
| 4093 | struct snd_soc_codec *codec = dai->codec; | 4093 | struct snd_soc_codec *codec = dai->codec; |
| 4094 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | 4094 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); |
| 4095 | unsigned int val = 0; | 4095 | unsigned int val = 0, slot_width_25 = 0; |
| 4096 | 4096 | ||
| 4097 | if (rx_mask || tx_mask) | 4097 | if (rx_mask || tx_mask) |
| 4098 | val |= (1 << 12); | 4098 | val |= (1 << 12); |
| @@ -4116,6 +4116,8 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, | |||
| 4116 | case 20: | 4116 | case 20: |
| 4117 | val |= (1 << 8); | 4117 | val |= (1 << 8); |
| 4118 | break; | 4118 | break; |
| 4119 | case 25: | ||
| 4120 | slot_width_25 = 0x8080; | ||
| 4119 | case 24: | 4121 | case 24: |
| 4120 | val |= (2 << 8); | 4122 | val |= (2 << 8); |
| 4121 | break; | 4123 | break; |
| @@ -4131,10 +4133,14 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, | |||
| 4131 | case RT5677_AIF1: | 4133 | case RT5677_AIF1: |
| 4132 | regmap_update_bits(rt5677->regmap, RT5677_TDM1_CTRL1, 0x1f00, | 4134 | regmap_update_bits(rt5677->regmap, RT5677_TDM1_CTRL1, 0x1f00, |
| 4133 | val); | 4135 | val); |
| 4136 | regmap_update_bits(rt5677->regmap, RT5677_DIG_MISC, 0x8000, | ||
| 4137 | slot_width_25); | ||
| 4134 | break; | 4138 | break; |
| 4135 | case RT5677_AIF2: | 4139 | case RT5677_AIF2: |
| 4136 | regmap_update_bits(rt5677->regmap, RT5677_TDM2_CTRL1, 0x1f00, | 4140 | regmap_update_bits(rt5677->regmap, RT5677_TDM2_CTRL1, 0x1f00, |
| 4137 | val); | 4141 | val); |
| 4142 | regmap_update_bits(rt5677->regmap, RT5677_DIG_MISC, 0x80, | ||
| 4143 | slot_width_25); | ||
| 4138 | break; | 4144 | break; |
| 4139 | default: | 4145 | default: |
| 4140 | break; | 4146 | break; |
