diff options
author | Chunxu Li <chunxu.li@mediatek.com> | 2022-08-05 15:04:48 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-08-23 18:22:29 +0100 |
commit | 6ace85b9838dc0162b474dbbbb6b388e7561f6a7 (patch) | |
tree | ce35859b22d3b8f1ae4ab9dc08bfffcc1b44ff1a /sound/soc/sof/sof-audio.c | |
parent | 94f072748337424c9cf92cd018532a34db3a5516 (diff) | |
download | linux-stable-6ace85b9838dc0162b474dbbbb6b388e7561f6a7.tar.gz linux-stable-6ace85b9838dc0162b474dbbbb6b388e7561f6a7.tar.bz2 linux-stable-6ace85b9838dc0162b474dbbbb6b388e7561f6a7.zip |
ASoC: SOF: Introduce function sof_of_machine_select
From current design in sof_machine_check and snd_sof_new_platform_drv,
the SOF can only support ACPI type machine.
1. In sof_machine_check if there is no ACPI machine exist, the function
will return -ENODEV directly, that's we don't expected if we do not
base on ACPI machine.
2. In snd_sof_new_platform_drv the component driver need a driver name
to do ignore_machine, currently the driver name is obtained from
machine->drv_name, and the type of machine is snd_soc_acpi_mach.
So we add a new function named sof_of_machine_select that we can pass
sof_machine_check and obtain info required by snd_sof_new_platform_drv.
Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220805070449.6611-2-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-audio.c')
-rw-r--r-- | sound/soc/sof/sof-audio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c index 28976098a89e..c18e723435bd 100644 --- a/sound/soc/sof/sof-audio.c +++ b/sound/soc/sof/sof-audio.c @@ -10,6 +10,7 @@ #include <linux/bitfield.h> #include "sof-audio.h" +#include "sof-of-dev.h" #include "ops.h" static void sof_reset_route_setup_status(struct snd_sof_dev *sdev, struct snd_sof_widget *widget) |