Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
2aad4762
Commit
2aad4762
authored
May 09, 2002
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge 2.4.x changes for old OSS ac97_codec driver:
* update Wolfson codec support * add new AC97 codec ids
parent
768c03fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
6 deletions
+45
-6
sound/oss/ac97_codec.c
sound/oss/ac97_codec.c
+45
-6
No files found.
sound/oss/ac97_codec.c
View file @
2aad4762
...
...
@@ -31,6 +31,8 @@
**************************************************************************
*
* History
* Mar 28, 2002 Randolph Bentson <bentson@holmsjoen.com>
* corrections to support WM9707 in ViewPad 1000
* v0.4 Mar 15 2000 Ollie Lho
* dual codecs support verified with 4 channels output
* v0.3 Feb 22 2000 Ollie Lho
...
...
@@ -59,7 +61,9 @@ static int ac97_mixer_ioctl(struct ac97_codec *codec, unsigned int cmd, unsigned
static
int
ac97_init_mixer
(
struct
ac97_codec
*
codec
);
static
int
wolfson_init
(
struct
ac97_codec
*
codec
);
static
int
wolfson_init00
(
struct
ac97_codec
*
codec
);
static
int
wolfson_init03
(
struct
ac97_codec
*
codec
);
static
int
wolfson_init04
(
struct
ac97_codec
*
codec
);
static
int
tritech_init
(
struct
ac97_codec
*
codec
);
static
int
tritech_maestro_init
(
struct
ac97_codec
*
codec
);
static
int
sigmatel_9708_init
(
struct
ac97_codec
*
codec
);
...
...
@@ -88,7 +92,9 @@ static int crystal_digital_control(struct ac97_codec *codec, int mode);
static
struct
ac97_ops
null_ops
=
{
NULL
,
NULL
,
NULL
};
static
struct
ac97_ops
default_ops
=
{
NULL
,
eapd_control
,
NULL
};
static
struct
ac97_ops
wolfson_ops
=
{
wolfson_init
,
NULL
,
NULL
};
static
struct
ac97_ops
wolfson_ops00
=
{
wolfson_init00
,
NULL
,
NULL
};
static
struct
ac97_ops
wolfson_ops03
=
{
wolfson_init03
,
NULL
,
NULL
};
static
struct
ac97_ops
wolfson_ops04
=
{
wolfson_init04
,
NULL
,
NULL
};
static
struct
ac97_ops
tritech_ops
=
{
tritech_init
,
NULL
,
NULL
};
static
struct
ac97_ops
tritech_m_ops
=
{
tritech_maestro_init
,
NULL
,
NULL
};
static
struct
ac97_ops
sigmatel_9708_ops
=
{
sigmatel_9708_init
,
NULL
,
NULL
};
...
...
@@ -114,6 +120,7 @@ static const struct {
{
0x414B4D01
,
"Asahi Kasei AK4542"
,
&
null_ops
},
{
0x414B4D02
,
"Asahi Kasei AK4543"
,
&
null_ops
},
{
0x414C4710
,
"ALC200/200P"
,
&
null_ops
},
{
0x414C4720
,
"ALC650"
,
&
null_ops
},
{
0x43525900
,
"Cirrus Logic CS4297"
,
&
default_ops
},
{
0x43525903
,
"Cirrus Logic CS4297"
,
&
default_ops
},
{
0x43525913
,
"Cirrus Logic CS4297A rev A"
,
&
default_ops
},
...
...
@@ -135,9 +142,9 @@ static const struct {
{
0x54524106
,
"TriTech TR28026"
,
&
null_ops
},
{
0x54524108
,
"TriTech TR28028"
,
&
tritech_ops
},
{
0x54524123
,
"TriTech TR A5"
,
&
null_ops
},
{
0x574D4C00
,
"Wolfson WM970
4"
,
&
wolfson_ops
},
{
0x574D4C03
,
"Wolfson WM9703/
9704"
,
&
wolfson_ops
},
{
0x574D4C04
,
"Wolfson WM9704
(quad)"
,
&
wolfson_ops
},
{
0x574D4C00
,
"Wolfson WM970
0A"
,
&
wolfson_ops00
},
{
0x574D4C03
,
"Wolfson WM9703/
WM9707"
,
&
wolfson_ops03
},
{
0x574D4C04
,
"Wolfson WM9704
M/WM9704Q"
,
&
wolfson_ops04
},
{
0x83847600
,
"SigmaTel STAC????"
,
&
null_ops
},
{
0x83847604
,
"SigmaTel STAC9701/3/4/5"
,
&
null_ops
},
{
0x83847605
,
"SigmaTel STAC9704"
,
&
null_ops
},
...
...
@@ -145,6 +152,7 @@ static const struct {
{
0x83847609
,
"SigmaTel STAC9721/23"
,
&
sigmatel_9721_ops
},
{
0x83847644
,
"SigmaTel STAC9744/45"
,
&
sigmatel_9744_ops
},
{
0x83847656
,
"SigmaTel STAC9756/57"
,
&
sigmatel_9744_ops
},
{
0x83847666
,
"SigmaTel STAC9750T"
,
&
sigmatel_9744_ops
},
{
0x83847684
,
"SigmaTel STAC9783/84?"
,
&
null_ops
},
{
0x57454301
,
"Winbond 83971D"
,
&
null_ops
},
};
...
...
@@ -837,7 +845,38 @@ static int sigmatel_9744_init(struct ac97_codec * codec)
}
static
int
wolfson_init
(
struct
ac97_codec
*
codec
)
static
int
wolfson_init00
(
struct
ac97_codec
*
codec
)
{
/* This initialization is suspect, but not known to be wrong.
It was copied from the initialization for the WM9704Q, but
that same sequence is known to fail for the WM9707. Thus
this warning may help someone with hardware to test
this code. */
codec
->
codec_write
(
codec
,
0x72
,
0x0808
);
codec
->
codec_write
(
codec
,
0x74
,
0x0808
);
// patch for DVD noise
codec
->
codec_write
(
codec
,
0x5a
,
0x0200
);
// init vol as PCM vol
codec
->
codec_write
(
codec
,
0x70
,
codec
->
codec_read
(
codec
,
AC97_PCMOUT_VOL
));
codec
->
codec_write
(
codec
,
AC97_SURROUND_MASTER
,
0x0000
);
return
0
;
}
static
int
wolfson_init03
(
struct
ac97_codec
*
codec
)
{
/* this is known to work for the ViewSonic ViewPad 1000 */
codec
->
codec_write
(
codec
,
0x72
,
0x0808
);
codec
->
codec_write
(
codec
,
0x20
,
0x8000
);
return
0
;
}
static
int
wolfson_init04
(
struct
ac97_codec
*
codec
)
{
codec
->
codec_write
(
codec
,
0x72
,
0x0808
);
codec
->
codec_write
(
codec
,
0x74
,
0x0808
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment