Unverified Commit 974cccf4 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown
Browse files

ASoC: SOF: Intel: update set_mach_params()



Add information for num_dai_drivers and dai_drivers[], which will be
used in the refactored nocodec implementation

Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarDaniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220121.1542362-5-ranjani.sridharan@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 17e9d6b0
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -561,10 +561,14 @@ static void bdw_machine_select(struct snd_sof_dev *sdev)
static void bdw_set_mach_params(const struct snd_soc_acpi_mach *mach,
static void bdw_set_mach_params(const struct snd_soc_acpi_mach *mach,
				struct snd_sof_dev *sdev)
				struct snd_sof_dev *sdev)
{
{
	struct snd_sof_pdata *pdata = sdev->pdata;
	const struct sof_dev_desc *desc = pdata->desc;
	struct snd_soc_acpi_mach_params *mach_params;
	struct snd_soc_acpi_mach_params *mach_params;


	mach_params = (struct snd_soc_acpi_mach_params *)&mach->mach_params;
	mach_params = (struct snd_soc_acpi_mach_params *)&mach->mach_params;
	mach_params->platform = dev_name(sdev->dev);
	mach_params->platform = dev_name(sdev->dev);
	mach_params->num_dai_drivers = desc->ops->num_drv;
	mach_params->dai_drivers = desc->ops->drv;
}
}


/* Broadwell DAIs */
/* Broadwell DAIs */
+4 −0
Original line number Original line Diff line number Diff line
@@ -500,10 +500,14 @@ static struct snd_soc_dai_driver byt_dai[] = {
static void byt_set_mach_params(const struct snd_soc_acpi_mach *mach,
static void byt_set_mach_params(const struct snd_soc_acpi_mach *mach,
				struct snd_sof_dev *sdev)
				struct snd_sof_dev *sdev)
{
{
	struct snd_sof_pdata *pdata = sdev->pdata;
	const struct sof_dev_desc *desc = pdata->desc;
	struct snd_soc_acpi_mach_params *mach_params;
	struct snd_soc_acpi_mach_params *mach_params;


	mach_params = (struct snd_soc_acpi_mach_params *)&mach->mach_params;
	mach_params = (struct snd_soc_acpi_mach_params *)&mach->mach_params;
	mach_params->platform = dev_name(sdev->dev);
	mach_params->platform = dev_name(sdev->dev);
	mach_params->num_dai_drivers = desc->ops->num_drv;
	mach_params->dai_drivers = desc->ops->drv;
}
}


/*
/*
+4 −0
Original line number Original line Diff line number Diff line
@@ -1215,10 +1215,14 @@ static int hda_sdw_machine_select(struct snd_sof_dev *sdev)
void hda_set_mach_params(const struct snd_soc_acpi_mach *mach,
void hda_set_mach_params(const struct snd_soc_acpi_mach *mach,
			 struct snd_sof_dev *sdev)
			 struct snd_sof_dev *sdev)
{
{
	struct snd_sof_pdata *pdata = sdev->pdata;
	const struct sof_dev_desc *desc = pdata->desc;
	struct snd_soc_acpi_mach_params *mach_params;
	struct snd_soc_acpi_mach_params *mach_params;


	mach_params = (struct snd_soc_acpi_mach_params *)&mach->mach_params;
	mach_params = (struct snd_soc_acpi_mach_params *)&mach->mach_params;
	mach_params->platform = dev_name(sdev->dev);
	mach_params->platform = dev_name(sdev->dev);
	mach_params->num_dai_drivers = desc->ops->num_drv;
	mach_params->dai_drivers = desc->ops->drv;
}
}


void hda_machine_select(struct snd_sof_dev *sdev)
void hda_machine_select(struct snd_sof_dev *sdev)