Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
external_tinyalsa
Commits
ad5e1116
Commit
ad5e1116
authored
9 years ago
by
Dylan Reid
Committed by
Android (Google) Code Review
9 years ago
Browse files
Options
Download
Plain Diff
Merge changes I61375a73,Iffe85dd8 into mnc-dr-dev
* changes: Add pcm_get_poll_fd Export pcm_mmap_avail
parents
875ff85c
b42510d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
include/tinyalsa/asoundlib.h
include/tinyalsa/asoundlib.h
+2
-0
pcm.c
pcm.c
+6
-1
No files found.
include/tinyalsa/asoundlib.h
View file @
ad5e1116
...
...
@@ -235,6 +235,7 @@ int pcm_mmap_read(struct pcm *pcm, void *data, unsigned int count);
int
pcm_mmap_begin
(
struct
pcm
*
pcm
,
void
**
areas
,
unsigned
int
*
offset
,
unsigned
int
*
frames
);
int
pcm_mmap_commit
(
struct
pcm
*
pcm
,
unsigned
int
offset
,
unsigned
int
frames
);
int
pcm_mmap_avail
(
struct
pcm
*
pcm
);
/* Prepare the PCM substream to be triggerable */
int
pcm_prepare
(
struct
pcm
*
pcm
);
...
...
@@ -247,6 +248,7 @@ int pcm_ioctl(struct pcm *pcm, int request, ...);
/* Interrupt driven API */
int
pcm_wait
(
struct
pcm
*
pcm
,
int
timeout
);
int
pcm_get_poll_fd
(
struct
pcm
*
pcm
);
/* Change avail_min after the stream has been opened with no need to stop the stream.
* Only accepted if opened with PCM_MMAP and PCM_NOIRQ flags
...
...
This diff is collapsed.
Click to expand it.
pcm.c
View file @
ad5e1116
...
...
@@ -1059,7 +1059,7 @@ static inline int pcm_mmap_capture_avail(struct pcm *pcm)
return
avail
;
}
static
inline
int
pcm_mmap_avail
(
struct
pcm
*
pcm
)
int
pcm_mmap_avail
(
struct
pcm
*
pcm
)
{
pcm_sync_ptr
(
pcm
,
SNDRV_PCM_SYNC_PTR_HWSYNC
);
if
(
pcm
->
flags
&
PCM_IN
)
...
...
@@ -1180,6 +1180,11 @@ int pcm_wait(struct pcm *pcm, int timeout)
return
1
;
}
int
pcm_get_poll_fd
(
struct
pcm
*
pcm
)
{
return
pcm
->
fd
;
}
int
pcm_mmap_transfer
(
struct
pcm
*
pcm
,
const
void
*
buffer
,
unsigned
int
bytes
)
{
int
err
=
0
,
frames
,
avail
;
...
...
This diff is collapsed.
Click to expand it.
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