[PC-BSD Commits] r2328 - pcbsd/trunk/SoundDetect
svn at pcbsd.org
svn at pcbsd.org
Mon Jul 14 08:12:21 PDT 2008
Author: kris
Date: 2008-07-14 08:12:21 -0700 (Mon, 14 Jul 2008)
New Revision: 2328
Modified:
pcbsd/trunk/SoundDetect/parse_sound.c
pcbsd/trunk/SoundDetect/sound_detect.c
pcbsd/trunk/SoundDetect/soundcards.xml
Log:
Update the sound_detect program, to not just load snd_driver anymore, is the
cause of a large number of crashes on FreeBSD 7.
Modified: pcbsd/trunk/SoundDetect/parse_sound.c
===================================================================
--- pcbsd/trunk/SoundDetect/parse_sound.c 2008-07-14 15:10:59 UTC (rev 2327)
+++ pcbsd/trunk/SoundDetect/parse_sound.c 2008-07-14 15:12:21 UTC (rev 2328)
@@ -37,7 +37,7 @@
cur = cur->next;
}
xmlFree(key);
- return "snd_driver";
+ return "UNKNOWN";
}
@@ -53,7 +53,7 @@
static char kernelmodule[12];
doc = xmlParseFile(docname);
- sprintf(kernelmodule,"%s","snd_driver");
+ sprintf(kernelmodule,"%s","UNKNOWN");
if (doc == NULL ) {
fprintf(stderr,"/PCBSD/soundDetect/soundcards.xml not found!\n");
Modified: pcbsd/trunk/SoundDetect/sound_detect.c
===================================================================
--- pcbsd/trunk/SoundDetect/sound_detect.c 2008-07-14 15:10:59 UTC (rev 2327)
+++ pcbsd/trunk/SoundDetect/sound_detect.c 2008-07-14 15:12:21 UTC (rev 2328)
@@ -83,24 +83,30 @@
sprintf(chip_id,"0x%08x",((p->pc_device << 16) | p->pc_vendor)) ;
sprintf(vendor,"x%x",p->pc_vendor );
sprintf(kmodule,"%s",parse_Sound_CardXML(SOUNDCARD_XML,vendor, chip_id));
- if(kldload(kmodule) <0)
- {
- warn("\nError loading module...%s",kmodule);
- }else{
- if(memcmp(kmodule,"snd_driver",10))
- {
- printf("Loaded sound module: %s.\n",kmodule);
- }else {
+ // Check if we have a unknown card
+ if(!memcmp(kmodule,"UNKNOWN",7))
+ {
if (called != ALREADY_CALLED)
{
update_soundcards_xml();
- }else {
- printf("Could not locate a driver for the sound card.\n");
- printf("snd_driver was loaded..\n");
- printf("Please send us the output of' pciconf -lv' to support at pcbsd.org\n");
- }
+ exit(0);
}
+
+ printf("\nUnidentified sound card!");
+ printf("\nPlease report the make & model to support at lists.pcbsd.org\n");
+ system("touch /tmp/unknownSound");
+ sleep(3);
+ exit(1);
}
+
+ if(kldload(kmodule) <0)
+ {
+ warn("\nError loading module...%s",kmodule);
+ sleep(3);
+ exit(1);
+ }else{
+ printf("Loaded sound module: %s.\n",kmodule);
+ }
}
}
Modified: pcbsd/trunk/SoundDetect/soundcards.xml
===================================================================
--- pcbsd/trunk/SoundDetect/soundcards.xml 2008-07-14 15:10:59 UTC (rev 2327)
+++ pcbsd/trunk/SoundDetect/soundcards.xml 2008-07-14 15:12:21 UTC (rev 2328)
@@ -17,7 +17,10 @@
<snd_ich>0x008a10de</snd_ich>
<snd_ich>0x00da10de</snd_ich>
<snd_ich>0x026b10de</snd_ich>
+ <snd_ich>0x00ea10de</snd_ich>
<snd_hda>0x00da10de</snd_hda>
+ <snd_hda>0x03f010de</snd_hda>
+ <snd_hda>0x037110de</snd_hda>
</x10de>
<!--End Nvidia -->
@@ -38,6 +41,7 @@
<snd_ich>0x24258086</snd_ich>
<snd_ich>0x71958086</snd_ich>
<snd_hda>0x26688086</snd_hda>
+ <snd_hda>0x284b8086</snd_hda>
</x8086>
<!--End intel -->
More information about the Commits
mailing list