diff options
author | Ranjani Sridharan <ranjani.sridharan@linux.intel.com> | 2019-05-01 02:09:31 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-03 09:01:45 +0300 |
commit | ed3baacd76baa045fe101ce04a9e46d48c188495 (patch) | |
tree | efffa3dd505c148ad9f5824c2943ce9f97b552cd /sound/soc/sof/intel/cnl.c | |
parent | 20d0aff739bed801bbe67ebed8012f3d9849b29d (diff) | |
download | linux-ed3baacd76baa045fe101ce04a9e46d48c188495.tar.xz |
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/intel/cnl.c')
-rw-r--r-- | sound/soc/sof/intel/cnl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/cnl.c b/sound/soc/sof/intel/cnl.c index d128839b2450..2eac20bbcaea 100644 --- a/sound/soc/sof/intel/cnl.c +++ b/sound/soc/sof/intel/cnl.c @@ -225,6 +225,7 @@ const struct snd_sof_dsp_ops sof_cnl_ops = { .resume = hda_dsp_resume, .runtime_suspend = hda_dsp_runtime_suspend, .runtime_resume = hda_dsp_runtime_resume, + .set_hw_params_upon_resume = hda_dsp_set_hw_params_upon_resume, }; EXPORT_SYMBOL(sof_cnl_ops); |