lkml.org 
[lkml]   [2003]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] workaround for i810_audio troubles on Samsung VM7000 notebooks
Hi Alan,

this patch works around i810_audio/ac97_codec (falsely?) identifying my
codec as softmodem. I also swapped the order of AC97 1.0/2.0 softmodem
detection in i810_audio because (at least in my case) reading both
AC97_EXTENDED_MODEM_ID and AC97_RESET identified it as softmodem, so
AC97_EXTENDED_MODEM_ID check should go first for correct message to
appear.

Regards,
Patrick
diff -urN -X ../src/dontdiff linux-2.4.21-pre2-clean/drivers/sound/ac97_codec.c linux-2.4.21-pre2/drivers/sound/ac97_codec.c
--- linux-2.4.21-pre2-clean/drivers/sound/ac97_codec.c 2003-01-01 21:32:08.000000000 +0100
+++ linux-2.4.21-pre2/drivers/sound/ac97_codec.c 2003-01-01 21:39:26.000000000 +0100
@@ -157,6 +157,7 @@
{0x83847666, "SigmaTel STAC9750T", &sigmatel_9744_ops},
{0x83847684, "SigmaTel STAC9783/84?", &null_ops},
{0x57454301, "Winbond 83971D", &null_ops},
+ {0x43585442, "Samsung ????", &null_ops},
};

static const char *ac97_stereo_enhancements[] =
diff -urN -X ../src/dontdiff linux-2.4.21-pre2-clean/drivers/sound/i810_audio.c linux-2.4.21-pre2/drivers/sound/i810_audio.c
--- linux-2.4.21-pre2-clean/drivers/sound/i810_audio.c 2003-01-01 21:32:09.000000000 +0100
+++ linux-2.4.21-pre2/drivers/sound/i810_audio.c 2003-01-01 21:41:52.000000000 +0100
@@ -2916,15 +2916,16 @@
kfree(codec);
break;
}
+
+ /* Samsung codec built in VM7000 series Notebooks is falsely (?)
+ * identified as softmodem */

- /* Check for an AC97 1.0 soft modem (ID1) */
-
- if(codec->codec_read(codec, AC97_RESET) & 2)
+ if (codec->type == 0x43585442)
{
- printk(KERN_WARNING "i810_audio: codec %d is an AC97 1.0 softmodem - skipping.\n", ac97_id);
- kfree(codec);
- continue;
+ printk(KERN_WARNING "i810_audio: codec %d is a broken(?) Samsung codec, skipping softmodem check.\n", ac97_id);
+ goto skip_modem_check;
}
+

/* Check for an AC97 2.x soft modem */

@@ -2935,7 +2936,17 @@
kfree(codec);
continue;
}
-
+
+ /* Check for an AC97 1.0 soft modem (ID1) */
+
+ if(codec->codec_read(codec, AC97_RESET) & 2)
+ {
+ printk(KERN_WARNING "i810_audio: codec %d is an AC97 1.0 softmodem - skipping.\n", ac97_id);
+ kfree(codec);
+ continue;
+ }
+
+skip_modem_check:
card->ac97_features = eid;

/* Now check the codec for useful features to make up for
\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.040 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site