diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2016-03-03 22:36:37 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-03-04 23:05:18 -0500 |
commit | ab738e4e3040b0985ab45780a688705f334e609b (patch) | |
tree | 402ca4641667bb785743fcec5d7bebd4d6bb21df | |
parent | 1fdb7c14a24689e9c7ec51aa16a3970a7ec0fdde (diff) |
ASoC: Intel: bytcr_rt5640: change quirk position
No added functionality
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 | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index 9a1752df45a9..a06cd1f99190 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c | |||
@@ -32,6 +32,18 @@ | |||
32 | #include "../atom/sst-atom-controls.h" | 32 | #include "../atom/sst-atom-controls.h" |
33 | #include "../common/sst-acpi.h" | 33 | #include "../common/sst-acpi.h" |
34 | 34 | ||
35 | enum { | ||
36 | BYT_RT5640_DMIC1_MAP, | ||
37 | BYT_RT5640_DMIC2_MAP, | ||
38 | BYT_RT5640_IN1_MAP, | ||
39 | }; | ||
40 | |||
41 | #define BYT_RT5640_MAP(quirk) ((quirk) & 0xff) | ||
42 | #define BYT_RT5640_DMIC_EN BIT(16) | ||
43 | |||
44 | static unsigned long byt_rt5640_quirk = BYT_RT5640_DMIC1_MAP | | ||
45 | BYT_RT5640_DMIC_EN; | ||
46 | |||
35 | static const struct snd_soc_dapm_widget byt_rt5640_widgets[] = { | 47 | static const struct snd_soc_dapm_widget byt_rt5640_widgets[] = { |
36 | SND_SOC_DAPM_HP("Headphone", NULL), | 48 | SND_SOC_DAPM_HP("Headphone", NULL), |
37 | SND_SOC_DAPM_MIC("Headset Mic", NULL), | 49 | SND_SOC_DAPM_MIC("Headset Mic", NULL), |
@@ -70,18 +82,6 @@ static const struct snd_soc_dapm_route byt_rt5640_intmic_in1_map[] = { | |||
70 | {"IN1P", NULL, "Internal Mic"}, | 82 | {"IN1P", NULL, "Internal Mic"}, |
71 | }; | 83 | }; |
72 | 84 | ||
73 | enum { | ||
74 | BYT_RT5640_DMIC1_MAP, | ||
75 | BYT_RT5640_DMIC2_MAP, | ||
76 | BYT_RT5640_IN1_MAP, | ||
77 | }; | ||
78 | |||
79 | #define BYT_RT5640_MAP(quirk) ((quirk) & 0xff) | ||
80 | #define BYT_RT5640_DMIC_EN BIT(16) | ||
81 | |||
82 | static unsigned long byt_rt5640_quirk = BYT_RT5640_DMIC1_MAP | | ||
83 | BYT_RT5640_DMIC_EN; | ||
84 | |||
85 | static const struct snd_kcontrol_new byt_rt5640_controls[] = { | 85 | static const struct snd_kcontrol_new byt_rt5640_controls[] = { |
86 | SOC_DAPM_PIN_SWITCH("Headphone"), | 86 | SOC_DAPM_PIN_SWITCH("Headphone"), |
87 | SOC_DAPM_PIN_SWITCH("Headset Mic"), | 87 | SOC_DAPM_PIN_SWITCH("Headset Mic"), |
@@ -174,7 +174,6 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime) | |||
174 | return ret; | 174 | return ret; |
175 | } | 175 | } |
176 | 176 | ||
177 | dmi_check_system(byt_rt5640_quirk_table); | ||
178 | switch (BYT_RT5640_MAP(byt_rt5640_quirk)) { | 177 | switch (BYT_RT5640_MAP(byt_rt5640_quirk)) { |
179 | case BYT_RT5640_IN1_MAP: | 178 | case BYT_RT5640_IN1_MAP: |
180 | custom_map = byt_rt5640_intmic_in1_map; | 179 | custom_map = byt_rt5640_intmic_in1_map; |
@@ -351,6 +350,9 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) | |||
351 | "%s%s%s", "i2c-", mach->id, ":00"); | 350 | "%s%s%s", "i2c-", mach->id, ":00"); |
352 | byt_rt5640_dais[MERR_DPCM_COMPR+1].codec_name = byt_rt5640_codec_name; | 351 | byt_rt5640_dais[MERR_DPCM_COMPR+1].codec_name = byt_rt5640_codec_name; |
353 | 352 | ||
353 | /* check quirks before creating card */ | ||
354 | dmi_check_system(byt_rt5640_quirk_table); | ||
355 | |||
354 | ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5640_card); | 356 | ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5640_card); |
355 | 357 | ||
356 | if (ret_val) { | 358 | if (ret_val) { |