public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: dw-hdmi-qp: Return -EOPNOTSUPP in HDMI audio functions
Date: Mon, 25 May 2026 22:33:17 +1000	[thread overview]
Message-ID: <review-patch1-20260519-fix-hdmi-audio-warnings-v1-1-9608966c993f@collabora.com> (raw)
In-Reply-To: <20260519-fix-hdmi-audio-warnings-v1-1-9608966c993f@collabora.com>

Patch Review

**audio_enable refactoring (lines 472-475 after patch):**

```c
	if (!hdmi->tmds_char_rate)
		return -EOPNOTSUPP;

	dw_hdmi_qp_mod(hdmi, 0, AVP_DATAPATH_PACKET_AUDIO_SWDISABLE, GLOBAL_SWDISABLE);
```

Previously, the logic was:

```c
	if (hdmi->tmds_char_rate)
		dw_hdmi_qp_mod(hdmi, 0, AVP_DATAPATH_PACKET_AUDIO_SWDISABLE, GLOBAL_SWDISABLE);

	return 0;
```

The old code returned success (0) even when `tmds_char_rate` was 0 — meaning audio was "enabled" successfully without actually touching the hardware. This is a subtle behavioral change: callers (the `hdmi_codec_startup` path) now see a failure when HDMI is disconnected, rather than a silent no-op success. This is the correct fix — a silent success would allow the ASoC stack to proceed to `get_eld` and `prepare`, which would operate on stale/zero ELD data. By returning `-EOPNOTSUPP` here, the startup aborts cleanly before the ELD path (`hdmi-codec.c:468-482`) is reached, which prevents the "0-valued ELD errors" mentioned in the commit message.

**audio_prepare change (line 489 after patch):**

```c
	if (!hdmi->tmds_char_rate)
		return -EOPNOTSUPP;
```

This is a straightforward error code substitution from `-ENODEV` to `-EOPNOTSUPP`. The guard already existed; only the error code changes.

**Consistency with audio_disable:**

The `dw_hdmi_qp_audio_disable` function (line 526) returns `void` and already has a `tmds_char_rate` guard that simply skips the register writes. No change needed there, and the patch correctly doesn't touch it.

**No issues found.** The patch is minimal, well-scoped, and the commit message accurately explains both the problem and the mechanism. The `-EOPNOTSUPP` choice is validated by `snd_soc_ret()` in `sound/soc/soc-utils.c:30-31` which explicitly skips `dev_err` logging for this error code.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-05-25 12:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 18:00 [PATCH] drm/bridge: dw-hdmi-qp: Return -EOPNOTSUPP in HDMI audio functions Detlev Casanova
2026-05-25 12:33 ` Claude review: " Claude Code Review Bot
2026-05-25 12:33 ` Claude Code Review Bot [this message]

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=review-patch1-20260519-fix-hdmi-audio-warnings-v1-1-9608966c993f@collabora.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox