* [PATCH v2] ALSA: hda/hdmi: Enable HBR capability
@ 2026-10-20 8:18 Aaron Kling via B4 Relay
2026-10-20 8:41 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Aaron Kling via B4 Relay @ 2026-10-20 8:18 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Thierry Reding, Jonathan Hunter
Cc: linux-sound, linux-tegra, linux-kernel, Aaron Kling
From: Aaron Kling <webgeek1234@gmail.com>
Tegra HDA does not set the HBR capability bit, however every SoC since
Tegra114 does support HBR. Override the hbr setup function for these
SoCs to unconditionally enable the feature. Since Tegra30 does not
support HBR, this override will not be applied.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
---
Before this, any attempt to open an hbr stream resulted in a rejection
on Tegra hardware. Looking at the downstream support, that just bypassed
the capbility check for all supported Tegra hardware in the common code.
This replicates that in a driver specific hook.
This has been tested on a SHIELD TV 2019 Pro trying to bitstream an
Atmos demo video. It attempts to play, but mostly just underruns the
entire time, with a few spurts of correct noise. My expectation is that
issue is userspace, since that is a WIP android audio hal. But even if
there are more kernel problems, this should be correct as a standalone
change.
---
Changes in v2:
- As suggested by Takashi, just don't apply the override for unsupported
SoCs instead of trying to replicate the unsupported path.
- Link to v1: https://lore.kernel.org/r/20261018-tegra-hda-hbr-v1-1-b8bb1f1d8d15@gmail.com
---
sound/hda/codecs/hdmi/tegrahdmi.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/sound/hda/codecs/hdmi/tegrahdmi.c b/sound/hda/codecs/hdmi/tegrahdmi.c
index ebb6410a48313..171d1ee154d9c 100644
--- a/sound/hda/codecs/hdmi/tegrahdmi.c
+++ b/sound/hda/codecs/hdmi/tegrahdmi.c
@@ -227,6 +227,37 @@ static int nvhdmi_chmap_validate(struct hdac_chmap *chmap,
return 0;
}
+static int tegrahdmi_pin_hbr_setup(struct hda_codec *codec, hda_nid_t pin_nid,
+ int dev_id, bool hbr)
+{
+ int pinctl, new_pinctl;
+
+ snd_hda_set_dev_select(codec, pin_nid, dev_id);
+ pinctl = snd_hda_codec_read(codec, pin_nid, 0,
+ AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
+
+ if (pinctl < 0)
+ return hbr ? -EINVAL : 0;
+
+ new_pinctl = pinctl & ~AC_PINCTL_EPT;
+ if (hbr)
+ new_pinctl |= AC_PINCTL_EPT_HBR;
+ else
+ new_pinctl |= AC_PINCTL_EPT_NATIVE;
+
+ codec_dbg(codec, "%s: NID=0x%x, %spinctl=0x%x\n",
+ __func__, pin_nid,
+ pinctl == new_pinctl ? "" : "new-",
+ new_pinctl);
+
+ if (pinctl != new_pinctl)
+ snd_hda_codec_write(codec, pin_nid, 0,
+ AC_VERB_SET_PIN_WIDGET_CONTROL,
+ new_pinctl);
+
+ return 0;
+}
+
static int tegra_hdmi_init(struct hda_codec *codec)
{
struct hdmi_spec *spec = codec->spec;
@@ -255,6 +286,10 @@ static int tegra_hdmi_init(struct hda_codec *codec)
spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate;
spec->nv_dp_workaround = true;
+ // Tegra 3 does not support HBR
+ if (codec->core.vendor_id != 0x10de0020)
+ spec->ops.pin_hbr_setup = tegrahdmi_pin_hbr_setup;
+
return 0;
}
---
base-commit: 2efb7a11f1aa4d2dc285fe2680cca22cb9f72f64
change-id: 20261018-tegra-hda-hbr-35107238b629
Best regards,
--
Aaron Kling <webgeek1234@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] ALSA: hda/hdmi: Enable HBR capability
2026-10-20 8:18 [PATCH v2] ALSA: hda/hdmi: Enable HBR capability Aaron Kling via B4 Relay
@ 2026-10-20 8:41 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-10-20 8:41 UTC (permalink / raw)
To: webgeek1234
Cc: Jaroslav Kysela, Takashi Iwai, Thierry Reding, Jonathan Hunter,
linux-sound, linux-tegra, linux-kernel
On Tue, 20 Oct 2026 10:18:14 +0200,
Aaron Kling via B4 Relay wrote:
>
> From: Aaron Kling <webgeek1234@gmail.com>
>
> Tegra HDA does not set the HBR capability bit, however every SoC since
> Tegra114 does support HBR. Override the hbr setup function for these
> SoCs to unconditionally enable the feature. Since Tegra30 does not
> support HBR, this override will not be applied.
>
> Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-20 8:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20 8:18 [PATCH v2] ALSA: hda/hdmi: Enable HBR capability Aaron Kling via B4 Relay
2026-10-20 8:41 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox