lkml.org 
[lkml]   [2000]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: ac97_codec.c won't compile/2.3.45
sigh, here is a patch which compiles :)

--
Jeff Garzik | Writing software is
Building 1024 | more fun than working.
MandrakeSoft, Inc. | -AnonIndex: drivers/sound/ac97_codec.c
===================================================================
RCS file: /g/cvslan/linux_2_3/drivers/sound/ac97_codec.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 ac97_codec.c
--- drivers/sound/ac97_codec.c 2000/02/14 03:54:22 1.1.1.3
+++ drivers/sound/ac97_codec.c 2000/02/14 18:28:21
@@ -38,11 +38,12 @@
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 struct {
+struct ac97_codec_id_info {
unsigned int id;
char *name;
int (*init) (struct ac97_codec *codec);
-} ac97_codec_ids[] = {
+};
+static struct ac97_codec_id_info ac97_codec_ids[] = {
{0x414B4D00, "Asahi Kasei AK4540" , NULL},
{0x41445340, "Analog Devices AD1881" , NULL},
{0x43525900, "Cirrus Logic CS4297" , NULL},
@@ -58,6 +59,7 @@
{0x574D4C00, "Wolfson WM9704" , NULL},
{0x00000000, NULL, NULL}
};
+#define N_CODEC_IDS (sizeof(ac97_codec_ids) / sizeof(struct ac97_codec_id_info))

static const char *ac97_stereo_enhancements[] =
{
@@ -380,7 +382,7 @@
return -EINVAL;

/* do we ever want to touch the hardware? */
- val = codec->read_mixer(card, i);
+ val = codec->read_mixer(codec, i);
/* val = codec->mixer_state[i]; */
break;
}
@@ -496,7 +498,7 @@

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, codec->name = NULL; i < N_CODEC_IDS; 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;
@@ -543,6 +545,7 @@
return 1;
}

+#if 0
static int sigmatel_init(struct ac97_codec * codec)
{
codec->codec_write(codec, AC97_SURROUND_MASTER, 0L);
@@ -550,6 +553,7 @@
codec->codec_write(codec, 0x74, 0x01);
return 1;
}
+#endif

EXPORT_SYMBOL(ac97_read_proc);
EXPORT_SYMBOL(ac97_probe_codec);
\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.052 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site