Revert "soc: mstr-ctrl: Retain Audio_HM voting until suspend"

This reverts commit d02c7efb35.
and commit 61f235e5bd to avoid AOP
related issues.

Change-Id: I0b8b44bc5cca6bef6bc18c228f08a9c585c79c1c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:
Laxminath Kasam
2020-06-16 20:06:22 +05:30
parent cbbff6809b
commit 034cd15ba8
8 changed files with 22 additions and 124 deletions

View File

@@ -81,7 +81,6 @@ struct tx_macro_swr_ctrl_platform_data {
void *data),
void *swrm_handle,
int action);
int (*pinctrl_setup)(void *handle, bool enable);
};
enum {
@@ -2497,30 +2496,12 @@ static const struct snd_kcontrol_new tx_macro_snd_controls[] = {
tx_macro_get_bcs, tx_macro_set_bcs),
};
static int tx_macro_pinctrl_setup(void *handle, bool enable)
{
struct tx_macro_priv *tx_priv = (struct tx_macro_priv *) handle;
if (tx_priv == NULL) {
pr_err("%s: tx priv data is NULL\n", __func__);
return -EINVAL;
}
if (enable)
msm_cdc_pinctrl_set_wakeup_capable(
tx_priv->tx_swr_gpio_p, true);
else
msm_cdc_pinctrl_set_wakeup_capable(
tx_priv->tx_swr_gpio_p, false);
return 0;
}
static int tx_macro_register_event_listener(struct snd_soc_component *component,
bool enable, bool is_dmic_sva)
bool enable)
{
struct device *tx_dev = NULL;
struct tx_macro_priv *tx_priv = NULL;
int ret = 0;
u32 dmic_sva = is_dmic_sva;
if (!component)
return -EINVAL;
@@ -2542,17 +2523,15 @@ static int tx_macro_register_event_listener(struct snd_soc_component *component,
if (enable) {
ret = swrm_wcd_notify(
tx_priv->swr_ctrl_data[0].tx_swr_pdev,
SWR_REGISTER_WAKEUP, &dmic_sva);
SWR_REGISTER_WAKEUP, NULL);
msm_cdc_pinctrl_set_wakeup_capable(
tx_priv->tx_swr_gpio_p, false);
tx_priv->tx_swr_gpio_p, false);
} else {
/* while teardown we can reset the flag */
dmic_sva = 0;
msm_cdc_pinctrl_set_wakeup_capable(
tx_priv->tx_swr_gpio_p, true);
tx_priv->tx_swr_gpio_p, true);
ret = swrm_wcd_notify(
tx_priv->swr_ctrl_data[0].tx_swr_pdev,
SWR_DEREGISTER_WAKEUP, &dmic_sva);
SWR_DEREGISTER_WAKEUP, NULL);
}
}
@@ -3343,7 +3322,6 @@ static int tx_macro_probe(struct platform_device *pdev)
tx_priv->swr_plat_data.clk = tx_macro_swrm_clock;
tx_priv->swr_plat_data.core_vote = tx_macro_core_vote;
tx_priv->swr_plat_data.handle_irq = NULL;
tx_priv->swr_plat_data.pinctrl_setup = tx_macro_pinctrl_setup;
mutex_init(&tx_priv->swr_clk_lock);
}
tx_priv->is_used_tx_swr_gpio = is_used_tx_swr_gpio;