[PATCH v5 00/12] ASoC: add and use new snd_soc_register_component()
Kuninori Morimoto <[email protected]>
| Newsgroups | org.kernel.vger.linux-sound |
|---|---|
| Message-ID | <[email protected]> |
Hi Current component has component->name. But snd_soc_register_component() user can't setup it, because component itself is alloced in that function. So, to setup it, user need to use snd_soc_component_initialize() / snd_soc_add_component() directly instead of using snd_soc_register_component(). In the same time, Component will be capsuled soon. Let's tidyup around here. All strange code can be gone if we have both below style. Normal case snd_soc_register_component(dev, ...); Want to setup case component = snd_soc_component_alloc(...); snd_soc_component_set_xxx(component, ...); snd_soc_component_set_xxx(component, ...); (A) snd_soc_register_component(component, ...); This patch-set adds new snd_soc_register_component() which allows to use component (A). v4 -> v5 - tidyup return value from snd_soc_component_alloc() [06/12] - use KUNIT_ASSERT_NOT_NULL() [10/12] v3 -> v4 - add Reviewed-by from Cezary - tidyup around return on [06/12] Originally, this patch-set was posted as v1: ASoC: intel: use component_name for Component name v2: ASoC: add [devm_]snd_soc_register_component_with_name() Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Kuninori Morimoto (12): ASoC: soc-component: move soc_component_field_shift() ASoC: soc-component: add snd_soc_component_alloc() ASoC: soc-component: add snd_soc_register_component_{c/d}() ASoC: soc-component: add snd_soc_component_{set_}name() ASoC: soc-component: add snd_soc_component_{set/to}_priv() ASoC: intel: avs: use snd_soc_register_component() ASoC: intel: avs: probes: use snd_soc_register_component() ASoC: intel: catpt: pcm: use snd_soc_register_component() ASoC: soc-generic-dmaengine-pcm: use snd_soc_register_component() ASoC: soc-topology-test: use snd_soc_register_component() ASoC: soc-core: makes snd_soc_component_initialize() / snd_soc_add_component() local ASoC: soc-core: remove dev from soc_component_initialize() include/sound/dmaengine_pcm.h | 6 -- include/sound/soc-component.h | 11 +++ include/sound/soc.h | 15 +-- sound/soc/fsl/fsl_asrc_dma.c | 4 +- sound/soc/intel/avs/avs.h | 5 +- sound/soc/intel/avs/ipc.c | 2 +- sound/soc/intel/avs/pcm.c | 19 ++-- sound/soc/intel/avs/probes.c | 16 ++-- sound/soc/intel/catpt/pcm.c | 14 +-- sound/soc/soc-component.c | 53 ++++++++-- sound/soc/soc-core.c | 44 +++++---- sound/soc/soc-generic-dmaengine-pcm.c | 30 +++--- sound/soc/soc-topology-test.c | 133 ++++++++++++++++---------- 13 files changed, 217 insertions(+), 135 deletions(-) -- 2.53.0