ASoC: samsung: s3c24xx-i2s: Fix build after removal of DAI suspend/resume
Subsystems (3)
PATCH 1/1 ASoC: samsung: s3c24xx-i2s: Fix build after removal of DAI suspend/resume
Commit 450312b640f9 ("ASoC: soc-core: remove DAI suspend/resume") removed the DAI side suspend/resume hooks and switched entirely to component suspend/resume. However the Samsung SoC s3c-i2s-v2 driver was not updated.
Move the suspend/resume hooks from s3c-i2s-v2.c to s3c2412-i2s.c while changing dai to component which allows to keep the struct snd_soc_component_driver const.
This fixes build errors:
sound/soc/samsung/s3c-i2s-v2.c: In function ‘s3c_i2sv2_register_component’:
sound/soc/samsung/s3c-i2s-v2.c:730:9: error: ‘struct snd_soc_dai_driver’ has no member named ‘suspend’
dai_drv->suspend = s3c2412_i2s_suspend;
---
Only compile tested.
--- sound/soc/samsung/s3c-i2s-v2.c | 57 --------------------------------- sound/soc/samsung/s3c2412-i2s.c | 56 ++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 57 deletions(-)
sound/soc/samsung/s3c-i2s-v2.c +0 -57
@@ -656,60 +656,6 @@ void s3c_i2sv2_cleanup(struct snd_soc_dai *dai, }EXPORT_SYMBOL_GPL (s3c_i2sv2_cleanup); -#ifdef CONFIG_PM -static int s3c2412_i2s_suspend (struct snd_soc_dai *dai) -{ -struct s3c_i2sv2_info *i2s =to_info (dai); -u32 iismod; - -if (dai->active) { - i2s->suspend_iismod =readl (i2s->regs +S3C2412_IISMOD ); - i2s->suspend_iiscon =readl (i2s->regs +S3C2412_IISCON ); - i2s->suspend_iispsr =readl (i2s->regs +S3C2412_IISPSR ); - -/* some basic suspend checks */ - - iismod =readl (i2s->regs +S3C2412_IISMOD ); - -if (iismod &S3C2412_IISCON_RXDMA_ACTIVE ) -pr_warn ("%s: RXDMA active?\n" , __func__); - -if (iismod &S3C2412_IISCON_TXDMA_ACTIVE ) -pr_warn ("%s: TXDMA active?\n" , __func__); - -if (iismod &S3C2412_IISCON_IIS_ACTIVE ) -pr_warn ("%s: IIS active\n" , __func__); - } - -return 0 ; -} - -static int s3c2412_i2s_resume (struct snd_soc_dai *dai) -{ -struct s3c_i2sv2_info *i2s =to_info (dai); - -pr_info ("dai_active %d, IISMOD %08x, IISCON %08x\n" , - dai->active, i2s->suspend_iismod, i2s->suspend_iiscon); - -if (dai->active) { -writel (i2s->suspend_iiscon, i2s->regs +S3C2412_IISCON ); -writel (i2s->suspend_iismod, i2s->regs +S3C2412_IISMOD ); -writel (i2s->suspend_iispsr, i2s->regs +S3C2412_IISPSR ); - -writel (S3C2412_IISFIC_RXFLUSH |S3C2412_IISFIC_TXFLUSH , - i2s->regs +S3C2412_IISFIC ); - -ndelay (250 ); -writel (0x0 , i2s->regs +S3C2412_IISFIC ); - } - -return 0 ; -} -#else -#define s3c2412_i2s_suspend NULL -#define s3c2412_i2s_resume NULL -#endif -int s3c_i2sv2_register_component (struct device *dev,int id,const struct snd_soc_component_driver *cmp_drv,struct snd_soc_dai_driver *dai_drv)
@@ -727,9 +673,6 @@ int s3c_i2sv2_register_component(struct device *dev, int id,if (!ops->delay) ops->delay = s3c2412_i2s_delay; - dai_drv->suspend = s3c2412_i2s_suspend; - dai_drv->resume = s3c2412_i2s_resume; -return devm_snd_soc_register_component (dev, cmp_drv, dai_drv,1 ); }EXPORT_SYMBOL_GPL (s3c_i2sv2_register_component);
sound/soc/samsung/s3c2412-i2s.c +56 -0
68 lines not on this page · raw message
Signature · 1 line
2.17.1
Mark Brown
maintainerApplied "ASoC: samsung: s3c24xx-i2s: Fix build after removal of DAI suspend/resume" to the asoc tree
The patch
ASoC: samsung: s3c24xx-i2s: Fix build after removal of DAI suspend/resume
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
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
From ec21bdc6dd16d74b3674ef1fd12ae8e4e7418603 Mon Sep 17 00:00:00 2001
From: Krzysztof Kozlowski <[email protected]>
Date: Mon, 13 Apr 2020 14:45:48 +0200
Subject: [PATCH] ASoC: samsung: s3c24xx-i2s: Fix build after removal of DAI
suspend/resume
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Commit 450312b640f9 ("ASoC: soc-core: remove DAI suspend/resume") removed the DAI side suspend/resume hooks and switched entirely to component suspend/resume. However the Samsung SoC s3c-i2s-v2 driver was not updated.
Move the suspend/resume hooks from s3c-i2s-v2.c to s3c2412-i2s.c while changing dai to component which allows to keep the struct snd_soc_component_driver const.
This fixes build errors:
sound/soc/samsung/s3c-i2s-v2.c: In function ‘s3c_i2sv2_register_component’:
sound/soc/samsung/s3c-i2s-v2.c:730:9: error: ‘struct snd_soc_dai_driver’ has no member named ‘suspend’
dai_drv->suspend = s3c2412_i2s_suspend;
--- sound/soc/samsung/s3c-i2s-v2.c | 57 --------------------------------- sound/soc/samsung/s3c2412-i2s.c | 56 ++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 57 deletions(-)
sound/soc/samsung/s3c-i2s-v2.c +0 -57
@@ -656,60 +656,6 @@ void s3c_i2sv2_cleanup(struct snd_soc_dai *dai, }EXPORT_SYMBOL_GPL (s3c_i2sv2_cleanup); -#ifdef CONFIG_PM -static int s3c2412_i2s_suspend (struct snd_soc_dai *dai) -{ -struct s3c_i2sv2_info *i2s =to_info (dai); -u32 iismod; - -if (dai->active) { - i2s->suspend_iismod =readl (i2s->regs +S3C2412_IISMOD ); - i2s->suspend_iiscon =readl (i2s->regs +S3C2412_IISCON ); - i2s->suspend_iispsr =readl (i2s->regs +S3C2412_IISPSR ); - -/* some basic suspend checks */ - - iismod =readl (i2s->regs +S3C2412_IISMOD ); - -if (iismod &S3C2412_IISCON_RXDMA_ACTIVE ) -pr_warn ("%s: RXDMA active?\n" , __func__); - -if (iismod &S3C2412_IISCON_TXDMA_ACTIVE ) -pr_warn ("%s: TXDMA active?\n" , __func__); - -if (iismod &S3C2412_IISCON_IIS_ACTIVE ) -pr_warn ("%s: IIS active\n" , __func__); - } - -return 0 ; -} - -static int s3c2412_i2s_resume (struct snd_soc_dai *dai) -{ -struct s3c_i2sv2_info *i2s =to_info (dai); - -pr_info ("dai_active %d, IISMOD %08x, IISCON %08x\n" , - dai->active, i2s->suspend_iismod, i2s->suspend_iiscon); - -if (dai->active) { -writel (i2s->suspend_iiscon, i2s->regs +S3C2412_IISCON ); -writel (i2s->suspend_iismod, i2s->regs +S3C2412_IISMOD ); -writel (i2s->suspend_iispsr, i2s->regs +S3C2412_IISPSR ); - -writel (S3C2412_IISFIC_RXFLUSH |S3C2412_IISFIC_TXFLUSH , - i2s->regs +S3C2412_IISFIC ); - -ndelay (250 ); -writel (0x0 , i2s->regs +S3C2412_IISFIC ); - } - -return 0 ; -} -#else -#define s3c2412_i2s_suspend NULL -#define s3c2412_i2s_resume NULL -#endif -int s3c_i2sv2_register_component (struct device *dev,int id,const struct snd_soc_component_driver *cmp_drv,struct snd_soc_dai_driver *dai_drv)
@@ -727,9 +673,6 @@ int s3c_i2sv2_register_component(struct device *dev, int id,if (!ops->delay) ops->delay = s3c2412_i2s_delay; - dai_drv->suspend = s3c2412_i2s_suspend; - dai_drv->resume = s3c2412_i2s_resume; -return devm_snd_soc_register_component (dev, cmp_drv, dai_drv,1 ); }EXPORT_SYMBOL_GPL (s3c_i2sv2_register_component);
sound/soc/samsung/s3c2412-i2s.c +56 -0
68 lines not on this page · raw message
Signature · 1 line
2.20.1