All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Daniel Dadap <ddadap@nvidia.com>
Cc: stable@vger.kernel.org, Takashi Iwai <tiwai@suse.de>
Subject: Re: [PATCH 5.15.y] ALSA: hda: Add missing NVIDIA HDA codec IDs
Date: Wed, 23 Jul 2025 14:23:26 -0400	[thread overview]
Message-ID: <aIEonpWtKY_hy9T7@lappy> (raw)
In-Reply-To: <aIER3X-61j_VVKkr@ddadap-lakeline.nvidia.com>

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.

>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.

-- 
Thanks,
Sasha

  reply	other threads:[~2025-07-23 18:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-12 13:58 FAILED: patch "[PATCH] ALSA: hda: Add missing NVIDIA HDA codec IDs" failed to apply to 5.15-stable tree gregkh
2025-07-23 14:10 ` [PATCH 5.15.y] ALSA: hda: Add missing NVIDIA HDA codec IDs Sasha Levin
2025-07-23 16:46   ` Daniel Dadap
2025-07-23 18:23     ` Sasha Levin [this message]
2025-07-23 19:42       ` Daniel Dadap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aIEonpWtKY_hy9T7@lappy \
    --to=sashal@kernel.org \
    --cc=ddadap@nvidia.com \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.