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>
This commit is contained in:
Libin Yang 2019-04-19 09:53:12 +08:00 committed by Mark Brown
parent d18360e07f
commit ae061d2a85
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0

View file

@ -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 */ /* only allow hw_params() if no connected FEs are running */
if (!snd_soc_dpcm_can_be_params(fe, be, stream)) if (!snd_soc_dpcm_can_be_params(fe, be, stream))
continue; continue;