diff options
author | Ranjani Sridharan <ranjani.sridharan@linux.intel.com> | 2019-04-30 18:09:31 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-03 15:01:45 +0900 |
commit | ed3baacd76baa045fe101ce04a9e46d48c188495 (patch) | |
tree | efffa3dd505c148ad9f5824c2943ce9f97b552cd /sound/soc/sof/sof-priv.h | |
parent | 20d0aff739bed801bbe67ebed8012f3d9849b29d (diff) | |
download | linux-stable-ed3baacd76baa045fe101ce04a9e46d48c188495.tar.gz linux-stable-ed3baacd76baa045fe101ce04a9e46d48c188495.tar.bz2 linux-stable-ed3baacd76baa045fe101ce04a9e46d48c188495.zip |
ASoC: SOF: intel: hda: add hw_params_upon_resume flag for hda stream
The prepare() ioctl for BE dai link gets called both
when the stream is started and when it is resumed from
suspend. SOF uses this ioctl to set the hw params
again only if the stream has been suspended.
When the stream is started, the hw_params ioctl gets called
before prepare() and hw_params is set for the BE dai link.
So the prepare call does not need to do anything further.
When the stream resumes after system suspend, SOF requires
that the hw_params be set again for the BE dai. In order
to determine which streams should set the hw params
during prepare(), an internal flag called "hw_params_upon_resume"
is introduced in struct sof_intel_hda_stream. The flag is set
for hda streams when the sof device suspends and is
cleared after hw_params is set.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-priv.h')
-rw-r--r-- | sound/soc/sof/sof-priv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index bbc285018f9a..170adc21ef17 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -166,6 +166,7 @@ struct snd_sof_dsp_ops { int (*runtime_suspend)(struct snd_sof_dev *sof_dev, int state); /* optional */ int (*runtime_resume)(struct snd_sof_dev *sof_dev); /* optional */ + void (*set_hw_params_upon_resume)(struct snd_sof_dev *sdev); /* optional */ /* DSP clocking */ int (*set_clk)(struct snd_sof_dev *sof_dev, u32 freq); /* optional */ |