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

Commit b68e8508 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 7a1110f2 on remote branch

Change-Id: Ia0cc0276e3b6036945a10de89d19e50bd67538c8
parents 627555e0 7a1110f2
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
 */

#include <linux/init.h>
@@ -626,6 +627,12 @@ static int hpcm_start_vocpcm(char *pcm_id, struct hpcm_drv *prtd,
		}
	}

	if (*no_of_tp != no_of_tp_req && *no_of_tp > 2) {
		pr_err("%s:: Invalid hpcm start request\n", __func__);
		memset(&prtd->start_cmd, 0, sizeof(struct start_cmd));
		return -EINVAL;
	}

	if ((prtd->mixer_conf.tx.enable || prtd->mixer_conf.rx.enable) &&
	    *no_of_tp == no_of_tp_req) {
		voc_send_cvp_start_vocpcm(voc_get_session_id(sess_name),
@@ -656,6 +663,11 @@ static void hpcm_copy_playback_data_from_queue(struct dai_data *dai_data,
				struct hpcm_buf_node, list);
		list_del(&buf_node->list);
		*len = buf_node->frame.len;
		if (*len > HPCM_MAX_VOC_PKT_SIZE) {
			pr_err("%s: Playback data len %d overflow\n",
					__func__, *len);
			return;
		}
		memcpy((u8 *)dai_data->vocpcm_ion_buffer.kvaddr,
		       &buf_node->frame.voc_pkt[0],
		       buf_node->frame.len);
@@ -683,6 +695,12 @@ static void hpcm_copy_capture_data_to_queue(struct dai_data *dai_data,
	if (dai_data->substream == NULL)
		return;

	if (len > HPCM_MAX_VOC_PKT_SIZE) {
		pr_err("%s: Copy capture data len %d overflow\n",
			__func__, len);
		return;
	}

	/* Copy out buffer packet into free_queue */
	spin_lock_irqsave(&dai_data->dsp_lock, dsp_flags);

+11 −0
Original line number Diff line number Diff line
@@ -1209,6 +1209,9 @@ static int32_t afe_callback(struct apr_client_data *data, void *priv)
				    sizeof(struct afe_port_mod_evt_rsp_hdr));
				uint32_t *dc_presence_flag = num_channels + 1;

				if (*num_channels < 1 || *num_channels > 4)
					return -EINVAL;

				for (i = 0; i < *num_channels; i++) {
					if (dc_presence_flag[i] == 1)
						dc_detected = true;
@@ -7901,6 +7904,14 @@ static int afe_sidetone_iir(u16 tx_port_id)
		pr_debug("%s: adding 2 to size:%d\n", __func__, size);
		size = size + 2;
	}

	if (size > MAX_SIDETONE_IIR_DATA_SIZE) {
		pr_err("%s: iir_config size is out of bounds:%d\n", __func__, size);
		mutex_unlock(&this_afe.cal_data[cal_index]->lock);
		ret = -EINVAL;
		goto done;
	}

	memcpy(&filter_data.iir_config, &st_iir_cal_info->iir_config, size);
	mutex_unlock(&this_afe.cal_data[cal_index]->lock);

+10 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
 * Author: Brian Swetland <swetland@google.com>
 *
 * This software is licensed under the terms of the GNU General Public
@@ -2289,6 +2290,15 @@ static int32_t q6asm_callback(struct apr_client_data *data, void *priv)

		config_debug_fs_read_cb();

		if (data->payload_size != (READDONE_IDX_SEQ_ID + 1) * sizeof(uint32_t)) {
			pr_err("%s:  payload size of %d is less than expected %d.\n",
					__func__, data->payload_size,
					((READDONE_IDX_SEQ_ID + 1) * sizeof(uint32_t)));
			spin_unlock_irqrestore(
				&(session[session_id].session_lock),
				flags);
			return -EINVAL;
		}
		dev_vdbg(ac->dev, "%s: ReadDone: status=%d buff_add=0x%x act_size=%d offset=%d\n",
				__func__, payload[READDONE_IDX_STATUS],
				payload[READDONE_IDX_BUFADD_LSW],
+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ EXPORT_SYMBOL(q6core_send_uevent);
static int parse_fwk_version_info(uint32_t *payload, uint16_t payload_size)
{
	size_t ver_size;
	int num_services;
	uint16_t num_services;

	pr_debug("%s: Payload info num services %d\n",
		 __func__, payload[4]);
+7 −0
Original line number Diff line number Diff line
@@ -2759,6 +2759,13 @@ static int voice_send_cvs_register_cal_cmd(struct voice_data *v)
		goto unlock;
	}

	if (col_data->cal_data.size >= MAX_COL_INFO_SIZE) {
		pr_err("%s: Invalid cal data size %d!\n",
			__func__, col_data->cal_data.size);
		ret = -EINVAL;
		goto unlock;
	}

	memcpy(&cvs_reg_cal_cmd.cvs_cal_data.column_info[0],
	       (void *) &((struct audio_cal_info_voc_col *)
	       col_data->cal_info)->data,