Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7f90db9 authored by Rohit Kumar's avatar Rohit Kumar Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm_sdw: Set codec directory name at runtime



Remove hardcoding of soundwire codec directory name and
assign directory name based on soundwire codec LPASS base
address.

Change-Id: Ie30b4f1a472201059842cedcf421ede418ad85f5
Signed-off-by: default avatarRohit Kumar <rohitkr@codeaurora.org>
parent 2fa1ec9b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1376,14 +1376,18 @@ int msm_sdw_codec_info_create_codec_entry(struct snd_info_entry *codec_root,
	struct snd_info_entry *version_entry;
	struct msm_sdw_priv *msm_sdw;
	struct snd_soc_card *card;
	char name[80];

	if (!codec_root || !codec)
		return -EINVAL;

	msm_sdw = snd_soc_codec_get_drvdata(codec);
	card = codec->component.card;

	snprintf(name, sizeof(name), "%x.%s", (u32)msm_sdw->sdw_base_addr,
			"msm-sdw-codec");
	msm_sdw->entry = snd_info_create_subdir(codec_root->module,
						  "152c1000.msm-sdw-codec",
						(const char *)name,
						codec_root);
	if (!msm_sdw->entry) {
		dev_err(codec->dev, "%s: failed to create msm_sdw entry\n",