Messages in this thread Patch in this message | | | Date | Wed, 1 Jan 2003 22:07:46 +0100 (MET) | From | Patrick McHardy <> | 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 | |