LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: <lgirdwood@gmail.com>, <rdunlap@infradead.org>,
<broonie@kernel.org>, <pierre-louis.bossart@linux.intel.com>,
<perex@perex.cz>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ASoC: SOF: Fix build error with CONFIG_SND_SOC_SOF_NOCODEC=m
Date: Fri, 10 May 2019 21:09:59 +0800 [thread overview]
Message-ID: <07c6a947-aa4f-2195-d4bf-3a757528352e@huawei.com> (raw)
In-Reply-To: <s5h7eayn5or.wl-tiwai@suse.de>
On 2019/5/10 15:12, Takashi Iwai wrote:
> On Fri, 10 May 2019 04:36:57 +0200,
> YueHaibing wrote:
>>
>> Fix gcc build error while CONFIG_SND_SOC_SOF_NOCODEC=m
>>
>> sound/soc/sof/core.o: In function `snd_sof_device_probe':
>> core.c:(.text+0x4af): undefined reference to `sof_nocodec_setup'
>>
>> Change SND_SOC_SOF_NOCODEC to bool to fix this.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Fixes: c16211d6226d ("ASoC: SOF: Add Sound Open Firmware driver core")
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>
> This change would break things severely. This won't allow to build it
> as a module any longer.
>
> A better fix would be to somehow restrict the SND_SOC_SOF_NOCODEC to
> align with SND_SOC_SOF, i.e. disallow SND_SOC_SOF=y &&
> SND_SOC_SOF_NOCODEC=m. Because of the complex mix of select and
> depends-on in SOF, I'm afraid that it's not that trivial, though.
> There might be something I overlooked, hopefully...
>
> An easier alternative would be to replace
> IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC) with
> IS_REACHABLE(CONFIG_SND_SOC_SOF_NOCODEC). This assures the condition
> at the build time, although the error at probe might be a surprising
> to some users that don't know this hidden dependency.
>
Yes, I prefer to use IS_REACHABLE, thanks!
>
> thanks,
>
> Takashi
>
>
>> ---
>> sound/soc/sof/Kconfig | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/sof/Kconfig b/sound/soc/sof/Kconfig
>> index b204c65..9c280c9 100644
>> --- a/sound/soc/sof/Kconfig
>> +++ b/sound/soc/sof/Kconfig
>> @@ -44,7 +44,7 @@ config SND_SOC_SOF_OPTIONS
>> if SND_SOC_SOF_OPTIONS
>>
>> config SND_SOC_SOF_NOCODEC
>> - tristate "SOF nocodec mode Support"
>> + bool "SOF nocodec mode Support"
>> help
>> This adds support for a dummy/nocodec machine driver fallback
>> option if no known codec is detected. This is typically only
>> --
>> 2.7.4
>>
>>
>>
>
> .
>
next prev parent reply other threads:[~2019-05-10 13:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-10 2:36 YueHaibing
2019-05-10 7:12 ` Takashi Iwai
2019-05-10 12:56 ` Pierre-Louis Bossart
2019-05-10 13:04 ` Takashi Iwai
2019-05-10 13:34 ` [alsa-devel] " Pierre-Louis Bossart
2019-05-10 13:41 ` Takashi Iwai
2019-05-10 13:56 ` Takashi Iwai
2019-05-10 15:29 ` Pierre-Louis Bossart
2019-05-10 16:57 ` Takashi Iwai
2019-05-10 17:56 ` Pierre-Louis Bossart
2019-05-10 18:05 ` Takashi Iwai
2019-05-10 13:09 ` YueHaibing [this message]
2019-05-10 13:29 ` [PATCH V2] " YueHaibing
2019-05-10 13:36 ` Pierre-Louis Bossart
2019-05-10 13:50 ` YueHaibing
2019-05-10 16:24 ` Pierre-Louis Bossart
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=07c6a947-aa4f-2195-d4bf-3a757528352e@huawei.com \
--to=yuehaibing@huawei.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rdunlap@infradead.org \
--cc=tiwai@suse.de \
--subject='Re: [PATCH] ASoC: SOF: Fix build error with CONFIG_SND_SOC_SOF_NOCODEC=m' \
/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
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).