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

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

Merge 98fd7ebd on remote branch

Change-Id: I6013b7afd4785d174da8a50628ce527f02e43d5d
parents 8e72f26f 98fd7ebd
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2013-2020, 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),
@@ -683,6 +690,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 is > HPCM_MAX_VOC_PKT_SIZE\n",
			__func__, len);
		return;
	}

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

+22 −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.
 */

#include <linux/init.h>
@@ -365,6 +366,13 @@ static void voip_process_ul_pkt(uint8_t *voc_pkt,
		switch (prtd->mode) {
		case MODE_AMR_WB:
		case MODE_AMR: {
			if (pkt_len <= DSP_FRAME_HDR_LEN) {
				pr_err("%s: pkt_len %d is < required len\n",
						pkt_len);
				spin_unlock_irqrestore(&prtd->dsp_ul_lock,
							dsp_flags);
				return;
			}
			/* Remove the DSP frame info header. Header format:
			 * Bits 0-3: Frame rate
			 * Bits 4-7: Frame type
@@ -385,6 +393,13 @@ static void voip_process_ul_pkt(uint8_t *voc_pkt,
		case MODE_4GV_NB:
		case MODE_4GV_WB:
		case MODE_4GV_NW: {
			if (pkt_len <= DSP_FRAME_HDR_LEN) {
				pr_err("%s: pkt_len %d is < required len\n",
						pkt_len);
				spin_unlock_irqrestore(&prtd->dsp_ul_lock,
							dsp_flags);
				return;
			}
			/* Remove the DSP frame info header.
			 * Header format:
			 * Bits 0-3: frame rate
@@ -422,6 +437,13 @@ static void voip_process_ul_pkt(uint8_t *voc_pkt,
			buf_node->frame.frm_hdr.timestamp = timestamp;
			voc_pkt = voc_pkt + DSP_FRAME_HDR_LEN;

			if (pkt_len <= 2 * DSP_FRAME_HDR_LEN) {
				pr_err("%s: pkt_len %d is < required len\n",
						pkt_len);
				spin_unlock_irqrestore(&prtd->dsp_ul_lock,
							dsp_flags);
				return;
			}
			/* There are two frames in the buffer. Length of the
			 * first frame:
			 */
+2 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
 */
#include <linux/module.h>
#include <linux/slab.h>
@@ -1668,7 +1668,7 @@ static int32_t adm_callback(struct apr_client_data *data, void *priv)
{
	uint32_t *payload;
	int port_idx, copp_idx, idx, client_id;
	int num_modules;
	uint32_t num_modules;
	int ret;
	int payload_size = 0, i = 0;
	struct msm_adsp_event_data *pp_event_package = NULL;
+2 −1
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.
 */

#include <linux/kernel.h>
@@ -204,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]);
+8 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
 */
#include <linux/slab.h>
#include <linux/kthread.h>
@@ -2852,6 +2852,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,