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
dbecaea6
Commit
dbecaea6
authored
Feb 21, 2004
by
Jaroslav Kysela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
ALSA<-OSS emulation Added period_frames to fix poll behavior
parent
5287a1ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
include/sound/pcm_oss.h
include/sound/pcm_oss.h
+1
-0
sound/core/oss/pcm_oss.c
sound/core/oss/pcm_oss.c
+3
-2
No files found.
include/sound/pcm_oss.h
View file @
dbecaea6
...
...
@@ -50,6 +50,7 @@ typedef struct _snd_pcm_oss_runtime {
unsigned
int
maxfrags
;
unsigned
int
subdivision
;
/* requested subdivision */
size_t
period_bytes
;
/* requested period size */
size_t
period_frames
;
/* period frames for poll */
size_t
period_ptr
;
/* actual write pointer to period */
unsigned
int
periods
;
size_t
buffer_bytes
;
/* requested buffer size */
...
...
sound/core/oss/pcm_oss.c
View file @
dbecaea6
...
...
@@ -254,6 +254,7 @@ static int snd_pcm_oss_period_size(snd_pcm_substream_t *substream,
snd_assert
(
oss_period_size
>=
16
,
return
-
EINVAL
);
runtime
->
oss
.
period_bytes
=
oss_period_size
;
runtime
->
oss
.
period_frames
=
oss_period_size
/
oss_frame_size
;
runtime
->
oss
.
periods
=
oss_periods
;
return
0
;
}
...
...
@@ -2098,7 +2099,7 @@ static int snd_pcm_oss_playback_ready(snd_pcm_substream_t *substream)
if
(
atomic_read
(
&
runtime
->
mmap_count
))
return
runtime
->
oss
.
prev_hw_ptr_interrupt
!=
runtime
->
hw_ptr_interrupt
;
else
return
snd_pcm_playback_
ready
(
substream
)
;
return
snd_pcm_playback_
avail
(
runtime
)
>=
runtime
->
oss
.
period_frames
;
}
static
int
snd_pcm_oss_capture_ready
(
snd_pcm_substream_t
*
substream
)
...
...
@@ -2107,7 +2108,7 @@ static int snd_pcm_oss_capture_ready(snd_pcm_substream_t *substream)
if
(
atomic_read
(
&
runtime
->
mmap_count
))
return
runtime
->
oss
.
prev_hw_ptr_interrupt
!=
runtime
->
hw_ptr_interrupt
;
else
return
snd_pcm_capture_
ready
(
substream
)
;
return
snd_pcm_capture_
avail
(
runtime
)
>=
runtime
->
oss
.
period_frames
;
}
static
unsigned
int
snd_pcm_oss_poll
(
struct
file
*
file
,
poll_table
*
wait
)
...
...
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