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

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

Merge 173de853 on remote branch

Change-Id: I1ab3fcf83c8903ea657852c6ea7c0efbaa908e5c
parents 8adb07db 173de853
Loading
Loading
Loading
Loading
+7 −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),
+1 −1
Original line number Diff line number Diff line
@@ -1016,7 +1016,7 @@ static int msm_pcm_capture_copy(struct snd_pcm_substream *substream,
			goto fail;
		}

		if (size == 0 || size < prtd->pcm_count) {
		if ((size == 0 || size < prtd->pcm_count) && ((offset + size) < prtd->pcm_count)) {
			memset(bufptr + offset + size, 0, prtd->pcm_count - size);
			if (fbytes > prtd->pcm_count)
				size = xfer = prtd->pcm_count;
+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]);
Loading