ASoC: Intel: Skylake: Add D0i3 mode ref counting
For device opened/closed, we check the D0i3 capability for the device and invoke skl_tplg_d0i3_get/put, which counts the use case based on the mode supported. These counters are then used to decide if the device can enter D0i3 mode of streaming or non-streaming or no D0i3. Signed-off-by: Jayachandran B <jayachandran.b@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -306,6 +306,23 @@ static void skl_ipc_tx_msg(struct sst_generic_ipc *ipc, struct ipc_message *msg)
|
||||
header->primary | SKL_ADSP_REG_HIPCI_BUSY);
|
||||
}
|
||||
|
||||
int skl_ipc_check_D0i0(struct sst_dsp *dsp, bool state)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* check D0i3 support */
|
||||
if (!dsp->fw_ops.set_state_D0i0)
|
||||
return 0;
|
||||
|
||||
/* Attempt D0i0 or D0i3 based on state */
|
||||
if (state)
|
||||
ret = dsp->fw_ops.set_state_D0i0(dsp);
|
||||
else
|
||||
ret = dsp->fw_ops.set_state_D0i3(dsp);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct ipc_message *skl_ipc_reply_get_msg(struct sst_generic_ipc *ipc,
|
||||
u64 ipc_header)
|
||||
{
|
||||
|
Reference in New Issue
Block a user