asoc: Initialize right WSA when wsa_max_dev is 1
Initialize right WSA when wsa_max_dev is 1, by default when wsa max dev is 1, left wsa is initialized but when left wsa is not enabled, Initialize Right wsa. Change-Id: Id00813ee2d3c7c4e847656c786da2800f05ca5b3 Signed-off-by: Sarath Varma Ganapathiraju <quic_ganavarm@quicinc.com>
This commit is contained in:
parent
11076f2ce0
commit
be4ae2fafd
@ -1709,15 +1709,25 @@ static int msm_int_wsa883x_init(struct snd_soc_pcm_runtime *rtd)
|
||||
component = snd_soc_rtdcom_lookup(rtd, "wsa-codec.1");
|
||||
if (!component) {
|
||||
pr_err("%s: wsa-codec.1 component is NULL\n", __func__);
|
||||
return -EINVAL;
|
||||
component = snd_soc_rtdcom_lookup(rtd, "wsa-codec.2");
|
||||
if (!component) {
|
||||
pr_err("%s: wsa-codec.2 component is NULL\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
wsa883x_set_channel_map(component, &spkright_ports[0],
|
||||
WSA883X_MAX_SWR_PORTS, &ch_mask[0],
|
||||
&ch_rate[0], &spkright_port_types[0]);
|
||||
|
||||
wsa883x_codec_info_create_codec_entry(pdata->codec_root,
|
||||
component);
|
||||
} else {
|
||||
wsa883x_set_channel_map(component, &spkleft_ports[0],
|
||||
WSA883X_MAX_SWR_PORTS, &ch_mask[0],
|
||||
&ch_rate[0], &spkleft_port_types[0]);
|
||||
|
||||
wsa883x_codec_info_create_codec_entry(pdata->codec_root,
|
||||
component);
|
||||
}
|
||||
|
||||
wsa883x_set_channel_map(component, &spkleft_ports[0],
|
||||
WSA883X_MAX_SWR_PORTS, &ch_mask[0],
|
||||
&ch_rate[0], &spkleft_port_types[0]);
|
||||
|
||||
wsa883x_codec_info_create_codec_entry(pdata->codec_root,
|
||||
component);
|
||||
}
|
||||
|
||||
/* If current platform has more than one WSA */
|
||||
@ -1794,15 +1804,25 @@ static int msm_int_wsa884x_init(struct snd_soc_pcm_runtime *rtd)
|
||||
component = snd_soc_rtdcom_lookup(rtd, "wsa-codec.1");
|
||||
if (!component) {
|
||||
pr_err("%s: wsa-codec.1 component is NULL\n", __func__);
|
||||
return -EINVAL;
|
||||
component = snd_soc_rtdcom_lookup(rtd, "wsa-codec.2");
|
||||
if (!component) {
|
||||
pr_err("%s: wsa-codec.2 component is NULL\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
wsa884x_set_channel_map(component, &spkright_ports[0],
|
||||
WSA884X_MAX_SWR_PORTS, &ch_mask[0],
|
||||
&ch_rate[0], &spkright_port_types[0]);
|
||||
|
||||
wsa884x_codec_info_create_codec_entry(pdata->codec_root,
|
||||
component);
|
||||
} else {
|
||||
wsa884x_set_channel_map(component, &spkleft_ports[0],
|
||||
WSA884X_MAX_SWR_PORTS, &ch_mask[0],
|
||||
&ch_rate[0], &spkleft_port_types[0]);
|
||||
|
||||
wsa884x_codec_info_create_codec_entry(pdata->codec_root,
|
||||
component);
|
||||
}
|
||||
|
||||
wsa884x_set_channel_map(component, &spkleft_ports[0],
|
||||
WSA884X_MAX_SWR_PORTS, &ch_mask[0],
|
||||
&ch_rate[0], &spkleft_port_types[0]);
|
||||
|
||||
wsa884x_codec_info_create_codec_entry(pdata->codec_root,
|
||||
component);
|
||||
}
|
||||
|
||||
/* If current platform has more than one WSA */
|
||||
|
Loading…
Reference in New Issue
Block a user