Repository navigation
Conversation
The snd_hda_device_is_hdmi() can be used in drivers to check if the hdev belongs to a display audio device. Signed-off-by: Peter Ujfalusi <[email protected]>
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. Link: thesofproject#4509 Signed-off-by: Peter Ujfalusi <[email protected]>
415123f to
778999d
Compare
|
Changes since v1:
|
| ret = devm_snd_soc_register_component(&hdev->dev, | ||
| &hdac_hda_codec, hdac_hda_dais, | ||
| ARRAY_SIZE(hdac_hda_dais)); | ||
| if (snd_hda_device_is_hdmi(hdev)) |
There was a problem hiding this comment.
Hmm, "if (hdev->addr == HDA_IDISP_ADDR)" would be an option, but I think for codec in soc/codecs/ , this is actually nicer.
There was a problem hiding this comment.
it is Intel only, (AMD's HDMI is addr=0 in some cases for example).
I'm looking at a different method, something like this:
hcodec = hdac_to_hda_codec(hdac);
and from there try to find some way. So far no leads in there.
There is a guessing local function in hda_bind.c: is_likely_hdmi_codec() but that might be even more questionable.
I'll try to find a better way or make this a bit nicer.
There was a problem hiding this comment.
To clarify: I'm not sure about addr == 2, I just only saw it in code for Intel platforms, it might be universal HDA convention, but I'm not certain if it is correct or not
Hi,
in the kernel log we always have warnings like these printed regardless of the platform:
The reason is that the hdac_hda driver registers the dais multiple time for each hdev, thus we end up with duplicated widgets.
This PR fixes the issue by conditionally registering the dais for HDMI and not HDMI hdev.
Partially addresses #4509, the
ASoC: Parent card not yet available, widget card binding deferredprint cannot be 'fixed', it is part of the normal flow. We could try to lover the log level of that print to silence it in enduser machines.