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
nexedi
linux
Commits
ba8add90
Commit
ba8add90
authored
Mar 23, 2003
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] bring OSS mad16 in sync with 2.4
parent
dafb1e82
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
26 deletions
+42
-26
sound/oss/mad16.c
sound/oss/mad16.c
+42
-26
No files found.
sound/oss/mad16.c
View file @
ba8add90
...
@@ -365,6 +365,8 @@ static int __init init_c930(struct address_info *hw_config)
...
@@ -365,6 +365,8 @@ static int __init init_c930(struct address_info *hw_config)
{
{
unsigned
char
cfg
=
0
;
unsigned
char
cfg
=
0
;
cfg
|=
(
0x0f
&
mad16_conf
);
if
(
c931_detected
)
if
(
c931_detected
)
{
{
/* Bit 0 has reversd meaning. Bits 1 and 2 sese
/* Bit 0 has reversd meaning. Bits 1 and 2 sese
...
@@ -402,7 +404,10 @@ static int __init init_c930(struct address_info *hw_config)
...
@@ -402,7 +404,10 @@ static int __init init_c930(struct address_info *hw_config)
and the C931. */
and the C931. */
cfg
=
c931_detected
?
0x04
:
0x00
;
cfg
=
c931_detected
?
0x04
:
0x00
;
mad_write
(
MC4_PORT
,
0x52
|
cfg
);
if
(
mad16_cdsel
&
0x20
)
mad_write
(
MC4_PORT
,
0x62
|
cfg
);
/* opl4 */
else
mad_write
(
MC4_PORT
,
0x52
|
cfg
);
/* opl3 */
mad_write
(
MC5_PORT
,
0x3C
);
/* Init it into mode2 */
mad_write
(
MC5_PORT
,
0x3C
);
/* Init it into mode2 */
mad_write
(
MC6_PORT
,
0x02
);
/* Enable WSS, Disable MPU and SB */
mad_write
(
MC6_PORT
,
0x02
);
/* Enable WSS, Disable MPU and SB */
...
@@ -529,10 +534,12 @@ static int __init probe_mad16(struct address_info *hw_config)
...
@@ -529,10 +534,12 @@ static int __init probe_mad16(struct address_info *hw_config)
return
init_c930
(
hw_config
);
return
init_c930
(
hw_config
);
for
(
i
=
0xf8d
;
i
<=
0xf93
;
i
++
)
for
(
i
=
0xf8d
;
i
<=
0xf93
;
i
++
)
{
if
(
!
c924pnp
)
if
(
!
c924pnp
)
DDB
(
printk
(
"port %03x = %02x
\n
"
,
i
,
mad_read
(
i
)))
else
DDB
(
printk
(
"port %03x = %02x
\n
"
,
i
,
mad_read
(
i
)))
else
DDB
(
printk
(
"port %03x = %02x
\n
"
,
i
-
0x80
,
mad_read
(
i
)));
DDB
(
printk
(
"port %03x = %02x
\n
"
,
i
-
0x80
,
mad_read
(
i
)));
}
/*
/*
* Set the WSS address
* Set the WSS address
...
@@ -559,10 +566,10 @@ static int __init probe_mad16(struct address_info *hw_config)
...
@@ -559,10 +566,10 @@ static int __init probe_mad16(struct address_info *hw_config)
*/
*/
tmp
&=
~
0x0f
;
tmp
&=
~
0x0f
;
tmp
|=
(
mad16_conf
&
0x0f
);
/* CD-ROM and joystick bits */
mad_write
(
MC1_PORT
,
tmp
);
mad_write
(
MC1_PORT
,
tmp
);
tmp
=
mad_read
(
MC2_PORT
);
tmp
=
mad16_cdsel
;
mad_write
(
MC2_PORT
,
tmp
);
mad_write
(
MC2_PORT
,
tmp
);
mad_write
(
MC3_PORT
,
0xf0
);
/* Disable SB */
mad_write
(
MC3_PORT
,
0xf0
);
/* Disable SB */
...
@@ -590,9 +597,12 @@ static int __init probe_mad16(struct address_info *hw_config)
...
@@ -590,9 +597,12 @@ static int __init probe_mad16(struct address_info *hw_config)
mad_write
(
MC5_PORT
,
0x30
|
cs4231_mode
);
mad_write
(
MC5_PORT
,
0x30
|
cs4231_mode
);
}
}
for
(
i
=
0xf8d
;
i
<=
0xf93
;
i
++
)
if
(
!
c924pnp
)
for
(
i
=
0xf8d
;
i
<=
0xf93
;
i
++
)
{
DDB
(
printk
(
"port %03x after init = %02x
\n
"
,
i
,
mad_read
(
i
)))
else
if
(
!
c924pnp
)
DDB
(
printk
(
"port %03x after init = %02x
\n
"
,
i
,
mad_read
(
i
)))
else
DDB
(
printk
(
"port %03x after init = %02x
\n
"
,
i
-
0x80
,
mad_read
(
i
)));
DDB
(
printk
(
"port %03x after init = %02x
\n
"
,
i
-
0x80
,
mad_read
(
i
)));
}
wss_init
(
hw_config
);
wss_init
(
hw_config
);
return
1
;
return
1
;
...
@@ -879,7 +889,7 @@ static int __initdata cdirq = 0;
...
@@ -879,7 +889,7 @@ static int __initdata cdirq = 0;
static
int
__initdata
cdport
=
0x340
;
static
int
__initdata
cdport
=
0x340
;
static
int
__initdata
cddma
=
-
1
;
static
int
__initdata
cddma
=
-
1
;
static
int
__initdata
opl4
=
0
;
static
int
__initdata
opl4
=
0
;
static
int
__initdata
joystick
=
1
;
static
int
__initdata
joystick
=
0
;
MODULE_PARM
(
mpu_io
,
"i"
);
MODULE_PARM
(
mpu_io
,
"i"
);
MODULE_PARM
(
mpu_irq
,
"i"
);
MODULE_PARM
(
mpu_irq
,
"i"
);
...
@@ -1049,6 +1059,12 @@ static void __exit cleanup_mad16(void)
...
@@ -1049,6 +1059,12 @@ static void __exit cleanup_mad16(void)
{
{
if
(
found_mpu
)
if
(
found_mpu
)
unload_mad16_mpu
(
&
cfg_mpu
);
unload_mad16_mpu
(
&
cfg_mpu
);
if
(
gameport
.
io
)
{
/* the gameport was initialized so we must free it up */
gameport_unregister_port
(
&
gameport
);
gameport
.
io
=
0
;
release_region
(
0x201
,
1
);
}
unload_mad16
(
&
cfg
);
unload_mad16
(
&
cfg
);
}
}
...
...
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