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

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

Merge 227a982a on remote branch

Change-Id: I9bef57b6645f4c8a820510a345c0f446539ad939
parents 0457661b 227a982a
Loading
Loading
Loading
Loading
+5 −2
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) 2012-2021, The Linux Foundation. All rights reserved.
 */


@@ -1009,7 +1009,10 @@ static int msm_pcm_capture_copy(struct snd_pcm_substream *substream,
		pr_debug("Offset value = %d\n", offset);
		if (size == 0 || size < prtd->pcm_count) {
			memset(bufptr + offset + size, 0, prtd->pcm_count - size);
			if (fbytes > prtd->pcm_count)
				size = xfer = prtd->pcm_count;
			else
				size = xfer = fbytes;
		}

		if (copy_to_user(buf, bufptr+offset, xfer)) {
+8 −7
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) 2012-2021, The Linux Foundation. All rights reserved.
 */
#include <linux/init.h>
@@ -22773,9 +22773,9 @@ static int msm_routing_put_app_type_cfg_control(struct snd_kcontrol *kcontrol,
	memset(app_type_cfg, 0, MAX_APP_TYPES*
				sizeof(struct msm_pcm_routing_app_type_data));
	if (num_app_types > MAX_APP_TYPES) {
		pr_err("%s: number of app types exceed the max supported\n",
			__func__);
	if (num_app_types > MAX_APP_TYPES || num_app_types < 0) {
		pr_err("%s: number of app types %d is invalid\n",
			__func__, num_app_types);
		return -EINVAL;
	}
	for (j = 0; j < num_app_types; j++) {
@@ -22979,9 +22979,10 @@ static int msm_routing_put_lsm_app_type_cfg_control(
	int i = 0, j;
	mutex_lock(&routing_lock);
	if (ucontrol->value.integer.value[0] > MAX_APP_TYPES) {
		pr_err("%s: number of app types exceed the max supported\n",
			__func__);
	if (ucontrol->value.integer.value[0] < 0 ||
	    ucontrol->value.integer.value[0] > MAX_APP_TYPES) {
		pr_err("%s: number of app types %ld is invalid\n",
			__func__, ucontrol->value.integer.value[0]);
		mutex_unlock(&routing_lock);
		return -EINVAL;
	}
+4 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ static void swrm_unlock_sleep(struct swr_mstr_ctrl *swrm);
static u32 swr_master_read(struct swr_mstr_ctrl *swrm, unsigned int reg_addr);
static void swr_master_write(struct swr_mstr_ctrl *swrm, u16 reg_addr, u32 val);
static int swrm_runtime_resume(struct device *dev);
static void swrm_wait_for_fifo_avail(struct swr_mstr_ctrl *swrm, int swrm_rd_wr);

static u8 swrm_get_clk_div(int mclk_freq, int bus_clk_freq)
{
@@ -627,6 +628,9 @@ static int swr_master_bulk_write(struct swr_mstr_ctrl *swrm, u32 *reg_addr,
		 * This still meets the hardware spec
		 */
			usleep_range(50, 55);
			if (reg_addr[i] == SWRM_CMD_FIFO_WR_CMD)
				swrm_wait_for_fifo_avail(swrm,
							 SWRM_WR_CHECK_AVAIL);
			swr_master_write(swrm, reg_addr[i], val[i]);
		}
		usleep_range(100, 110);