mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
ASoC: msm: fix ec reference channel issue
Allow the number of ec reference channel is 0, in capture case. Change-Id: If2c10a1f885d51a5f99ef4641027fcfbb8fccebc Signed-off-by: Hongtao Peng <hongtaop@codeaurora.org>
This commit is contained in:
parent
659f37f76f
commit
33b18e716b
2 changed files with 4 additions and 12 deletions
7
asoc/msm-pcm-routing-v2.c
Normal file → Executable file
7
asoc/msm-pcm-routing-v2.c
Normal file → Executable file
|
|
@ -1410,13 +1410,6 @@ int msm_pcm_routing_set_stream_ec_ref_chmix_cfg(
|
|||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
if (cfg_data->input_channel != msm_ec_ref_ch) {
|
||||
pr_err("%s: mismatched input ch %d with port config ch %d\n",
|
||||
__func__, cfg_data->input_channel,
|
||||
msm_ec_ref_ch);
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
pr_debug("%s: fedai_id %d, input_channel %d output_channel %d\n",
|
||||
__func__, fedai_id,
|
||||
|
|
|
|||
9
dsp/q6adm.c
Normal file → Executable file
9
dsp/q6adm.c
Normal file → Executable file
|
|
@ -3235,8 +3235,8 @@ int adm_open_v2(int port_id, int path, int rate, int channel_mode, int topology,
|
|||
ec_ref_port_cfg->port_id :
|
||||
this_adm.ec_ref_rx;
|
||||
|
||||
int ec_ref_ch = ec_ref_port_cfg ?
|
||||
ec_ref_port_cfg->ch :
|
||||
int ec_ref_ch = ec_ref_chmix_cfg ?
|
||||
ec_ref_chmix_cfg->input_channel :
|
||||
this_adm.num_ec_ref_rx_chans;
|
||||
|
||||
int ec_ref_bit = ec_ref_port_cfg ?
|
||||
|
|
@ -3440,11 +3440,10 @@ int adm_open_v2(int port_id, int path, int rate, int channel_mode, int topology,
|
|||
if (ec_ref_ch != 0) {
|
||||
open_v8.endpoint_id_2 =
|
||||
ec_ref_port_id;
|
||||
ec_ref_port_id = AFE_PORT_INVALID;
|
||||
this_adm.ec_ref_rx = AFE_PORT_INVALID;
|
||||
} else {
|
||||
pr_err("%s: EC channels not set %d\n",
|
||||
pr_warn("%s: EC channels not set %d\n",
|
||||
__func__, ec_ref_ch);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue