Skip to content

Commit d120514

Browse files
committed
ASoC: soc-acpi: add get_function_tplg_files ops
We always use a single topology that contains all PCM devices belonging to a machine configuration. However, with SDCA, we want to be able to load function topologies based on the supported device functions. This change is in preparation for loading those function topologies. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent d1b73da commit d120514

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

include/sound/soc-acpi.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/acpi.h>
1111
#include <linux/mod_devicetable.h>
1212
#include <linux/soundwire/sdw.h>
13+
#include <sound/soc.h>
1314

1415
struct snd_soc_acpi_package_context {
1516
char *name; /* package name */
@@ -193,6 +194,15 @@ struct snd_soc_acpi_link_adr {
193194
* is not constant since this field may be updated at run-time
194195
* @sof_tplg_filename: Sound Open Firmware topology file name, if enabled
195196
* @tplg_quirk_mask: quirks to select different topology files dynamically
197+
* @get_function_tplg_files: This is an optional callback, if specified then instead of
198+
* the single sof_tplg_filename the callback will return the list of function topology
199+
* files to be loaded.
200+
* Return value: The number of the files or negative ERRNO. 0 means that the single topology
201+
* file should be used, no function topology split can be used on the machine.
202+
* @card: the pointer of the card
203+
* @mach: the pointer of the machine driver
204+
* @prefix: the prefix of the topology file name. Typically, it is the path.
205+
* @tplg_files: the pointer of the array of the topology file names.
196206
*/
197207
/* Descriptor for SST ASoC machine driver */
198208
struct snd_soc_acpi_mach {
@@ -212,6 +222,9 @@ struct snd_soc_acpi_mach {
212222
struct snd_soc_acpi_mach_params mach_params;
213223
const char *sof_tplg_filename;
214224
const u32 tplg_quirk_mask;
225+
int (*get_function_tplg_files)(struct snd_soc_card *card,
226+
const struct snd_soc_acpi_mach *mach,
227+
const char *prefix, const char ***tplg_files);
215228
};
216229

217230
#define SND_SOC_ACPI_MAX_CODECS 3

0 commit comments

Comments
 (0)