diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2019-05-30 13:50:11 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-30 17:33:26 +0200 |
commit | 536cfd2f375d36f4316c0b93bb9e0eaf78e0ef6c (patch) | |
tree | 2990c0ffb102ef23ac6316329c71ce9083d8d0ee /sound/soc/intel/boards/bxt_da7219_max98357a.c | |
parent | ASoC: rt5677: Add missing voice activation register definitions (diff) | |
download | linux-536cfd2f375d36f4316c0b93bb9e0eaf78e0ef6c.tar.xz linux-536cfd2f375d36f4316c0b93bb9e0eaf78e0ef6c.zip |
ASoC: Intel: use common helpers to detect CPUs
We have duplicated code in multiple locations (atom, machine drivers,
SOF) to detect Baytrail, Cherrytrail and other SOCs. This is not very
elegant, and introduces dependencies on CONFIG_X86 that prevent
COMPILE_TEST from working.
Add common helpers to provide same functionality in a cleaner
way. This will also help support the DMI-based quirks being introduced
to handle SOF/SST autodetection.
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/bxt_da7219_max98357a.c')
-rw-r--r-- | sound/soc/intel/boards/bxt_da7219_max98357a.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c index 5cadb7f654f3..4ee769a86201 100644 --- a/sound/soc/intel/boards/bxt_da7219_max98357a.c +++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c @@ -16,7 +16,6 @@ * GNU General Public License for more details. */ -#include <asm/cpu_device_id.h> #include <linux/input.h> #include <linux/module.h> #include <linux/platform_device.h> @@ -29,6 +28,7 @@ #include "../../codecs/hdac_hdmi.h" #include "../../codecs/da7219.h" #include "../../codecs/da7219-aad.h" +#include "../common/soc-intel-quirks.h" #define BXT_DIALOG_CODEC_DAI "da7219-hifi" #define BXT_MAXIM_CODEC_DAI "HiFi" @@ -568,11 +568,6 @@ static struct snd_soc_dai_link broxton_dais[] = { }, }; -static const struct x86_cpu_id glk_ids[] = { - { X86_VENDOR_INTEL, 6, 0x7A }, /* Geminilake CPU_ID */ - {} -}; - #define NAME_SIZE 32 static int bxt_card_late_probe(struct snd_soc_card *card) { @@ -582,7 +577,7 @@ static int bxt_card_late_probe(struct snd_soc_card *card) int err, i = 0; char jack_name[NAME_SIZE]; - if (x86_match_cpu(glk_ids)) + if (soc_intel_is_glk()) snd_soc_dapm_add_routes(&card->dapm, gemini_map, ARRAY_SIZE(gemini_map)); else @@ -645,7 +640,7 @@ static int broxton_audio_probe(struct platform_device *pdev) broxton_audio_card.dev = &pdev->dev; snd_soc_card_set_drvdata(&broxton_audio_card, ctx); - if (x86_match_cpu(glk_ids)) { + if (soc_intel_is_glk()) { unsigned int i; broxton_audio_card.name = "glkda7219max"; |