• Takashi Iwai's avatar
    ALSA: hda - Fix undefined symbol due to builtin/module mixup · ef8e39b5
    Takashi Iwai authored
    Even after the fix for leftover kconfig handling (commit f8f1becf),
    the current code still doesn't handle properly the builtin/module
    mixup case between the core snd-hda-codec and other codec drivers.
    For example, when CONFIG_SND_HDA_INTEL=y and
    CONFIG_SND_HDA_CODEC_HDMI=m, it'll end up with an unresolved symbol
    snd_hda_parse_hdmi_codec.  This patch fixes the issue.
    
    Now codec->parser points to the parser object *only* when a module
    (either generic or HDMI parser) is loaded and bound.  When a builtin
    symbol is used, codec->parser still points to NULL.  This is the
    difference from the previous versions.
    
    Fixes: f8f1becf ('ALSA: hda - Fix leftover ifdef checks after modularization')
    Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    ef8e39b5
hda_codec.c 153 KB