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>
This commit is contained in:
parent
68817cdb3b
commit
5d98f58fd6
|
@ -41,6 +41,7 @@ enum {
|
||||||
#define BYT_RT5640_MAP(quirk) ((quirk) & 0xff)
|
#define BYT_RT5640_MAP(quirk) ((quirk) & 0xff)
|
||||||
#define BYT_RT5640_DMIC_EN BIT(16)
|
#define BYT_RT5640_DMIC_EN BIT(16)
|
||||||
#define BYT_RT5640_MONO_SPEAKER BIT(17)
|
#define BYT_RT5640_MONO_SPEAKER BIT(17)
|
||||||
|
#define BYT_RT5640_DIFF_MIC BIT(18) /* defaut is single-ended */
|
||||||
|
|
||||||
static unsigned long byt_rt5640_quirk = BYT_RT5640_DMIC1_MAP |
|
static unsigned long byt_rt5640_quirk = BYT_RT5640_DMIC1_MAP |
|
||||||
BYT_RT5640_DMIC_EN;
|
BYT_RT5640_DMIC_EN;
|
||||||
|
@ -148,7 +149,8 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
|
||||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TAF"),
|
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TAF"),
|
||||||
},
|
},
|
||||||
.driver_data = (unsigned long *)(BYT_RT5640_IN1_MAP |
|
.driver_data = (unsigned long *)(BYT_RT5640_IN1_MAP |
|
||||||
BYT_RT5640_MONO_SPEAKER
|
BYT_RT5640_MONO_SPEAKER |
|
||||||
|
BYT_RT5640_DIFF_MIC
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -223,6 +225,11 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
if (byt_rt5640_quirk & BYT_RT5640_DIFF_MIC) {
|
||||||
|
snd_soc_update_bits(codec, RT5640_IN1_IN2, RT5640_IN_DF1,
|
||||||
|
RT5640_IN_DF1);
|
||||||
|
}
|
||||||
|
|
||||||
if (byt_rt5640_quirk & BYT_RT5640_DMIC_EN) {
|
if (byt_rt5640_quirk & BYT_RT5640_DMIC_EN) {
|
||||||
ret = rt5640_dmic_enable(codec, 0, 0);
|
ret = rt5640_dmic_enable(codec, 0, 0);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Reference in New Issue