Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt721: fix prepare clock stop failed
@ 2025-10-27 10:33 shumingf
  2025-10-28  6:14 ` Mukunda,Vijendar
  2025-10-28 11:17 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: shumingf @ 2025-10-27 10:33 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang,
	Vijendar.Mukunda, Shuming Fan

From: Shuming Fan <shumingf@realtek.com>

This patch adds settings to prevent the 'prepare clock stop failed' error.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
---
 sound/soc/codecs/rt721-sdca.c | 4 ++++
 sound/soc/codecs/rt721-sdca.h | 1 +
 2 files changed, 5 insertions(+)

diff --git a/sound/soc/codecs/rt721-sdca.c b/sound/soc/codecs/rt721-sdca.c
index a4bd29d7220b..5f7b505d5414 100644
--- a/sound/soc/codecs/rt721-sdca.c
+++ b/sound/soc/codecs/rt721-sdca.c
@@ -281,6 +281,10 @@ static void rt721_sdca_jack_preset(struct rt721_sdca_priv *rt721)
 	rt_sdca_index_write(rt721->mbq_regmap, RT721_BOOST_CTRL,
 		RT721_BST_4CH_TOP_GATING_CTRL1, 0x002a);
 	regmap_write(rt721->regmap, 0x2f58, 0x07);
+
+	regmap_write(rt721->regmap, 0x2f51, 0x00);
+	rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
+		RT721_MISC_CTL, 0x0004);
 }
 
 static void rt721_sdca_jack_init(struct rt721_sdca_priv *rt721)
diff --git a/sound/soc/codecs/rt721-sdca.h b/sound/soc/codecs/rt721-sdca.h
index 71fac9cd8739..24ce188562ba 100644
--- a/sound/soc/codecs/rt721-sdca.h
+++ b/sound/soc/codecs/rt721-sdca.h
@@ -137,6 +137,7 @@ struct rt721_sdca_dmic_kctrl_priv {
 #define RT721_HDA_LEGACY_UAJ_CTL		0x02
 #define RT721_HDA_LEGACY_CTL1			0x05
 #define RT721_HDA_LEGACY_RESET_CTL		0x06
+#define RT721_MISC_CTL				0x07
 #define RT721_XU_REL_CTRL			0x0c
 #define RT721_GE_REL_CTRL1			0x0d
 #define RT721_HDA_LEGACY_GPIO_WAKE_EN_CTL	0x0e
-- 
2.51.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: rt721: fix prepare clock stop failed
  2025-10-27 10:33 [PATCH] ASoC: rt721: fix prepare clock stop failed shumingf
@ 2025-10-28  6:14 ` Mukunda,Vijendar
  2025-10-28 11:17 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mukunda,Vijendar @ 2025-10-28  6:14 UTC (permalink / raw)
  To: shumingf, broonie, lgirdwood
  Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang



On 10/27/25 16:03, shumingf@realtek.com wrote:
> From: Shuming Fan <shumingf@realtek.com>
>
> This patch adds settings to prevent the 'prepare clock stop failed' error.
>
> Signed-off-by: Shuming Fan <shumingf@realtek.com>
Tested-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
> ---
>   sound/soc/codecs/rt721-sdca.c | 4 ++++
>   sound/soc/codecs/rt721-sdca.h | 1 +
>   2 files changed, 5 insertions(+)
>
> diff --git a/sound/soc/codecs/rt721-sdca.c b/sound/soc/codecs/rt721-sdca.c
> index a4bd29d7220b..5f7b505d5414 100644
> --- a/sound/soc/codecs/rt721-sdca.c
> +++ b/sound/soc/codecs/rt721-sdca.c
> @@ -281,6 +281,10 @@ static void rt721_sdca_jack_preset(struct rt721_sdca_priv *rt721)
>   	rt_sdca_index_write(rt721->mbq_regmap, RT721_BOOST_CTRL,
>   		RT721_BST_4CH_TOP_GATING_CTRL1, 0x002a);
>   	regmap_write(rt721->regmap, 0x2f58, 0x07);
> +
> +	regmap_write(rt721->regmap, 0x2f51, 0x00);
> +	rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
> +		RT721_MISC_CTL, 0x0004);
>   }
>   
>   static void rt721_sdca_jack_init(struct rt721_sdca_priv *rt721)
> diff --git a/sound/soc/codecs/rt721-sdca.h b/sound/soc/codecs/rt721-sdca.h
> index 71fac9cd8739..24ce188562ba 100644
> --- a/sound/soc/codecs/rt721-sdca.h
> +++ b/sound/soc/codecs/rt721-sdca.h
> @@ -137,6 +137,7 @@ struct rt721_sdca_dmic_kctrl_priv {
>   #define RT721_HDA_LEGACY_UAJ_CTL		0x02
>   #define RT721_HDA_LEGACY_CTL1			0x05
>   #define RT721_HDA_LEGACY_RESET_CTL		0x06
> +#define RT721_MISC_CTL				0x07
>   #define RT721_XU_REL_CTRL			0x0c
>   #define RT721_GE_REL_CTRL1			0x0d
>   #define RT721_HDA_LEGACY_GPIO_WAKE_EN_CTL	0x0e


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: rt721: fix prepare clock stop failed
  2025-10-27 10:33 [PATCH] ASoC: rt721: fix prepare clock stop failed shumingf
  2025-10-28  6:14 ` Mukunda,Vijendar
@ 2025-10-28 11:17 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2025-10-28 11:17 UTC (permalink / raw)
  To: lgirdwood, shumingf
  Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang,
	Vijendar.Mukunda

On Mon, 27 Oct 2025 18:33:33 +0800, shumingf@realtek.com wrote:
> This patch adds settings to prevent the 'prepare clock stop failed' error.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: rt721: fix prepare clock stop failed
      commit: d914ec6f07548f7c13a231a4f526e043e736e82e

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-28 11:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 10:33 [PATCH] ASoC: rt721: fix prepare clock stop failed shumingf
2025-10-28  6:14 ` Mukunda,Vijendar
2025-10-28 11:17 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox