Skip to content

Commit 2c22120

Browse files
plbossartbardliao
authored andcommitted
ASoC: soc-acpi: introduce new 'machine check' callback
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@linux.intel.com>
1 parent 85a9234 commit 2c22120

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

include/sound/soc-acpi.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ struct snd_soc_acpi_link_adr {
185185
* ACPI ID alone is not sufficient, wrong or misleading
186186
* @quirk_data: data used to uniquely identify a machine, usually a list of
187187
* audio codecs whose presence if checked with ACPI
188+
* @machine_check: pointer to quirk function. The functionality is similar to
189+
* the use of @machine_quirk, except that the return value is a boolean: the intent
190+
* is to skip a machine if the additional hardware/firmware verification invalidates
191+
* the initial selection in the snd_soc_acpi_mach table.
188192
* @pdata: intended for platform data or machine specific-ops. This structure
189193
* is not constant since this field may be updated at run-time
190194
* @sof_tplg_filename: Sound Open Firmware topology file name, if enabled
@@ -203,6 +207,7 @@ struct snd_soc_acpi_mach {
203207
const char *board;
204208
struct snd_soc_acpi_mach * (*machine_quirk)(void *arg);
205209
const void *quirk_data;
210+
bool (*machine_check)(void *arg);
206211
void *pdata;
207212
struct snd_soc_acpi_mach_params mach_params;
208213
const char *sof_tplg_filename;

0 commit comments

Comments
 (0)