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

Commit 3af13c7b authored by Srinivasarao P's avatar Srinivasarao P Committed by Tanya Dixit
Browse files

ASoC: msm: Use msm_route_ec_ref_rx for widget update



In default switch case msm_route_ec_ref_rx value is 0 or NONE
but mux contains value passed from user space to avoid this
error scenario widget power update should call with
msm_route_ec_ref_rx value.

CRs-Fixed: 970762
Change-Id: I6b03e9846022965d91796c6b17ca336697444ce3
Signed-off-by: default avatarSrinivasarao P <spathi@codeaurora.org>
parent 49d57d9b
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -2760,14 +2760,9 @@ static int msm_routing_ec_ref_rx_put(struct snd_kcontrol *kcontrol,
	struct snd_soc_dapm_widget_list *wlist =
					dapm_kcontrol_get_wlist(kcontrol);
	struct snd_soc_dapm_widget *widget = wlist->widgets[0];
	int mux = ucontrol->value.enumerated.item[0];
	struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
	struct snd_soc_dapm_update *update = NULL;
	if (mux >= e->items) {
		pr_err("%s: Invalid mux value %d\n", __func__, mux);
		return -EINVAL;
	}
	mutex_lock(&routing_lock);
	switch (ucontrol->value.integer.value[0]) {
@@ -2870,7 +2865,8 @@ static int msm_routing_ec_ref_rx_put(struct snd_kcontrol *kcontrol,
	pr_debug("%s: msm_route_ec_ref_rx = %d\n",
	    __func__, msm_route_ec_ref_rx);
	mutex_unlock(&routing_lock);
	snd_soc_dapm_mux_update_power(widget->dapm, kcontrol, mux, e, update);
	snd_soc_dapm_mux_update_power(widget->dapm, kcontrol,
					msm_route_ec_ref_rx, e, update);
	return 0;
}