From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: synopsys: dw-dp: Add audio support
Date: Tue, 05 May 2026 09:49:48 +1000 [thread overview]
Message-ID: <review-patch12-20260501-synopsys-dw-dp-improvements-v2-12-d7e7f6bac77f@collabora.com> (raw)
In-Reply-To: <20260501-synopsys-dw-dp-improvements-v2-12-d7e7f6bac77f@collabora.com>
Patch Review
The main audio implementation. Uses the `drm_bridge_funcs` DP audio callbacks.
**Issue — `AUDIO_DATA_IN_EN_CHANNEL*` bit definitions overlap with `AUDIO_INF_SELECT`:**
```c
#define AUDIO_DATA_IN_EN GENMASK(4, 1)
+#define AUDIO_DATA_IN_EN_CHANNEL12 BIT(0)
+#define AUDIO_DATA_IN_EN_CHANNEL34 BIT(1)
+#define AUDIO_DATA_IN_EN_CHANNEL56 BIT(2)
+#define AUDIO_DATA_IN_EN_CHANNEL78 BIT(3)
#define AUDIO_INF_SELECT BIT(0)
```
These `CHANNEL*` defines are *field values* used inside `FIELD_PREP(AUDIO_DATA_IN_EN, ...)`, not raw register bits. This is correct usage, but the naming convention (`BIT(0)` etc. placed right next to raw register bit defines) is confusing. A comment or renaming (e.g., `DW_DP_AUD_CH12_EN = BIT(0)`) would improve readability.
**Issue — both clocks enabled then one disabled:**
```c
+ clk_prepare_enable(dp->spdif_clk);
+ clk_prepare_enable(dp->i2s_clk);
+ /* ... configure registers ... */
+ if (dp->audio_interface == DW_DP_AUDIO_I2S)
+ clk_disable_unprepare(dp->spdif_clk);
+ else if (dp->audio_interface == DW_DP_AUDIO_SPDIF)
+ clk_disable_unprepare(dp->i2s_clk);
```
Both clocks are enabled, registers are configured, then the unused one is disabled. The comment says "Wait for inf switch" with a `usleep_range(20, 40)`. No error handling on `clk_prepare_enable` calls here either.
**Issue — channel count support is limited:**
```c
+ switch (params->cea.channels) {
+ case 1:
+ case 2:
+ audio_data_in_en = AUDIO_DATA_IN_EN_CHANNEL12;
+ break;
+ case 8:
+ audio_data_in_en = ...all channels...;
+ break;
+ default:
+ dev_err(dp->dev, "invalid audio channels %d\n", ...);
+ return -EINVAL;
+ }
```
Only 1/2 and 8 channels are supported. 4 and 6 channel configurations (common for surround sound) are rejected. This is likely intentional for initial implementation but worth noting.
**Audio startup/shutdown PM:** `pm_runtime_get_sync` in `startup` and `pm_runtime_put_autosuspend` in `shutdown` — same lack of error handling as noted in patch 9.
**The `hdmi_audio_dai_port = 1` assignment:** This assumes port@1 is the audio DAI port, which aligns with the DT binding change in patch 11 that defines `#sound-dai-cells = <1>`.
Overall the audio implementation follows established patterns from other DRM bridge audio drivers and looks functionally correct for SST use cases.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-04 23:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 22:20 [PATCH v2 00/12] Synopsys DisplayPort Controller improvements for Rockchip platforms Sebastian Reichel
2026-04-30 22:20 ` [PATCH v2 01/12] drm/bridge: synopsys: dw-dp: Support unregistering the AUX channel Sebastian Reichel
2026-05-04 23:49 ` Claude review: " Claude Code Review Bot
2026-04-30 22:20 ` [PATCH v2 02/12] drm/rockchip: dw_dp: Release core resources Sebastian Reichel
2026-05-04 23:49 ` Claude review: " Claude Code Review Bot
2026-04-30 22:20 ` [PATCH v2 03/12] drm/bridge: synopsys: dw-dp: Simplify driver data setting Sebastian Reichel
2026-05-04 23:49 ` Claude review: " Claude Code Review Bot
2026-04-30 22:20 ` [PATCH v2 04/12] drm/bridge: synopsys: dw-dp: Support MEDIA_BUS_FMT_FIXED Sebastian Reichel
2026-05-04 23:49 ` Claude review: " Claude Code Review Bot
2026-04-30 22:20 ` [PATCH v2 05/12] drm/bridge: synopsys: dw-dp: Add follow-up bridge support Sebastian Reichel
2026-05-04 23:49 ` Claude review: " Claude Code Review Bot
2026-04-30 22:20 ` [PATCH v2 06/12] drm/bridge: Add out-of-band HPD notify handler Sebastian Reichel
2026-05-04 23:49 ` Claude review: " Claude Code Review Bot
2026-04-30 22:20 ` [PATCH v2 07/12] drm/rockchip: dw_dp: Implement out-of-band HPD handling Sebastian Reichel
2026-05-04 23:49 ` Claude review: " Claude Code Review Bot
2026-04-30 22:20 ` [PATCH v2 08/12] drm/bridge: synopsys: dw-dp: Support software triggered OOB HPD Sebastian Reichel
2026-05-04 23:49 ` Claude review: " Claude Code Review Bot
2026-04-30 22:20 ` [PATCH v2 09/12] drm/bridge: synopsys: dw-dp: Add Runtime PM support Sebastian Reichel
2026-05-04 23:49 ` Claude review: " Claude Code Review Bot
2026-04-30 22:20 ` [PATCH v2 10/12] drm/rockchip: dw_dp: Add runtime " Sebastian Reichel
2026-05-04 23:49 ` Claude review: " Claude Code Review Bot
2026-04-30 22:20 ` [PATCH RFC v2 11/12] dt-bindings: display: rockchip: dw-dp: fix sound DAI cells Sebastian Reichel
2026-05-04 23:49 ` Claude review: " Claude Code Review Bot
2026-04-30 22:20 ` [PATCH v2 12/12] drm/bridge: synopsys: dw-dp: Add audio support Sebastian Reichel
2026-05-04 23:49 ` Claude Code Review Bot [this message]
2026-05-04 23:49 ` Claude review: Synopsys DisplayPort Controller improvements for Rockchip platforms Claude Code Review Bot
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-patch12-20260501-synopsys-dw-dp-improvements-v2-12-d7e7f6bac77f@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