Loading asoc/lahaina.c +15 −12 Original line number Diff line number Diff line Loading @@ -7636,17 +7636,14 @@ static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd) struct msm_asoc_mach_data *pdata = snd_soc_card_get_drvdata(rtd->card); int ret = 0; int wsa_active_devs = 0; if (codec_reg_done) { return 0; } if (pdata->wsa_max_devs > 0) { component = snd_soc_rtdcom_lookup(rtd, "wsa-codec.1"); if (!component) { pr_err("%s: wsa-codec.1 component is NULL\n", __func__); return -EINVAL; } if (component) { dapm = snd_soc_component_get_dapm(component); wsa883x_set_channel_map(component, &spkleft_ports[0], Loading @@ -7655,13 +7652,19 @@ static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd) wsa883x_codec_info_create_codec_entry(pdata->codec_root, component); wsa_active_devs++; } else { pr_info("%s: wsa-codec.1 component is NULL\n", __func__); } } /* If current platform has more than one WSA */ if (pdata->wsa_max_devs > 1) { if (pdata->wsa_max_devs > wsa_active_devs) { component = snd_soc_rtdcom_lookup(rtd, "wsa-codec.2"); if (!component) { pr_err("%s: wsa-codec.2 component is NULL\n", __func__); pr_err("%s: %d WSA is found. Expect %d WSA.", __func__, wsa_active_devs, pdata->wsa_max_devs); return -EINVAL; } Loading Loading
asoc/lahaina.c +15 −12 Original line number Diff line number Diff line Loading @@ -7636,17 +7636,14 @@ static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd) struct msm_asoc_mach_data *pdata = snd_soc_card_get_drvdata(rtd->card); int ret = 0; int wsa_active_devs = 0; if (codec_reg_done) { return 0; } if (pdata->wsa_max_devs > 0) { component = snd_soc_rtdcom_lookup(rtd, "wsa-codec.1"); if (!component) { pr_err("%s: wsa-codec.1 component is NULL\n", __func__); return -EINVAL; } if (component) { dapm = snd_soc_component_get_dapm(component); wsa883x_set_channel_map(component, &spkleft_ports[0], Loading @@ -7655,13 +7652,19 @@ static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd) wsa883x_codec_info_create_codec_entry(pdata->codec_root, component); wsa_active_devs++; } else { pr_info("%s: wsa-codec.1 component is NULL\n", __func__); } } /* If current platform has more than one WSA */ if (pdata->wsa_max_devs > 1) { if (pdata->wsa_max_devs > wsa_active_devs) { component = snd_soc_rtdcom_lookup(rtd, "wsa-codec.2"); if (!component) { pr_err("%s: wsa-codec.2 component is NULL\n", __func__); pr_err("%s: %d WSA is found. Expect %d WSA.", __func__, wsa_active_devs, pdata->wsa_max_devs); return -EINVAL; } Loading