Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33b18e71 authored by Hongtao Peng's avatar Hongtao Peng Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarHongtao Peng <hongtaop@codeaurora.org>
parent 659f37f7
Loading
Loading
Loading
Loading

asoc/msm-pcm-routing-v2.c

100644 → 100755
+0 −7
Original line number Diff line number Diff line
@@ -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,

dsp/q6adm.c

100644 → 100755
+4 −5
Original line number Diff line number Diff line
@@ -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;
				}
			}