summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/bytcht_es8316.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart2019-05-30 13:50:11 +0200
committerMark Brown2019-05-30 17:33:26 +0200
commit536cfd2f375d36f4316c0b93bb9e0eaf78e0ef6c (patch)
tree2990c0ffb102ef23ac6316329c71ce9083d8d0ee /sound/soc/intel/boards/bytcht_es8316.c
parentASoC: rt5677: Add missing voice activation register definitions (diff)
downloadkernel-qcow2-linux-536cfd2f375d36f4316c0b93bb9e0eaf78e0ef6c.tar.gz
kernel-qcow2-linux-536cfd2f375d36f4316c0b93bb9e0eaf78e0ef6c.tar.xz
kernel-qcow2-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/bytcht_es8316.c')
-rw-r--r--sound/soc/intel/boards/bytcht_es8316.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index e8c585ffd04d..d08715ac3945 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -30,8 +30,6 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
-#include <asm/cpu_device_id.h>
-#include <asm/intel-family.h>
#include <asm/platform_sst_audio.h>
#include <sound/jack.h>
#include <sound/pcm.h>
@@ -40,6 +38,7 @@
#include <sound/soc-acpi.h>
#include "../atom/sst-atom-controls.h"
#include "../common/sst-dsp.h"
+#include "../common/soc-intel-quirks.h"
/* jd-inv + terminating entry */
#define MAX_NO_PROPS 2
@@ -430,11 +429,6 @@ static struct snd_soc_card byt_cht_es8316_card = {
.resume_post = byt_cht_es8316_resume,
};
-static const struct x86_cpu_id baytrail_cpu_ids[] = {
- { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT }, /* Valleyview */
- {}
-};
-
static const struct acpi_gpio_params first_gpio = { 0, 0, false };
static const struct acpi_gpio_mapping byt_cht_es8316_gpios[] = {
@@ -506,8 +500,8 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
dmi_id = dmi_first_match(byt_cht_es8316_quirk_table);
if (dmi_id) {
quirk = (unsigned long)dmi_id->driver_data;
- } else if (x86_match_cpu(baytrail_cpu_ids) &&
- mach->mach_params.acpi_ipc_irq_index == 0) {
+ } else if (soc_intel_is_byt() &&
+ mach->mach_params.acpi_ipc_irq_index == 0) {
/* On BYTCR default to SSP0, internal-mic-in2-map, mono-spk */
quirk = BYT_CHT_ES8316_SSP0 | BYT_CHT_ES8316_INTMIC_IN2_MAP |
BYT_CHT_ES8316_MONO_SPEAKER;