mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 01:08:50 +00:00
ASoC: SOF: change signature of set_mach_params() callback
To set additional parameters, we need to have access to sdev, not the plain vanilla struct device pointer. No functionality change. 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-4-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ca6a012255
commit
17e9d6b0a3
@ -559,12 +559,12 @@ 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 device *dev)
|
struct snd_sof_dev *sdev)
|
||||||
{
|
{
|
||||||
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(dev);
|
mach_params->platform = dev_name(sdev->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Broadwell DAIs */
|
/* Broadwell DAIs */
|
||||||
|
@ -427,15 +427,6 @@ static void byt_machine_select(struct snd_sof_dev *sdev)
|
|||||||
sof_pdata->machine = mach;
|
sof_pdata->machine = mach;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void byt_set_mach_params(const struct snd_soc_acpi_mach *mach,
|
|
||||||
struct device *dev)
|
|
||||||
{
|
|
||||||
struct snd_soc_acpi_mach_params *mach_params;
|
|
||||||
|
|
||||||
mach_params = (struct snd_soc_acpi_mach_params *)&mach->mach_params;
|
|
||||||
mach_params->platform = dev_name(dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Baytrail DAIs */
|
/* Baytrail DAIs */
|
||||||
static struct snd_soc_dai_driver byt_dai[] = {
|
static struct snd_soc_dai_driver byt_dai[] = {
|
||||||
{
|
{
|
||||||
@ -506,6 +497,15 @@ static struct snd_soc_dai_driver byt_dai[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void byt_set_mach_params(const struct snd_soc_acpi_mach *mach,
|
||||||
|
struct snd_sof_dev *sdev)
|
||||||
|
{
|
||||||
|
struct snd_soc_acpi_mach_params *mach_params;
|
||||||
|
|
||||||
|
mach_params = (struct snd_soc_acpi_mach_params *)&mach->mach_params;
|
||||||
|
mach_params->platform = dev_name(sdev->dev);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Probe and remove.
|
* Probe and remove.
|
||||||
*/
|
*/
|
||||||
|
@ -1213,12 +1213,12 @@ static int hda_sdw_machine_select(struct snd_sof_dev *sdev)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
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 device *dev)
|
struct snd_sof_dev *sdev)
|
||||||
{
|
{
|
||||||
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(dev);
|
mach_params->platform = dev_name(sdev->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hda_machine_select(struct snd_sof_dev *sdev)
|
void hda_machine_select(struct snd_sof_dev *sdev)
|
||||||
|
@ -762,7 +762,7 @@ extern const struct sof_intel_dsp_desc adls_chip_info;
|
|||||||
/* machine driver select */
|
/* machine driver select */
|
||||||
void hda_machine_select(struct snd_sof_dev *sdev);
|
void hda_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 device *dev);
|
struct snd_sof_dev *sdev);
|
||||||
|
|
||||||
/* PCI driver selection and probe */
|
/* PCI driver selection and probe */
|
||||||
int hda_pci_intel_probe(struct pci_dev *pci, const struct pci_device_id *pci_id);
|
int hda_pci_intel_probe(struct pci_dev *pci, const struct pci_device_id *pci_id);
|
||||||
|
@ -497,12 +497,10 @@ snd_sof_machine_select(struct snd_sof_dev *sdev)
|
|||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
snd_sof_set_mach_params(const struct snd_soc_acpi_mach *mach,
|
snd_sof_set_mach_params(const struct snd_soc_acpi_mach *mach,
|
||||||
struct device *dev)
|
struct snd_sof_dev *sdev)
|
||||||
{
|
{
|
||||||
struct snd_sof_dev *sdev = dev_get_drvdata(dev);
|
|
||||||
|
|
||||||
if (sof_ops(sdev) && sof_ops(sdev)->set_mach_params)
|
if (sof_ops(sdev) && sof_ops(sdev)->set_mach_params)
|
||||||
sof_ops(sdev)->set_mach_params(mach, dev);
|
sof_ops(sdev)->set_mach_params(mach, sdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const struct snd_sof_dsp_ops
|
static inline const struct snd_sof_dsp_ops
|
||||||
|
@ -475,7 +475,7 @@ int sof_machine_check(struct snd_sof_dev *sdev)
|
|||||||
/* find machine */
|
/* find machine */
|
||||||
snd_sof_machine_select(sdev);
|
snd_sof_machine_select(sdev);
|
||||||
if (sof_pdata->machine) {
|
if (sof_pdata->machine) {
|
||||||
snd_sof_set_mach_params(sof_pdata->machine, sdev->dev);
|
snd_sof_set_mach_params(sof_pdata->machine, sdev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,7 +500,7 @@ int sof_machine_check(struct snd_sof_dev *sdev)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
sof_pdata->machine = mach;
|
sof_pdata->machine = mach;
|
||||||
snd_sof_set_mach_params(sof_pdata->machine, sdev->dev);
|
snd_sof_set_mach_params(sof_pdata->machine, sdev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@ struct snd_sof_dsp_ops {
|
|||||||
void *pdata); /* optional */
|
void *pdata); /* optional */
|
||||||
void (*machine_select)(struct snd_sof_dev *sdev); /* optional */
|
void (*machine_select)(struct snd_sof_dev *sdev); /* optional */
|
||||||
void (*set_mach_params)(const struct snd_soc_acpi_mach *mach,
|
void (*set_mach_params)(const struct snd_soc_acpi_mach *mach,
|
||||||
struct device *dev); /* optional */
|
struct snd_sof_dev *sdev); /* optional */
|
||||||
|
|
||||||
/* DAI ops */
|
/* DAI ops */
|
||||||
struct snd_soc_dai_driver *drv;
|
struct snd_soc_dai_driver *drv;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user