Skip to contentSkip to conversation

ASoC: st: Use maple tree register cache

PATCH In review Mark Brown 1 participant 7 messages Jul 12, 2023 – Jul 28, 2023

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

cover ASoC: st: Use maple tree register cache

The maple tree register cache has now got to the point where is is roughly feature compatible with the rbtree cache, let's convert the ST drivers to use the more modern data structure.

---
Mark Brown (5):
ASoC: sta32x: Update to use maple tree register cache
ASoC: sta350: Update to use maple tree register cache
ASoC: sta529: Update to use maple tree register cache
ASoC: stac9766: Update to use maple tree register cache
ASoC: sti-sas: Update to use maple tree register cache

 sound/soc/codecs/sta32x.c   | 2 +-
 sound/soc/codecs/sta350.c   | 2 +-
 sound/soc/codecs/sta529.c   | 2 +-
 sound/soc/codecs/stac9766.c | 2 +-
 sound/soc/codecs/sti-sas.c  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

---
base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
change-id: 20230701-asoc-st-maple-fc1a8f015154

Best regards,

Signature · 1 line
Mark Brown <[email protected]>
author maintainer
#1 lore raw

PATCH 1/5 ASoC: sta32x: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.

Update the sta32x driver to use the more modern data structure.

---
 sound/soc/codecs/sta32x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/sta32x.c +1 -1
index 4a694d0bfd68..34ffd32ab9dc 100644
@@ -1022,7 +1022,7 @@ static const struct regmap_config sta32x_regmap = {
 	.max_register =		STA32X_FDRC2,
 	.reg_defaults =		sta32x_regs,
 	.num_reg_defaults =	ARRAY_SIZE(sta32x_regs),
-	.cache_type =		REGCACHE_RBTREE,
+	.cache_type =		REGCACHE_MAPLE,
 	.wr_table =		&sta32x_write_regs,
 	.rd_table =		&sta32x_read_regs,
 	.volatile_table =	&sta32x_volatile_regs,
Signature · 1 line
2.39.2
author maintainer
#2 lore raw

PATCH 2/5 ASoC: sta350: Update to use maple tree register cache

In reply to Mark Brown

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.

Update the sta350 driver to use the more modern data structure.

---
 sound/soc/codecs/sta350.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/sta350.c +1 -1
index d05f3fd57661..e4a9e9241c60 100644
@@ -1065,7 +1065,7 @@ static const struct regmap_config sta350_regmap = {
 	.max_register =		STA350_MISC2,
 	.reg_defaults =		sta350_regs,
 	.num_reg_defaults =	ARRAY_SIZE(sta350_regs),
-	.cache_type =		REGCACHE_RBTREE,
+	.cache_type =		REGCACHE_MAPLE,
 	.wr_table =		&sta350_write_regs,
 	.rd_table =		&sta350_read_regs,
 	.volatile_table =	&sta350_volatile_regs,
Signature · 1 line
2.39.2
author maintainer
#3 lore raw

PATCH 3/5 ASoC: sta529: Update to use maple tree register cache

In reply to Mark Brown

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.

Update the sta529 driver to use the more modern data structure.

---
 sound/soc/codecs/sta529.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/sta529.c +1 -1
index 0ac08478ddac..eedafef775e5 100644
@@ -331,7 +331,7 @@ static const struct regmap_config sta529_regmap = {
 	.max_register = STA529_MAX_REGISTER,
 	.readable_reg = sta529_readable,
 
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.reg_defaults = sta529_reg_defaults,
 	.num_reg_defaults = ARRAY_SIZE(sta529_reg_defaults),
 };
Signature · 1 line
2.39.2
author maintainer
#4 lore raw

PATCH 4/5 ASoC: stac9766: Update to use maple tree register cache

In reply to Mark Brown

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.

Update the stac9766 driver to use the more modern data structure.

---
 sound/soc/codecs/stac9766.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/stac9766.c +1 -1
index 1824a71fe053..2f9f10a4dfed 100644
@@ -67,7 +67,7 @@ static const struct regmap_config stac9766_regmap_config = {
 	.reg_stride = 2,
 	.val_bits = 16,
 	.max_register = 0x78,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 
 	.volatile_reg = regmap_ac97_default_volatile,
 
Signature · 1 line
2.39.2
author maintainer
#5 lore raw

PATCH 5/5 ASoC: sti-sas: Update to use maple tree register cache

In reply to Mark Brown

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.

Update the sti-sas driver to use the more modern data structure.

---
 sound/soc/codecs/sti-sas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/sti-sas.c +1 -1
index 99545bcb2ba9..c421906a0694 100644
@@ -316,7 +316,7 @@ static const struct regmap_config stih407_sas_regmap = {
 	.reg_defaults = stih407_sas_reg_defaults,
 	.num_reg_defaults = ARRAY_SIZE(stih407_sas_reg_defaults),
 	.volatile_reg = sti_sas_volatile_register,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.reg_read = sti_sas_read_reg,
 	.reg_write = sti_sas_write_reg,
 };
Signature · 1 line
2.39.2
author maintainer
#6 lore raw
In reply to Mark Brown
Quoted 5 lines · Mark Brown

The maple tree register cache has now got to the point where is is roughly feature compatible with the rbtree cache, let's convert the ST drivers to use the more modern data structure.

Applied to

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

Thanks!

[1/5] ASoC: sta32x: Update to use maple tree register cache

      commit: c8af46580b0f5300bb3df16b89f795f255cbcb65
[2/5] ASoC: sta350: Update to use maple tree register cache
      commit: 87256942e90242ec7ddeeba9f6b9433f01eec9be
[3/5] ASoC: sta529: Update to use maple tree register cache
      commit: 35959958df14542c68b0d0c1a7906838323fcbeb
[4/5] ASoC: stac9766: Update to use maple tree register cache
      commit: 4810c775484b373ec5c1c75f53bb9a09ba96a7ef
[5/5] ASoC: sti-sas: Update to use maple tree register cache
      commit: 66b1abc17c9d9e4af58098b9d6b8d7ade961e195

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