9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] audiohda add cannon lake
@ 2023-07-27  3:11 Thaddeus Woskowiak
  2023-07-27 18:33 ` kemal
  0 siblings, 1 reply; 3+ messages in thread
From: Thaddeus Woskowiak @ 2023-07-27  3:11 UTC (permalink / raw)
  To: 9front

I have a Lenovo ThinkCentre M720 Tiny with an Intel Core i5-8500T and
B360 chipset. It has issues but this quick patch gets audio working:
http://okturing.com/src/16483/body

-taw

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9front] audiohda add cannon lake
  2023-07-27  3:11 [9front] audiohda add cannon lake Thaddeus Woskowiak
@ 2023-07-27 18:33 ` kemal
  2023-08-18 13:05   ` kemal
  0 siblings, 1 reply; 3+ messages in thread
From: kemal @ 2023-07-27 18:33 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

2023-07-27 6:11 GMT+03:00, Thaddeus Woskowiak <tswoskowiak@gmail.com>:
> I have a Lenovo ThinkCentre M720 Tiny with an Intel Core i5-8500T and
> B360 chipset. It has issues but this quick patch gets audio working:
> http://okturing.com/src/16483/body
>
> -taw
>

pci id assignment specification assigns the class 04:03 as HDA
https://pcisig.com/sites/default/files/files/PCI_Code-ID_r_1_11__v24_Jan_2019.pdf
checking the class id would allow the driver to attach any generic HDA device
i prepared a patch to do this, i kept the pci lookup table in case there is
some device with a broken pci class

[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 729 bytes --]

From: kemal <kemalinanc8@gmail.com>
Date: Thu, 27 Jul 2023 18:25:14 +0000
Subject: [PATCH] audiohda: detect hda devices using pci class id

---
diff 281c087865941281cbe656b5d7b44c15cfa68dfc 693b8be8be4be656b3108a2fc8eebb8fba94b1d2
--- 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;
 }
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9front] audiohda add cannon lake
  2023-07-27 18:33 ` kemal
@ 2023-08-18 13:05   ` kemal
  0 siblings, 0 replies; 3+ messages in thread
From: kemal @ 2023-08-18 13:05 UTC (permalink / raw)
  To: 9front

2023-07-27 21:33 GMT+03:00, kemal <kemalinanc8@gmail.com>:
> pci id assignment specification assigns the class 04:03 as HDA
> https://pcisig.com/sites/default/files/files/PCI_Code-ID_r_1_11__v24_Jan_2019.pdf
> checking the class id would allow the driver to attach any generic HDA
> device
> i prepared a patch to do this, i kept the pci lookup table in case there is
> some device with a broken pci class

ping

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-18 13:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-27  3:11 [9front] audiohda add cannon lake Thaddeus Woskowiak
2023-07-27 18:33 ` kemal
2023-08-18 13:05   ` kemal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).