[PATCH 03/19] ASoC: Intel: use ACPI HID definition in ssp-common

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Brent Lu <brent.lu@xxxxxxxxx>

Use ACPI HID definition in ssp-common header for device name macros.
No functional change here.

Signed-off-by: Brent Lu <brent.lu@xxxxxxxxx>
Reviewed-by: Rander Wang <rander.wang@xxxxxxxxx>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
Signed-off-by: Bard Liao <yung-chuan.liao@xxxxxxxxxxxxxxx>
---
 sound/soc/intel/boards/sof_cirrus_common.h  |  9 ++---
 sound/soc/intel/boards/sof_maxim_common.h   | 13 +++++---
 sound/soc/intel/boards/sof_realtek_common.h | 37 +++++++++++++++------
 3 files changed, 40 insertions(+), 19 deletions(-)

diff --git a/sound/soc/intel/boards/sof_cirrus_common.h b/sound/soc/intel/boards/sof_cirrus_common.h
index ca438c12c386..d4ecf8d023d1 100644
--- a/sound/soc/intel/boards/sof_cirrus_common.h
+++ b/sound/soc/intel/boards/sof_cirrus_common.h
@@ -9,15 +9,16 @@
 #define __SOF_CIRRUS_COMMON_H
 
 #include <sound/soc.h>
+#include "sof_ssp_common.h"
 
 /*
  * Cirrus Logic CS35L41/CS35L53
  */
 #define CS35L41_CODEC_DAI	"cs35l41-pcm"
-#define CS35L41_DEV0_NAME	"i2c-CSC3541:00"
-#define CS35L41_DEV1_NAME	"i2c-CSC3541:01"
-#define CS35L41_DEV2_NAME	"i2c-CSC3541:02"
-#define CS35L41_DEV3_NAME	"i2c-CSC3541:03"
+#define CS35L41_DEV0_NAME	"i2c-" CS35L41_ACPI_HID ":00"
+#define CS35L41_DEV1_NAME	"i2c-" CS35L41_ACPI_HID ":01"
+#define CS35L41_DEV2_NAME	"i2c-" CS35L41_ACPI_HID ":02"
+#define CS35L41_DEV3_NAME	"i2c-" CS35L41_ACPI_HID ":03"
 
 void cs35l41_set_dai_link(struct snd_soc_dai_link *link);
 void cs35l41_set_codec_conf(struct snd_soc_card *card);
diff --git a/sound/soc/intel/boards/sof_maxim_common.h b/sound/soc/intel/boards/sof_maxim_common.h
index a095b47b856b..fe0212fbad8e 100644
--- a/sound/soc/intel/boards/sof_maxim_common.h
+++ b/sound/soc/intel/boards/sof_maxim_common.h
@@ -11,10 +11,14 @@
 #define __SOF_MAXIM_COMMON_H
 
 #include <sound/soc.h>
+#include "sof_ssp_common.h"
 
+/*
+ * Maxim MAX98373
+ */
 #define MAX_98373_CODEC_DAI	"max98373-aif1"
-#define MAX_98373_DEV0_NAME	"i2c-MX98373:00"
-#define MAX_98373_DEV1_NAME	"i2c-MX98373:01"
+#define MAX_98373_DEV0_NAME	"i2c-" MAX_98373_ACPI_HID ":00"
+#define MAX_98373_DEV1_NAME	"i2c-" MAX_98373_ACPI_HID ":01"
 
 extern struct snd_soc_dai_link_component max_98373_components[2];
 extern struct snd_soc_ops max_98373_ops;
@@ -27,7 +31,6 @@ int max_98373_trigger(struct snd_pcm_substream *substream, int cmd);
 /*
  * Maxim MAX98390
  */
-#define MAX_98390_ACPI_HID	"MX98390"
 #define MAX_98390_CODEC_DAI	"max98390-aif1"
 #define MAX_98390_DEV0_NAME	"i2c-" MAX_98390_ACPI_HID ":00"
 #define MAX_98390_DEV1_NAME	"i2c-" MAX_98390_ACPI_HID ":01"
@@ -41,8 +44,8 @@ void max_98390_set_codec_conf(struct device *dev, struct snd_soc_card *card);
  * Maxim MAX98357A/MAX98360A
  */
 #define MAX_98357A_CODEC_DAI	"HiFi"
