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

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

Merge "ASoC: msm: qdsp6v2: Add initialization and range check in q6afe" into msm-4.9

parents 5e10a1cf d365038c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1183,6 +1183,7 @@ static int afe_send_hw_delay(u16 port_id, u32 rate)

	pr_debug("%s:\n", __func__);

	memset(&delay_entry, 0, sizeof(delay_entry));
	delay_entry.sample_rate = rate;
	if (afe_get_port_type(port_id) == MSM_AFE_PORT_TYPE_TX)
		ret = afe_get_cal_hw_delay(TX_DEVICE, &delay_entry);
@@ -2750,6 +2751,11 @@ static int q6afe_send_enc_config(u16 port_id,
	}
	memset(&config, 0, sizeof(config));
	index = q6audio_get_port_index(port_id);
	if (index < 0) {
		pr_err("%s: Invalid index number: %d\n", __func__, index);
		return -EINVAL;
	}

	config.hdr.hdr_field = APR_HDR_FIELD(APR_MSG_TYPE_SEQ_CMD,
				APR_HDR_LEN(APR_HDR_SIZE), APR_PKT_VER);
	config.hdr.pkt_size = sizeof(config);