[PC-BSD Commits] r2461 - pcbsd/trunk/SoundDetect

svn at pcbsd.org svn at pcbsd.org
Mon Jul 28 11:35:36 PDT 2008


Author: melkor
Date: 2008-07-28 11:35:36 -0700 (Mon, 28 Jul 2008)
New Revision: 2461

Modified:
   pcbsd/trunk/SoundDetect/sound_detect.c
Log:

For last chance try the default vendor driver


Modified: pcbsd/trunk/SoundDetect/sound_detect.c
===================================================================
--- pcbsd/trunk/SoundDetect/sound_detect.c	2008-07-28 18:11:51 UTC (rev 2460)
+++ pcbsd/trunk/SoundDetect/sound_detect.c	2008-07-28 18:35:36 UTC (rev 2461)
@@ -39,11 +39,13 @@
 	struct pci_conf conf[255], *p;
 	int none_count = 0;
 	char chip_id[12];
+	char def_chip_id[12];
 	char vendor[12];
 	char kmodule[12];
 	short kldload_status ;
 
 	memset(chip_id,0,sizeof(chip_id));
+	memset(def_chip_id,0,sizeof(def_chip_id));
 	memset(kmodule,0,sizeof(kmodule));
 	memset(vendor,0,sizeof(vendor));
 
@@ -81,8 +83,14 @@
 			{
 
 				sprintf(chip_id,"0x%08x",((p->pc_device << 16) | p->pc_vendor)) ;
+				sprintf(def_chip_id,"0xffff%x",p->pc_vendor);
 				sprintf(vendor,"x%x",p->pc_vendor );
- 			        sprintf(kmodule,"%s",parse_Sound_CardXML(SOUNDCARD_XML,vendor, chip_id)); 
+ 			        sprintf(kmodule,"%s",parse_Sound_CardXML(SOUNDCARD_XML,vendor, chip_id));
+				// Try find default_chip_id 
+				if(!memcmp(kmodule,"UNKNOWN",7))
+				{
+					sprintf(kmodule,"%s",parse_Sound_CardXML(SOUNDCARD_XML,vendor, def_chip_id));
+				}
       				// Check if we have a unknown card
 				if(!memcmp(kmodule,"UNKNOWN",7))
  				{



More information about the Commits mailing list