Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 1 | /* asoundlib.h |
| 2 | ** |
| 3 | ** Copyright 2011, The Android Open Source Project |
| 4 | ** |
| 5 | ** Redistribution and use in source and binary forms, with or without |
| 6 | ** modification, are permitted provided that the following conditions are met: |
| 7 | ** * Redistributions of source code must retain the above copyright |
| 8 | ** notice, this list of conditions and the following disclaimer. |
| 9 | ** * Redistributions in binary form must reproduce the above copyright |
| 10 | ** notice, this list of conditions and the following disclaimer in the |
| 11 | ** documentation and/or other materials provided with the distribution. |
| 12 | ** * Neither the name of The Android Open Source Project nor the names of |
| 13 | ** its contributors may be used to endorse or promote products derived |
| 14 | ** from this software without specific prior written permission. |
| 15 | ** |
| 16 | ** THIS SOFTWARE IS PROVIDED BY The Android Open Source Project ``AS IS'' AND |
| 17 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 18 | ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 19 | ** ARE DISCLAIMED. IN NO EVENT SHALL The Android Open Source Project BE LIABLE |
| 20 | ** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 21 | ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 22 | ** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 23 | ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 24 | ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 25 | ** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
| 26 | ** DAMAGE. |
| 27 | */ |
| 28 | |
| 29 | #ifndef ASOUNDLIB_H |
| 30 | #define ASOUNDLIB_H |
| 31 | |
Simon Wilson | dd88f13 | 2011-07-25 10:58:30 -0700 | [diff] [blame] | 32 | #include <sys/time.h> |
Simon Wilson | da39e0b | 2012-11-09 15:16:47 -0800 | [diff] [blame] | 33 | #include <stddef.h> |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 34 | |
Simon Wilson | c123962 | 2011-07-27 15:08:34 -0700 | [diff] [blame] | 35 | #if defined(__cplusplus) |
| 36 | extern "C" { |
| 37 | #endif |
| 38 | |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 39 | /* |
| 40 | * PCM API |
| 41 | */ |
| 42 | |
| 43 | struct pcm; |
| 44 | |
| 45 | #define PCM_OUT 0x00000000 |
| 46 | #define PCM_IN 0x10000000 |
Simon Wilson | e9942c8 | 2011-10-13 13:57:25 -0700 | [diff] [blame] | 47 | #define PCM_MMAP 0x00000001 |
| 48 | #define PCM_NOIRQ 0x00000002 |
John Grossman | 673253a | 2012-04-03 16:37:38 -0700 | [diff] [blame] | 49 | #define PCM_NORESTART 0x00000004 /* PCM_NORESTART - when set, calls to |
| 50 | * pcm_write for a playback stream will not |
| 51 | * attempt to restart the stream in the case |
| 52 | * of an underflow, but will return -EPIPE |
| 53 | * instead. After the first -EPIPE error, the |
| 54 | * stream is considered to be stopped, and a |
| 55 | * second call to pcm_write will attempt to |
| 56 | * restart the stream. |
| 57 | */ |
Glenn Kasten | 6b0a206 | 2013-08-22 15:11:48 -0700 | [diff] [blame] | 58 | #define PCM_MONOTONIC 0x00000008 /* see pcm_get_htimestamp */ |
Simon Wilson | e9942c8 | 2011-10-13 13:57:25 -0700 | [diff] [blame] | 59 | |
| 60 | /* PCM runtime states */ |
| 61 | #define PCM_STATE_OPEN 0 |
| 62 | #define PCM_STATE_SETUP 1 |
| 63 | #define PCM_STATE_PREPARED 2 |
| 64 | #define PCM_STATE_RUNNING 3 |
| 65 | #define PCM_STATE_XRUN 4 |
| 66 | #define PCM_STATE_DRAINING 5 |
| 67 | #define PCM_STATE_PAUSED 6 |
| 68 | #define PCM_STATE_SUSPENDED 7 |
| 69 | #define PCM_STATE_DISCONNECTED 8 |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 70 | |
| 71 | /* Bit formats */ |
| 72 | enum pcm_format { |
Glenn Kasten | 8863816 | 2014-07-15 10:52:31 -0700 | [diff] [blame] | 73 | PCM_FORMAT_INVALID = -1, |
Paul McLean | b25ece4 | 2014-03-21 15:27:34 -0700 | [diff] [blame] | 74 | PCM_FORMAT_S16_LE = 0, /* 16-bit signed */ |
| 75 | PCM_FORMAT_S32_LE, /* 32-bit signed */ |
| 76 | PCM_FORMAT_S8, /* 8-bit signed */ |
| 77 | PCM_FORMAT_S24_LE, /* 24-bits in 4-bytes */ |
| 78 | PCM_FORMAT_S24_3LE, /* 24-bits in 3-bytes */ |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 79 | |
| 80 | PCM_FORMAT_MAX, |
| 81 | }; |
| 82 | |
Andy Hung | a5b44d9 | 2014-03-10 18:08:15 -0700 | [diff] [blame] | 83 | /* Bitmask has 256 bits (32 bytes) in asound.h */ |
| 84 | struct pcm_mask { |
| 85 | unsigned int bits[32 / sizeof(unsigned int)]; |
| 86 | }; |
| 87 | |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 88 | /* Configuration for a stream */ |
| 89 | struct pcm_config { |
| 90 | unsigned int channels; |
| 91 | unsigned int rate; |
| 92 | unsigned int period_size; |
| 93 | unsigned int period_count; |
| 94 | enum pcm_format format; |
Simon Wilson | c123962 | 2011-07-27 15:08:34 -0700 | [diff] [blame] | 95 | |
Maneet Singh | e25fe0b | 2015-06-11 17:34:40 -0700 | [diff] [blame] | 96 | /* Values to use for the ALSA start, stop and silence thresholds, and |
| 97 | * silence size. Setting any one of these values to 0 will cause the |
| 98 | * default tinyalsa values to be used instead. |
| 99 | * Tinyalsa defaults are as follows. |
Simon Wilson | c123962 | 2011-07-27 15:08:34 -0700 | [diff] [blame] | 100 | * |
| 101 | * start_threshold : period_count * period_size |
| 102 | * stop_threshold : period_count * period_size |
| 103 | * silence_threshold : 0 |
Maneet Singh | e25fe0b | 2015-06-11 17:34:40 -0700 | [diff] [blame] | 104 | * silence_size : 0 |
Simon Wilson | c123962 | 2011-07-27 15:08:34 -0700 | [diff] [blame] | 105 | */ |
| 106 | unsigned int start_threshold; |
| 107 | unsigned int stop_threshold; |
| 108 | unsigned int silence_threshold; |
Christopher R. Palmer | 6240f8d | 2015-11-28 07:32:13 -0500 | [diff] [blame] | 109 | #ifndef IGNORE_SILENCE_SIZE |
Maneet Singh | e25fe0b | 2015-06-11 17:34:40 -0700 | [diff] [blame] | 110 | unsigned int silence_size; |
Christopher R. Palmer | 6240f8d | 2015-11-28 07:32:13 -0500 | [diff] [blame] | 111 | #endif |
Glenn Kasten | 4c0f7e8 | 2012-01-19 13:35:28 -0800 | [diff] [blame] | 112 | |
| 113 | /* Minimum number of frames available before pcm_mmap_write() will actually |
| 114 | * write into the kernel buffer. Only used if the stream is opened in mmap mode |
| 115 | * (pcm_open() called with PCM_MMAP flag set). Use 0 for default. |
| 116 | */ |
Eric Laurent | 73b9c67 | 2011-10-14 11:12:24 -0700 | [diff] [blame] | 117 | int avail_min; |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 118 | }; |
| 119 | |
Simon Wilson | 42fc2d3 | 2012-12-03 11:18:57 -0800 | [diff] [blame] | 120 | /* PCM parameters */ |
| 121 | enum pcm_param |
| 122 | { |
Andy Hung | a5b44d9 | 2014-03-10 18:08:15 -0700 | [diff] [blame] | 123 | /* mask parameters */ |
| 124 | PCM_PARAM_ACCESS, |
| 125 | PCM_PARAM_FORMAT, |
| 126 | PCM_PARAM_SUBFORMAT, |
| 127 | /* interval parameters */ |
Simon Wilson | 42fc2d3 | 2012-12-03 11:18:57 -0800 | [diff] [blame] | 128 | PCM_PARAM_SAMPLE_BITS, |
| 129 | PCM_PARAM_FRAME_BITS, |
| 130 | PCM_PARAM_CHANNELS, |
| 131 | PCM_PARAM_RATE, |
| 132 | PCM_PARAM_PERIOD_TIME, |
| 133 | PCM_PARAM_PERIOD_SIZE, |
| 134 | PCM_PARAM_PERIOD_BYTES, |
| 135 | PCM_PARAM_PERIODS, |
| 136 | PCM_PARAM_BUFFER_TIME, |
| 137 | PCM_PARAM_BUFFER_SIZE, |
| 138 | PCM_PARAM_BUFFER_BYTES, |
| 139 | PCM_PARAM_TICK_TIME, |
| 140 | }; |
| 141 | |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 142 | /* Mixer control types */ |
| 143 | enum mixer_ctl_type { |
| 144 | MIXER_CTL_TYPE_BOOL, |
| 145 | MIXER_CTL_TYPE_INT, |
| 146 | MIXER_CTL_TYPE_ENUM, |
| 147 | MIXER_CTL_TYPE_BYTE, |
| 148 | MIXER_CTL_TYPE_IEC958, |
| 149 | MIXER_CTL_TYPE_INT64, |
| 150 | MIXER_CTL_TYPE_UNKNOWN, |
| 151 | |
| 152 | MIXER_CTL_TYPE_MAX, |
| 153 | }; |
| 154 | |
| 155 | /* Open and close a stream */ |
| 156 | struct pcm *pcm_open(unsigned int card, unsigned int device, |
| 157 | unsigned int flags, struct pcm_config *config); |
| 158 | int pcm_close(struct pcm *pcm); |
| 159 | int pcm_is_ready(struct pcm *pcm); |
| 160 | |
Simon Wilson | 42fc2d3 | 2012-12-03 11:18:57 -0800 | [diff] [blame] | 161 | /* Obtain the parameters for a PCM */ |
| 162 | struct pcm_params *pcm_params_get(unsigned int card, unsigned int device, |
| 163 | unsigned int flags); |
| 164 | void pcm_params_free(struct pcm_params *pcm_params); |
Andy Hung | a5b44d9 | 2014-03-10 18:08:15 -0700 | [diff] [blame] | 165 | |
| 166 | struct pcm_mask *pcm_params_get_mask(struct pcm_params *pcm_params, |
Andy Hung | 70530a6 | 2014-03-26 18:29:07 -0700 | [diff] [blame] | 167 | enum pcm_param param); |
Simon Wilson | 42fc2d3 | 2012-12-03 11:18:57 -0800 | [diff] [blame] | 168 | unsigned int pcm_params_get_min(struct pcm_params *pcm_params, |
| 169 | enum pcm_param param); |
Paul McLean | b25ece4 | 2014-03-21 15:27:34 -0700 | [diff] [blame] | 170 | void pcm_params_set_min(struct pcm_params *pcm_params, |
| 171 | enum pcm_param param, unsigned int val); |
Simon Wilson | 42fc2d3 | 2012-12-03 11:18:57 -0800 | [diff] [blame] | 172 | unsigned int pcm_params_get_max(struct pcm_params *pcm_params, |
| 173 | enum pcm_param param); |
Paul McLean | b25ece4 | 2014-03-21 15:27:34 -0700 | [diff] [blame] | 174 | void pcm_params_set_max(struct pcm_params *pcm_params, |
| 175 | enum pcm_param param, unsigned int val); |
Simon Wilson | 42fc2d3 | 2012-12-03 11:18:57 -0800 | [diff] [blame] | 176 | |
Andy Hung | 70530a6 | 2014-03-26 18:29:07 -0700 | [diff] [blame] | 177 | /* Converts the pcm parameters to a human readable string. |
| 178 | * The string parameter is a caller allocated buffer of size bytes, |
| 179 | * which is then filled up to size - 1 and null terminated, |
| 180 | * if size is greater than zero. |
| 181 | * The return value is the number of bytes copied to string |
| 182 | * (not including null termination) if less than size; otherwise, |
| 183 | * the number of bytes required for the buffer. |
| 184 | */ |
| 185 | int pcm_params_to_string(struct pcm_params *params, char *string, unsigned int size); |
| 186 | |
| 187 | /* Returns 1 if the pcm_format is present (format bit set) in |
| 188 | * the pcm_params structure; 0 otherwise, or upon unrecognized format. |
| 189 | */ |
| 190 | int pcm_params_format_test(struct pcm_params *params, enum pcm_format format); |
| 191 | |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 192 | /* Set and get config */ |
| 193 | int pcm_get_config(struct pcm *pcm, struct pcm_config *config); |
| 194 | int pcm_set_config(struct pcm *pcm, struct pcm_config *config); |
| 195 | |
| 196 | /* Returns a human readable reason for the last error */ |
| 197 | const char *pcm_get_error(struct pcm *pcm); |
| 198 | |
Simon Wilson | 36ea2d8 | 2013-07-17 11:10:45 -0700 | [diff] [blame] | 199 | /* Returns the sample size in bits for a PCM format. |
| 200 | * As with ALSA formats, this is the storage size for the format, whereas the |
| 201 | * format represents the number of significant bits. For example, |
| 202 | * PCM_FORMAT_S24_LE uses 32 bits of storage. |
| 203 | */ |
| 204 | unsigned int pcm_format_to_bits(enum pcm_format format); |
| 205 | |
Simon Wilson | 5aed71d | 2011-11-16 14:45:38 -0800 | [diff] [blame] | 206 | /* Returns the buffer size (int frames) that should be used for pcm_write. */ |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 207 | unsigned int pcm_get_buffer_size(struct pcm *pcm); |
Simon Wilson | e9942c8 | 2011-10-13 13:57:25 -0700 | [diff] [blame] | 208 | unsigned int pcm_frames_to_bytes(struct pcm *pcm, unsigned int frames); |
Simon Wilson | 5aed71d | 2011-11-16 14:45:38 -0800 | [diff] [blame] | 209 | unsigned int pcm_bytes_to_frames(struct pcm *pcm, unsigned int bytes); |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 210 | |
| 211 | /* Returns the pcm latency in ms */ |
| 212 | unsigned int pcm_get_latency(struct pcm *pcm); |
| 213 | |
Simon Wilson | dd88f13 | 2011-07-25 10:58:30 -0700 | [diff] [blame] | 214 | /* Returns available frames in pcm buffer and corresponding time stamp. |
Glenn Kasten | 6b0a206 | 2013-08-22 15:11:48 -0700 | [diff] [blame] | 215 | * The clock is CLOCK_MONOTONIC if flag PCM_MONOTONIC was specified in pcm_open, |
| 216 | * otherwise the clock is CLOCK_REALTIME. |
Simon Wilson | dd88f13 | 2011-07-25 10:58:30 -0700 | [diff] [blame] | 217 | * For an input stream, frames available are frames ready for the |
| 218 | * application to read. |
| 219 | * For an output stream, frames available are the number of empty frames available |
| 220 | * for the application to write. |
| 221 | */ |
| 222 | int pcm_get_htimestamp(struct pcm *pcm, unsigned int *avail, |
| 223 | struct timespec *tstamp); |
| 224 | |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 225 | /* Write data to the fifo. |
| 226 | * Will start playback on the first write or on a write that |
| 227 | * occurs after a fifo underrun. |
| 228 | */ |
Simon Wilson | daa8329 | 2012-02-28 15:26:02 -0800 | [diff] [blame] | 229 | int pcm_write(struct pcm *pcm, const void *data, unsigned int count); |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 230 | int pcm_read(struct pcm *pcm, void *data, unsigned int count); |
| 231 | |
Simon Wilson | e9942c8 | 2011-10-13 13:57:25 -0700 | [diff] [blame] | 232 | /* |
| 233 | * mmap() support. |
| 234 | */ |
Simon Wilson | daa8329 | 2012-02-28 15:26:02 -0800 | [diff] [blame] | 235 | int pcm_mmap_write(struct pcm *pcm, const void *data, unsigned int count); |
Eric Laurent | c98da79 | 2013-09-16 14:31:17 -0700 | [diff] [blame] | 236 | int pcm_mmap_read(struct pcm *pcm, void *data, unsigned int count); |
Simon Wilson | e9942c8 | 2011-10-13 13:57:25 -0700 | [diff] [blame] | 237 | int pcm_mmap_begin(struct pcm *pcm, void **areas, unsigned int *offset, |
| 238 | unsigned int *frames); |
| 239 | int pcm_mmap_commit(struct pcm *pcm, unsigned int offset, unsigned int frames); |
Dylan Reid | 9074cfc | 2015-09-01 11:01:57 -0700 | [diff] [blame] | 240 | int pcm_mmap_avail(struct pcm *pcm); |
Simon Wilson | e9942c8 | 2011-10-13 13:57:25 -0700 | [diff] [blame] | 241 | |
Omair Mohammed Abdullah | 7a0b995 | 2013-01-31 16:35:39 +0530 | [diff] [blame] | 242 | /* Prepare the PCM substream to be triggerable */ |
| 243 | int pcm_prepare(struct pcm *pcm); |
Simon Wilson | 70d7708 | 2011-06-24 11:08:10 -0700 | [diff] [blame] | 244 | /* Start and stop a PCM channel that doesn't transfer data */ |
| 245 | int pcm_start(struct pcm *pcm); |
| 246 | int pcm_stop(struct pcm *pcm); |
| 247 | |
Shiv Maliyappanahalli | 892d6a5 | 2014-05-23 15:20:13 -0700 | [diff] [blame] | 248 | /* ioctl function for PCM driver */ |
| 249 | int pcm_ioctl(struct pcm *pcm, int request, ...); |
| 250 | |
Simon Wilson | da39e0b | 2012-11-09 15:16:47 -0800 | [diff] [blame] | 251 | /* Interrupt driven API */ |
| 252 | int pcm_wait(struct pcm *pcm, int timeout); |
Dylan Reid | cefba1e | 2015-09-01 11:03:01 -0700 | [diff] [blame] | 253 | int pcm_get_poll_fd(struct pcm *pcm); |
Simon Wilson | da39e0b | 2012-11-09 15:16:47 -0800 | [diff] [blame] | 254 | |
Eric Laurent | 73b9c67 | 2011-10-14 11:12:24 -0700 | [diff] [blame] | 255 | /* Change avail_min after the stream has been opened with no need to stop the stream. |
| 256 | * Only accepted if opened with PCM_MMAP and PCM_NOIRQ flags |
| 257 | */ |
| 258 | int pcm_set_avail_min(struct pcm *pcm, int avail_min); |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 259 | |
| 260 | /* |
| 261 | * MIXER API |
| 262 | */ |
| 263 | |
| 264 | struct mixer; |
| 265 | struct mixer_ctl; |
| 266 | |
| 267 | /* Open and close a mixer */ |
| 268 | struct mixer *mixer_open(unsigned int card); |
| 269 | void mixer_close(struct mixer *mixer); |
| 270 | |
Simon Wilson | 7e8a656 | 2013-06-28 16:47:16 -0700 | [diff] [blame] | 271 | /* Get info about a mixer */ |
| 272 | const char *mixer_get_name(struct mixer *mixer); |
| 273 | |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 274 | /* Obtain mixer controls */ |
| 275 | unsigned int mixer_get_num_ctls(struct mixer *mixer); |
| 276 | struct mixer_ctl *mixer_get_ctl(struct mixer *mixer, unsigned int id); |
| 277 | struct mixer_ctl *mixer_get_ctl_by_name(struct mixer *mixer, const char *name); |
| 278 | |
| 279 | /* Get info about mixer controls */ |
Simon Wilson | e44e30a | 2012-03-08 10:45:31 -0800 | [diff] [blame] | 280 | const char *mixer_ctl_get_name(struct mixer_ctl *ctl); |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 281 | enum mixer_ctl_type mixer_ctl_get_type(struct mixer_ctl *ctl); |
| 282 | const char *mixer_ctl_get_type_string(struct mixer_ctl *ctl); |
| 283 | unsigned int mixer_ctl_get_num_values(struct mixer_ctl *ctl); |
| 284 | unsigned int mixer_ctl_get_num_enums(struct mixer_ctl *ctl); |
Simon Wilson | e44e30a | 2012-03-08 10:45:31 -0800 | [diff] [blame] | 285 | const char *mixer_ctl_get_enum_string(struct mixer_ctl *ctl, |
| 286 | unsigned int enum_id); |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 287 | |
Simon Wilson | 7e8a656 | 2013-06-28 16:47:16 -0700 | [diff] [blame] | 288 | /* Some sound cards update their controls due to external events, |
| 289 | * such as HDMI EDID byte data changing when an HDMI cable is |
| 290 | * connected. This API allows the count of elements to be updated. |
| 291 | */ |
| 292 | void mixer_ctl_update(struct mixer_ctl *ctl); |
| 293 | |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 294 | /* Set and get mixer controls */ |
| 295 | int mixer_ctl_get_percent(struct mixer_ctl *ctl, unsigned int id); |
| 296 | int mixer_ctl_set_percent(struct mixer_ctl *ctl, unsigned int id, int percent); |
| 297 | |
| 298 | int mixer_ctl_get_value(struct mixer_ctl *ctl, unsigned int id); |
Simon Wilson | 8813fe8 | 2013-06-24 15:40:34 -0700 | [diff] [blame] | 299 | int mixer_ctl_get_array(struct mixer_ctl *ctl, void *array, size_t count); |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 300 | int mixer_ctl_set_value(struct mixer_ctl *ctl, unsigned int id, int value); |
Simon Wilson | 8813fe8 | 2013-06-24 15:40:34 -0700 | [diff] [blame] | 301 | int mixer_ctl_set_array(struct mixer_ctl *ctl, const void *array, size_t count); |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 302 | int mixer_ctl_set_enum_by_string(struct mixer_ctl *ctl, const char *string); |
| 303 | |
| 304 | /* Determe range of integer mixer controls */ |
| 305 | int mixer_ctl_get_range_min(struct mixer_ctl *ctl); |
| 306 | int mixer_ctl_get_range_max(struct mixer_ctl *ctl); |
| 307 | |
Simon Wilson | c123962 | 2011-07-27 15:08:34 -0700 | [diff] [blame] | 308 | #if defined(__cplusplus) |
| 309 | } /* extern "C" */ |
| 310 | #endif |
| 311 | |
Simon Wilson | edff708 | 2011-06-06 15:33:34 -0700 | [diff] [blame] | 312 | #endif |