[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241016102333.294448-8-yung-chuan.liao@linux.intel.com>
Date: Wed, 16 Oct 2024 18:23:29 +0800
From: Bard Liao <yung-chuan.liao@...ux.intel.com>
To: broonie@...nel.org,
tiwai@...e.de,
vkoul@...nel.org
Cc: vinod.koul@...aro.org,
linux-kernel@...r.kernel.org,
linux-sound@...r.kernel.org,
pierre-louis.bossart@...ux.dev,
bard.liao@...el.com
Subject: [PATCH 07/11] ASoC: soc-acpi: introduce new 'machine check' callback
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
The existing machine_quirk() returns a pointer to a soc_acpi_mach
structure.
For SoundWire/SDCA support, we need a slightly different
functionality where a quirk function either validates or NACKs an
initial selection, based on additional firmware/DMI information.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@...ux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@...ux.intel.com>
---
include/sound/soc-acpi.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h
index ac7f9e791ee1..72e371a21767 100644
--- a/include/sound/soc-acpi.h
+++ b/include/sound/soc-acpi.h
@@ -185,6 +185,10 @@ struct snd_soc_acpi_link_adr {
* ACPI ID alone is not sufficient, wrong or misleading
* @quirk_data: data used to uniquely identify a machine, usually a list of
* audio codecs whose presence if checked with ACPI
+ * @machine_check: pointer to quirk function. The functionality is similar to
+ * the use of @machine_quirk, except that the return value is a boolean: the intent
+ * is to skip a machine if the additional hardware/firmware verification invalidates
+ * the initial selection in the snd_soc_acpi_mach table.
* @pdata: intended for platform data or machine specific-ops. This structure
* is not constant since this field may be updated at run-time
* @sof_tplg_filename: Sound Open Firmware topology file name, if enabled
@@ -203,6 +207,7 @@ struct snd_soc_acpi_mach {
const char *board;
struct snd_soc_acpi_mach * (*machine_quirk)(void *arg);
const void *quirk_data;
+ bool (*machine_check)(void *arg);
void *pdata;
struct snd_soc_acpi_mach_params mach_params;
const char *sof_tplg_filename;
--
2.43.0
Powered by blists - more mailing lists