Re: sound/hda: Module loading problem of controller and codec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux