Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: linux-sound@vger.kernel.org
Subject: Re: Question about conversion kcontrol to component
Date: Fri, 25 Apr 2025 16:58:02 +0100	[thread overview]
Message-ID: <aAuxCjJgi11NdWSd@opensource.cirrus.com> (raw)
In-Reply-To: <877c38dgfq.wl-kuninori.morimoto.gx@renesas.com>

On Fri, Apr 25, 2025 at 04:16:10AM +0000, Kuninori Morimoto wrote:
> 
> Hi ALSA ML
> 
> I have noticed that we have similar functions
> 
> 	snd_soc_kcontrol_component()
> 	snd_soc_dapm_kcontrol_component()
> 
> Both converts snd_kcontrol to snd_soc_component.
> I wonder can we merge these ? or which we can use is case-by-case ?
> 

I think this is case-by-case snd_soc_kcontrol_component() relies on
the component being stored in private_data on the kcontrol, which is
true for all controls added through snd_soc_add_component_controls(),
but not true for DAPM controls which often use private_data for
various internal things and call snd_soc_cnew() directly.

Thanks,
Charles

  reply	other threads:[~2025-04-25 15:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25  4:16 Question about conversion kcontrol to component Kuninori Morimoto
2025-04-25 15:58 ` Charles Keepax [this message]
2025-05-07  0:19   ` 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=aAuxCjJgi11NdWSd@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-sound@vger.kernel.org \
    /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