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

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

Merge 5db1ae06 on remote branch

Change-Id: I5bf213bad52532c1e5648152e3d63b0746cd08fc
parents ccfefc51 5db1ae06
Loading
Loading
Loading
Loading
+19 −8
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 */

#include <linux/module.h>
@@ -184,6 +185,7 @@ struct va_macro_priv {
	int dec_mode[VA_MACRO_NUM_DECIMATORS];
	u16 current_clk_id;
	int pcm_rate[VA_MACRO_NUM_DECIMATORS];
	bool dev_up;
};

static bool va_macro_get_data(struct snd_soc_component *component,
@@ -329,6 +331,7 @@ static int va_macro_event_handler(struct snd_soc_component *component,
		trace_printk("%s, enter SSR up\n", __func__);
		/* reset swr after ssr/pdr */
		va_priv->reset_swr = true;
		va_priv->dev_up = true;
		if (va_priv->swr_ctrl_data)
			swrm_wcd_notify(
				va_priv->swr_ctrl_data[0].va_swr_pdev,
@@ -338,6 +341,8 @@ static int va_macro_event_handler(struct snd_soc_component *component,
		bolero_rsc_clk_reset(va_dev, VA_CORE_CLK);
		break;
	case BOLERO_MACRO_EVT_SSR_DOWN:
		trace_printk("%s: BOLERO_MACRO_EVT_SSR_DOWN\n", __func__);
		va_priv->dev_up = false;
		if (va_priv->swr_ctrl_data) {
			swrm_wcd_notify(
				va_priv->swr_ctrl_data[0].va_swr_pdev,
@@ -441,9 +446,7 @@ static int va_macro_swr_pwr_event_v2(struct snd_soc_dapm_widget *w,
		}
		break;
	case SND_SOC_DAPM_POST_PMD:
		if (va_priv->current_clk_id == VA_CORE_CLK &&
			va_priv->va_swr_clk_cnt != 0 &&
			va_priv->tx_clk_status) {
		if (va_priv->current_clk_id == VA_CORE_CLK) {
			ret = bolero_clk_rsc_request_clock(va_priv->dev,
					va_priv->default_clk_id,
					TX_CORE_CLK,
@@ -452,6 +455,7 @@ static int va_macro_swr_pwr_event_v2(struct snd_soc_dapm_widget *w,
				dev_dbg(component->dev,
					"%s: request clock TX_CLK disable failed\n",
					__func__);
				if (va_priv->dev_up)
					break;
			}
			ret = bolero_clk_rsc_request_clock(va_priv->dev,
@@ -462,6 +466,7 @@ static int va_macro_swr_pwr_event_v2(struct snd_soc_dapm_widget *w,
				dev_dbg(component->dev,
					"%s: request clock VA_CLK disable failed\n",
					__func__);
				if (va_priv->dev_up)
					bolero_clk_rsc_request_clock(va_priv->dev,
						TX_CORE_CLK,
						TX_CORE_CLK,
@@ -704,6 +709,10 @@ static int va_macro_tx_va_mclk_enable(struct va_macro_priv *va_priv,
							   TX_CORE_CLK,
							   false);
			if (ret < 0) {
				if (va_priv->swr_clk_users == 0) {
					msm_cdc_pinctrl_select_sleep_state(
							va_priv->va_swr_gpio_p);
				}
				dev_err_ratelimited(va_priv->dev,
					"%s: swr request clk failed\n",
					__func__);
@@ -2839,6 +2848,8 @@ static int va_macro_init(struct snd_soc_component *component)
	}
	snd_soc_dapm_sync(dapm);

	va_priv->dev_up = true;

	for (i = 0; i < VA_MACRO_NUM_DECIMATORS; i++) {
		va_priv->va_hpf_work[i].va_priv = va_priv;
		va_priv->va_hpf_work[i].decimator = i;
+2 −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.
 */

#include <linux/init.h>
@@ -474,7 +475,7 @@ static const struct soc_enum tdm_config_enum[] = {
	SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(tdm_header_type), tdm_header_type),
};

static u16 afe_port_logging_port_id;
static u16 afe_port_logging_port_id = 0x9000;

static bool afe_port_logging_item[IDX_TDM_MAX];

+10 −8
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) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 */
#include <linux/init.h>
#include <linux/err.h>
@@ -3092,14 +3093,6 @@ static int msm_lsm_close(struct snd_pcm_substream *substream)
						__func__, ret);
				prtd->lsm_client->lab_started = false;
			}
			if (prtd->lsm_client->lab_buffer) {
				ret = msm_lsm_lab_buffer_alloc(prtd,
						LAB_BUFFER_DEALLOC);
				if (ret)
					dev_err(rtd->dev,
						"%s: lab buffer dealloc failed ret %d\n",
						__func__, ret);
			}
		}

		if (!atomic_read(&prtd->read_abort)) {
@@ -3120,6 +3113,15 @@ static int msm_lsm_close(struct snd_pcm_substream *substream)
		prtd->lsm_client->started = false;
	}

	if (prtd->lsm_client->lab_enable && prtd->lsm_client->lab_buffer) {
		ret = msm_lsm_lab_buffer_alloc(prtd,
				LAB_BUFFER_DEALLOC);
		if (ret)
			dev_err(rtd->dev,
				"%s: lab buffer dealloc failed ret %d\n",
				__func__, ret);
	}

	/*
	 * De-register existing sound models
	 * to free SM and CAL buffer, even if
+2 −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.
 */
#include <linux/slab.h>
#include <linux/kthread.h>
@@ -25,7 +26,7 @@
#include <dsp/voice_mhi.h>
#include <soc/qcom/secure_buffer.h>

#define TIMEOUT_MS 300
#define TIMEOUT_MS 1000


#define CMD_STATUS_SUCCESS 0

include/dsp/rtac.h

100644 → 100755
+2 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2011, 2013-2015, 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 */

#ifndef __RTAC_H__
@@ -13,7 +14,7 @@
#define RTAC_CVS		1
#define RTAC_VOICE_MODES	2

#define RTAC_MAX_ACTIVE_DEVICES		6
#define RTAC_MAX_ACTIVE_DEVICES		15
#define RTAC_MAX_ACTIVE_POPP		8

#define DEFAULT_APP_TYPE	0x00011130