diff options
author | John Grossman | 2012-04-03 18:37:38 -0500 |
---|---|---|
committer | John Grossman | 2012-04-03 18:59:59 -0500 |
commit | 673253acf06838bb24d0b0b1a3962bed573855b8 (patch) | |
tree | c6c8a6a063171ec87872f40e585b13dc5e757a3a /include/tinyalsa | |
parent | 1b32ddfd35e54b0a6ef1e43ca35dbc1547e5676a (diff) | |
download | platform-external-tinyalsa-673253acf06838bb24d0b0b1a3962bed573855b8.tar.gz platform-external-tinyalsa-673253acf06838bb24d0b0b1a3962bed573855b8.tar.xz platform-external-tinyalsa-673253acf06838bb24d0b0b1a3962bed573855b8.zip |
tinyalsa: Add PCM_NORESTART flag.
Add a flag which can be passed to pcm_open (called PCM_NORESTART).
When set on a playback stream, calls to pcm_write will not
automatically attempt to restart an ALSA device in the case of an
underflow. Instead, it will propagate the first EPIPE error up to the
application to allow it to handle the underflow situation. Subsequent
calls to pcm_write will attempt to start the pipeline.
Change-Id: If17973c6de9079c4227631bac9ff09b218377344
Signed-off-by: John Grossman <johngro@google.com>
Diffstat (limited to 'include/tinyalsa')
-rw-r--r-- | include/tinyalsa/asoundlib.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h index d6409fe..cb70439 100644 --- a/include/tinyalsa/asoundlib.h +++ b/include/tinyalsa/asoundlib.h | |||
@@ -45,6 +45,15 @@ struct pcm; | |||
45 | #define PCM_IN 0x10000000 | 45 | #define PCM_IN 0x10000000 |
46 | #define PCM_MMAP 0x00000001 | 46 | #define PCM_MMAP 0x00000001 |
47 | #define PCM_NOIRQ 0x00000002 | 47 | #define PCM_NOIRQ 0x00000002 |
48 | #define PCM_NORESTART 0x00000004 /* PCM_NORESTART - when set, calls to | ||
49 | * pcm_write for a playback stream will not | ||
50 | * attempt to restart the stream in the case | ||
51 | * of an underflow, but will return -EPIPE | ||
52 | * instead. After the first -EPIPE error, the | ||
53 | * stream is considered to be stopped, and a | ||
54 | * second call to pcm_write will attempt to | ||
55 | * restart the stream. | ||
56 | */ | ||
48 | 57 | ||
49 | /* PCM runtime states */ | 58 | /* PCM runtime states */ |
50 | #define PCM_STATE_OPEN 0 | 59 | #define PCM_STATE_OPEN 0 |