Revert "soc: mstr-ctrl: Retain Audio_HM voting until suspend"
This reverts commitd02c7efb35
. and commit61f235e5bd
to avoid AOP related issues. Change-Id: I0b8b44bc5cca6bef6bc18c228f08a9c585c79c1c Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:
@@ -2481,8 +2481,6 @@ static int swrm_probe(struct platform_device *pdev)
|
||||
ret = -EINVAL;
|
||||
goto err_pdata_fail;
|
||||
}
|
||||
swrm->pinctrl_setup = pdata->pinctrl_setup;
|
||||
|
||||
if (of_property_read_u32(pdev->dev.of_node,
|
||||
"qcom,swr-clock-stop-mode0",
|
||||
&swrm->clk_stop_mode0_supp)) {
|
||||
@@ -2815,6 +2813,7 @@ static int swrm_runtime_resume(struct device *dev)
|
||||
int ret = 0;
|
||||
bool swrm_clk_req_err = false;
|
||||
bool hw_core_err = false;
|
||||
bool aud_core_err = false;
|
||||
struct swr_master *mstr = &swrm->master;
|
||||
struct swr_device *swr_dev;
|
||||
u32 temp = 0;
|
||||
@@ -2833,7 +2832,7 @@ static int swrm_runtime_resume(struct device *dev)
|
||||
if (swrm_request_hw_vote(swrm, LPASS_AUDIO_CORE, true)) {
|
||||
dev_err(dev, "%s:lpass audio hw enable failed\n",
|
||||
__func__);
|
||||
swrm->aud_core_err = true;
|
||||
aud_core_err = true;
|
||||
}
|
||||
|
||||
if ((swrm->state == SWR_MSTR_DOWN) ||
|
||||
@@ -2852,9 +2851,6 @@ static int swrm_runtime_resume(struct device *dev)
|
||||
irq_get_irq_data(swrm->wake_irq)))
|
||||
disable_irq_nosync(swrm->wake_irq);
|
||||
mutex_unlock(&swrm->irq_lock);
|
||||
if (swrm->dmic_sva && swrm->pinctrl_setup)
|
||||
swrm->pinctrl_setup(swrm->handle,
|
||||
false);
|
||||
}
|
||||
if (swrm->ipc_wakeup)
|
||||
msm_aud_evt_blocking_notifier_call_chain(
|
||||
@@ -2928,7 +2924,7 @@ static int swrm_runtime_resume(struct device *dev)
|
||||
swrm->state = SWR_MSTR_UP;
|
||||
}
|
||||
exit:
|
||||
if (ret && !swrm->aud_core_err)
|
||||
if (!aud_core_err)
|
||||
swrm_request_hw_vote(swrm, LPASS_AUDIO_CORE, false);
|
||||
if (!hw_core_err)
|
||||
swrm_request_hw_vote(swrm, LPASS_HW_CORE, false);
|
||||
@@ -2953,6 +2949,7 @@ static int swrm_runtime_suspend(struct device *dev)
|
||||
struct swr_mstr_ctrl *swrm = platform_get_drvdata(pdev);
|
||||
int ret = 0;
|
||||
bool hw_core_err = false;
|
||||
bool aud_core_err = false;
|
||||
struct swr_master *mstr = &swrm->master;
|
||||
struct swr_device *swr_dev;
|
||||
int current_state = 0;
|
||||
@@ -2971,6 +2968,11 @@ static int swrm_runtime_suspend(struct device *dev)
|
||||
__func__);
|
||||
hw_core_err = true;
|
||||
}
|
||||
if (swrm_request_hw_vote(swrm, LPASS_AUDIO_CORE, true)) {
|
||||
dev_err(dev, "%s:lpass audio hw enable failed\n",
|
||||
__func__);
|
||||
aud_core_err = true;
|
||||
}
|
||||
|
||||
if ((current_state == SWR_MSTR_UP) ||
|
||||
(current_state == SWR_MSTR_SSR)) {
|
||||
@@ -3039,8 +3041,6 @@ static int swrm_runtime_suspend(struct device *dev)
|
||||
|
||||
if (swrm->clk_stop_mode0_supp) {
|
||||
if (swrm->wake_irq > 0) {
|
||||
if (swrm->dmic_sva && swrm->pinctrl_setup)
|
||||
swrm->pinctrl_setup(swrm->handle, true);
|
||||
enable_irq(swrm->wake_irq);
|
||||
} else if (swrm->ipc_wakeup) {
|
||||
msm_aud_evt_blocking_notifier_call_chain(
|
||||
@@ -3054,11 +3054,10 @@ static int swrm_runtime_suspend(struct device *dev)
|
||||
if (current_state != SWR_MSTR_SSR)
|
||||
swrm->state = SWR_MSTR_DOWN;
|
||||
exit:
|
||||
if (!swrm->aud_core_err)
|
||||
if (!aud_core_err)
|
||||
swrm_request_hw_vote(swrm, LPASS_AUDIO_CORE, false);
|
||||
if (!hw_core_err)
|
||||
swrm_request_hw_vote(swrm, LPASS_HW_CORE, false);
|
||||
swrm->aud_core_err = false;
|
||||
mutex_unlock(&swrm->reslock);
|
||||
trace_printk("%s: pm_runtime: suspend done state: %d\n",
|
||||
__func__, swrm->state);
|
||||
@@ -3394,12 +3393,10 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
|
||||
case SWR_REGISTER_WAKEUP:
|
||||
msm_aud_evt_blocking_notifier_call_chain(
|
||||
SWR_WAKE_IRQ_REGISTER, (void *)swrm);
|
||||
swrm->dmic_sva = *(u32 *)data;
|
||||
break;
|
||||
case SWR_DEREGISTER_WAKEUP:
|
||||
msm_aud_evt_blocking_notifier_call_chain(
|
||||
SWR_WAKE_IRQ_DEREGISTER, (void *)swrm);
|
||||
swrm->dmic_sva = 0;
|
||||
break;
|
||||
case SWR_SET_PORT_MAP:
|
||||
if (!data) {
|
||||
|
Reference in New Issue
Block a user