diff mbox series

[RESEND,21/31] ASoC: intel/sdw_utils: move dai id common macros

Message ID 20240801111821.18076-1-Vijendar.Mukunda@amd.com
State Superseded
Headers show
Series AMD SOF based generic SoundWire machine driver | expand

Commit Message

Vijendar Mukunda Aug. 1, 2024, 11:18 a.m. UTC
Move dai id common macros from intel SoundWire generic driver to
soc_sdw_utils.h file so that it can be used by other platform machine
driver.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 include/sound/soc_sdw_utils.h           | 7 +++++++
 sound/soc/intel/boards/sof_sdw_common.h | 6 ------
 2 files changed, 7 insertions(+), 6 deletions(-)

Comments

Vijendar Mukunda Aug. 2, 2024, 8:45 a.m. UTC | #1
On 02/08/24 14:07, Krzysztof Kozlowski wrote:
> On 01/08/2024 13:18, Vijendar Mukunda wrote:
>> Add sof based Soundwire generic driver for amd platforms.
>> Currently support added for ACP6.3 based platforms.
>>
> ...
>
>> +static const struct platform_device_id mc_id_table[] = {
>> +	{ "amd_sof_sdw", },
>> +	{}
>> +};
>> +MODULE_DEVICE_TABLE(platform, mc_id_table);
>> +
>> +static struct platform_driver sof_sdw_driver = {
>> +	.driver = {
>> +		.name = "amd_sof_sdw",
>> +		.pm = &snd_soc_pm_ops,
>> +	},
>> +	.probe = mc_probe,
>> +	.remove_new = mc_remove,
>> +	.id_table = mc_id_table,
>> +};
>> +
>> +module_platform_driver(sof_sdw_driver);
>> +
>> +MODULE_DESCRIPTION("ASoC AMD SoundWire Generic Machine driver");
>> +MODULE_AUTHOR("Vijendar Mukunda <Vijendar.Mukunda@amd.com");
>> +MODULE_LICENSE("GPL");
>> +MODULE_ALIAS("platform:amd_sof_sdw");
> That's a total duplicate... standard form letter:
>
> You should not need MODULE_ALIAS() in normal cases. If you need it,
> usually it means your device ID table is wrong (e.g. misses either
> entries or MODULE_DEVICE_TABLE()). MODULE_ALIAS() is not a substitute
> for incomplete ID table.
Agreed. Will remove MODULE_ALIAS().
>
>
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h
index 9e84d1ab6cd0..13941ddd24c8 100644
--- a/include/sound/soc_sdw_utils.h
+++ b/include/sound/soc_sdw_utils.h
@@ -29,6 +29,13 @@ 
  */
 #define SOC_SDW_SIDECAR_AMPS		BIT(16)
 
+#define SOC_SDW_UNUSED_DAI_ID		-1
+#define SOC_SDW_JACK_OUT_DAI_ID		0
+#define SOC_SDW_JACK_IN_DAI_ID		1
+#define SOC_SDW_AMP_OUT_DAI_ID		2
+#define SOC_SDW_AMP_IN_DAI_ID		3
+#define SOC_SDW_DMIC_DAI_ID		4
+
 struct asoc_sdw_codec_info;
 
 struct asoc_sdw_dai_info {
diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h
index 664c3404eb81..8bfdffde16a3 100644
--- a/sound/soc/intel/boards/sof_sdw_common.h
+++ b/sound/soc/intel/boards/sof_sdw_common.h
@@ -16,12 +16,6 @@ 
 #include "sof_hdmi_common.h"
 
 #define MAX_HDMI_NUM 4
-#define SOC_SDW_UNUSED_DAI_ID -1
-#define SOC_SDW_JACK_OUT_DAI_ID 0
-#define SOC_SDW_JACK_IN_DAI_ID 1
-#define SOC_SDW_AMP_OUT_DAI_ID 2
-#define SOC_SDW_AMP_IN_DAI_ID 3
-#define SOC_SDW_DMIC_DAI_ID 4
 #define SOC_SDW_MAX_CPU_DAIS 16
 #define SOC_SDW_INTEL_BIDIR_PDI_BASE 2