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

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

Merge "asoc: Check backend index to apply channel map" into audio-drivers.lnx.2.0

parents 8f9f0424 6c6884d8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -17463,6 +17463,12 @@ static int msm_routing_put_port_chmap_mixer(struct snd_kcontrol *kcontrol,
	uint32_t be_idx = ucontrol->value.integer.value[0];
	int i;
	if (be_idx < 0 || be_idx >= MSM_BACKEND_DAI_MAX) {
		pr_err("%s: Invalid Backend ID %d\n",
			__func__, be_idx);
		return -EINVAL;
	}
	for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++) {
		channel_map[i] = (char)(ucontrol->value.integer.value[i + 1]);
		if (channel_map[i] > PCM_MAX_CHMAP_ID) {