From: kemal <kemalinanc8@gmail.com>
To: 9front@9front.org
Subject: [9front] audiohda: detect hda devices using pci class id
Date: Sun, 17 Sep 2023 16:16:56 +0300 [thread overview]
Message-ID: <CABO6sheXxde-o3ttOgiPjRJ_wiTVceB24urMcrNkDATv2+kUOw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 342 bytes --]
ping:
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: audiohda.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;
}
next reply other threads:[~2023-09-17 13:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-17 13:16 kemal [this message]
2023-09-17 18:26 ` ori
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=CABO6sheXxde-o3ttOgiPjRJ_wiTVceB24urMcrNkDATv2+kUOw@mail.gmail.com \
--to=kemalinanc8@gmail.com \
--cc=9front@9front.org \
/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;
as well as URLs for NNTP newsgroup(s).