ASoC: soc-acpi: add new fields for mach_params
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 9 Apr 2021 22:01:17 +0000 (15:01 -0700)
committerMark Brown <broonie@kernel.org>
Mon, 12 Apr 2021 16:05:51 +0000 (17:05 +0100)
We currently have an ugly way of handling the SOF nocodec mode, with
blatant violations between layers. To create the nocodec card, let's
add two new fields and the existing mach_params structure, that way
there will be no differences with regular cards.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-acpi.h

index c450750..2f3fa38 100644 (file)
@@ -63,6 +63,8 @@ static inline struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
  * @common_hdmi_codec_drv: use commom HDAudio HDMI codec driver
  * @link_mask: links enabled on the board
  * @links: array of link _ADR descriptors, null terminated
+ * @num_dai_drivers: number of elements in @dai_drivers
+ * @dai_drivers: pointer to dai_drivers, used e.g. in nocodec mode
  */
 struct snd_soc_acpi_mach_params {
        u32 acpi_ipc_irq_index;
@@ -72,6 +74,8 @@ struct snd_soc_acpi_mach_params {
        bool common_hdmi_codec_drv;
        u32 link_mask;
        const struct snd_soc_acpi_link_adr *links;
+       u32 num_dai_drivers;
+       struct snd_soc_dai_driver *dai_drivers;
 };
 
 /**