* [PATCH] ASoC: rt715-sdca: fix clock stop prepare timeout issue
@ 2021-04-21 7:01 Jack Yu
0 siblings, 0 replies; 3+ messages in thread
From: Jack Yu @ 2021-04-21 7:01 UTC (permalink / raw)
To: broonie@kernel.org, lgirdwood@gmail.com
Cc: Oder Chiou, alsa-devel@alsa-project.org, lars@metafoo.de,
Derek [方德義], bard.liao@intel.com,
Shuming [范書銘], Flove(HsinFu),
pierre-louis.bossart@intel.com
[-- Attachment #1: Type: text/plain, Size: 2750 bytes --]
The Clock_Stop_Not_Finished bit is currently not cleared during the
clock stop sequence,which results in the clock stop sequence timing out
after 300ms. This is root-caused to a missing register configuration
impacting the transition between the bus clock and an internal clock.
This problem was exposed by cleanups in the SoundWire bus code,
where previously the ClockStopPrepare was mistakenly skipped
when using ClockStopMode0.
Signed-off-by: Jack Yu <jack.yu@realtek.com>
---
sound/soc/codecs/rt715-sdca-sdw.c | 1 +
sound/soc/codecs/rt715-sdca-sdw.h | 1 +
sound/soc/codecs/rt715-sdca.c | 3 +++
sound/soc/codecs/rt715-sdca.h | 1 +
4 files changed, 6 insertions(+)
diff --git a/sound/soc/codecs/rt715-sdca-sdw.c b/sound/soc/codecs/rt715-sdca-sdw.c
index 1350798406f0..47a8f04d7100 100644
--- a/sound/soc/codecs/rt715-sdca-sdw.c
+++ b/sound/soc/codecs/rt715-sdca-sdw.c
@@ -70,6 +70,7 @@ static bool rt715_sdca_mbq_readable_register(struct device *dev, unsigned int re
case 0x2000036:
case 0x2000037:
case 0x2000039:
+ case 0x2000044:
case 0x6100000:
return true;
default:
diff --git a/sound/soc/codecs/rt715-sdca-sdw.h b/sound/soc/codecs/rt715-sdca-sdw.h
index cd365bb60747..0cbc14844f8c 100644
--- a/sound/soc/codecs/rt715-sdca-sdw.h
+++ b/sound/soc/codecs/rt715-sdca-sdw.h
@@ -113,6 +113,7 @@ static const struct reg_default rt715_mbq_reg_defaults_sdca[] = {
{ 0x2000036, 0x0000 },
{ 0x2000037, 0x0000 },
{ 0x2000039, 0xaa81 },
+ { 0x2000044, 0x0202 },
{ 0x6100000, 0x0100 },
{ SDW_SDCA_CTL(FUN_MIC_ARRAY, RT715_SDCA_FU_ADC8_9_VOL,
RT715_SDCA_FU_VOL_CTRL, CH_01), 0x00 },
diff --git a/sound/soc/codecs/rt715-sdca.c b/sound/soc/codecs/rt715-sdca.c
index 7db76c19e048..936e3061ca1e 100644
--- a/sound/soc/codecs/rt715-sdca.c
+++ b/sound/soc/codecs/rt715-sdca.c
@@ -1054,6 +1054,9 @@ int rt715_sdca_io_init(struct device *dev, struct sdw_slave *slave)
rt715_sdca_index_update_bits(rt715, RT715_VENDOR_REG,
RT715_REV_1, 0x40, 0x40);
}
+ /* DFLL Calibration trigger */
+ rt715_sdca_index_update_bits(rt715, RT715_VENDOR_REG,
+ RT715_DFLL_VAD, 0x1, 0x1);
/* trigger mode = VAD enable */
regmap_write(rt715->regmap,
SDW_SDCA_CTL(FUN_MIC_ARRAY, RT715_SDCA_SMPU_TRIG_ST_EN,
diff --git a/sound/soc/codecs/rt715-sdca.h b/sound/soc/codecs/rt715-sdca.h
index 85ce4d95e5eb..1c7fbff2ce1e 100644
--- a/sound/soc/codecs/rt715-sdca.h
+++ b/sound/soc/codecs/rt715-sdca.h
@@ -81,6 +81,7 @@ struct rt715_sdca_kcontrol_private {
#define RT715_AD_FUNC_EN 0x36
#define RT715_REV_1 0x37
#define RT715_SDW_INPUT_SEL 0x39
+#define RT715_DFLL_VAD 0x44
#define RT715_EXT_DMIC_CLK_CTRL2 0x54
/* Index (NID:61h) */
--
2.29.0
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 6803 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ASoC: rt715-sdca: fix clock stop prepare timeout issue
@ 2023-01-30 2:43 Jack Yu
2023-01-30 19:33 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Jack Yu @ 2023-01-30 2:43 UTC (permalink / raw)
To: broonie@kernel.org, lgirdwood@gmail.com
Cc: Oder Chiou, alsa-devel@alsa-project.org, lars@metafoo.de,
Derek [方德義],
Shuming [范書銘], Flove(HsinFu)
[-- Attachment #1: Type: text/plain, Size: 677 bytes --]
Modify clock_stop_timeout value for rt715-sdca according to
the requirement of internal clock trimming.
Signed-off-by: Jack Yu <jack.yu@realtek.com>
---
sound/soc/codecs/rt715-sdca-sdw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt715-sdca-sdw.c b/sound/soc/codecs/rt715-sdca-sdw.c
index 75468e91ffef..38a82e4e2f95 100644
--- a/sound/soc/codecs/rt715-sdca-sdw.c
+++ b/sound/soc/codecs/rt715-sdca-sdw.c
@@ -167,7 +167,7 @@ static int rt715_sdca_read_prop(struct sdw_slave *slave)
}
/* set the timeout values */
- prop->clk_stop_timeout = 20;
+ prop->clk_stop_timeout = 200;
return 0;
}
--
2.38.1
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 5339 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: rt715-sdca: fix clock stop prepare timeout issue
2023-01-30 2:43 Jack Yu
@ 2023-01-30 19:33 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-01-30 19:33 UTC (permalink / raw)
To: lgirdwood, Jack Yu
Cc: Oder Chiou, alsa-devel, lars, derek.fang, shumingf, Flove(HsinFu)
On Mon, 30 Jan 2023 02:43:25 +0000, Jack Yu wrote:
> Modify clock_stop_timeout value for rt715-sdca according to
> the requirement of internal clock trimming.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: rt715-sdca: fix clock stop prepare timeout issue
commit: 2036890282d56bcbf7f915ba9e04bf77967ab231
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:[~2023-01-30 19:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-21 7:01 [PATCH] ASoC: rt715-sdca: fix clock stop prepare timeout issue Jack Yu
-- strict thread matches above, loose matches on Subject: below --
2023-01-30 2:43 Jack Yu
2023-01-30 19:33 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.