-#define MAX_98357A_DEV0_NAME	"MX98357A:00"
-#define MAX_98360A_DEV0_NAME	"MX98360A:00"
+#define MAX_98357A_DEV0_NAME	MAX_98357A_ACPI_HID ":00"
+#define MAX_98360A_DEV0_NAME	MAX_98360A_ACPI_HID ":00"
 
 void max_98357a_dai_link(struct snd_soc_dai_link *link);
 void max_98360a_dai_link(struct snd_soc_dai_link *link);
diff --git a/sound/soc/intel/boards/sof_realtek_common.h b/sound/soc/intel/boards/sof_realtek_common.h
index 3ae99d8239e0..e3fa2924c1c1 100644
--- a/sound/soc/intel/boards/sof_realtek_common.h
+++ b/sound/soc/intel/boards/sof_realtek_common.h
@@ -11,36 +11,53 @@
 #define __SOF_REALTEK_COMMON_H
 
 #include <sound/soc.h>
+#include "sof_ssp_common.h"
+
+/*
+ * Realtek ALC1011
+ */
 
 #define RT1011_CODEC_DAI	"rt1011-aif"
-#define RT1011_DEV0_NAME	"i2c-10EC1011:00"
-#define RT1011_DEV1_NAME	"i2c-10EC1011:01"
-#define RT1011_DEV2_NAME	"i2c-10EC1011:02"
-#define RT1011_DEV3_NAME	"i2c-10EC1011:03"
+#define RT1011_DEV0_NAME	"i2c-" RT1011_ACPI_HID ":00"
+#define RT1011_DEV1_NAME	"i2c-" RT1011_ACPI_HID ":01"
+#define RT1011_DEV2_NAME	"i2c-" RT1011_ACPI_HID ":02"
+#define RT1011_DEV3_NAME	"i2c-" RT1011_ACPI_HID ":03"
 
 void sof_rt1011_dai_link(struct snd_soc_dai_link *link);
 void sof_rt1011_codec_conf(struct snd_soc_card *card);
 
+/*
+ * Realtek ALC1015 (AUTO)
+ */
 #define RT1015P_CODEC_DAI	"HiFi"
-#define RT1015P_DEV0_NAME	"RTL1015:00"
-#define RT1015P_DEV1_NAME	"RTL1015:01"
+#define RT1015P_DEV0_NAME	RT1015P_ACPI_HID ":00"
+#define RT1015P_DEV1_NAME	RT1015P_ACPI_HID ":01"
 
 void sof_rt1015p_dai_link(struct snd_soc_dai_link *link);
 void sof_rt1015p_codec_conf(struct snd_soc_card *card);
 
+/*
+ * Realtek ALC1015 (I2C)
+ */
 #define RT1015_CODEC_DAI	"rt1015-aif"
-#define RT1015_DEV0_NAME	"i2c-10EC1015:00"
-#define RT1015_DEV1_NAME	"i2c-10EC1015:01"
+#define RT1015_DEV0_NAME	"i2c-" RT1015_ACPI_HID ":00"
+#define RT1015_DEV1_NAME	"i2c-" RT1015_ACPI_HID ":01"
 
 void sof_rt1015_dai_link(struct snd_soc_dai_link *link);
 void sof_rt1015_codec_conf(struct snd_soc_card *card);
 
+/*
+ * Realtek ALC1308
+ */
 #define RT1308_CODEC_DAI	"rt1308-aif"
-#define RT1308_DEV0_NAME	"i2c-10EC1308:00"
+#define RT1308_DEV0_NAME	"i2c-" RT1308_ACPI_HID ":00"
 void sof_rt1308_dai_link(struct snd_soc_dai_link *link);
 
+/*
+ * Realtek ALC1019
+ */
 #define RT1019P_CODEC_DAI	"HiFi"
-#define RT1019P_DEV0_NAME	"RTL1019:00"
+#define RT1019P_DEV0_NAME	RT1019P_ACPI_HID ":00"
 
 void sof_rt1019p_dai_link(struct snd_soc_dai_link *link);
 
-- 
2.25.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux