On Wed, Jul 23, 2025 at 02:23:26PM -0400, Sasha Levin wrote:
On Wed, Jul 23, 2025 at 11:46:21AM -0500, Daniel Dadap wrote:
On Wed, Jul 23, 2025 at 10:10:42AM -0400, Sasha Levin wrote:
From: Daniel Dadap ddadap@nvidia.com
[ Upstream commit e0a911ac86857a73182edde9e50d9b4b949b7f01 ]
Add codec IDs for several NVIDIA products with HDA controllers to the snd_hda_id_hdmi[] patch table.
Signed-off-by: Daniel Dadap ddadap@nvidia.com Cc: stable@vger.kernel.org Link: https://patch.msgid.link/aF24rqwMKFWoHu12@ddadap-lakeline.nvidia.com Signed-off-by: Takashi Iwai tiwai@suse.de [ change patch_tegra234_hdmi function calls to patch_tegra_hdmi ] Signed-off-by: Sasha Levin sashal@kernel.org
sound/pci/hda/patch_hdmi.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 81025d45306d3..fcd7d94afc5d5 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -4364,6 +4364,8 @@ HDA_CODEC_ENTRY(0x10de002d, "Tegra186 HDMI/DP0", patch_tegra_hdmi), HDA_CODEC_ENTRY(0x10de002e, "Tegra186 HDMI/DP1", patch_tegra_hdmi), HDA_CODEC_ENTRY(0x10de002f, "Tegra194 HDMI/DP2", patch_tegra_hdmi), HDA_CODEC_ENTRY(0x10de0030, "Tegra194 HDMI/DP3", patch_tegra_hdmi), +HDA_CODEC_ENTRY(0x10de0033, "SoC 33 HDMI/DP", patch_tegra_hdmi), +HDA_CODEC_ENTRY(0x10de0035, "SoC 35 HDMI/DP", patch_tegra_hdmi),
I tested a modified snd-hda-codec-hdmi.ko which patched one of these to patch_tegra_hdmi instead of patch_tegra234_hdmi, and it still worked correctly as far as I could tell with a few brief checks. However, it seems like patch_nvhdmi might be a better match, at least based on how it seems to behave with DP MST, so if we don't decide to drop the codec entries for 0x10de0033 and 0x10de0035 in the older branches it might be good to use patch_nvhdmi.
Hmm...
I've used patch_tegra_hdmi because from my understanding of the code, Tegra SoCs require explicit format notification through NVIDIA AFG scratch registers. The key mechanism is in tegra_hdmi_set_format() which writes the HDA format to NVIDIA_SET_SCRATCH0_BYTE[0-1] and toggles NVIDIA_SCRATCH_VALID (bit 30) in NVIDIA_SET_SCRATCH0_BYTE3.
patch_nvhdmi doesn't seem to deal with this at all.
Hmm. The HDA does manage to work with both patch_nvhdmi and the generic HDMI patch functions on this system, but I'm not sure if that's because it doesn't need the explicit notification, or if I just hadn't exercised changing the format from the default.
It probably does make more sense to drop the SoC codec entries for the backports, the more I think about it. It makes sense to backport dGPU codec entries since somebody could put an add-in-board into an existing system running an LTS kernel, but for new SoCs you'd want the kernel to be recent enough to support all of the hardware on the system. Notably, we don't seem to have backported HDA codec entries for other SoCs like the T234 that patch_tegra234_hdmi was added for in the first place.
On our end we'd prefer to keep this align with upstream as much as possible: it will make future patches easier to apply without manual modifications.
If leaving them in there is harmless (and only unnecessary), I'd rather just leave it there.
Sounds good to me.
-- Thanks, Sasha