diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2016-08-12 17:27:46 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-08-15 10:14:57 -0400 |
commit | 5d98f58fd66ea164d7e317d57de77b7d7c1391ff (patch) | |
tree | 13ebf39224dd206d540f512bb2996d8a6a3f41bf | |
parent | 68817cdb3b9f1a19ac6741cdb7151f463d86ec7f (diff) |
ASoC: Intel: bytcr_rt5640: enable differential mic quirk
Some Baytrail-CR devices rely on analog mics connected with
differential pairs and not the single-ended default
Add quirk and enable it for T00TAF
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/intel/boards/bytcr_rt5640.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index 421a53cfa53f..085e57f95fb2 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c | |||
@@ -41,6 +41,7 @@ enum { | |||
41 | #define BYT_RT5640_MAP(quirk) ((quirk) & 0xff) | 41 | #define BYT_RT5640_MAP(quirk) ((quirk) & 0xff) |
42 | #define BYT_RT5640_DMIC_EN BIT(16) | 42 | #define BYT_RT5640_DMIC_EN BIT(16) |
43 | #define BYT_RT5640_MONO_SPEAKER BIT(17) | 43 | #define BYT_RT5640_MONO_SPEAKER BIT(17) |
44 | #define BYT_RT5640_DIFF_MIC BIT(18) /* defaut is single-ended */ | ||
44 | 45 | ||
45 | static unsigned long byt_rt5640_quirk = BYT_RT5640_DMIC1_MAP | | 46 | static unsigned long byt_rt5640_quirk = BYT_RT5640_DMIC1_MAP | |
46 | BYT_RT5640_DMIC_EN; | 47 | BYT_RT5640_DMIC_EN; |
@@ -148,7 +149,8 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { | |||
148 | DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TAF"), | 149 | DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TAF"), |
149 | }, | 150 | }, |
150 | .driver_data = (unsigned long *)(BYT_RT5640_IN1_MAP | | 151 | .driver_data = (unsigned long *)(BYT_RT5640_IN1_MAP | |
151 | BYT_RT5640_MONO_SPEAKER | 152 | BYT_RT5640_MONO_SPEAKER | |
153 | BYT_RT5640_DIFF_MIC | ||
152 | ), | 154 | ), |
153 | }, | 155 | }, |
154 | { | 156 | { |
@@ -223,6 +225,11 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime) | |||
223 | if (ret) | 225 | if (ret) |
224 | return ret; | 226 | return ret; |
225 | 227 | ||
228 | if (byt_rt5640_quirk & BYT_RT5640_DIFF_MIC) { | ||
229 | snd_soc_update_bits(codec, RT5640_IN1_IN2, RT5640_IN_DF1, | ||
230 | RT5640_IN_DF1); | ||
231 | } | ||
232 | |||
226 | if (byt_rt5640_quirk & BYT_RT5640_DMIC_EN) { | 233 | if (byt_rt5640_quirk & BYT_RT5640_DMIC_EN) { |
227 | ret = rt5640_dmic_enable(codec, 0, 0); | 234 | ret = rt5640_dmic_enable(codec, 0, 0); |
228 | if (ret) | 235 | if (ret) |