mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
asoc: sm6150: Correct codec_root entry creation logic
Create codec root entry only if it is not created already in proc directory to avoid failures in codec version entry enumeration. Change-Id: I8c912be5fb0f229a3b5a088ebb5c0aeea06f67b2 Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
This commit is contained in:
parent
054e70ec0e
commit
5b2d30fa26
1 changed files with 20 additions and 16 deletions
|
|
@ -4912,15 +4912,17 @@ static int msm_audrx_tavil_init(struct snd_soc_pcm_runtime *rtd)
|
|||
}
|
||||
|
||||
card = rtd->card->snd_card;
|
||||
entry = snd_info_create_subdir(card->module, "codecs",
|
||||
card->proc_root);
|
||||
if (!entry) {
|
||||
pr_debug("%s: Cannot create codecs module entry\n",
|
||||
__func__);
|
||||
ret = 0;
|
||||
goto err;
|
||||
if (!pdata->codec_root) {
|
||||
entry = snd_info_create_subdir(card->module, "codecs",
|
||||
card->proc_root);
|
||||
if (!entry) {
|
||||
pr_debug("%s: Cannot create codecs module entry\n",
|
||||
__func__);
|
||||
ret = 0;
|
||||
goto err;
|
||||
}
|
||||
pdata->codec_root = entry;
|
||||
}
|
||||
pdata->codec_root = entry;
|
||||
tavil_codec_info_create_codec_entry(pdata->codec_root, component);
|
||||
|
||||
codec_reg_done = true;
|
||||
|
|
@ -5088,15 +5090,17 @@ static int msm_audrx_tasha_init(struct snd_soc_pcm_runtime *rtd)
|
|||
}
|
||||
|
||||
card = rtd->card->snd_card;
|
||||
entry = snd_info_create_subdir(card->module, "codecs",
|
||||
card->proc_root);
|
||||
if (!entry) {
|
||||
pr_debug("%s: Cannot create codecs module entry\n",
|
||||
__func__);
|
||||
ret = 0;
|
||||
goto err;
|
||||
if (!pdata->codec_root) {
|
||||
entry = snd_info_create_subdir(card->module, "codecs",
|
||||
card->proc_root);
|
||||
if (!entry) {
|
||||
pr_debug("%s: Cannot create codecs module entry\n",
|
||||
__func__);
|
||||
ret = 0;
|
||||
goto err;
|
||||
}
|
||||
pdata->codec_root = entry;
|
||||
}
|
||||
pdata->codec_root = entry;
|
||||
tasha_codec_info_create_codec_entry(pdata->codec_root, component);
|
||||
tasha_mbhc_zdet_gpio_ctrl(msm_config_hph_en0_gpio, component);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue