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

Commit b8996b2e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm8x16-wcd: update digital mute handling on decimators"

parents eb4661a5 ff561881
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -4745,14 +4745,24 @@ int msm8x16_wcd_digital_mute(struct snd_soc_dai *dai, int mute)
		if (msm8x16_wcd->dec_active[i])
			decimator = i + 1;
		if (decimator && decimator <= NUM_DECIMATORS) {
			pr_debug("%s: Mute = %d Decimator = %d", __func__,
					mute, decimator);
			tx_vol_ctl_reg = MSM8X16_WCD_A_CDC_TX1_VOL_CTL_CFG +
			/* mute/unmute decimators corresponding to Tx DAI's */
			if (dai->id == AIF2_VIFEED && decimator > 2) {
				tx_vol_ctl_reg =
					MSM8X16_WCD_A_CDC_TX1_VOL_CTL_CFG +
					32 * (decimator - 1);
				snd_soc_update_bits(codec, tx_vol_ctl_reg,
						0x01, mute);
			} else if (dai->id == AIF1_CAP && decimator < 3) {
				tx_vol_ctl_reg =
					MSM8X16_WCD_A_CDC_TX1_VOL_CTL_CFG +
					32 * (decimator - 1);
			snd_soc_update_bits(codec, tx_vol_ctl_reg, 0x01, mute);
				snd_soc_update_bits(codec, tx_vol_ctl_reg,
						0x01, mute);
			}
		}
		decimator = 0;
	}

	return 0;
}