summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter Yang <yandongy@codeaurora.org>2016-08-26 20:34:09 +0800
committerWalter Yang <yandongy@codeaurora.org>2016-09-14 08:24:07 +0800
commitcc0ec8435faed1c362bc3c2bea18fb40b064b7ae (patch)
tree97abd6575948c8c56a4758309b819408273e4b75
parent24bf042aefd0c438db56fea9e1059f1c58d6acd3 (diff)
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: Walter Yang <yandongy@codeaurora.org>
-rw-r--r--sound/soc/msm/msmcobalt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/msm/msmcobalt.c b/sound/soc/msm/msmcobalt.c
index 523cd1ce4140..e9e991aaa845 100644
--- a/sound/soc/msm/msmcobalt.c
+++ b/sound/soc/msm/msmcobalt.c
@@ -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;