Repository navigation
ALSA/ASoC: hdac_hda: hdmi: Avoid duplicated dai registration - take 2 - #4659
Merged
plbossart merged 2 commits intoOct 26, 2023
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]>
ujfalusi
requested review from
bardliao,
dbaluta,
kuanhsuncheng,
kv2019i,
lgirdwood,
plbossart,
ranj063,
vijendarmukunda and
yaochunhung
as code owners
October 26, 2023 07:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
Since #4649 is now merged it is now possible to fix the duplicate DAI registration without regression on HDA devices.
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.