ASoC: pcm: save fixed-up hw_params of BE
PATCH 1/1 ASoC: pcm: save fixed-up hw_params of BE
From: Libin Yang <[email protected]>
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.
--- sound/soc/soc-pcm.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/soc/soc-pcm.c +4 -0
@@ -2164,6 +2164,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 ;
Signature · 1 line
2.7.4
Quoted 6 lines · On 4/18/19 8:53 PM, [email protected] wrote:
From: Libin Yang <[email protected]>
Some drivers mandate setting up hw params after resuming from system sleep. Since, the
hw_paramsioctl 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.
This functionality is needed for SOF. We initially thought of implementing it as an SOF-specific patch but thought this could be useful to others, and don't see any negative impact.
Libin and Ranjani, can you clarify what 'some drivers' means. I took it as "SOF and other DPCM-based drivers without the 'INFO_RESUME' flag". Please confirm if I was correct, if we want feedback we should clarify who might benefit. Thanks!
Quoted 21 lines
Signed-off-by Libin Yang <[email protected]>--- sound/soc/soc-pcm.c | 4 ++++ 1 file changed, 4 insertions(+)sound/soc/soc-pcm.c +4
-0@@ -2164,6 +2164,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 ;
Mark Brown
maintainerApplied "ASoC: pcm: save fixed-up hw_params of BE" to the asoc tree
In reply to [email protected]The patch
ASoC: pcm: save fixed-up hw_params of BE
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
ae061d2a857f84ad47b77b04c3ad37478651ab6cMon Sep 17 00:00:00 2001
From: Libin Yang <[email protected]>
Date: Fri, 19 Apr 2019 09:53:12 +0800
Subject: [PATCH] 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.
--- sound/soc/soc-pcm.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/soc/soc-pcm.c +4 -0
@@ -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 ;
Signature · 1 line
2.20.1