Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156467640
D55473.id172552.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55473.id172552.diff
View Options
diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c
--- a/sys/dev/sound/pci/hda/hdaa.c
+++ b/sys/dev/sound/pci/hda/hdaa.c
@@ -3268,10 +3268,52 @@
first = seq;
/* Check association correctness. */
if (as[cnt].pins[seq] != 0) {
- device_printf(devinfo->dev, "%s: Duplicate pin %d (%d) "
- "in association %d! Disabling association.\n",
- __func__, seq, w->nid, j);
- as[cnt].enable = 0;
+ int newseq = -1;
+
+ /*
+ * Some firmware (e.g. Apple EFI on Mac hardware)
+ * assigns seq=0 to all HDMI/DP output pins in
+ * an association. Reassign the duplicate to
+ * the next free slot rather than disabling the
+ * whole association. Limit to seq=0 duplicates:
+ * any other duplicate sequence is more likely a
+ * genuine firmware error and should still disable.
+ */
+ if (seq == 0 && dir == HDAA_CTL_OUT &&
+ HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(
+ w->param.widget_cap) &&
+ (HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap) ||
+ HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap))) {
+ int s;
+
+ for (s = 1; s < 16; s++) {
+ int cand = (seq + s) % 16;
+ if (as[cnt].pins[cand] == 0) {
+ newseq = cand;
+ break;
+ }
+ }
+ }
+ if (newseq >= 0) {
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "%s: Duplicate pin %d (%d) "
+ "in association %d, "
+ "reassigning to seq %d.\n",
+ __func__, seq, w->nid,
+ j, newseq);
+ );
+ seq = newseq;
+ if (newseq < first)
+ first = newseq;
+ } else {
+ device_printf(devinfo->dev,
+ "%s: Duplicate pin %d (%d) "
+ "in association %d! "
+ "Disabling association.\n",
+ __func__, seq, w->nid, j);
+ as[cnt].enable = 0;
+ }
}
if (dir != as[cnt].dir) {
device_printf(devinfo->dev, "%s: Pin %d has wrong "
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 14, 9:24 PM (11 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28980594
Default Alt Text
D55473.id172552.diff (1 KB)
Attached To
Mode
D55473: hdaa: reassign duplicate HDMI/DP pin sequences instead of disabling
Attached
Detach File
Event Timeline
Log In to Comment