• Peter Ujfalusi's avatar
    ASoC: hdac_hda: Conditionally register dais for HDMI and Analog · a0575b4a
    Peter Ujfalusi authored
    The current driver is registering the same dais for each hdev found in the
    system which results duplicated widgets to be registered and the kernel
    log contains similar prints:
    snd_hda_codec_realtek ehdaudio0D0: ASoC: sink widget AIF1TX overwritten
    snd_hda_codec_realtek ehdaudio0D0: ASoC: source widget AIF1RX overwritten
    skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi3 overwritten
    skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi2 overwritten
    skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi1 overwritten
    skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Codec Output Pin1 overwritten
    skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Codec Input Pin1 overwritten
    skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Analog Codec Playback overwritten
    skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Digital Codec Playback overwritten
    skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Alt Analog Codec Playback overwritten
    skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Analog Codec Capture overwritten
    skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Digital Codec Capture overwritten
    skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Alt Analog Codec Capture overwritten
    
    To avoid such issue, split the dai array into HDMI and non HDMI array and
    register them conditionally:
    for HDMI hdev only register the dais needed for HDMI
    for non HDMI hdev do not  register the HDMI dais.
    
    Depends-on: 3d1dc8b1 ("ASoC: Intel: skl_hda_dsp_generic: Drop HDMI routes when HDMI is not available")
    Link: https://github.com/thesofproject/linux/issues/4509Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
    Link: https://lore.kernel.org/r/20231128123914.3986-1-peter.ujfalusi@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    a0575b4a
hdac_hda.c 17.5 KB