summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel/hda.h
diff options
context:
space:
mode:
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>2021-01-27 05:07:36 +0300
committerMark Brown <broonie@kernel.org>2021-01-27 16:06:49 +0300
commit89a400bdeb129dbc7e1c8ad2151cc8141a619709 (patch)
tree41ef0e92cbbbbb0c94d225ead6da18a5ac36402c /sound/soc/sof/intel/hda.h
parented9ce1ed2239909c23d48c723c6549417c476246 (diff)
downloadlinux-89a400bdeb129dbc7e1c8ad2151cc8141a619709.tar.xz
ASoC: SOF: Intel: hda: enable DMI L1 for D0i3-compatible streams
DMI L1 entry is currently disabled whenever any capture stream is opened to prevent xruns during pause/release. But, in order to maximise power savings for the wake-on-voice usecase, DMI L1 entry should be enabled for D0i3-compatible capture streams. Introduce a new field, flags in struct sof_intel_hda_stream that stores whether a stream is dmi_l1_compatible. All playback streams, and D0i3-compatible capture streams are DMI L1 compatible. Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20210127020737.1088960-2-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/hda.h')
-rw-r--r--sound/soc/sof/intel/hda.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h
index 9ec8ae0fd649..8e9b94bf0333 100644
--- a/sound/soc/sof/intel/hda.h
+++ b/sound/soc/sof/intel/hda.h
@@ -402,6 +402,9 @@ struct sof_intel_dsp_bdl {
#define SOF_HDA_PLAYBACK 0
#define SOF_HDA_CAPTURE 1
+/* stream flags */
+#define SOF_HDA_STREAM_DMI_L1_COMPATIBLE 1
+
/*
* Time in ms for opportunistic D0I3 entry delay.
* This has been deliberately chosen to be long to avoid race conditions.
@@ -471,6 +474,7 @@ struct sof_intel_hda_stream {
struct hdac_ext_stream hda_stream;
struct sof_intel_stream stream;
int host_reserved; /* reserve host DMA channel */
+ u32 flags;
};
#define hstream_to_sof_hda_stream(hstream) \
@@ -562,7 +566,7 @@ bool hda_dsp_check_ipc_irq(struct snd_sof_dev *sdev);
bool hda_dsp_check_stream_irq(struct snd_sof_dev *sdev);
struct hdac_ext_stream *
- hda_dsp_stream_get(struct snd_sof_dev *sdev, int direction);
+ hda_dsp_stream_get(struct snd_sof_dev *sdev, int direction, u32 flags);
int hda_dsp_stream_put(struct snd_sof_dev *sdev, int direction, int stream_tag);
int hda_dsp_stream_spib_config(struct snd_sof_dev *sdev,
struct hdac_ext_stream *stream,