diff options
author | Vinod Koul <vinod.koul@intel.com> | 2016-11-03 12:37:20 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-11-03 18:14:42 +0100 |
commit | a83e3b4c4454ecdc473cf09aa1c9d1705623c4cc (patch) | |
tree | 165721daa72811beddab5dcf764e1e91b9408adc /sound/soc/intel/skylake/skl-sst-ipc.c | |
parent | ASoC: Intel: Skylake: Add support for specifying D0i3 configuration (diff) | |
download | linux-a83e3b4c4454ecdc473cf09aa1c9d1705623c4cc.tar.xz linux-a83e3b4c4454ecdc473cf09aa1c9d1705623c4cc.zip |
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>
Diffstat (limited to 'sound/soc/intel/skylake/skl-sst-ipc.c')
-rw-r--r-- | sound/soc/intel/skylake/skl-sst-ipc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c index 734408a34a24..594623a4b4cd 100644 --- a/sound/soc/intel/skylake/skl-sst-ipc.c +++ b/sound/soc/intel/skylake/skl-sst-ipc.c @@ -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) { |