diff options
author | Libin Yang <libin.yang@intel.com> | 2019-04-19 09:53:12 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-04-19 17:00:28 +0100 |
commit | ae061d2a857f84ad47b77b04c3ad37478651ab6c (patch) | |
tree | 26a419d9d64cc43803304d8c06f7a0c2288d433e /sound/soc/soc-pcm.c | |
parent | d18360e07fb73c61b5bd850daa9744d986e44d50 (diff) |
ASoC: pcm: save fixed-up hw_params of BE
Some drivers mandate setting up hw params after resuming from system sleep.
Since, the hw_params ioctl is not invoked upon resuming, the fixed-up BE
dai hw params should be saved so the driver can use it in its resume
sequence.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r-- | sound/soc/soc-pcm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 2d5d5cac4ba6..035dedee78f1 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2156,6 +2156,10 @@ int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int stream) } } + /* copy the fixed-up hw params for BE dai */ + memcpy(&be->dpcm[stream].hw_params, &dpcm->hw_params, + sizeof(struct snd_pcm_hw_params)); + /* only allow hw_params() if no connected FEs are running */ if (!snd_soc_dpcm_can_be_params(fe, be, stream)) continue; |