shithub: riscv

Download patch

ref: da308716c73a2b06f861e7535df425ca0dd62ee1
parent: 16a0a1066feea1d71ff4609b9264abfdd3bb31c5
author: kemal <kemalinanc8@gmail.com>
date: Thu Jul 27 14:25:14 EDT 2023

audiohda: detect hda devices using pci class id

--- a/sys/src/9/pc/audiohda.c
+++ b/sys/src/9/pc/audiohda.c
@@ -1758,7 +1758,9 @@
 static Pcidev*
 hdamatch(Pcidev *p)
 {
-	while(p = pcimatch(p, 0, 0))
+	while(p = pcimatch(p, 0, 0)){
+		if(p->ccrb == 0x04 && p->ccru == 0x03)
+			return p;
 		switch((p->vid << 16) | p->did){
 		case (0x8086 << 16) | 0x2668:	/* Intel ICH6 (untested) */
 		case (0x8086 << 16) | 0x27d8:	/* Intel ICH7 */
@@ -1812,6 +1814,7 @@
 		case (0x15ad << 16) | 0x1977:	/* Vmware */
 			return p;
 		}
+	}
 	return nil;
 }