Commit e8acf91a authored by Hans de Goede's avatar Hans de Goede Committed by Mark Brown

ASoC: Intel: bytcht_es8316: Add is_bytcr helper variable

Add a is_bytcr helper variable to probe().

This is a preparation patch for determining the quirks through querying
the ACPI Device-Specific-Method (DSM) on the codec-device.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231202123946.54347-4-hdegoede@redhat.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent b71e1d37
...@@ -471,10 +471,10 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) ...@@ -471,10 +471,10 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
struct byt_cht_es8316_private *priv; struct byt_cht_es8316_private *priv;
const struct dmi_system_id *dmi_id; const struct dmi_system_id *dmi_id;
struct fwnode_handle *fwnode; struct fwnode_handle *fwnode;
bool sof_parent, is_bytcr;
const char *platform_name; const char *platform_name;
struct acpi_device *adev; struct acpi_device *adev;
struct device *codec_dev; struct device *codec_dev;
bool sof_parent;
unsigned int cnt = 0; unsigned int cnt = 0;
int dai_index = 0; int dai_index = 0;
int i; int i;
...@@ -524,11 +524,11 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) ...@@ -524,11 +524,11 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
es83xx_dsm_dump(priv->codec_dev); es83xx_dsm_dump(priv->codec_dev);
/* Check for BYTCR or other platform and setup quirks */ /* Check for BYTCR or other platform and setup quirks */
is_bytcr = soc_intel_is_byt() && mach->mach_params.acpi_ipc_irq_index == 0;
dmi_id = dmi_first_match(byt_cht_es8316_quirk_table); dmi_id = dmi_first_match(byt_cht_es8316_quirk_table);
if (dmi_id) { if (dmi_id) {
quirk = (unsigned long)dmi_id->driver_data; quirk = (unsigned long)dmi_id->driver_data;
} else if (soc_intel_is_byt() && } else if (is_bytcr) {
mach->mach_params.acpi_ipc_irq_index == 0) {
/* On BYTCR default to SSP0, internal-mic-in2-map, mono-spk */ /* On BYTCR default to SSP0, internal-mic-in2-map, mono-spk */
quirk = BYT_CHT_ES8316_SSP0 | BYT_CHT_ES8316_INTMIC_IN2_MAP | quirk = BYT_CHT_ES8316_SSP0 | BYT_CHT_ES8316_INTMIC_IN2_MAP |
BYT_CHT_ES8316_MONO_SPEAKER; BYT_CHT_ES8316_MONO_SPEAKER;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment