* [PATCH 00/20] ASoC: add new Component functions
@ 2026-11-10 5:23 Kuninori Morimoto
2026-11-10 5:23 ` [PATCH 01/20] ASoC: soc-generic-dmaengine-pcm: move devm_snd_dmaengine_pcm_register() Kuninori Morimoto
` (19 more replies)
0 siblings, 20 replies; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:23 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
Hi Mark
I'm now posting ASoC Capsuling patches.
Current status, and this patch-set postion is below.
This patch-set moves Card related functions to soc-card.c
x: done
o: This patch-set
[x] move DAI functions
[x] add new DAI functions
[x] move Component functions
[x] move Card functions
[o] add new Component functions
[ ] rename DAI/Component list
[ ] move Card functions v2
[ ] add new Card functions
[ ] adjust Test
[ ] use new Card register
[ ] use new functions on all drivers
[ ] Capsule DAI/Component/Card
Kuninori Morimoto (20):
ASoC: soc-generic-dmaengine-pcm: move devm_snd_dmaengine_pcm_register()
ASoC: soc-component: rename snd_soc_component_{init/exit}_regmap() to snd_soc_component_regmap_{init/exit}()
ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c
ASoC: soc-component: move devm_snd_soc_component_register()
ASoC: soc-component: move snd_soc_of_xlate_dai_name() to soc-component.c
ASoC: soc-component: makes regmap function to inline macro
ASoC: soc-component: add snd_soc_component_name_prefix()
ASoC: soc-component: add snd_soc_component_to_dev()
ASoC: soc-component: add snd_soc_component_to_driver()
ASoC: soc-component: add snd_soc_component_to_card()
ASoC: soc-component: add snd_soc_component_to_debugfs_root()
ASoC: soc-component: add snd_soc_component_to_regmap()
ASoC: soc-component: add snd_soc_component_regcache_mark_dirty()
ASoC: soc-component: add snd_soc_component_regcache_cache_only()
ASoC: soc-component: add snd_soc_component_regcache_cache_bypass()
ASoC: soc-component: add snd_soc_component_regmap_multi_reg_write_bypassed()
ASoC: soc-component: add snd_soc_component_num_dai()
ASoC: soc-component: add snd_soc_component_connect_dai()
ASoC: soc-component: add snd_soc_component_active_update()
ASoC: soc-component: add snd_soc_component_device_link_{add/del}()
include/sound/soc-component.h | 118 ++++++-
include/sound/soc.h | 14 -
sound/soc/soc-card.c | 22 +-
sound/soc/soc-component.c | 432 ++++++++++++++++++++++----
sound/soc/soc-core.c | 245 ---------------
sound/soc/soc-dai.c | 5 +-
sound/soc/soc-devres.c | 80 -----
sound/soc/soc-generic-dmaengine-pcm.c | 36 +++
sound/soc/soc-internal.h | 4 +
sound/soc/soc-pcm.c | 2 +-
10 files changed, 530 insertions(+), 428 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 01/20] ASoC: soc-generic-dmaengine-pcm: move devm_snd_dmaengine_pcm_register()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
@ 2026-11-10 5:23 ` Kuninori Morimoto
2026-11-11 15:43 ` Alvin Šipraga
2026-11-10 5:23 ` [PATCH 02/20] ASoC: soc-component: rename snd_soc_component_{init/exit}_regmap() to snd_soc_component_regmap_{init/exit}() Kuninori Morimoto
` (18 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:23 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
We don't need to have dmaengine related function in soc-devres.c.
Let's move it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/soc-devres.c | 40 ---------------------------
sound/soc/soc-generic-dmaengine-pcm.c | 36 ++++++++++++++++++++++++
2 files changed, 36 insertions(+), 40 deletions(-)
diff --git a/sound/soc/soc-devres.c b/sound/soc/soc-devres.c
index 718165ba84ac8..ca6c29b54f6ab 100644
--- a/sound/soc/soc-devres.c
+++ b/sound/soc/soc-devres.c
@@ -63,43 +63,3 @@ int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card)
return snd_soc_register_card(card);
}
EXPORT_SYMBOL_GPL(devm_snd_soc_register_card);
-
-#ifdef CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM
-
-static void devm_dmaengine_pcm_release(struct device *dev, void *res)
-{
- snd_dmaengine_pcm_unregister(*(struct device **)res);
-}
-
-/**
- * devm_snd_dmaengine_pcm_register - resource managed dmaengine PCM registration
- * @dev: The parent device for the PCM device
- * @config: Platform specific PCM configuration
- * @flags: Platform specific quirks
- *
- * Register a dmaengine based PCM device with automatic unregistration when the
- * device is unregistered.
- */
-int devm_snd_dmaengine_pcm_register(struct device *dev,
- const struct snd_dmaengine_pcm_config *config, unsigned int flags)
-{
- struct device **ptr;
- int ret;
-
- ptr = devres_alloc(devm_dmaengine_pcm_release, sizeof(*ptr), GFP_KERNEL);
- if (!ptr)
- return -ENOMEM;
-
- ret = snd_dmaengine_pcm_register(dev, config, flags);
- if (ret == 0) {
- *ptr = dev;
- devres_add(dev, ptr);
- } else {
- devres_free(ptr);
- }
-
- return ret;
-}
-EXPORT_SYMBOL_GPL(devm_snd_dmaengine_pcm_register);
-
-#endif
diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
index c7523bae45af7..1ecf3feb2bed0 100644
--- a/sound/soc/soc-generic-dmaengine-pcm.c
+++ b/sound/soc/soc-generic-dmaengine-pcm.c
@@ -520,5 +520,41 @@ void snd_dmaengine_pcm_unregister(struct device *dev)
}
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_unregister);
+static void devm_dmaengine_pcm_release(struct device *dev, void *res)
+{
+ snd_dmaengine_pcm_unregister(*(struct device **)res);
+}
+
+/**
+ * devm_snd_dmaengine_pcm_register - resource managed dmaengine PCM registration
+ * @dev: The parent device for the PCM device
+ * @config: Platform specific PCM configuration
+ * @flags: Platform specific quirks
+ *
+ * Register a dmaengine based PCM device with automatic unregistration when the
+ * device is unregistered.
+ */
+int devm_snd_dmaengine_pcm_register(struct device *dev,
+ const struct snd_dmaengine_pcm_config *config, unsigned int flags)
+{
+ struct device **ptr;
+ int ret;
+
+ ptr = devres_alloc(devm_dmaengine_pcm_release, sizeof(*ptr), GFP_KERNEL);
+ if (!ptr)
+ return -ENOMEM;
+
+ ret = snd_dmaengine_pcm_register(dev, config, flags);
+ if (ret == 0) {
+ *ptr = dev;
+ devres_add(dev, ptr);
+ } else {
+ devres_free(ptr);
+ }
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(devm_snd_dmaengine_pcm_register);
+
MODULE_DESCRIPTION("ASoC helpers for generic PCM dmaengine API");
MODULE_LICENSE("GPL");
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 02/20] ASoC: soc-component: rename snd_soc_component_{init/exit}_regmap() to snd_soc_component_regmap_{init/exit}()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
2026-11-10 5:23 ` [PATCH 01/20] ASoC: soc-generic-dmaengine-pcm: move devm_snd_dmaengine_pcm_register() Kuninori Morimoto
@ 2026-11-10 5:23 ` Kuninori Morimoto
2026-11-10 5:35 ` sashiko-bot
2026-11-10 5:23 ` [PATCH 03/20] ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c Kuninori Morimoto
` (17 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:23 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
We already have snd_soc_component_regmap_xxx() functions.
Let's standardize the function names.
- snd_soc_component_{init/exit}_regmap()
+ snd_soc_component_regmap_{init/exit}()
And no need to have CONFIG_REGMAP, remove #if-#endif
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 10 +++++-----
sound/soc/soc-component.c | 16 ++++++----------
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 73d66c9766944..0d565b6c1f611 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -333,14 +333,12 @@ int snd_soc_component_stream_event(struct snd_soc_component *component,
int snd_soc_component_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level);
+void snd_soc_component_regmap_init(struct snd_soc_component *component,
+ struct regmap *regmap);
+void snd_soc_component_regmap_exit(struct snd_soc_component *component);
int snd_soc_component_regmap_val_bytes(struct snd_soc_component *component);
int snd_soc_component_regmap_cache_sync(struct snd_soc_component *component);
void snd_soc_component_regmap_async_complete(struct snd_soc_component *component);
-#ifdef CONFIG_REGMAP
-void snd_soc_component_init_regmap(struct snd_soc_component *component,
- struct regmap *regmap);
-void snd_soc_component_exit_regmap(struct snd_soc_component *component);
-#endif
int snd_soc_component_fixup_controls(struct snd_soc_component *component);
int snd_soc_component_add_controls(struct snd_soc_component *component,
@@ -445,6 +443,8 @@ void snd_soc_pcm_component_delay(struct snd_pcm_substream *substream,
snd_pcm_sframes_t *cpu_delay, snd_pcm_sframes_t *codec_delay);
/* REMOVE ME */
+#define snd_soc_component_init_regmap snd_soc_component_regmap_init
+#define snd_soc_component_exit_regmap snd_soc_component_regmap_exit
#define snd_soc_component_cache_sync snd_soc_component_regmap_cache_sync
#define snd_soc_component_async_complete snd_soc_component_regmap_async_complete
#define snd_soc_lookup_component_nolocked snd_soc_component_lookup_nolock
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index a6e280c798f3d..6dad994009bdb 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -432,10 +432,8 @@ void snd_soc_component_regmap_async_complete(struct snd_soc_component *component
}
EXPORT_SYMBOL_GPL(snd_soc_component_regmap_async_complete);
-#ifdef CONFIG_REGMAP
-
/**
- * snd_soc_component_init_regmap() - Initialize regmap instance for the
+ * snd_soc_component_regmap_init() - Initialize regmap instance for the
* component
* @component: The component for which to initialize the regmap instance
* @regmap: The regmap instance that should be used by the component
@@ -445,15 +443,15 @@ EXPORT_SYMBOL_GPL(snd_soc_component_regmap_async_complete);
* yet ready when the component is registered. The function must also be called
* before the first IO attempt of the component.
*/
-void snd_soc_component_init_regmap(struct snd_soc_component *component,
+void snd_soc_component_regmap_init(struct snd_soc_component *component,
struct regmap *regmap)
{
component->regmap = regmap;
}
-EXPORT_SYMBOL_GPL(snd_soc_component_init_regmap);
+EXPORT_SYMBOL_GPL(snd_soc_component_regmap_init);
/**
- * snd_soc_component_exit_regmap() - De-initialize regmap instance for the
+ * snd_soc_component_regmap_exit() - De-initialize regmap instance for the
* component
* @component: The component for which to de-initialize the regmap instance
*
@@ -463,14 +461,12 @@ EXPORT_SYMBOL_GPL(snd_soc_component_init_regmap);
* This function should only be used if snd_soc_component_init_regmap() was used
* to initialize the regmap instance.
*/
-void snd_soc_component_exit_regmap(struct snd_soc_component *component)
+void snd_soc_component_regmap_exit(struct snd_soc_component *component)
{
regmap_exit(component->regmap);
component->regmap = NULL;
}
-EXPORT_SYMBOL_GPL(snd_soc_component_exit_regmap);
-
-#endif
+EXPORT_SYMBOL_GPL(snd_soc_component_regmap_exit);
int snd_soc_component_compr_open(struct snd_soc_component *component,
struct snd_compr_stream *cstream)
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 03/20] ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
2026-11-10 5:23 ` [PATCH 01/20] ASoC: soc-generic-dmaengine-pcm: move devm_snd_dmaengine_pcm_register() Kuninori Morimoto
2026-11-10 5:23 ` [PATCH 02/20] ASoC: soc-component: rename snd_soc_component_{init/exit}_regmap() to snd_soc_component_regmap_{init/exit}() Kuninori Morimoto
@ 2026-11-10 5:23 ` Kuninori Morimoto
2026-11-10 5:30 ` sashiko-bot
2026-11-11 15:43 ` Alvin Šipraga
2026-11-10 5:23 ` [PATCH 04/20] ASoC: soc-component: move devm_snd_soc_component_register() Kuninori Morimoto
` (16 subsequent siblings)
19 siblings, 2 replies; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:23 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
move snd_soc_register_[un]component() to soc-component.c
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 10 ++
include/sound/soc.h | 11 --
sound/soc/soc-component.c | 214 ++++++++++++++++++++++++++++++++++
sound/soc/soc-core.c | 212 ---------------------------------
4 files changed, 224 insertions(+), 223 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 0d565b6c1f611..009e0140a15cb 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -278,6 +278,16 @@ struct snd_soc_component *snd_soc_component_new(struct device *dev, const char *
int snd_soc_component_register(struct snd_soc_component *component,
struct snd_soc_dai_driver *dai_drv,
int num_dai);
+int snd_soc_register_component(struct device *dev,
+ const struct snd_soc_component_driver *component_driver,
+ struct snd_soc_dai_driver *dai_drv, int num_dai);
+
+int devm_snd_soc_register_component(struct device *dev,
+ const struct snd_soc_component_driver *component_driver,
+ struct snd_soc_dai_driver *dai_drv, int num_dai);
+#define snd_soc_unregister_component(dev) snd_soc_unregister_component_by_driver(dev, NULL)
+void snd_soc_unregister_component_by_driver(struct device *dev,
+ const struct snd_soc_component_driver *component_driver);
const char *snd_soc_component_name(struct snd_soc_component *component);
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 338662645b42f..338ba5cf85fb3 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -447,17 +447,6 @@ static inline int snd_soc_resume(struct device *dev)
}
#endif
int snd_soc_poweroff(struct device *dev);
-int snd_soc_register_component(struct device *dev,
- const struct snd_soc_component_driver *component_driver,
- struct snd_soc_dai_driver *dai_drv, int num_dai);
-
-int devm_snd_soc_register_component(struct device *dev,
- const struct snd_soc_component_driver *component_driver,
- struct snd_soc_dai_driver *dai_drv, int num_dai);
-#define snd_soc_unregister_component(dev) snd_soc_unregister_component_by_driver(dev, NULL)
-void snd_soc_unregister_component_by_driver(struct device *dev,
- const struct snd_soc_component_driver *component_driver);
-
int soc_new_pcm(struct snd_soc_pcm_runtime *rtd);
#ifdef CONFIG_SND_SOC_COMPRESS
int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd);
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 6dad994009bdb..a2f079cd8aae2 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -1549,3 +1549,217 @@ struct snd_soc_component *snd_soc_component_lookup_by_name(const char *component
return NULL;
}
EXPORT_SYMBOL_GPL(snd_soc_component_lookup_by_name);
+
+/**
+ * snd_soc_unregister_dais - Unregister DAIs from the ASoC core
+ *
+ * @component: The component for which the DAIs should be unregistered
+ */
+static void snd_soc_unregister_dais(struct snd_soc_component *component)
+{
+ struct snd_soc_dai *dai, *_dai;
+
+ for_each_component_dais_safe(component, dai, _dai)
+ snd_soc_unregister_dai(dai);
+}
+
+/**
+ * snd_soc_register_dais - Register a DAI with the ASoC core
+ *
+ * @component: The component the DAIs are registered for
+ * @dai_drv: DAI driver to use for the DAIs
+ * @count: Number of DAIs
+ */
+static int snd_soc_register_dais(struct snd_soc_component *component,
+ struct snd_soc_dai_driver *dai_drv,
+ size_t count)
+{
+ struct snd_soc_dai *dai;
+ unsigned int i;
+ int ret;
+
+ for (i = 0; i < count; i++) {
+ dai = snd_soc_register_dai(component, dai_drv + i, count == 1 &&
+ component->driver->legacy_dai_naming);
+ if (dai == NULL) {
+ ret = -ENOMEM;
+ goto err;
+ }
+ }
+
+ return 0;
+
+err:
+ snd_soc_unregister_dais(component);
+
+ return ret;
+}
+
+#define ENDIANNESS_MAP(name) \
+ (SNDRV_PCM_FMTBIT_##name##LE | SNDRV_PCM_FMTBIT_##name##BE)
+static u64 endianness_format_map[] = {
+ ENDIANNESS_MAP(S16_),
+ ENDIANNESS_MAP(U16_),
+ ENDIANNESS_MAP(S24_),
+ ENDIANNESS_MAP(U24_),
+ ENDIANNESS_MAP(S32_),
+ ENDIANNESS_MAP(U32_),
+ ENDIANNESS_MAP(S24_3),
+ ENDIANNESS_MAP(U24_3),
+ ENDIANNESS_MAP(S20_3),
+ ENDIANNESS_MAP(U20_3),
+ ENDIANNESS_MAP(S18_3),
+ ENDIANNESS_MAP(U18_3),
+ ENDIANNESS_MAP(FLOAT_),
+ ENDIANNESS_MAP(FLOAT64_),
+ ENDIANNESS_MAP(IEC958_SUBFRAME_),
+};
+
+/*
+ * Fix up the DAI formats for endianness: codecs don't actually see
+ * the endianness of the data but we're using the CPU format
+ * definitions which do need to include endianness so we ensure that
+ * codec DAIs always have both big and little endian variants set.
+ */
+static void convert_endianness_formats(struct snd_soc_pcm_stream *stream)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(endianness_format_map); i++)
+ if (stream->formats & endianness_format_map[i])
+ stream->formats |= endianness_format_map[i];
+}
+
+static void snd_soc_del_component_unlocked(struct snd_soc_component *component)
+{
+ struct snd_soc_card *card = component->card;
+
+ snd_soc_unregister_dais(component);
+
+ if (card)
+ snd_soc_card_unbind(card, true);
+
+ list_del(&component->list);
+}
+
+struct snd_soc_component *snd_soc_component_new(struct device *dev, const char *name,
+ const struct snd_soc_component_driver *driver)
+{
+ struct snd_soc_component *component;
+
+ component = devm_kzalloc(dev, sizeof(*component), GFP_KERNEL);
+ if (!component)
+ return ERR_PTR(-ENOMEM);
+
+ component->dapm = snd_soc_dapm_alloc(dev);
+ if (!component->dapm)
+ return ERR_PTR(-ENOMEM);
+
+ if (!name) {
+ name = snd_soc_fmt_single_name(dev, NULL);
+ if (!name) {
+ dev_err(dev, "ASoC: Failed to allocate name\n");
+ return ERR_PTR(-ENOMEM);
+ }
+ }
+
+ component->dev = dev;
+ component->name = name;
+ component->driver = driver;
+
+ INIT_LIST_HEAD(&component->dai_list);
+ INIT_LIST_HEAD(&component->dobj_list);
+ INIT_LIST_HEAD(&component->card_list);
+ INIT_LIST_HEAD(&component->list);
+ INIT_LIST_HEAD(&component->card_aux_list);
+ mutex_init(&component->io_mutex);
+
+ return component;
+}
+EXPORT_SYMBOL_GPL(snd_soc_component_new);
+
+int snd_soc_component_register(struct snd_soc_component *component,
+ struct snd_soc_dai_driver *dai_drv,
+ int num_dai)
+{
+ int ret;
+ int i;
+
+ guard(mutex)(&client_mutex);
+
+ if (component->driver->endianness) {
+ for (i = 0; i < num_dai; i++) {
+ convert_endianness_formats(&dai_drv[i].playback);
+ convert_endianness_formats(&dai_drv[i].capture);
+ }
+ }
+
+ ret = snd_soc_register_dais(component, dai_drv, num_dai);
+ if (ret < 0) {
+ dev_err(component->dev, "ASoC: Failed to register DAIs: %d\n",
+ ret);
+ goto err_cleanup;
+ }
+
+ if (!component->driver->write && !component->driver->read) {
+ if (!component->regmap)
+ component->regmap = dev_get_regmap(component->dev,
+ NULL);
+ }
+
+ /* see for_each_component */
+ list_add(&component->list, snd_soc_component_get_list_head());
+
+ snd_soc_card_rebind();
+
+err_cleanup:
+ if (ret < 0)
+ snd_soc_del_component_unlocked(component);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(snd_soc_component_register);
+
+int snd_soc_register_component(struct device *dev,
+ const struct snd_soc_component_driver *component_driver,
+ struct snd_soc_dai_driver *dai_drv,
+ int num_dai)
+{
+ struct snd_soc_component *component;
+
+ component = snd_soc_component_new(dev, NULL, component_driver);
+ if (IS_ERR(component))
+ return PTR_ERR(component);
+
+ return snd_soc_component_register(component, dai_drv, num_dai);
+}
+EXPORT_SYMBOL_GPL(snd_soc_register_component);
+
+/**
+ * snd_soc_unregister_component_by_driver - Unregister component using a given driver
+ * from the ASoC core
+ *
+ * @dev: The device to unregister
+ * @component_driver: The component driver to unregister
+ */
+void snd_soc_unregister_component_by_driver(struct device *dev,
+ const struct snd_soc_component_driver *component_driver)
+{
+ const char *driver_name = NULL;
+
+ if (component_driver)
+ driver_name = component_driver->name;
+
+ guard(mutex)(&client_mutex);
+
+ while (1) {
+ struct snd_soc_component *component;
+
+ component = snd_soc_lookup_component_nolocked(dev, driver_name);
+ if (!component)
+ break;
+
+ snd_soc_del_component_unlocked(component);
+ }
+}
+EXPORT_SYMBOL_GPL(snd_soc_unregister_component_by_driver);
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index ac72d9357840a..b0dfdfe8d4a29 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1376,218 +1376,6 @@ char *snd_soc_fmt_multiple_name(struct device *dev, struct snd_soc_dai_driver *d
return devm_kstrdup(dev, dai_drv->name, GFP_KERNEL);
}
-/**
- * snd_soc_unregister_dais - Unregister DAIs from the ASoC core
- *
- * @component: The component for which the DAIs should be unregistered
- */
-static void snd_soc_unregister_dais(struct snd_soc_component *component)
-{
- struct snd_soc_dai *dai, *_dai;
-
- for_each_component_dais_safe(component, dai, _dai)
- snd_soc_unregister_dai(dai);
-}
-
-/**
- * snd_soc_register_dais - Register a DAI with the ASoC core
- *
- * @component: The component the DAIs are registered for
- * @dai_drv: DAI driver to use for the DAIs
- * @count: Number of DAIs
- */
-static int snd_soc_register_dais(struct snd_soc_component *component,
- struct snd_soc_dai_driver *dai_drv,
- size_t count)
-{
- struct snd_soc_dai *dai;
- unsigned int i;
- int ret;
-
- for (i = 0; i < count; i++) {
- dai = snd_soc_register_dai(component, dai_drv + i, count == 1 &&
- component->driver->legacy_dai_naming);
- if (dai == NULL) {
- ret = -ENOMEM;
- goto err;
- }
- }
-
- return 0;
-
-err:
- snd_soc_unregister_dais(component);
-
- return ret;
-}
-
-#define ENDIANNESS_MAP(name) \
- (SNDRV_PCM_FMTBIT_##name##LE | SNDRV_PCM_FMTBIT_##name##BE)
-static u64 endianness_format_map[] = {
- ENDIANNESS_MAP(S16_),
- ENDIANNESS_MAP(U16_),
- ENDIANNESS_MAP(S24_),
- ENDIANNESS_MAP(U24_),
- ENDIANNESS_MAP(S32_),
- ENDIANNESS_MAP(U32_),
- ENDIANNESS_MAP(S24_3),
- ENDIANNESS_MAP(U24_3),
- ENDIANNESS_MAP(S20_3),
- ENDIANNESS_MAP(U20_3),
- ENDIANNESS_MAP(S18_3),
- ENDIANNESS_MAP(U18_3),
- ENDIANNESS_MAP(FLOAT_),
- ENDIANNESS_MAP(FLOAT64_),
- ENDIANNESS_MAP(IEC958_SUBFRAME_),
-};
-
-/*
- * Fix up the DAI formats for endianness: codecs don't actually see
- * the endianness of the data but we're using the CPU format
- * definitions which do need to include endianness so we ensure that
- * codec DAIs always have both big and little endian variants set.
- */
-static void convert_endianness_formats(struct snd_soc_pcm_stream *stream)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(endianness_format_map); i++)
- if (stream->formats & endianness_format_map[i])
- stream->formats |= endianness_format_map[i];
-}
-
-static void snd_soc_del_component_unlocked(struct snd_soc_component *component)
-{
- struct snd_soc_card *card = component->card;
-
- snd_soc_unregister_dais(component);
-
- if (card)
- snd_soc_card_unbind(card, true);
-
- list_del(&component->list);
-}
-
-struct snd_soc_component *snd_soc_component_new(struct device *dev, const char *name,
- const struct snd_soc_component_driver *driver)
-{
- struct snd_soc_component *component;
-
- component = devm_kzalloc(dev, sizeof(*component), GFP_KERNEL);
- if (!component)
- return ERR_PTR(-ENOMEM);
-
- component->dapm = snd_soc_dapm_alloc(dev);
- if (!component->dapm)
- return ERR_PTR(-ENOMEM);
-
- if (!name) {
- name = snd_soc_fmt_single_name(dev, NULL);
- if (!name) {
- dev_err(dev, "ASoC: Failed to allocate name\n");
- return ERR_PTR(-ENOMEM);
- }
- }
-
- component->dev = dev;
- component->name = name;
- component->driver = driver;
-
- INIT_LIST_HEAD(&component->dai_list);
- INIT_LIST_HEAD(&component->dobj_list);
- INIT_LIST_HEAD(&component->card_list);
- INIT_LIST_HEAD(&component->list);
- INIT_LIST_HEAD(&component->card_aux_list);
- mutex_init(&component->io_mutex);
-
- return component;
-}
-EXPORT_SYMBOL_GPL(snd_soc_component_new);
-
-int snd_soc_component_register(struct snd_soc_component *component,
- struct snd_soc_dai_driver *dai_drv,
- int num_dai)
-{
- int ret;
- int i;
- guard(mutex)(&client_mutex);
-
- if (component->driver->endianness) {
- for (i = 0; i < num_dai; i++) {
- convert_endianness_formats(&dai_drv[i].playback);
- convert_endianness_formats(&dai_drv[i].capture);
- }
- }
-
- ret = snd_soc_register_dais(component, dai_drv, num_dai);
- if (ret < 0) {
- dev_err(component->dev, "ASoC: Failed to register DAIs: %d\n",
- ret);
- goto err_cleanup;
- }
-
- if (!component->driver->write && !component->driver->read) {
- if (!component->regmap)
- component->regmap = dev_get_regmap(component->dev,
- NULL);
- }
-
- /* see for_each_component */
- list_add(&component->list, snd_soc_component_get_list_head());
-
- snd_soc_card_rebind();
-
-err_cleanup:
- if (ret < 0)
- snd_soc_del_component_unlocked(component);
-
- return ret;
-}
-EXPORT_SYMBOL_GPL(snd_soc_component_register);
-
-int snd_soc_register_component(struct device *dev,
- const struct snd_soc_component_driver *component_driver,
- struct snd_soc_dai_driver *dai_drv,
- int num_dai)
-{
- struct snd_soc_component *component;
-
- component = snd_soc_component_new(dev, NULL, component_driver);
- if (IS_ERR(component))
- return PTR_ERR(component);
-
- return snd_soc_component_register(component, dai_drv, num_dai);
-}
-EXPORT_SYMBOL_GPL(snd_soc_register_component);
-
-/**
- * snd_soc_unregister_component_by_driver - Unregister component using a given driver
- * from the ASoC core
- *
- * @dev: The device to unregister
- * @component_driver: The component driver to unregister
- */
-void snd_soc_unregister_component_by_driver(struct device *dev,
- const struct snd_soc_component_driver *component_driver)
-{
- const char *driver_name = NULL;
-
- if (component_driver)
- driver_name = component_driver->name;
-
- guard(mutex)(&client_mutex);
-
- while (1) {
- struct snd_soc_component *component = snd_soc_lookup_component_nolocked(dev, driver_name);
-
- if (!component)
- break;
-
- snd_soc_del_component_unlocked(component);
- }
-}
-EXPORT_SYMBOL_GPL(snd_soc_unregister_component_by_driver);
-
/* Retrieve a card's name from device tree */
int snd_soc_of_parse_card_name(struct snd_soc_card *card,
const char *propname)
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 04/20] ASoC: soc-component: move devm_snd_soc_component_register()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (2 preceding siblings ...)
2026-11-10 5:23 ` [PATCH 03/20] ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c Kuninori Morimoto
@ 2026-11-10 5:23 ` Kuninori Morimoto
2026-11-11 15:44 ` Alvin Šipraga
2026-11-10 5:23 ` [PATCH 05/20] ASoC: soc-component: move snd_soc_of_xlate_dai_name() to soc-component.c Kuninori Morimoto
` (15 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:23 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
We don't need to have component related function in soc-devres.c.
Let's move it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/soc-component.c | 40 +++++++++++++++++++++++++++++++++++++++
sound/soc/soc-devres.c | 40 ---------------------------------------
2 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index a2f079cd8aae2..080568810ea5d 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -1763,3 +1763,43 @@ void snd_soc_unregister_component_by_driver(struct device *dev,
}
}
EXPORT_SYMBOL_GPL(snd_soc_unregister_component_by_driver);
+
+static void devm_component_release(struct device *dev, void *res)
+{
+ const struct snd_soc_component_driver **cmpnt_drv = res;
+
+ snd_soc_unregister_component_by_driver(dev, *cmpnt_drv);
+}
+
+/**
+ * devm_snd_soc_register_component - resource managed component registration
+ * @dev: Device used to manage component
+ * @cmpnt_drv: Component driver
+ * @dai_drv: DAI driver
+ * @num_dai: Number of DAIs to register
+ *
+ * Register a component with automatic unregistration when the device is
+ * unregistered.
+ */
+int devm_snd_soc_register_component(struct device *dev,
+ const struct snd_soc_component_driver *cmpnt_drv,
+ struct snd_soc_dai_driver *dai_drv, int num_dai)
+{
+ const struct snd_soc_component_driver **ptr;
+ int ret;
+
+ ptr = devres_alloc(devm_component_release, sizeof(*ptr), GFP_KERNEL);
+ if (!ptr)
+ return -ENOMEM;
+
+ ret = snd_soc_register_component(dev, cmpnt_drv, dai_drv, num_dai);
+ if (ret == 0) {
+ *ptr = cmpnt_drv;
+ devres_add(dev, ptr);
+ } else {
+ devres_free(ptr);
+ }
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(devm_snd_soc_register_component);
diff --git a/sound/soc/soc-devres.c b/sound/soc/soc-devres.c
index ca6c29b54f6ab..431bb366468ac 100644
--- a/sound/soc/soc-devres.c
+++ b/sound/soc/soc-devres.c
@@ -9,46 +9,6 @@
#include <sound/soc.h>
#include <sound/dmaengine_pcm.h>
-static void devm_component_release(struct device *dev, void *res)
-{
- const struct snd_soc_component_driver **cmpnt_drv = res;
-
- snd_soc_unregister_component_by_driver(dev, *cmpnt_drv);
-}
-
-/**
- * devm_snd_soc_register_component - resource managed component registration
- * @dev: Device used to manage component
- * @cmpnt_drv: Component driver
- * @dai_drv: DAI driver
- * @num_dai: Number of DAIs to register
- *
- * Register a component with automatic unregistration when the device is
- * unregistered.
- */
-int devm_snd_soc_register_component(struct device *dev,
- const struct snd_soc_component_driver *cmpnt_drv,
- struct snd_soc_dai_driver *dai_drv, int num_dai)
-{
- const struct snd_soc_component_driver **ptr;
- int ret;
-
- ptr = devres_alloc(devm_component_release, sizeof(*ptr), GFP_KERNEL);
- if (!ptr)
- return -ENOMEM;
-
- ret = snd_soc_register_component(dev, cmpnt_drv, dai_drv, num_dai);
- if (ret == 0) {
- *ptr = cmpnt_drv;
- devres_add(dev, ptr);
- } else {
- devres_free(ptr);
- }
-
- return ret;
-}
-EXPORT_SYMBOL_GPL(devm_snd_soc_register_component);
-
/**
* devm_snd_soc_register_card - resource managed card registration
* @dev: Device used to manage card
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 05/20] ASoC: soc-component: move snd_soc_of_xlate_dai_name() to soc-component.c
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (3 preceding siblings ...)
2026-11-10 5:23 ` [PATCH 04/20] ASoC: soc-component: move devm_snd_soc_component_register() Kuninori Morimoto
@ 2026-11-10 5:23 ` Kuninori Morimoto
2026-11-11 15:44 ` Alvin Šipraga
2026-11-10 5:23 ` [PATCH 06/20] ASoC: soc-component: makes regmap function to inline macro Kuninori Morimoto
` (14 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:23 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
move snd_soc_of_xlate_dai_name() to soc-component.c
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 5 ++++-
include/sound/soc.h | 3 ---
sound/soc/soc-component.c | 33 +++++++++++++++++++++++++++++++++
sound/soc/soc-core.c | 33 ---------------------------------
4 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 009e0140a15cb..6d5740d5a5e21 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -400,6 +400,9 @@ int snd_soc_component_of_xlate_dai_id(struct snd_soc_component *component,
int snd_soc_component_of_xlate_dai_name(struct snd_soc_component *component,
const struct of_phandle_args *args,
const char **dai_name);
+int snd_soc_component_of_simple_xlate_dai_name(struct snd_soc_component *component,
+ const struct of_phandle_args *args,
+ const char **dai_name);
int snd_soc_component_compr_open(struct snd_soc_component *component,
struct snd_compr_stream *cstream);
void snd_soc_component_compr_free(struct snd_soc_component *component,
@@ -460,5 +463,5 @@ void snd_soc_pcm_component_delay(struct snd_pcm_substream *substream,
#define snd_soc_lookup_component_nolocked snd_soc_component_lookup_nolock
#define snd_soc_lookup_component snd_soc_component_lookup
#define snd_soc_lookup_component_by_name snd_soc_component_lookup_by_name
-
+#define snd_soc_of_xlate_dai_name snd_soc_component_of_simple_xlate_dai_name
#endif /* __SOC_COMPONENT_H */
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 338ba5cf85fb3..5abebfa329b52 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1303,9 +1303,6 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np,
unsigned int *rx_mask,
unsigned int *slots,
unsigned int *slot_width);
-int snd_soc_of_xlate_dai_name(struct snd_soc_component *component,
- const struct of_phandle_args *args,
- const char **dai_name);
void snd_soc_of_parse_node_prefix(struct device_node *np,
struct snd_soc_codec_conf *codec_conf,
struct device_node *of_node,
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 080568810ea5d..f717204fec60d 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -1803,3 +1803,36 @@ int devm_snd_soc_register_component(struct device *dev,
return ret;
}
EXPORT_SYMBOL_GPL(devm_snd_soc_register_component);
+
+/**
+ * snd_soc_component_of_simple_xlate_dai_name - Resolve a sound-dai phandle argument to a
+ * DAI name by searching the component DAI list.
+ * @component: ASoC component to search.
+ * @args: Phandle arguments from the sound-dai property; args[0] is the
+ * DAI ID.
+ * @dai_name: Output pointer set to the matched DAI name on success.
+ *
+ * Return: 0 on success, -EINVAL if args_count != 1 or no match is found.
+ */
+int snd_soc_component_of_simple_xlate_dai_name(struct snd_soc_component *component,
+ const struct of_phandle_args *args,
+ const char **dai_name)
+{
+ struct snd_soc_dai *dai;
+ int id;
+
+ if (args->args_count != 1)
+ return -EINVAL;
+
+ id = args->args[0];
+
+ for_each_component_dais(component, dai) {
+ if (dai->driver->id == id) {
+ *dai_name = snd_soc_dai_name(dai);
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+EXPORT_SYMBOL_GPL(snd_soc_component_of_simple_xlate_dai_name);
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index b0dfdfe8d4a29..54a6d696d59cf 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1593,39 +1593,6 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np,
}
EXPORT_SYMBOL_GPL(snd_soc_of_parse_tdm_slot);
-/**
- * snd_soc_of_xlate_dai_name - Resolve a sound-dai phandle argument to a
- * DAI name by searching the component DAI list.
- * @component: ASoC component to search.
- * @args: Phandle arguments from the sound-dai property; args[0] is the
- * DAI ID.
- * @dai_name: Output pointer set to the matched DAI name on success.
- *
- * Return: 0 on success, -EINVAL if args_count != 1 or no match is found.
- */
-int snd_soc_of_xlate_dai_name(struct snd_soc_component *component,
- const struct of_phandle_args *args,
- const char **dai_name)
-{
- struct snd_soc_dai *dai;
- int id;
-
- if (args->args_count != 1)
- return -EINVAL;
-
- id = args->args[0];
-
- for_each_component_dais(component, dai) {
- if (dai->driver->id == id) {
- *dai_name = snd_soc_dai_name(dai);
- return 0;
- }
- }
-
- return -EINVAL;
-}
-EXPORT_SYMBOL_GPL(snd_soc_of_xlate_dai_name);
-
void snd_soc_dlc_use_cpu_as_platform(struct snd_soc_dai_link_component *platforms,
struct snd_soc_dai_link_component *cpus)
{
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 06/20] ASoC: soc-component: makes regmap function to inline macro
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (4 preceding siblings ...)
2026-11-10 5:23 ` [PATCH 05/20] ASoC: soc-component: move snd_soc_of_xlate_dai_name() to soc-component.c Kuninori Morimoto
@ 2026-11-10 5:23 ` Kuninori Morimoto
2026-11-10 5:38 ` sashiko-bot
2026-11-11 15:45 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 07/20] ASoC: soc-component: add snd_soc_component_name_prefix() Kuninori Morimoto
` (13 subsequent siblings)
19 siblings, 2 replies; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:23 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
Component regmap related function is almost rapper, thus very redundant.
No need to makes it as function, but inline macro is very enough.
Let's standardize inline function naming conventions.
snd_soc_component_${regmap_func}(...);
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 52 +++++++++++++++++++++++++++++------
sound/soc/soc-component.c | 46 -------------------------------
2 files changed, 44 insertions(+), 54 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 6d5740d5a5e21..4e538942df643 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -343,13 +343,6 @@ int snd_soc_component_stream_event(struct snd_soc_component *component,
int snd_soc_component_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level);
-void snd_soc_component_regmap_init(struct snd_soc_component *component,
- struct regmap *regmap);
-void snd_soc_component_regmap_exit(struct snd_soc_component *component);
-int snd_soc_component_regmap_val_bytes(struct snd_soc_component *component);
-int snd_soc_component_regmap_cache_sync(struct snd_soc_component *component);
-void snd_soc_component_regmap_async_complete(struct snd_soc_component *component);
-
int snd_soc_component_fixup_controls(struct snd_soc_component *component);
int snd_soc_component_add_controls(struct snd_soc_component *component,
const struct snd_kcontrol_new *controls, unsigned int num_controls);
@@ -455,10 +448,53 @@ int snd_soc_pcm_component_ack(struct snd_pcm_substream *substream);
void snd_soc_pcm_component_delay(struct snd_pcm_substream *substream,
snd_pcm_sframes_t *cpu_delay, snd_pcm_sframes_t *codec_delay);
+/*
+ * regmap
+ */
+void snd_soc_component_regmap_init(struct snd_soc_component *component,
+ struct regmap *regmap);
+void snd_soc_component_regmap_exit(struct snd_soc_component *component);
+
+static inline int snd_soc_component_regmap_get_val_bytes(struct snd_soc_component *component)
+{
+ struct regmap *regmap = snd_soc_component_to_regmap(component);
+ int val_bytes;
+
+ /* Errors are legitimate for non-integer byte multiples */
+
+ if (!regmap)
+ return 0;
+
+ val_bytes = regmap_get_val_bytes(regmap);
+ if (val_bytes < 0)
+ return 0;
+
+ return val_bytes;
+}
+
+static inline int snd_soc_component_regcache_sync(struct snd_soc_component *component)
+{
+ struct regmap *regmap = snd_soc_component_to_regmap(component);
+
+ if (!regmap)
+ return 0;
+
+ return regcache_sync(regmap);
+}
+
+static inline void snd_soc_component_regmap_async_complete(struct snd_soc_component *component)
+{
+ struct regmap *regmap = snd_soc_component_to_regmap(component);
+
+ if (regmap)
+ regmap_async_complete(regmap);
+}
+
/* REMOVE ME */
#define snd_soc_component_init_regmap snd_soc_component_regmap_init
#define snd_soc_component_exit_regmap snd_soc_component_regmap_exit
-#define snd_soc_component_cache_sync snd_soc_component_regmap_cache_sync
+#define snd_soc_component_regmap_val_bytes snd_soc_component_regmap_get_val_bytes
+#define snd_soc_component_cache_sync snd_soc_component_regcache_sync
#define snd_soc_component_async_complete snd_soc_component_regmap_async_complete
#define snd_soc_lookup_component_nolocked snd_soc_component_lookup_nolock
#define snd_soc_lookup_component snd_soc_component_lookup
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index f717204fec60d..838a00c2b325b 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -386,52 +386,6 @@ int snd_soc_component_of_xlate_dai_name(struct snd_soc_component *component,
return -ENOTSUPP;
}
-int snd_soc_component_regmap_val_bytes(struct snd_soc_component *component)
-{
- int val_bytes;
-
- /* Errors are legitimate for non-integer byte multiples */
-
- if (!component->regmap)
- return 0;
-
- val_bytes = regmap_get_val_bytes(component->regmap);
- if (val_bytes < 0)
- return 0;
-
- return val_bytes;
-}
-EXPORT_SYMBOL_GPL(snd_soc_component_regmap_val_bytes);
-
-/**
- * snd_soc_component_regmap_cache_sync() - Sync the register cache with the hardware
- * @component: COMPONENT to sync
- *
- * Note: This function will call regcache_sync()
- */
-int snd_soc_component_regmap_cache_sync(struct snd_soc_component *component)
-{
- if (!component->regmap)
- return 0;
-
- return regcache_sync(component->regmap);
-}
-EXPORT_SYMBOL_GPL(snd_soc_component_regmap_cache_sync);
-
-/**
- * snd_soc_component_regmap_async_complete() - Ensure asynchronous I/O has completed
- * @component: Component for which to wait
- *
- * This function blocks until all asynchronous I/O which has previously been
- * scheduled using snd_soc_component_update_bits_async() has completed.
- */
-void snd_soc_component_regmap_async_complete(struct snd_soc_component *component)
-{
- if (component->regmap)
- regmap_async_complete(component->regmap);
-}
-EXPORT_SYMBOL_GPL(snd_soc_component_regmap_async_complete);
-
/**
* snd_soc_component_regmap_init() - Initialize regmap instance for the
* component
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 07/20] ASoC: soc-component: add snd_soc_component_name_prefix()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (5 preceding siblings ...)
2026-11-10 5:23 ` [PATCH 06/20] ASoC: soc-component: makes regmap function to inline macro Kuninori Morimoto
@ 2026-11-10 5:24 ` Kuninori Morimoto
2026-11-11 15:45 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 08/20] ASoC: soc-component: add snd_soc_component_to_dev() Kuninori Morimoto
` (12 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:24 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
Add snd_soc_component_name_prefix() to soc-component.c
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 1 +
sound/soc/soc-component.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 4e538942df643..ad148e341fdf0 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -290,6 +290,7 @@ void snd_soc_unregister_component_by_driver(struct device *dev,
const struct snd_soc_component_driver *component_driver);
const char *snd_soc_component_name(struct snd_soc_component *component);
+const char *snd_soc_component_name_prefix(struct snd_soc_component *component);
void snd_soc_component_set_priv(struct snd_soc_component *component, void *priv);
void *snd_soc_component_to_priv(struct snd_soc_component *component);
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 838a00c2b325b..0dd0008ac59b9 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -43,6 +43,12 @@ const char *snd_soc_component_name(struct snd_soc_component *component)
}
EXPORT_SYMBOL_GPL(snd_soc_component_name);
+const char *snd_soc_component_name_prefix(struct snd_soc_component *component)
+{
+ return component->name_prefix;
+}
+EXPORT_SYMBOL_GPL(snd_soc_component_name_prefix);
+
void snd_soc_component_set_priv(struct snd_soc_component *component, void *priv)
{
component->priv = priv;
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 08/20] ASoC: soc-component: add snd_soc_component_to_dev()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (6 preceding siblings ...)
2026-11-10 5:24 ` [PATCH 07/20] ASoC: soc-component: add snd_soc_component_name_prefix() Kuninori Morimoto
@ 2026-11-10 5:24 ` Kuninori Morimoto
2026-11-11 15:45 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 09/20] ASoC: soc-component: add snd_soc_component_to_driver() Kuninori Morimoto
` (11 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:24 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
Add snd_soc_component_to_dev() to soc-component.c
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 1 +
sound/soc/soc-component.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index ad148e341fdf0..960645fde8e31 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -272,6 +272,7 @@ struct snd_soc_component {
snd_soc_dai_to_list(dai) != &(component)->dai_list; \
dai = _dai, _dai = snd_soc_dai_from_list(snd_soc_dai_to_list(_dai)->next))
+struct device *snd_soc_component_to_dev(struct snd_soc_component *component);
struct snd_soc_dapm_context *snd_soc_component_to_dapm(struct snd_soc_component *component);
struct snd_soc_component *snd_soc_component_new(struct device *dev, const char *name,
const struct snd_soc_component_driver *driver);
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 0dd0008ac59b9..abb8cc843662d 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -61,6 +61,12 @@ void *snd_soc_component_to_priv(struct snd_soc_component *component)
}
EXPORT_SYMBOL_GPL(snd_soc_component_to_priv);
+struct device *snd_soc_component_to_dev(struct snd_soc_component *component)
+{
+ return component->dev;
+}
+EXPORT_SYMBOL_GPL(snd_soc_component_to_dev);
+
struct snd_soc_dapm_context *snd_soc_component_to_dapm(struct snd_soc_component *component)
{
return component->dapm;
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 09/20] ASoC: soc-component: add snd_soc_component_to_driver()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (7 preceding siblings ...)
2026-11-10 5:24 ` [PATCH 08/20] ASoC: soc-component: add snd_soc_component_to_dev() Kuninori Morimoto
@ 2026-11-10 5:24 ` Kuninori Morimoto
2026-11-11 15:45 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 10/20] ASoC: soc-component: add snd_soc_component_to_card() Kuninori Morimoto
` (10 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:24 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
Add snd_soc_component_to_driver() to soc-component.c
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 2 ++
sound/soc/soc-component.c | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 960645fde8e31..23a41fbe55abc 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -274,6 +274,8 @@ struct snd_soc_component {
struct device *snd_soc_component_to_dev(struct snd_soc_component *component);
struct snd_soc_dapm_context *snd_soc_component_to_dapm(struct snd_soc_component *component);
+const struct snd_soc_component_driver
+*snd_soc_component_to_driver(struct snd_soc_component *component);
struct snd_soc_component *snd_soc_component_new(struct device *dev, const char *name,
const struct snd_soc_component_driver *driver);
int snd_soc_component_register(struct snd_soc_component *component,
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index abb8cc843662d..e42e5152a9f93 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -73,6 +73,13 @@ struct snd_soc_dapm_context *snd_soc_component_to_dapm(struct snd_soc_component
}
EXPORT_SYMBOL_GPL(snd_soc_component_to_dapm);
+const struct snd_soc_component_driver *
+snd_soc_component_to_driver(struct snd_soc_component *component)
+{
+ return component->driver;
+}
+EXPORT_SYMBOL_GPL(snd_soc_component_to_driver);
+
unsigned int snd_soc_component_active(struct snd_soc_component *component)
{
return component->active;
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 10/20] ASoC: soc-component: add snd_soc_component_to_card()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (8 preceding siblings ...)
2026-11-10 5:24 ` [PATCH 09/20] ASoC: soc-component: add snd_soc_component_to_driver() Kuninori Morimoto
@ 2026-11-10 5:24 ` Kuninori Morimoto
2026-11-11 15:46 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 11/20] ASoC: soc-component: add snd_soc_component_to_debugfs_root() Kuninori Morimoto
` (9 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:24 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
Add snd_soc_component_to_card() to soc-component.c
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 1 +
sound/soc/soc-component.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 23a41fbe55abc..64aca0083c98e 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -276,6 +276,7 @@ struct device *snd_soc_component_to_dev(struct snd_soc_component *component);
struct snd_soc_dapm_context *snd_soc_component_to_dapm(struct snd_soc_component *component);
const struct snd_soc_component_driver
*snd_soc_component_to_driver(struct snd_soc_component *component);
+struct snd_soc_card *snd_soc_component_to_card(struct snd_soc_component *component);
struct snd_soc_component *snd_soc_component_new(struct device *dev, const char *name,
const struct snd_soc_component_driver *driver);
int snd_soc_component_register(struct snd_soc_component *component,
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index e42e5152a9f93..bf7c0fcbbb8ce 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -80,6 +80,12 @@ snd_soc_component_to_driver(struct snd_soc_component *component)
}
EXPORT_SYMBOL_GPL(snd_soc_component_to_driver);
+struct snd_soc_card *snd_soc_component_to_card(struct snd_soc_component *component)
+{
+ return component->card;
+}
+EXPORT_SYMBOL_GPL(snd_soc_component_to_card);
+
unsigned int snd_soc_component_active(struct snd_soc_component *component)
{
return component->active;
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 11/20] ASoC: soc-component: add snd_soc_component_to_debugfs_root()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (9 preceding siblings ...)
2026-11-10 5:24 ` [PATCH 10/20] ASoC: soc-component: add snd_soc_component_to_card() Kuninori Morimoto
@ 2026-11-10 5:24 ` Kuninori Morimoto
2026-11-11 15:46 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 12/20] ASoC: soc-component: add snd_soc_component_to_regmap() Kuninori Morimoto
` (8 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:24 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
This patch adds snd_soc_component_debugfs_root() to get
component->debugfs_root.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 1 +
sound/soc/soc-component.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 64aca0083c98e..3ba4e2c84e4b4 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -277,6 +277,7 @@ struct snd_soc_dapm_context *snd_soc_component_to_dapm(struct snd_soc_component
const struct snd_soc_component_driver
*snd_soc_component_to_driver(struct snd_soc_component *component);
struct snd_soc_card *snd_soc_component_to_card(struct snd_soc_component *component);
+struct dentry *snd_soc_component_to_debugfs_root(struct snd_soc_component *component);
struct snd_soc_component *snd_soc_component_new(struct device *dev, const char *name,
const struct snd_soc_component_driver *driver);
int snd_soc_component_register(struct snd_soc_component *component,
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index bf7c0fcbbb8ce..ebeac81355901 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -86,6 +86,12 @@ struct snd_soc_card *snd_soc_component_to_card(struct snd_soc_component *compone
}
EXPORT_SYMBOL_GPL(snd_soc_component_to_card);
+struct dentry *snd_soc_component_to_debugfs_root(struct snd_soc_component *component)
+{
+ return component->debugfs_root;
+}
+EXPORT_SYMBOL_GPL(snd_soc_component_to_debugfs_root);
+
unsigned int snd_soc_component_active(struct snd_soc_component *component)
{
return component->active;
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 12/20] ASoC: soc-component: add snd_soc_component_to_regmap()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (10 preceding siblings ...)
2026-11-10 5:24 ` [PATCH 11/20] ASoC: soc-component: add snd_soc_component_to_debugfs_root() Kuninori Morimoto
@ 2026-11-10 5:24 ` Kuninori Morimoto
2026-11-10 5:42 ` sashiko-bot
2026-11-11 15:46 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 13/20] ASoC: soc-component: add snd_soc_component_regcache_mark_dirty() Kuninori Morimoto
` (7 subsequent siblings)
19 siblings, 2 replies; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:24 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
Add snd_soc_component_to_regmap() to soc-component.c
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 1 +
sound/soc/soc-component.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 3ba4e2c84e4b4..4a72cfb5401a9 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -278,6 +278,7 @@ const struct snd_soc_component_driver
*snd_soc_component_to_driver(struct snd_soc_component *component);
struct snd_soc_card *snd_soc_component_to_card(struct snd_soc_component *component);
struct dentry *snd_soc_component_to_debugfs_root(struct snd_soc_component *component);
+struct regmap *snd_soc_component_to_regmap(struct snd_soc_component *component);
struct snd_soc_component *snd_soc_component_new(struct device *dev, const char *name,
const struct snd_soc_component_driver *driver);
int snd_soc_component_register(struct snd_soc_component *component,
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index ebeac81355901..d8274273bb013 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -92,6 +92,12 @@ struct dentry *snd_soc_component_to_debugfs_root(struct snd_soc_component *compo
}
EXPORT_SYMBOL_GPL(snd_soc_component_to_debugfs_root);
+struct regmap *snd_soc_component_to_regmap(struct snd_soc_component *component)
+{
+ return component->regmap;
+}
+EXPORT_SYMBOL_GPL(snd_soc_component_to_regmap);
+
unsigned int snd_soc_component_active(struct snd_soc_component *component)
{
return component->active;
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 13/20] ASoC: soc-component: add snd_soc_component_regcache_mark_dirty()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (11 preceding siblings ...)
2026-11-10 5:24 ` [PATCH 12/20] ASoC: soc-component: add snd_soc_component_to_regmap() Kuninori Morimoto
@ 2026-11-10 5:24 ` Kuninori Morimoto
2026-11-11 15:46 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 14/20] ASoC: soc-component: add snd_soc_component_regcache_cache_only() Kuninori Morimoto
` (6 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:24 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
Adds snd_soc_component_regcache_mark_dirty().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 4a72cfb5401a9..25b25389bf0fa 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -497,6 +497,15 @@ static inline void snd_soc_component_regmap_async_complete(struct snd_soc_compon
regmap_async_complete(regmap);
}
+static inline void snd_soc_component_regcache_mark_dirty(struct snd_soc_component *component)
+{
+ struct regmap *regmap = snd_soc_component_to_regmap(component);
+
+ if (regmap)
+ regcache_mark_dirty(regmap);
+}
+
+
/* REMOVE ME */
#define snd_soc_component_init_regmap snd_soc_component_regmap_init
#define snd_soc_component_exit_regmap snd_soc_component_regmap_exit
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 14/20] ASoC: soc-component: add snd_soc_component_regcache_cache_only()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (12 preceding siblings ...)
2026-11-10 5:24 ` [PATCH 13/20] ASoC: soc-component: add snd_soc_component_regcache_mark_dirty() Kuninori Morimoto
@ 2026-11-10 5:24 ` Kuninori Morimoto
2026-11-11 15:47 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 15/20] ASoC: soc-component: add snd_soc_component_regcache_cache_bypass() Kuninori Morimoto
` (5 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:24 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
Adds snd_soc_component_regcache_cache_only().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 25b25389bf0fa..5e43d559b2005 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -505,6 +505,14 @@ static inline void snd_soc_component_regcache_mark_dirty(struct snd_soc_componen
regcache_mark_dirty(regmap);
}
+static inline void snd_soc_component_regcache_cache_only(struct snd_soc_component *component,
+ bool enable)
+{
+ struct regmap *regmap = snd_soc_component_to_regmap(component);
+
+ if (regmap)
+ regcache_cache_only(regmap, enable);
+}
/* REMOVE ME */
#define snd_soc_component_init_regmap snd_soc_component_regmap_init
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 15/20] ASoC: soc-component: add snd_soc_component_regcache_cache_bypass()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (13 preceding siblings ...)
2026-11-10 5:24 ` [PATCH 14/20] ASoC: soc-component: add snd_soc_component_regcache_cache_only() Kuninori Morimoto
@ 2026-11-10 5:24 ` Kuninori Morimoto
2026-11-11 15:47 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 16/20] ASoC: soc-component: add snd_soc_component_regmap_multi_reg_write_bypassed() Kuninori Morimoto
` (4 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:24 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
Adds snd_soc_component_regcache_cache_bypass().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 5e43d559b2005..89ae650b74f87 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -514,6 +514,15 @@ static inline void snd_soc_component_regcache_cache_only(struct snd_soc_componen
regcache_cache_only(regmap, enable);
}
+static inline void snd_soc_component_regcache_cache_bypass(struct snd_soc_component *component,
+ bool enable)
+{
+ struct regmap *regmap = snd_soc_component_to_regmap(component);
+
+ if (regmap)
+ regcache_cache_bypass(regmap, enable);
+}
+
/* REMOVE ME */
#define snd_soc_component_init_regmap snd_soc_component_regmap_init
#define snd_soc_component_exit_regmap snd_soc_component_regmap_exit
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 16/20] ASoC: soc-component: add snd_soc_component_regmap_multi_reg_write_bypassed()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (14 preceding siblings ...)
2026-11-10 5:24 ` [PATCH 15/20] ASoC: soc-component: add snd_soc_component_regcache_cache_bypass() Kuninori Morimoto
@ 2026-11-10 5:24 ` Kuninori Morimoto
2026-11-10 5:47 ` sashiko-bot
2026-11-10 5:24 ` [PATCH 17/20] ASoC: soc-component: add snd_soc_component_num_dai() Kuninori Morimoto
` (3 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:24 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
Adds snd_soc_component_regmap_multi_reg_write_bypassed().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 89ae650b74f87..0a8beebd7b038 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -489,6 +489,19 @@ static inline int snd_soc_component_regcache_sync(struct snd_soc_component *comp
return regcache_sync(regmap);
}
+static inline int
+snd_soc_component_regmap_multi_reg_write_bypassed(struct snd_soc_component *component,
+ const struct reg_sequence *regs,
+ int num_regs)
+{
+ struct regmap *regmap = snd_soc_component_to_regmap(component);
+
+ if (!regmap)
+ return 0;
+
+ return regmap_multi_reg_write_bypassed(regmap, regs, num_regs);
+}
+
static inline void snd_soc_component_regmap_async_complete(struct snd_soc_component *component)
{
struct regmap *regmap = snd_soc_component_to_regmap(component);
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 17/20] ASoC: soc-component: add snd_soc_component_num_dai()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (15 preceding siblings ...)
2026-11-10 5:24 ` [PATCH 16/20] ASoC: soc-component: add snd_soc_component_regmap_multi_reg_write_bypassed() Kuninori Morimoto
@ 2026-11-10 5:24 ` Kuninori Morimoto
2026-11-11 15:47 ` Alvin Šipraga
2026-11-10 5:25 ` [PATCH 18/20] ASoC: soc-component: add snd_soc_component_connect_dai() Kuninori Morimoto
` (2 subsequent siblings)
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:24 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
This patch adds snd_soc_component_num_dai() to get component->num_dai.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 1 +
sound/soc/soc-component.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 0a8beebd7b038..f60d797b2c4e9 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -379,6 +379,7 @@ static inline void *snd_soc_component_get_drvdata(struct snd_soc_component *c)
}
unsigned int snd_soc_component_active(struct snd_soc_component *component);
+int snd_soc_component_num_dai(struct snd_soc_component *component);
/* component controls */
struct snd_kcontrol *snd_soc_component_get_kcontrol(struct snd_soc_component *component,
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index d8274273bb013..93978fae9b840 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -104,6 +104,12 @@ unsigned int snd_soc_component_active(struct snd_soc_component *component)
}
EXPORT_SYMBOL_GPL(snd_soc_component_active);
+int snd_soc_component_num_dai(struct snd_soc_component *component)
+{
+ return component->num_dai;
+}
+EXPORT_SYMBOL_GPL(snd_soc_component_num_dai);
+
/*
* We might want to check substream by using list.
* In such case, we can update these macros.
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 18/20] ASoC: soc-component: add snd_soc_component_connect_dai()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (16 preceding siblings ...)
2026-11-10 5:24 ` [PATCH 17/20] ASoC: soc-component: add snd_soc_component_num_dai() Kuninori Morimoto
@ 2026-11-10 5:25 ` Kuninori Morimoto
2026-11-11 15:48 ` Alvin Šipraga
2026-11-10 5:25 ` [PATCH 19/20] ASoC: soc-component: add snd_soc_component_active_update() Kuninori Morimoto
2026-11-10 5:25 ` [PATCH 20/20] ASoC: soc-component: add snd_soc_component_device_link_{add/del}() Kuninori Morimoto
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:25 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
This patch adds snd_soc_component_connect_dai() to connect DAI to
Component.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/soc-component.c | 7 +++++++
sound/soc/soc-dai.c | 3 +--
sound/soc/soc-internal.h | 1 +
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 93978fae9b840..50101d16f8539 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -110,6 +110,13 @@ int snd_soc_component_num_dai(struct snd_soc_component *component)
}
EXPORT_SYMBOL_GPL(snd_soc_component_num_dai);
+void snd_soc_component_connect_dai(struct snd_soc_component *component, struct snd_soc_dai *dai)
+{
+ /* dai->list <-> component->dai_list */
+ list_add_tail(snd_soc_dai_to_list(dai), &component->dai_list);
+ component->num_dai++;
+}
+
/*
* We might want to check substream by using list.
* In such case, we can update these macros.
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index d124b6afb1b8d..e222268d8466a 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -1265,8 +1265,7 @@ struct snd_soc_dai *snd_soc_dai_register(struct snd_soc_component *component,
dai->driver = dai_drv;
/* see for_each_component_dais */
- list_add_tail(&dai->list, &component->dai_list);
- component->num_dai++;
+ snd_soc_component_connect_dai(component, dai);
dev_dbg(dev, "ASoC: Registered DAI '%s'\n", dai->name);
return dai;
diff --git a/sound/soc/soc-internal.h b/sound/soc/soc-internal.h
index e09d283d443a8..98ff0e2fc2e1d 100644
--- a/sound/soc/soc-internal.h
+++ b/sound/soc/soc-internal.h
@@ -69,6 +69,7 @@ bool snd_soc_component_matches_dlc(struct snd_soc_component *component,
void snd_soc_component_remove(struct snd_soc_component *component, int probed);
int snd_soc_component_probe(struct snd_soc_component *component, struct snd_soc_card *card);
struct list_head *snd_soc_component_get_list_head(void);
+void snd_soc_component_connect_dai(struct snd_soc_component *component, struct snd_soc_dai *dai);
#define for_each_component(component) \
list_for_each_entry(component, snd_soc_component_get_list_head(), list)
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 19/20] ASoC: soc-component: add snd_soc_component_active_update()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (17 preceding siblings ...)
2026-11-10 5:25 ` [PATCH 18/20] ASoC: soc-component: add snd_soc_component_connect_dai() Kuninori Morimoto
@ 2026-11-10 5:25 ` Kuninori Morimoto
2026-11-11 15:48 ` Alvin Šipraga
2026-11-10 5:25 ` [PATCH 20/20] ASoC: soc-component: add snd_soc_component_device_link_{add/del}() Kuninori Morimoto
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:25 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
This patch adds snd_soc_component_active_update() to handle Component
acitive count.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/soc-component.c | 5 +++++
sound/soc/soc-dai.c | 2 +-
sound/soc/soc-internal.h | 1 +
sound/soc/soc-pcm.c | 2 +-
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 50101d16f8539..fa5dd07bf498e 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -104,6 +104,11 @@ unsigned int snd_soc_component_active(struct snd_soc_component *component)
}
EXPORT_SYMBOL_GPL(snd_soc_component_active);
+void snd_soc_component_active_update(struct snd_soc_component *component, int action)
+{
+ component->active += action;
+}
+
int snd_soc_component_num_dai(struct snd_soc_component *component)
{
return component->num_dai;
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index e222268d8466a..dffb265fd38bb 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -713,7 +713,7 @@ void snd_soc_dai_active_update(struct snd_soc_dai *dai, int stream, int action)
dai->stream[stream].active += action;
/* see snd_soc_component_active() */
- dai->component->active += action;
+ snd_soc_component_active_update(dai->component, action);
}
int snd_soc_dai_active(const struct snd_soc_dai *dai)
diff --git a/sound/soc/soc-internal.h b/sound/soc/soc-internal.h
index 98ff0e2fc2e1d..1190be669eae3 100644
--- a/sound/soc/soc-internal.h
+++ b/sound/soc/soc-internal.h
@@ -70,6 +70,7 @@ void snd_soc_component_remove(struct snd_soc_component *component, int probed);
int snd_soc_component_probe(struct snd_soc_component *component, struct snd_soc_card *card);
struct list_head *snd_soc_component_get_list_head(void);
void snd_soc_component_connect_dai(struct snd_soc_component *component, struct snd_soc_dai *dai);
+void snd_soc_component_active_update(struct snd_soc_component *component, int action);
#define for_each_component(component) \
list_for_each_entry(component, snd_soc_component_get_list_head(), list)
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index ef8ccf52798eb..dac353fec4bcf 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -374,7 +374,7 @@ void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd,
for_each_rtd_components(rtd, i, component) {
if (component->num_dai)
continue;
- component->active += action;
+ snd_soc_component_active_update(component, action);
}
}
EXPORT_SYMBOL_GPL(snd_soc_runtime_action);
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 20/20] ASoC: soc-component: add snd_soc_component_device_link_{add/del}()
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
` (18 preceding siblings ...)
2026-11-10 5:25 ` [PATCH 19/20] ASoC: soc-component: add snd_soc_component_active_update() Kuninori Morimoto
@ 2026-11-10 5:25 ` Kuninori Morimoto
2026-11-11 15:48 ` Alvin Šipraga
19 siblings, 1 reply; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-10 5:25 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-sound
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
This patch adds snd_soc_component_device_link_{add/del}() to handle
Component device_link.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/soc-card.c | 22 ++++------------------
sound/soc/soc-component.c | 28 ++++++++++++++++++++++++++++
sound/soc/soc-internal.h | 2 ++
3 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/sound/soc/soc-card.c b/sound/soc/soc-card.c
index 6544dbf2ee260..079312216a3b2 100644
--- a/sound/soc/soc-card.c
+++ b/sound/soc/soc-card.c
@@ -884,12 +884,8 @@ static void snd_soc_remove_device_links(struct snd_soc_card *card)
{
struct snd_soc_component *component;
- for_each_card_components(card, component) {
- if (component->card_device_link) {
- device_link_del(component->card_device_link);
- component->card_device_link = NULL;
- }
- }
+ for_each_card_components(card, component)
+ snd_soc_component_device_link_del(component);
}
void snd_soc_card_unbind(struct snd_soc_card *card, bool reuse)
@@ -1043,18 +1039,8 @@ static int snd_soc_card_bind(struct snd_soc_card *card)
* If a driver pair already have a link in the opposite direction
* they must manage their own suspend order.
*/
- for_each_card_components(card, component) {
- if (card->dev == component->dev)
- continue;
-
- component->card_device_link = device_link_add(card->dev,
- component->dev,
- DL_FLAG_STATELESS);
- if (!component->card_device_link) {
- dev_warn(card->dev, "Could not create device link to %s\n",
- dev_name(component->dev));
- }
- }
+ for_each_card_components(card, component)
+ snd_soc_component_device_link_add(component);
ret = snd_soc_card_late_probe(card);
if (ret < 0)
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index fa5dd07bf498e..1597acbe1a965 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -122,6 +122,34 @@ void snd_soc_component_connect_dai(struct snd_soc_component *component, struct s
component->num_dai++;
}
+void snd_soc_component_device_link_del(struct snd_soc_component *component)
+{
+ if (component->card_device_link) {
+ device_link_del(component->card_device_link);
+ component->card_device_link = NULL;
+ }
+}
+
+int snd_soc_component_device_link_add(struct snd_soc_component *component)
+{
+ struct snd_soc_card *card = snd_soc_component_to_card(component);
+ struct device *card_dev = card->dev;
+ struct device *component_dev = snd_soc_component_to_dev(component);
+
+ if (card_dev == component_dev)
+ return 0;
+
+ component->card_device_link = device_link_add(card_dev, component_dev,
+ DL_FLAG_STATELESS);
+ if (!component->card_device_link) {
+ dev_warn(card_dev, "Could not create device link to %s\n",
+ dev_name(component_dev));
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
/*
* We might want to check substream by using list.
* In such case, we can update these macros.
diff --git a/sound/soc/soc-internal.h b/sound/soc/soc-internal.h
index 1190be669eae3..e713d13543b2d 100644
--- a/sound/soc/soc-internal.h
+++ b/sound/soc/soc-internal.h
@@ -71,6 +71,8 @@ int snd_soc_component_probe(struct snd_soc_component *component, struct snd_soc_
struct list_head *snd_soc_component_get_list_head(void);
void snd_soc_component_connect_dai(struct snd_soc_component *component, struct snd_soc_dai *dai);
void snd_soc_component_active_update(struct snd_soc_component *component, int action);
+void snd_soc_component_device_link_del(struct snd_soc_component *component);
+int snd_soc_component_device_link_add(struct snd_soc_component *component);
#define for_each_component(component) \
list_for_each_entry(component, snd_soc_component_get_list_head(), list)
--
2.53.0
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 03/20] ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c
2026-11-10 5:23 ` [PATCH 03/20] ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c Kuninori Morimoto
@ 2026-11-10 5:30 ` sashiko-bot
2026-11-11 5:05 ` Kuninori Morimoto
2026-11-11 15:43 ` Alvin Šipraga
1 sibling, 1 reply; 45+ messages in thread
From: sashiko-bot @ 2026-11-10 5:30 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: linux-sound
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Medium] ASoC: dmaengine: memory leak in
snd_dmaengine_pcm_unregister() [1]
--
commit a5f7b09ef3fb2f0bb4b4617d3a6ce6f9faafae80
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c
This commit moves component registration and unregistration functions and
their declarations from soc-core.c and soc.h to soc-component.c and
soc-component.h.
> diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
> index 6dad994009bdb..a2f079cd8aae2 100644
> --- a/sound/soc/soc-component.c
> +++ b/sound/soc/soc-component.c
> @@ -1549,3 +1549,217 @@ struct snd_soc_component *snd_soc_component_lookup_by_name(const char *component
[ ... ]
> +void snd_soc_unregister_component_by_driver(struct device *dev,
> + const struct snd_soc_component_driver *component_driver)
> +{
> + const char *driver_name = NULL;
> +
> + if (component_driver)
> + driver_name = component_driver->name;
> +
> + guard(mutex)(&client_mutex);
> +
> + while (1) {
> + struct snd_soc_component *component;
> +
> + component = snd_soc_lookup_component_nolocked(dev, driver_name);
> + if (!component)
> + break;
> +
> + snd_soc_del_component_unlocked(component);
> + }
> +}
[Severity: Medium]
This problem wasn't introduced by this patch, but can this loop cause
snd_dmaengine_pcm_unregister() to leak dmaengine_pcm structures and DMA
channels [1] when a device registers multiple dmaengine PCMs?
sound/soc/soc-generic-dmaengine-pcm.c:snd_dmaengine_pcm_unregister() {
component = snd_soc_lookup_component(dev, SND_DMAENGINE_PCM_DRV_NAME);
if (!component)
return;
pcm = snd_soc_component_to_priv(component);
snd_soc_unregister_component_by_driver(dev, component->driver);
dmaengine_pcm_release_chan(pcm);
kfree(pcm);
}
When devres releases multiple PCMs registered via
devm_snd_dmaengine_pcm_register() on the same device, the first call to
snd_dmaengine_pcm_unregister() removes all components matching
SND_DMAENGINE_PCM_DRV_NAME. Subsequent release callbacks then get NULL
from snd_soc_lookup_component() and return early without releasing their
DMA channels or freeing their pcm structures.
[1] https://sashiko.dev/#/bug/linux-259df7eb-71d4-4d88-9686-fca9af84a4de
--
Sashiko AI review · https://sashiko.dev/#/patchset/878q31nttj.wl-kuninori.morimoto.gx@renesas.com?part=3
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 02/20] ASoC: soc-component: rename snd_soc_component_{init/exit}_regmap() to snd_soc_component_regmap_{init/exit}()
2026-11-10 5:23 ` [PATCH 02/20] ASoC: soc-component: rename snd_soc_component_{init/exit}_regmap() to snd_soc_component_regmap_{init/exit}() Kuninori Morimoto
@ 2026-11-10 5:35 ` sashiko-bot
0 siblings, 0 replies; 45+ messages in thread
From: sashiko-bot @ 2026-11-10 5:35 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: linux-sound
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] ASoC: soc-component: build failure in
snd_soc_component_regmap_exit() when !CONFIG_REGMAP
--
commit b2a7793f33b0c23793a100c7c2aba1692324766a
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ASoC: soc-component: rename snd_soc_component_{init/exit}_regmap() to snd_soc_component_regmap_{init/exit}()
This commit renames snd_soc_component_{init,exit}_regmap() to
snd_soc_component_regmap_{init,exit}(), provides compatibility macros for
the old names, and removes the #ifdef CONFIG_REGMAP guards around them.
> diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
> index a6e280c798f3d..6dad994009bdb 100644
> --- a/sound/soc/soc-component.c
> +++ b/sound/soc/soc-component.c
> @@ -432,10 +432,8 @@ void snd_soc_component_regmap_async_complete(struct snd_soc_component *component
> }
> EXPORT_SYMBOL_GPL(snd_soc_component_regmap_async_complete);
>
> -#ifdef CONFIG_REGMAP
> -
> /**
> - * snd_soc_component_init_regmap() - Initialize regmap instance for the
> + * snd_soc_component_regmap_init() - Initialize regmap instance for the
> * component
> * @component: The component for which to initialize the regmap instance
> * @regmap: The regmap instance that should be used by the component
> @@ -445,15 +443,15 @@ EXPORT_SYMBOL_GPL(snd_soc_component_regmap_async_complete);
> * yet ready when the component is registered. The function must also be called
> * before the first IO attempt of the component.
> */
> -void snd_soc_component_init_regmap(struct snd_soc_component *component,
> +void snd_soc_component_regmap_init(struct snd_soc_component *component,
> struct regmap *regmap)
> {
> component->regmap = regmap;
> }
> -EXPORT_SYMBOL_GPL(snd_soc_component_init_regmap);
> +EXPORT_SYMBOL_GPL(snd_soc_component_regmap_init);
>
> /**
> - * snd_soc_component_exit_regmap() - De-initialize regmap instance for the
> + * snd_soc_component_regmap_exit() - De-initialize regmap instance for the
> * component
> * @component: The component for which to de-initialize the regmap instance
> *
> @@ -463,14 +461,12 @@ EXPORT_SYMBOL_GPL(snd_soc_component_init_regmap);
> * This function should only be used if snd_soc_component_init_regmap() was used
> * to initialize the regmap instance.
> */
> -void snd_soc_component_exit_regmap(struct snd_soc_component *component)
> +void snd_soc_component_regmap_exit(struct snd_soc_component *component)
> {
> regmap_exit(component->regmap);
> component->regmap = NULL;
> }
> -EXPORT_SYMBOL_GPL(snd_soc_component_exit_regmap);
> -
> -#endif
> +EXPORT_SYMBOL_GPL(snd_soc_component_regmap_exit);
[Severity: Medium]
Does removing the #ifdef CONFIG_REGMAP guard around
snd_soc_component_regmap_exit() break builds when CONFIG_SND_SOC is
enabled and CONFIG_REGMAP is disabled?
In sound/soc/Kconfig, SND_SOC only selects REGMAP_I2C if I2C and
REGMAP_SPI if SPI_MASTER, so CONFIG_REGMAP can remain unset. Unlike
regmap_get_val_bytes(), regcache_sync(), and regmap_async_complete(),
regmap_exit() is only declared inside the #ifdef CONFIG_REGMAP block in
include/linux/regmap.h and has no stub when CONFIG_REGMAP is disabled,
causing an implicit function declaration error here.
--
Sashiko AI review · https://sashiko.dev/#/patchset/878q31nttj.wl-kuninori.morimoto.gx@renesas.com?part=2
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 06/20] ASoC: soc-component: makes regmap function to inline macro
2026-11-10 5:23 ` [PATCH 06/20] ASoC: soc-component: makes regmap function to inline macro Kuninori Morimoto
@ 2026-11-10 5:38 ` sashiko-bot
2026-11-11 15:45 ` Alvin Šipraga
1 sibling, 0 replies; 45+ messages in thread
From: sashiko-bot @ 2026-11-10 5:38 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: linux-sound
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] ASoC: soc-component: undeclared snd_soc_component_to_regmap()
breaks build
--
commit f289bf9367f01f6ee0716c3f431535b8a1efc6e9
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ASoC: soc-component: makes regmap function to inline macro
This commit moves snd_soc_component_regmap_val_bytes(),
snd_soc_component_regmap_cache_sync(), and
snd_soc_component_regmap_async_complete() from sound/soc/soc-component.c to
static inline helpers in include/sound/soc-component.h.
> diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
> index 6d5740d5a5e21..4e538942df643 100644
> --- a/include/sound/soc-component.h
> +++ b/include/sound/soc-component.h
[ ... ]
> @@ -455,10 +448,53 @@ int snd_soc_pcm_component_ack(struct snd_pcm_substream *substream);
> void snd_soc_pcm_component_delay(struct snd_pcm_substream *substream,
> snd_pcm_sframes_t *cpu_delay, snd_pcm_sframes_t *codec_delay);
>
> +/*
> + * regmap
> + */
> +void snd_soc_component_regmap_init(struct snd_soc_component *component,
> + struct regmap *regmap);
> +void snd_soc_component_regmap_exit(struct snd_soc_component *component);
> +
> +static inline int snd_soc_component_regmap_get_val_bytes(struct snd_soc_component *component)
> +{
> + struct regmap *regmap = snd_soc_component_to_regmap(component);
> + int val_bytes;
> +
> + /* Errors are legitimate for non-integer byte multiples */
> +
> + if (!regmap)
> + return 0;
> +
> + val_bytes = regmap_get_val_bytes(regmap);
> + if (val_bytes < 0)
> + return 0;
> +
> + return val_bytes;
> +}
> +
> +static inline int snd_soc_component_regcache_sync(struct snd_soc_component *component)
> +{
> + struct regmap *regmap = snd_soc_component_to_regmap(component);
> +
> + if (!regmap)
> + return 0;
> +
> + return regcache_sync(regmap);
> +}
> +
> +static inline void snd_soc_component_regmap_async_complete(struct snd_soc_component *component)
> +{
> + struct regmap *regmap = snd_soc_component_to_regmap(component);
> +
> + if (regmap)
> + regmap_async_complete(regmap);
> +}
[Severity: High]
Does calling snd_soc_component_to_regmap() in these three static inline
functions break compilation at this commit?
snd_soc_component_to_regmap() is not declared or defined until a later patch
in the series, commit "ASoC: soc-component: add
snd_soc_component_to_regmap()". Because these helpers are static inline
functions rather than macros, every translation unit that includes
include/sound/soc-component.h fails to compile with an implicit function
declaration error until that patch is applied, breaking git bisect across
the intermediate commits. Ordering commit "ASoC: soc-component: add
snd_soc_component_to_regmap()" before this patch would keep the series
bisectable.
--
Sashiko AI review · https://sashiko.dev/#/patchset/878q31nttj.wl-kuninori.morimoto.gx@renesas.com?part=6
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 12/20] ASoC: soc-component: add snd_soc_component_to_regmap()
2026-11-10 5:24 ` [PATCH 12/20] ASoC: soc-component: add snd_soc_component_to_regmap() Kuninori Morimoto
@ 2026-11-10 5:42 ` sashiko-bot
2026-11-11 15:46 ` Alvin Šipraga
1 sibling, 0 replies; 45+ messages in thread
From: sashiko-bot @ 2026-11-10 5:42 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: linux-sound
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] ASoC: soc-component: snd_soc_component_to_regmap() ordered
after its callers
--
commit 1b181762257030814f72c0850502aed04e2f536a
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ASoC: soc-component: add snd_soc_component_to_regmap()
This commit adds the snd_soc_component_to_regmap() helper function to
retrieve the regmap pointer from struct snd_soc_component.
> diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
> index 3ba4e2c84e4b4..4a72cfb5401a9 100644
> --- a/include/sound/soc-component.h
> +++ b/include/sound/soc-component.h
> @@ -278,6 +278,7 @@ const struct snd_soc_component_driver
> *snd_soc_component_to_driver(struct snd_soc_component *component);
> struct snd_soc_card *snd_soc_component_to_card(struct snd_soc_component *component);
> struct dentry *snd_soc_component_to_debugfs_root(struct snd_soc_component *component);
> +struct regmap *snd_soc_component_to_regmap(struct snd_soc_component *component);
> struct snd_soc_component *snd_soc_component_new(struct device *dev, const char *name,
> const struct snd_soc_component_driver *driver);
> int snd_soc_component_register(struct snd_soc_component *component,
> diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
> index ebeac81355901..d8274273bb013 100644
> --- a/sound/soc/soc-component.c
> +++ b/sound/soc/soc-component.c
> @@ -92,6 +92,12 @@ struct dentry *snd_soc_component_to_debugfs_root(struct snd_soc_component *compo
> }
> EXPORT_SYMBOL_GPL(snd_soc_component_to_debugfs_root);
>
> +struct regmap *snd_soc_component_to_regmap(struct snd_soc_component *component)
> +{
> + return component->regmap;
> +}
> +EXPORT_SYMBOL_GPL(snd_soc_component_to_regmap);
[Severity: Medium]
Should this patch be ordered before commit "ASoC: soc-component: makes
regmap function to inline macro" in the series?
That earlier commit converts snd_soc_component_regmap_get_val_bytes() and
related helpers in include/sound/soc-component.h into static inline
functions that call snd_soc_component_to_regmap(), so the six intermediate
commits fail to compile with an implicit function declaration error and
break git bisect.
--
Sashiko AI review · https://sashiko.dev/#/patchset/878q31nttj.wl-kuninori.morimoto.gx@renesas.com?part=12
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 16/20] ASoC: soc-component: add snd_soc_component_regmap_multi_reg_write_bypassed()
2026-11-10 5:24 ` [PATCH 16/20] ASoC: soc-component: add snd_soc_component_regmap_multi_reg_write_bypassed() Kuninori Morimoto
@ 2026-11-10 5:47 ` sashiko-bot
0 siblings, 0 replies; 45+ messages in thread
From: sashiko-bot @ 2026-11-10 5:47 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: linux-sound
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] ASoC: build failure in
snd_soc_component_regmap_multi_reg_write_bypassed()
--
commit 57b5a81c5a120fd92608fae86a8fb5b252d6cb73
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ASoC: soc-component: add snd_soc_component_regmap_multi_reg_write_bypassed()
This commit adds the snd_soc_component_regmap_multi_reg_write_bypassed()
static inline helper to wrap regmap_multi_reg_write_bypassed() on a
component's regmap.
> diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
> index 89ae650b74f87..0a8beebd7b038 100644
> --- a/include/sound/soc-component.h
> +++ b/include/sound/soc-component.h
> @@ -489,6 +489,19 @@ static inline int snd_soc_component_regcache_sync(struct snd_soc_component *comp
> return regcache_sync(regmap);
> }
>
> +static inline int
> +snd_soc_component_regmap_multi_reg_write_bypassed(struct snd_soc_component *component,
> + const struct reg_sequence *regs,
> + int num_regs)
> +{
> + struct regmap *regmap = snd_soc_component_to_regmap(component);
> +
> + if (!regmap)
> + return 0;
> +
> + return regmap_multi_reg_write_bypassed(regmap, regs, num_regs);
> +}
[Severity: High]
Does calling regmap_multi_reg_write_bypassed() from a static inline helper
break the build when regmap support is disabled?
Unlike regcache_sync() and the other helpers in this header,
include/linux/regmap.h only declares regmap_multi_reg_write_bypassed()
inside its #ifdef CONFIG_REGMAP block and provides no fallback stub in the
#else section. Any translation unit that includes sound/soc-component.h
(or sound/soc.h) when regmap is disabled will fail to compile with an
implicit function declaration error.
--
Sashiko AI review · https://sashiko.dev/#/patchset/878q31nttj.wl-kuninori.morimoto.gx@renesas.com?part=16
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 03/20] ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c
2026-11-10 5:30 ` sashiko-bot
@ 2026-11-11 5:05 ` Kuninori Morimoto
0 siblings, 0 replies; 45+ messages in thread
From: Kuninori Morimoto @ 2026-11-11 5:05 UTC (permalink / raw)
To: sashiko-reviews; +Cc: linux-sound
Hi ALSA ML
> [Severity: Medium]
> This problem wasn't introduced by this patch, but can this loop cause
> snd_dmaengine_pcm_unregister() to leak dmaengine_pcm structures and DMA
> channels [1] when a device registers multiple dmaengine PCMs?
>
> sound/soc/soc-generic-dmaengine-pcm.c:snd_dmaengine_pcm_unregister() {
> component = snd_soc_lookup_component(dev, SND_DMAENGINE_PCM_DRV_NAME);
> if (!component)
> return;
>
> pcm = snd_soc_component_to_priv(component);
>
> snd_soc_unregister_component_by_driver(dev, component->driver);
> dmaengine_pcm_release_chan(pcm);
> kfree(pcm);
> }
>
> When devres releases multiple PCMs registered via
> devm_snd_dmaengine_pcm_register() on the same device, the first call to
> snd_dmaengine_pcm_unregister() removes all components matching
> SND_DMAENGINE_PCM_DRV_NAME. Subsequent release callbacks then get NULL
> from snd_soc_lookup_component() and return early without releasing their
> DMA channels or freeing their pcm structures.
This is not related to this patch, but indeed issue.
I will solve this issue too in v2 patch.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 01/20] ASoC: soc-generic-dmaengine-pcm: move devm_snd_dmaengine_pcm_register()
2026-11-10 5:23 ` [PATCH 01/20] ASoC: soc-generic-dmaengine-pcm: move devm_snd_dmaengine_pcm_register() Kuninori Morimoto
@ 2026-11-11 15:43 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:43 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:23:34AM +0000, Kuninori Morimoto wrote:
> We don't need to have dmaengine related function in soc-devres.c.
> Let's move it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> sound/soc/soc-devres.c | 40 ---------------------------
> sound/soc/soc-generic-dmaengine-pcm.c | 36 ++++++++++++++++++++++++
> 2 files changed, 36 insertions(+), 40 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 03/20] ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c
2026-11-10 5:23 ` [PATCH 03/20] ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c Kuninori Morimoto
2026-11-10 5:30 ` sashiko-bot
@ 2026-11-11 15:43 ` Alvin Šipraga
1 sibling, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:43 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:23:42AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> move snd_soc_register_[un]component() to soc-component.c
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 10 ++
> include/sound/soc.h | 11 --
> sound/soc/soc-component.c | 214 ++++++++++++++++++++++++++++++++++
> sound/soc/soc-core.c | 212 ---------------------------------
> 4 files changed, 224 insertions(+), 223 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 04/20] ASoC: soc-component: move devm_snd_soc_component_register()
2026-11-10 5:23 ` [PATCH 04/20] ASoC: soc-component: move devm_snd_soc_component_register() Kuninori Morimoto
@ 2026-11-11 15:44 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:44 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:23:48AM +0000, Kuninori Morimoto wrote:
> We don't need to have component related function in soc-devres.c.
> Let's move it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> sound/soc/soc-component.c | 40 +++++++++++++++++++++++++++++++++++++++
> sound/soc/soc-devres.c | 40 ---------------------------------------
> 2 files changed, 40 insertions(+), 40 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 05/20] ASoC: soc-component: move snd_soc_of_xlate_dai_name() to soc-component.c
2026-11-10 5:23 ` [PATCH 05/20] ASoC: soc-component: move snd_soc_of_xlate_dai_name() to soc-component.c Kuninori Morimoto
@ 2026-11-11 15:44 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:44 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:23:52AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> move snd_soc_of_xlate_dai_name() to soc-component.c
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 5 ++++-
> include/sound/soc.h | 3 ---
> sound/soc/soc-component.c | 33 +++++++++++++++++++++++++++++++++
> sound/soc/soc-core.c | 33 ---------------------------------
> 4 files changed, 37 insertions(+), 37 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 06/20] ASoC: soc-component: makes regmap function to inline macro
2026-11-10 5:23 ` [PATCH 06/20] ASoC: soc-component: makes regmap function to inline macro Kuninori Morimoto
2026-11-10 5:38 ` sashiko-bot
@ 2026-11-11 15:45 ` Alvin Šipraga
1 sibling, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:45 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:23:59AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> Component regmap related function is almost rapper, thus very redundant.
> No need to makes it as function, but inline macro is very enough.
>
> Let's standardize inline function naming conventions.
>
> snd_soc_component_${regmap_func}(...);
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
sashiko is right about the order, but the patch itself is fine
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 52 +++++++++++++++++++++++++++++------
> sound/soc/soc-component.c | 46 -------------------------------
> 2 files changed, 44 insertions(+), 54 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 07/20] ASoC: soc-component: add snd_soc_component_name_prefix()
2026-11-10 5:24 ` [PATCH 07/20] ASoC: soc-component: add snd_soc_component_name_prefix() Kuninori Morimoto
@ 2026-11-11 15:45 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:45 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:24:05AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> Add snd_soc_component_name_prefix() to soc-component.c
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 1 +
> sound/soc/soc-component.c | 6 ++++++
> 2 files changed, 7 insertions(+)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 08/20] ASoC: soc-component: add snd_soc_component_to_dev()
2026-11-10 5:24 ` [PATCH 08/20] ASoC: soc-component: add snd_soc_component_to_dev() Kuninori Morimoto
@ 2026-11-11 15:45 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:45 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:24:13AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> Add snd_soc_component_to_dev() to soc-component.c
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 1 +
> sound/soc/soc-component.c | 6 ++++++
> 2 files changed, 7 insertions(+)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 09/20] ASoC: soc-component: add snd_soc_component_to_driver()
2026-11-10 5:24 ` [PATCH 09/20] ASoC: soc-component: add snd_soc_component_to_driver() Kuninori Morimoto
@ 2026-11-11 15:45 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:45 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:24:20AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> Add snd_soc_component_to_driver() to soc-component.c
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 2 ++
> sound/soc/soc-component.c | 7 +++++++
> 2 files changed, 9 insertions(+)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 10/20] ASoC: soc-component: add snd_soc_component_to_card()
2026-11-10 5:24 ` [PATCH 10/20] ASoC: soc-component: add snd_soc_component_to_card() Kuninori Morimoto
@ 2026-11-11 15:46 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:46 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:24:24AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> Add snd_soc_component_to_card() to soc-component.c
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 1 +
> sound/soc/soc-component.c | 6 ++++++
> 2 files changed, 7 insertions(+)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 11/20] ASoC: soc-component: add snd_soc_component_to_debugfs_root()
2026-11-10 5:24 ` [PATCH 11/20] ASoC: soc-component: add snd_soc_component_to_debugfs_root() Kuninori Morimoto
@ 2026-11-11 15:46 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:46 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:24:29AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> This patch adds snd_soc_component_debugfs_root() to get
> component->debugfs_root.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 1 +
> sound/soc/soc-component.c | 6 ++++++
> 2 files changed, 7 insertions(+)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 12/20] ASoC: soc-component: add snd_soc_component_to_regmap()
2026-11-10 5:24 ` [PATCH 12/20] ASoC: soc-component: add snd_soc_component_to_regmap() Kuninori Morimoto
2026-11-10 5:42 ` sashiko-bot
@ 2026-11-11 15:46 ` Alvin Šipraga
1 sibling, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:46 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:24:36AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> Add snd_soc_component_to_regmap() to soc-component.c
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 1 +
> sound/soc/soc-component.c | 6 ++++++
> 2 files changed, 7 insertions(+)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 13/20] ASoC: soc-component: add snd_soc_component_regcache_mark_dirty()
2026-11-10 5:24 ` [PATCH 13/20] ASoC: soc-component: add snd_soc_component_regcache_mark_dirty() Kuninori Morimoto
@ 2026-11-11 15:46 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:46 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:24:40AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> Adds snd_soc_component_regcache_mark_dirty().
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 14/20] ASoC: soc-component: add snd_soc_component_regcache_cache_only()
2026-11-10 5:24 ` [PATCH 14/20] ASoC: soc-component: add snd_soc_component_regcache_cache_only() Kuninori Morimoto
@ 2026-11-11 15:47 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:47 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:24:44AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> Adds snd_soc_component_regcache_cache_only().
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 15/20] ASoC: soc-component: add snd_soc_component_regcache_cache_bypass()
2026-11-10 5:24 ` [PATCH 15/20] ASoC: soc-component: add snd_soc_component_regcache_cache_bypass() Kuninori Morimoto
@ 2026-11-11 15:47 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:47 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:24:49AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> Adds snd_soc_component_regcache_cache_bypass().
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 17/20] ASoC: soc-component: add snd_soc_component_num_dai()
2026-11-10 5:24 ` [PATCH 17/20] ASoC: soc-component: add snd_soc_component_num_dai() Kuninori Morimoto
@ 2026-11-11 15:47 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:47 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:24:56AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> This patch adds snd_soc_component_num_dai() to get component->num_dai.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> include/sound/soc-component.h | 1 +
> sound/soc/soc-component.c | 6 ++++++
> 2 files changed, 7 insertions(+)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 18/20] ASoC: soc-component: add snd_soc_component_connect_dai()
2026-11-10 5:25 ` [PATCH 18/20] ASoC: soc-component: add snd_soc_component_connect_dai() Kuninori Morimoto
@ 2026-11-11 15:48 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:48 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:25:00AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> This patch adds snd_soc_component_connect_dai() to connect DAI to
> Component.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> sound/soc/soc-component.c | 7 +++++++
> sound/soc/soc-dai.c | 3 +--
> sound/soc/soc-internal.h | 1 +
> 3 files changed, 9 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 19/20] ASoC: soc-component: add snd_soc_component_active_update()
2026-11-10 5:25 ` [PATCH 19/20] ASoC: soc-component: add snd_soc_component_active_update() Kuninori Morimoto
@ 2026-11-11 15:48 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:48 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:25:04AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> This patch adds snd_soc_component_active_update() to handle Component
> acitive count.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> sound/soc/soc-component.c | 5 +++++
> sound/soc/soc-dai.c | 2 +-
> sound/soc/soc-internal.h | 1 +
> sound/soc/soc-pcm.c | 2 +-
> 4 files changed, 8 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 20/20] ASoC: soc-component: add snd_soc_component_device_link_{add/del}()
2026-11-10 5:25 ` [PATCH 20/20] ASoC: soc-component: add snd_soc_component_device_link_{add/del}() Kuninori Morimoto
@ 2026-11-11 15:48 ` Alvin Šipraga
0 siblings, 0 replies; 45+ messages in thread
From: Alvin Šipraga @ 2026-11-11 15:48 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Mark Brown, linux-sound
On Tue, Nov 10, 2026 at 05:25:07AM +0000, Kuninori Morimoto wrote:
> struct snd_soc_component will be capsuled soon, its member will not be
> able to access from non soc-component.c.
>
> This patch adds snd_soc_component_device_link_{add/del}() to handle
> Component device_link.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> sound/soc/soc-card.c | 22 ++++------------------
> sound/soc/soc-component.c | 28 ++++++++++++++++++++++++++++
> sound/soc/soc-internal.h | 2 ++
> 3 files changed, 34 insertions(+), 18 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
end of thread, other threads:[~2026-11-11 15:48 UTC | newest]
Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-10 5:23 [PATCH 00/20] ASoC: add new Component functions Kuninori Morimoto
2026-11-10 5:23 ` [PATCH 01/20] ASoC: soc-generic-dmaengine-pcm: move devm_snd_dmaengine_pcm_register() Kuninori Morimoto
2026-11-11 15:43 ` Alvin Šipraga
2026-11-10 5:23 ` [PATCH 02/20] ASoC: soc-component: rename snd_soc_component_{init/exit}_regmap() to snd_soc_component_regmap_{init/exit}() Kuninori Morimoto
2026-11-10 5:35 ` sashiko-bot
2026-11-10 5:23 ` [PATCH 03/20] ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c Kuninori Morimoto
2026-11-10 5:30 ` sashiko-bot
2026-11-11 5:05 ` Kuninori Morimoto
2026-11-11 15:43 ` Alvin Šipraga
2026-11-10 5:23 ` [PATCH 04/20] ASoC: soc-component: move devm_snd_soc_component_register() Kuninori Morimoto
2026-11-11 15:44 ` Alvin Šipraga
2026-11-10 5:23 ` [PATCH 05/20] ASoC: soc-component: move snd_soc_of_xlate_dai_name() to soc-component.c Kuninori Morimoto
2026-11-11 15:44 ` Alvin Šipraga
2026-11-10 5:23 ` [PATCH 06/20] ASoC: soc-component: makes regmap function to inline macro Kuninori Morimoto
2026-11-10 5:38 ` sashiko-bot
2026-11-11 15:45 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 07/20] ASoC: soc-component: add snd_soc_component_name_prefix() Kuninori Morimoto
2026-11-11 15:45 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 08/20] ASoC: soc-component: add snd_soc_component_to_dev() Kuninori Morimoto
2026-11-11 15:45 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 09/20] ASoC: soc-component: add snd_soc_component_to_driver() Kuninori Morimoto
2026-11-11 15:45 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 10/20] ASoC: soc-component: add snd_soc_component_to_card() Kuninori Morimoto
2026-11-11 15:46 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 11/20] ASoC: soc-component: add snd_soc_component_to_debugfs_root() Kuninori Morimoto
2026-11-11 15:46 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 12/20] ASoC: soc-component: add snd_soc_component_to_regmap() Kuninori Morimoto
2026-11-10 5:42 ` sashiko-bot
2026-11-11 15:46 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 13/20] ASoC: soc-component: add snd_soc_component_regcache_mark_dirty() Kuninori Morimoto
2026-11-11 15:46 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 14/20] ASoC: soc-component: add snd_soc_component_regcache_cache_only() Kuninori Morimoto
2026-11-11 15:47 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 15/20] ASoC: soc-component: add snd_soc_component_regcache_cache_bypass() Kuninori Morimoto
2026-11-11 15:47 ` Alvin Šipraga
2026-11-10 5:24 ` [PATCH 16/20] ASoC: soc-component: add snd_soc_component_regmap_multi_reg_write_bypassed() Kuninori Morimoto
2026-11-10 5:47 ` sashiko-bot
2026-11-10 5:24 ` [PATCH 17/20] ASoC: soc-component: add snd_soc_component_num_dai() Kuninori Morimoto
2026-11-11 15:47 ` Alvin Šipraga
2026-11-10 5:25 ` [PATCH 18/20] ASoC: soc-component: add snd_soc_component_connect_dai() Kuninori Morimoto
2026-11-11 15:48 ` Alvin Šipraga
2026-11-10 5:25 ` [PATCH 19/20] ASoC: soc-component: add snd_soc_component_active_update() Kuninori Morimoto
2026-11-11 15:48 ` Alvin Šipraga
2026-11-10 5:25 ` [PATCH 20/20] ASoC: soc-component: add snd_soc_component_device_link_{add/del}() Kuninori Morimoto
2026-11-11 15:48 ` Alvin Šipraga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).