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

Commit cc0ec843 authored by Walter Yang's avatar Walter Yang
Browse files

ASoC: msm: Create the codec entry for wcd934x codec



Create codec entry for wcd934x codec so that userspace can retrieve
the codec info.

CRs-Fixed: 1063367
Change-Id: Ie846b5edf1d8aaecce5140986dad8da69d608d5a
Signed-off-by: default avatarWalter Yang <yandongy@codeaurora.org>
parent 24bf042a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1866,6 +1866,17 @@ static int msm_audrx_init(struct snd_soc_pcm_runtime *rtd)
				tavil_set_spkr_gain_offset(rtd->codec,
							RX_GAIN_OFFSET_M1P5_DB);
		}
		card = rtd->card->snd_card;
		entry = snd_register_module_info(card->module, "codecs",
						 card->proc_root);
		if (!entry) {
			pr_debug("%s: Cannot create codecs module entry\n",
				 __func__);
			pdata->codec_root = NULL;
			goto done;
		}
		pdata->codec_root = entry;
		tavil_codec_info_create_codec_entry(pdata->codec_root, codec);
	} else {
		if (rtd_aux && rtd_aux->component)
			if (!strcmp(rtd_aux->component->name, WSA8810_NAME_1) ||
@@ -1886,6 +1897,7 @@ static int msm_audrx_init(struct snd_soc_pcm_runtime *rtd)
		pdata->codec_root = entry;
		tasha_codec_info_create_codec_entry(pdata->codec_root, codec);
	}
done:
	codec_reg_done = true;
	return 0;