alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* sound/hda: Module loading problem of controller and codec
@ 2023-09-20  4:18 yu tian
  2023-09-20  7:11 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: yu tian @ 2023-09-20  4:18 UTC (permalink / raw)
  To: tiwai; +Cc: alsa-devel

Hi Takashi,
The following commit only gives a warning in menuconfig:
"Set to Y if you want auto-loading the codec driver"

d8f66c71d547 ("ALSA: hda - Add warning texts when codec driver Kconfig
doesn't match")
78e34f34ac27 ("ALSA: hda - remove PCI dependency in Kconfig")

The problem with module loading is because when SND_HDA=y,
sound/pci/hda/hda_bind.c is not compiled as a module.There is a
“#ifdef MODULE“ in the codec_bind_module function in this file. Why
can't it be deleted directly?Or am I missing something?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: sound/hda: Module loading problem of controller and codec
  2023-09-20  4:18 sound/hda: Module loading problem of controller and codec yu tian
@ 2023-09-20  7:11 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2023-09-20  7:11 UTC (permalink / raw)
  To: yu tian; +Cc: tiwai, alsa-devel

On Wed, 20 Sep 2023 06:18:28 +0200,
yu tian wrote:
> 
> Hi Takashi,
> The following commit only gives a warning in menuconfig:
> "Set to Y if you want auto-loading the codec driver"
> 
> d8f66c71d547 ("ALSA: hda - Add warning texts when codec driver Kconfig
> doesn't match")
> 78e34f34ac27 ("ALSA: hda - remove PCI dependency in Kconfig")
> 
> The problem with module loading is because when SND_HDA=y,
> sound/pci/hda/hda_bind.c is not compiled as a module.There is a
> “#ifdef MODULE“ in the codec_bind_module function in this file. Why
> can't it be deleted directly?Or am I missing something?

You seem looking at things other way round.  The problem is not
because of '#ifdef MODULE'.  It's rather because of the code behavior
and the expected results.

The current code there requires the module loading for binding when
the HDA stuff is built as modules.  Although you may reduce the ifdef,
it doesn't mean that the behavior would change.  Hence, when
CONFIG_SND_HDA=y and codecs are modules, those codecs will be never
bound, no matter with or without ifdef.  That's the reason of the
warning there.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-21 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20  4:18 sound/hda: Module loading problem of controller and codec yu tian
2023-09-20  7:11 ` Takashi Iwai

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).