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
8fb892d4
Commit
8fb892d4
authored
May 10, 2004
by
Herbert Xu
Committed by
David S. Miller
May 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[sound/oss i810] remove divides on playback
This patch removes a couple of divides on the playback path.
parent
011fba7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
sound/oss/i810_audio.c
sound/oss/i810_audio.c
+4
-6
No files found.
sound/oss/i810_audio.c
View file @
8fb892d4
...
@@ -99,6 +99,7 @@
...
@@ -99,6 +99,7 @@
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/smp_lock.h>
#include <linux/smp_lock.h>
#include <linux/ac97_codec.h>
#include <linux/ac97_codec.h>
#include <linux/bitops.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/hardirq.h>
#include <asm/hardirq.h>
...
@@ -1000,6 +1001,7 @@ static int prog_dmabuf(struct i810_state *state, unsigned rec)
...
@@ -1000,6 +1001,7 @@ static int prog_dmabuf(struct i810_state *state, unsigned rec)
dmabuf
->
numfrag
=
SG_LEN
;
dmabuf
->
numfrag
=
SG_LEN
;
dmabuf
->
fragsize
=
dmabuf
->
dmasize
/
dmabuf
->
numfrag
;
dmabuf
->
fragsize
=
dmabuf
->
dmasize
/
dmabuf
->
numfrag
;
dmabuf
->
fragsamples
=
dmabuf
->
fragsize
>>
1
;
dmabuf
->
fragsamples
=
dmabuf
->
fragsize
>>
1
;
dmabuf
->
fragshift
=
ffs
(
dmabuf
->
fragsize
)
-
1
;
dmabuf
->
userfragsize
=
dmabuf
->
ossfragsize
;
dmabuf
->
userfragsize
=
dmabuf
->
ossfragsize
;
dmabuf
->
userfrags
=
dmabuf
->
dmasize
/
dmabuf
->
ossfragsize
;
dmabuf
->
userfrags
=
dmabuf
->
dmasize
/
dmabuf
->
ossfragsize
;
...
@@ -1007,16 +1009,12 @@ static int prog_dmabuf(struct i810_state *state, unsigned rec)
...
@@ -1007,16 +1009,12 @@ static int prog_dmabuf(struct i810_state *state, unsigned rec)
if
(
dmabuf
->
ossmaxfrags
==
4
)
{
if
(
dmabuf
->
ossmaxfrags
==
4
)
{
fragint
=
8
;
fragint
=
8
;
dmabuf
->
fragshift
=
2
;
}
else
if
(
dmabuf
->
ossmaxfrags
==
8
)
{
}
else
if
(
dmabuf
->
ossmaxfrags
==
8
)
{
fragint
=
4
;
fragint
=
4
;
dmabuf
->
fragshift
=
3
;
}
else
if
(
dmabuf
->
ossmaxfrags
==
16
)
{
}
else
if
(
dmabuf
->
ossmaxfrags
==
16
)
{
fragint
=
2
;
fragint
=
2
;
dmabuf
->
fragshift
=
4
;
}
else
{
}
else
{
fragint
=
1
;
fragint
=
1
;
dmabuf
->
fragshift
=
5
;
}
}
/*
/*
* Now set up the ring
* Now set up the ring
...
@@ -1113,7 +1111,7 @@ static void __i810_update_lvi(struct i810_state *state, int rec)
...
@@ -1113,7 +1111,7 @@ static void __i810_update_lvi(struct i810_state *state, int rec)
/* MASKP2(swptr, fragsize) - 1 is the tail of our transfer */
/* MASKP2(swptr, fragsize) - 1 is the tail of our transfer */
x
=
MODULOP2
(
MASKP2
(
dmabuf
->
swptr
,
fragsize
)
-
1
,
dmabuf
->
dmasize
);
x
=
MODULOP2
(
MASKP2
(
dmabuf
->
swptr
,
fragsize
)
-
1
,
dmabuf
->
dmasize
);
x
/=
fragsize
;
x
>>=
dmabuf
->
fragshift
;
outb
(
x
,
port
+
OFF_LVI
);
outb
(
x
,
port
+
OFF_LVI
);
}
}
...
@@ -1708,7 +1706,7 @@ static ssize_t i810_write(struct file *file, const char *buffer, size_t count, l
...
@@ -1708,7 +1706,7 @@ static ssize_t i810_write(struct file *file, const char *buffer, size_t count, l
goto
ret
;
goto
ret
;
}
}
swptr
=
(
swptr
+
cnt
)
%
dmabuf
->
dmasize
;
swptr
=
MODULOP2
(
swptr
+
cnt
,
dmabuf
->
dmasize
)
;
spin_lock_irqsave
(
&
state
->
card
->
lock
,
flags
);
spin_lock_irqsave
(
&
state
->
card
->
lock
,
flags
);
if
(
PM_SUSPENDED
(
card
))
{
if
(
PM_SUSPENDED
(
card
))
{
...
...
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