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

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

Merge 80875035 on remote branch

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


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


static bool va_macro_get_data(struct snd_soc_component *component,
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__);
		trace_printk("%s, enter SSR up\n", __func__);
		/* reset swr after ssr/pdr */
		/* reset swr after ssr/pdr */
		va_priv->reset_swr = true;
		va_priv->reset_swr = true;
		va_priv->dev_up = true;
		if (va_priv->swr_ctrl_data)
		if (va_priv->swr_ctrl_data)
			swrm_wcd_notify(
			swrm_wcd_notify(
				va_priv->swr_ctrl_data[0].va_swr_pdev,
				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);
		bolero_rsc_clk_reset(va_dev, VA_CORE_CLK);
		break;
		break;
	case BOLERO_MACRO_EVT_SSR_DOWN:
	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) {
		if (va_priv->swr_ctrl_data) {
			swrm_wcd_notify(
			swrm_wcd_notify(
				va_priv->swr_ctrl_data[0].va_swr_pdev,
				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;
		break;
	case SND_SOC_DAPM_POST_PMD:
	case SND_SOC_DAPM_POST_PMD:
		if (va_priv->current_clk_id == VA_CORE_CLK &&
		if (va_priv->current_clk_id == VA_CORE_CLK) {
			va_priv->va_swr_clk_cnt != 0 &&
			va_priv->tx_clk_status) {
			ret = bolero_clk_rsc_request_clock(va_priv->dev,
			ret = bolero_clk_rsc_request_clock(va_priv->dev,
					va_priv->default_clk_id,
					va_priv->default_clk_id,
					TX_CORE_CLK,
					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,
				dev_dbg(component->dev,
					"%s: request clock TX_CLK disable failed\n",
					"%s: request clock TX_CLK disable failed\n",
					__func__);
					__func__);
				if (va_priv->dev_up)
					break;
					break;
			}
			}
			ret = bolero_clk_rsc_request_clock(va_priv->dev,
			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,
				dev_dbg(component->dev,
					"%s: request clock VA_CLK disable failed\n",
					"%s: request clock VA_CLK disable failed\n",
					__func__);
					__func__);
				if (va_priv->dev_up)
					bolero_clk_rsc_request_clock(va_priv->dev,
					bolero_clk_rsc_request_clock(va_priv->dev,
						TX_CORE_CLK,
						TX_CORE_CLK,
						TX_CORE_CLK,
						TX_CORE_CLK,
@@ -2843,6 +2848,8 @@ static int va_macro_init(struct snd_soc_component *component)
	}
	}
	snd_soc_dapm_sync(dapm);
	snd_soc_dapm_sync(dapm);


	va_priv->dev_up = true;

	for (i = 0; i < VA_MACRO_NUM_DECIMATORS; i++) {
	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].va_priv = va_priv;
		va_priv->va_hpf_work[i].decimator = i;
		va_priv->va_hpf_work[i].decimator = i;
+2 −2
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2022, The Linux Foundation. All rights reserved.
 */
 */


#include <linux/init.h>
#include <linux/init.h>
@@ -474,7 +474,7 @@ static const struct soc_enum tdm_config_enum[] = {
	SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(tdm_header_type), tdm_header_type),
	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];
static bool afe_port_logging_item[IDX_TDM_MAX];