Hello
Sorry, I made some mistake when a patch for Linus, that patch breaks
ac97_codec. I hope this time I am correct.
Ollie
diff -urN linux-2.3.45/drivers/sound/ac97_codec.c linux-2.3.45-sis7018/drivers/sound/ac97_codec.c
--- linux-2.3.45/drivers/sound/ac97_codec.c Mon Feb 14 10:50:12 2000
+++ linux-2.3.45-sis7018/drivers/sound/ac97_codec.c Tue Feb 15 09:01:29 2000
@@ -38,6 +38,8 @@
static int ac97_recmask_io(struct ac97_codec *codec, int rw, int mask);
static int ac97_mixer_ioctl(struct ac97_codec *codec, unsigned int cmd, unsigned long arg);
+static int sigmatel_init(struct ac97_codec * codec);
+
static struct {
unsigned int id;
char *name;
@@ -47,13 +49,14 @@
{0x41445340, "Analog Devices AD1881" , NULL},
{0x43525900, "Cirrus Logic CS4297" , NULL},
{0x43525913, "Cirrus Logic CS4297A" , NULL},
+ {0x43525903, "Crystal Semiconductor CS4297" , NULL},
{0x43525931, "Cirrus Logic CS4299" , NULL},
- {0x4e534331, "National Semiconductor LM4549", NULL},
+ {0x4e534331, "National Semiconductor LM4549" , NULL},
{0x83847600, "SigmaTel STAC????" , NULL},
{0x83847604, "SigmaTel STAC9701/3/4/5", NULL},
{0x83847605, "SigmaTel STAC9704" , NULL},
{0x83847608, "SigmaTel STAC9708" , NULL},
- {0x83847609, "SigmaTel STAC9721/23" , NULL},
+ {0x83847609, "SigmaTel STAC9721/23" , sigmatel_init},
{0x54524108, "TriTech TR28028" , NULL},
{0x574D4C00, "Wolfson WM9704" , NULL},
{0x00000000, NULL, NULL}
@@ -380,8 +383,8 @@
return -EINVAL;
/* do we ever want to touch the hardware? */
- val = codec->read_mixer(card, i);
- /* val = codec->mixer_state[i]; */
+ /* val = codec->read_mixer(codec, i); */
+ val = codec->mixer_state[i];
break;
}
return put_user(val, (int *)arg);
@@ -493,10 +496,13 @@
codec->codec_write(codec, AC97_RESET, 0L);
if ((cap = codec->codec_read(codec, AC97_RESET)) & 0x8000)
return 0;
-
+
+ codec->name = NULL;
+ codec->codec_init = NULL;
+
id1 = codec->codec_read(codec, AC97_VENDOR_ID1);
id2 = codec->codec_read(codec, AC97_VENDOR_ID2);
- for (i = 0, codec->name = NULL; i < arraysize (ac97_codec_ids[i]); i++) {
+ for (i = 0; ac97_codec_ids[i].id != 0; i++) {
if (ac97_codec_ids[i].id == ((id1 << 16) | id2)) {
codec->name = ac97_codec_ids[i].name;
codec->codec_init = ac97_codec_ids[i].init;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:28 EST