From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260519-fix-hdmi-audio-warnings-v1-1-9608966c993f@collabora.com> References: <20260519-fix-hdmi-audio-warnings-v1-1-9608966c993f@collabora.com> <20260519-fix-hdmi-audio-warnings-v1-1-9608966c993f@collabora.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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_SWDISA= BLE); ``` Previously, the logic was: ```c if (hdmi->tmds_char_rate) dw_hdmi_qp_mod(hdmi, 0, AVP_DATAPATH_PACKET_AUDIO_SWDISABLE, GLOBAL_SWDIS= ABLE); return 0; ``` The old code returned success (0) even when `tmds_char_rate` was 0 =E2=80= =94 meaning audio was "enabled" successfully without actually touching the = hardware. This is a subtle behavioral change: callers (the `hdmi_codec_star= tup` path) now see a failure when HDMI is disconnected, rather than a silen= t no-op success. This is the correct fix =E2=80=94 a silent success would a= llow the ASoC stack to proceed to `get_eld` and `prepare`, which would oper= ate on stale/zero ELD data. By returning `-EOPNOTSUPP` here, the startup ab= orts 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 `-EOPNO= TSUPP`. 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 alrea= dy has a `tmds_char_rate` guard that simply skips the register writes. No c= hange needed there, and the patch correctly doesn't touch it. **No issues found.** The patch is minimal, well-scoped, and the commit mess= age accurately explains both the problem and the mechanism. The `-EOPNOTSUP= P` 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