diff mbox series

[1/6] ASoC: Intel: sof_sdw_rt711: remove hard-coded codec name

Message ID 20200717211337.31956-2-pierre-louis.bossart@linux.intel.com (mailing list archive)
State Accepted
Commit 1f891055c7d0ce665247c09e97db927f2db37ce7
Headers show
Series ASoC: Intel: machine driver updates for 5.9 | expand

Commit Message

Pierre-Louis Bossart July 17, 2020, 9:13 p.m. UTC
From: Bard Liao <yung-chuan.liao@linux.intel.com>

We can get codec name from dai link.

Suggested-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/sof_sdw_rt711.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/intel/boards/sof_sdw_rt711.c b/sound/soc/intel/boards/sof_sdw_rt711.c
index d4d75c8dc6b7..c8f84e9a3e4e 100644
--- a/sound/soc/intel/boards/sof_sdw_rt711.c
+++ b/sound/soc/intel/boards/sof_sdw_rt711.c
@@ -147,7 +147,7 @@  int sof_sdw_rt711_init(const struct snd_soc_acpi_link_adr *link,
 	if (!playback)
 		return 0;
 
-	ret = rt711_add_codec_device_props("sdw:0:25d:711:0");
+	ret = rt711_add_codec_device_props(dai_links->codecs[0].name);
 	if (ret < 0)
 		return ret;