public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org,
	Jaroslav Kysela <perex@perex.cz>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>
Subject: Re: [PATCH 5/5] ASoC: soc.h: don't create dummy Component via COMP_DUMMY()
Date: Thu, 7 Dec 2023 09:24:49 +0100	[thread overview]
Message-ID: <f4dfebd6-db57-4588-a3fe-ab198d2ac366@linux.intel.com> (raw)
In-Reply-To: <87h6kuolii.wl-kuninori.morimoto.gx@renesas.com>

On 12/7/2023 2:21 AM, Kuninori Morimoto wrote:
> 
> Hi Amadeusz
> 
> Thank you for your feedback
> 
>>> --- a/include/sound/soc.h
>>> +++ b/include/sound/soc.h
>>> @@ -938,7 +938,7 @@ snd_soc_link_to_platform(struct snd_soc_dai_link *link, int n) {
>>>    #define COMP_PLATFORM(_name)		{ .name = _name }
>>>    #define COMP_AUX(_name)			{ .name = _name }
>>>    #define COMP_CODEC_CONF(_name)		{ .name = _name }
>>> -#define COMP_DUMMY()			{ .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", }
>>> +#define COMP_DUMMY()			/* see snd_soc_fill_dummy_dai() */
>>
>> Isn't it effectively making COMP_DUMMY same as COMP_EMPTY, or am I not
>> seeing something? I guess next step could be to just remove all
>> COMP_DUMMY and replace them with COMP_EMPTY to avoid two definitions
>> which are same thing?
> 
> It is a little bit macro magic
> 
> COMP_EMPTY()
> 	static struct snd_soc_dai_link_component name[]	= {{ }},
> 	                                                   ^^^
> COMP_DUMMY()
> 	static struct snd_soc_dai_link_component name[]	= {   },
> 	                                                   ^^^
> EMPTY case will be 1 element array, DUMMY case will be 0 element array.
> So, EMPTY case has empty element, and is not a special/strange array.
> But DUMMY case, it has pointer but 0 size array, very special/strange.
> This patch making this special/strange array on purpose, and convert it
> to asoc_dummy_dlc() on soc-core.c
> Is this good answer for you ?
> 

Yes, thanks!

>>> +		if (dai_link->num_platforms == 0 && dai_link->platforms) {
>>> +			dev_warn(card->dev, "platform don't need dummy Component/DAI\n");
>>
>> I would just replace above print with code comment, no need to spam dmesg.
> 
> OK, will fix in v2
> 
> 
> Thank you for your help !!
> 
> Best regards
> ---
> Renesas Electronics
> Ph.D. Kuninori Morimoto


  reply	other threads:[~2023-12-07  8:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04  1:31 [PATCH 0/5] ASoC: don't use original dummy dlc Kuninori Morimoto
2023-12-04  1:31 ` [PATCH 1/5] ASoC: fsl: fsl-asoc-card: don't need DUMMY Platform Kuninori Morimoto
2023-12-04  1:31 ` [PATCH 2/5] ASoC: samsung: odroid: " Kuninori Morimoto
2023-12-04  1:31 ` [PATCH 3/5] ASoC: intel: hdaudio.c: use snd_soc_dummy_dlc Kuninori Morimoto
2023-12-04  1:31 ` [PATCH 4/5] ASoC: sof: " Kuninori Morimoto
2023-12-04  1:31 ` [PATCH 5/5] ASoC: soc.h: don't create dummy Component via COMP_DUMMY() Kuninori Morimoto
2023-12-04 15:44   ` Amadeusz Sławiński
2023-12-07  1:21     ` Kuninori Morimoto
2023-12-07  8:24       ` Amadeusz Sławiński [this message]
2023-12-19 18:06 ` [PATCH 0/5] ASoC: don't use original dummy dlc Mark Brown

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=f4dfebd6-db57-4588-a3fe-ab198d2ac366@linux.intel.com \
    --to=amadeuszx.slawinski@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --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