mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: broonie@kernel.org, linux-sound@vger.kernel.org, tiwai@suse.com,
	perex@perex.cz, amade@asmblr.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/7] ASoC: core: Create new components in sane state
Date: Mon, 12 Oct 2026 23:52:45 +0000	[thread overview]
Message-ID: <87pkxexyr6.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <20261007133353.455185-1-cezary.rojewski@intel.com>


Hi Cezary

Thank you for the patch

> There is a gap between snd_soc_component_alloc() and
> snd_soc_register_component().  A driver that obtains a component object
> through snd_soc_component_alloc() receives an object in uninitialized
> state.  soc_component_initialize() is the function responsible for
> bringing it into a sane one but it is not accessible by the framework
> users.  Example of the uninitialized members are the lists e.g.:
> comp->dai_list.
> 
> The framework shall prevent manipulation of uninitialized components.
> Introduce snd_soc_component_new() which acts as a constructor: allocates
> and initializes the component object before returning it to the caller.
> 
> Given the quite recent discussion related to all things
> component-register [1], decided to stick to the "register" wording and
> renamed soc_component_add() to snd_soc_component_register().  With that,
> register/unregister pattern is kept.  At the same time, the update
> brings a clear division between:
> 
> 	1) snd_soc_component_register(component..)
> 	2) snd_soc_register_component(dev..)
> 
> A driver uses 1) when operating on pre-constructed component object
> explicitly and 2) when they want the ASoC framework to do everything for
> them.
> 
> Parameter "name" is added to the ctor parameter list as it is one of the
> fields that is always initialized, see the 'if (!component->name)'
> within soc_component_initialize().  Private data on the other hand is
> not so opted out of including it.  And thus snd_soc_component_set_priv()
> remains intact.

I would like to review this patch, but unfortunately I'm busy this week.
Actually, I'm now posting cleanup snd_soc_component_xxx(),
which has many steps, and is now under progress.

I will review your patch next week, but I guess some of them (= not all)
are conflicts to mine...

Thank you for your help !!

Best regards
---
Kuninori Morimoto

  parent reply	other threads:[~2026-10-12 23:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 13:33 Cezary Rojewski
2026-10-07 13:33 ` [PATCH 1/7] ASoC: core: Add component constructor Cezary Rojewski
2026-10-07 13:33 ` [PATCH 2/7] ASoC: core: Rename and export soc_component_add() Cezary Rojewski
2026-10-07 13:33 ` [PATCH 3/7] ASoC: dmaengine: Switch to snd_snd_component_new() Cezary Rojewski
2026-10-07 13:33 ` [PATCH 4/7] ASoC: topology-test: " Cezary Rojewski
2026-10-07 13:33 ` [PATCH 5/7] ASoC: Intel: catpt: " Cezary Rojewski
2026-10-07 13:33 ` [PATCH 6/7] ASoC: Intel: avs: " Cezary Rojewski
2026-10-07 13:33 ` [PATCH 7/7] ASoC: core: Remove unused component-register members Cezary Rojewski
2026-10-12 22:58 ` [PATCH 0/7] ASoC: core: Create new components in sane state Mark Brown
2026-10-12 23:52 ` Kuninori Morimoto [this message]
2026-10-13 10:53   ` Mark Brown
2026-10-13 11:24     ` Cezary Rojewski
2026-10-13 12:44       ` Mark Brown
2026-10-14  3:08       ` Kuninori Morimoto
2026-10-14  8:06         ` Cezary Rojewski
2026-10-15  2:35           ` Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pkxexyr6.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=amade@asmblr.net \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®