|
@@ -24,6 +24,7 @@
|
|
#include <dsp/msm-audio-event-notify.h>
|
|
#include <dsp/msm-audio-event-notify.h>
|
|
#include "swr-mstr-registers.h"
|
|
#include "swr-mstr-registers.h"
|
|
#include "swr-slave-registers.h"
|
|
#include "swr-slave-registers.h"
|
|
|
|
+#include <dsp/digital-cdc-rsc-mgr.h>
|
|
#include "swr-mstr-ctrl.h"
|
|
#include "swr-mstr-ctrl.h"
|
|
|
|
|
|
#define SWR_NUM_PORTS 4 /* TODO - Get this info from DT */
|
|
#define SWR_NUM_PORTS 4 /* TODO - Get this info from DT */
|
|
@@ -403,8 +404,8 @@ static int swrm_request_hw_vote(struct swr_mstr_ctrl *swrm,
|
|
}
|
|
}
|
|
if (++swrm->hw_core_clk_en == 1) {
|
|
if (++swrm->hw_core_clk_en == 1) {
|
|
ret =
|
|
ret =
|
|
- clk_prepare_enable(
|
|
|
|
- swrm->lpass_core_hw_vote);
|
|
|
|
|
|
+ digital_cdc_rsc_mgr_hw_vote_enable(
|
|
|
|
+ swrm->lpass_core_hw_vote);
|
|
if (ret < 0) {
|
|
if (ret < 0) {
|
|
dev_err(swrm->dev,
|
|
dev_err(swrm->dev,
|
|
"%s:lpass core hw enable failed\n",
|
|
"%s:lpass core hw enable failed\n",
|
|
@@ -417,8 +418,8 @@ static int swrm_request_hw_vote(struct swr_mstr_ctrl *swrm,
|
|
if (swrm->hw_core_clk_en < 0)
|
|
if (swrm->hw_core_clk_en < 0)
|
|
swrm->hw_core_clk_en = 0;
|
|
swrm->hw_core_clk_en = 0;
|
|
else if (swrm->hw_core_clk_en == 0)
|
|
else if (swrm->hw_core_clk_en == 0)
|
|
- clk_disable_unprepare(
|
|
|
|
- swrm->lpass_core_hw_vote);
|
|
|
|
|
|
+ digital_cdc_rsc_mgr_hw_vote_disable(
|
|
|
|
+ swrm->lpass_core_hw_vote);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -435,8 +436,8 @@ static int swrm_request_hw_vote(struct swr_mstr_ctrl *swrm,
|
|
}
|
|
}
|
|
if (++swrm->aud_core_clk_en == 1) {
|
|
if (++swrm->aud_core_clk_en == 1) {
|
|
ret =
|
|
ret =
|
|
- clk_prepare_enable(
|
|
|
|
- swrm->lpass_core_audio);
|
|
|
|
|
|
+ digital_cdc_rsc_mgr_hw_vote_enable(
|
|
|
|
+ swrm->lpass_core_audio);
|
|
if (ret < 0) {
|
|
if (ret < 0) {
|
|
dev_err(swrm->dev,
|
|
dev_err(swrm->dev,
|
|
"%s:lpass audio hw enable failed\n",
|
|
"%s:lpass audio hw enable failed\n",
|
|
@@ -449,8 +450,8 @@ static int swrm_request_hw_vote(struct swr_mstr_ctrl *swrm,
|
|
if (swrm->aud_core_clk_en < 0)
|
|
if (swrm->aud_core_clk_en < 0)
|
|
swrm->aud_core_clk_en = 0;
|
|
swrm->aud_core_clk_en = 0;
|
|
else if (swrm->aud_core_clk_en == 0)
|
|
else if (swrm->aud_core_clk_en == 0)
|
|
- clk_disable_unprepare(
|
|
|
|
- swrm->lpass_core_audio);
|
|
|
|
|
|
+ digital_cdc_rsc_mgr_hw_vote_disable(
|
|
|
|
+ swrm->lpass_core_audio);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3237,6 +3238,8 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
|
|
swrm_device_down(&pdev->dev);
|
|
swrm_device_down(&pdev->dev);
|
|
mutex_lock(&swrm->devlock);
|
|
mutex_lock(&swrm->devlock);
|
|
swrm->dev_up = false;
|
|
swrm->dev_up = false;
|
|
|
|
+ swrm->hw_core_clk_en = 0;
|
|
|
|
+ swrm->aud_core_clk_en = 0;
|
|
mutex_unlock(&swrm->devlock);
|
|
mutex_unlock(&swrm->devlock);
|
|
mutex_lock(&swrm->reslock);
|
|
mutex_lock(&swrm->reslock);
|
|
swrm->state = SWR_MSTR_SSR;
|
|
swrm->state = SWR_MSTR_SSR;
|