blob: e3fdc87dbd999277a6d9693a50cd38aeb0f44b85 [file] [log] [blame]
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -08001/*
Shiv Maliyappanahalli34b585f2013-10-01 15:49:05 -07002 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
3 * Not a contribution.
4 *
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -08005 * Copyright (C) 2013 The Android Open Source Project
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
Eric Laurentb23d5282013-05-14 15:27:20 -070020#ifndef QCOM_AUDIO_HW_H
21#define QCOM_AUDIO_HW_H
22
Steve Kondikcf634d12015-10-18 01:30:44 -070023#include <stdlib.h>
Eric Laurentb23d5282013-05-14 15:27:20 -070024#include <cutils/list.h>
Steve Kondikcf634d12015-10-18 01:30:44 -070025#include <cutils/str_parms.h>
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080026#include <hardware/audio.h>
Ethan Chen79c356c2015-06-07 12:26:14 -070027#include <hardware/audio_amplifier.h>
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080028#include <tinyalsa/asoundlib.h>
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -070029#include <tinycompress/tinycompress.h>
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080030
31#include <audio_route/audio_route.h>
Mingming Yin9952f522014-07-11 10:39:59 -070032#include "audio_defs.h"
Shiv Maliyappanahalli34b585f2013-10-01 15:49:05 -070033#include "voice.h"
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080034
Eric Laurentc4aef752013-09-12 17:45:53 -070035#define VISUALIZER_LIBRARY_PATH "/system/lib/soundfx/libqcomvisualizer.so"
Subhash Chandra Bose Naripeddy1d089162013-11-13 13:31:50 -080036#define OFFLOAD_EFFECTS_BUNDLE_LIBRARY_PATH "/system/lib/soundfx/libqcompostprocbundle.so"
Eric Laurentc4aef752013-09-12 17:45:53 -070037
Eric Laurentb23d5282013-05-14 15:27:20 -070038/* Flags used to initialize acdb_settings variable that goes to ACDB library */
Venkata Narendra Kumar Gutta9c38b182014-03-27 17:39:57 +053039#define NONE_FLAG 0x00000000
40#define DMIC_FLAG 0x00000002
41#define QMIC_FLAG 0x00000004
42#define TTY_MODE_OFF 0x00000010
43#define TTY_MODE_FULL 0x00000020
44#define TTY_MODE_VCO 0x00000040
45#define TTY_MODE_HCO 0x00000080
46#define TTY_MODE_CLEAR 0xFFFFFF0F
47#define FLUENCE_MODE_CLEAR 0xFFFFFFF0
Eric Laurentb23d5282013-05-14 15:27:20 -070048
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080049#define ACDB_DEV_TYPE_OUT 1
50#define ACDB_DEV_TYPE_IN 2
51
Eric Laurentb23d5282013-05-14 15:27:20 -070052#define MAX_SUPPORTED_CHANNEL_MASKS 2
Eric Laurent07eeafd2013-10-06 12:52:49 -070053#define DEFAULT_HDMI_OUT_CHANNELS 2
Ravi Kumar Alamanda72c411f2013-02-12 02:09:33 -080054
LiuShangfe0bc342015-02-17 18:20:11 +080055/* Expose microphone selection for testing purposes */
56#define FP_TEST_KEY "fp_test"
57#define FP_TEST_KEY_PRIMARY "primary_mic"
58#define FP_TEST_KEY_SECONDARY "secondary_mic"
59#define FP_TEST_DEFAULT_MIC 0X00000000
60#define FP_TEST_PRIMARY_MIC 0X00000100
61#define FP_TEST_SECONDARY_MIC 0X00000200
62
63static uint32_t mFpTestMicSource = FP_TEST_DEFAULT_MIC;
64
Naresh Tanniru2d19ab42014-05-11 19:56:25 +053065#define SND_CARD_STATE_OFFLINE 0
66#define SND_CARD_STATE_ONLINE 1
67
Eric Laurentb23d5282013-05-14 15:27:20 -070068typedef int snd_device_t;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080069
70/* These are the supported use cases by the hardware.
71 * Each usecase is mapped to a specific PCM device.
72 * Refer to pcm_device_table[].
73 */
74typedef enum {
75 USECASE_INVALID = -1,
76 /* Playback usecases */
77 USECASE_AUDIO_PLAYBACK_DEEP_BUFFER = 0,
78 USECASE_AUDIO_PLAYBACK_LOW_LATENCY,
79 USECASE_AUDIO_PLAYBACK_MULTI_CH,
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -070080 USECASE_AUDIO_PLAYBACK_OFFLOAD,
Steve Kondik26d44522015-12-16 15:23:47 -050081 USECASE_AUDIO_PLAYBACK_ULL,
82
Subhash Chandra Bose Naripeddy148144e2014-04-01 21:03:10 -070083#ifdef MULTIPLE_OFFLOAD_ENABLED
84 USECASE_AUDIO_PLAYBACK_OFFLOAD2,
85 USECASE_AUDIO_PLAYBACK_OFFLOAD3,
86 USECASE_AUDIO_PLAYBACK_OFFLOAD4,
87 USECASE_AUDIO_PLAYBACK_OFFLOAD5,
88 USECASE_AUDIO_PLAYBACK_OFFLOAD6,
89 USECASE_AUDIO_PLAYBACK_OFFLOAD7,
90 USECASE_AUDIO_PLAYBACK_OFFLOAD8,
91 USECASE_AUDIO_PLAYBACK_OFFLOAD9,
92#endif
93
vivek mehtac2711cd2015-08-26 14:01:20 -070094 USECASE_AUDIO_DIRECT_PCM_OFFLOAD,
95
Apoorv Raghuvanshi6e262842013-10-06 14:39:35 -070096 /* FM usecase */
97 USECASE_AUDIO_PLAYBACK_FM,
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080098
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -080099 /* HFP Use case*/
100 USECASE_AUDIO_HFP_SCO,
Vimal Puthanveed47e64852013-12-20 13:23:39 -0800101 USECASE_AUDIO_HFP_SCO_WB,
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800102
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800103 /* Capture usecases */
104 USECASE_AUDIO_RECORD,
Mingming Yine62d7842013-10-25 16:26:03 -0700105 USECASE_AUDIO_RECORD_COMPRESS,
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800106 USECASE_AUDIO_RECORD_LOW_LATENCY,
Preetam Singh Ranawatde84f1a2013-11-01 14:58:16 -0700107 USECASE_AUDIO_RECORD_FM_VIRTUAL,
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800108
Shiv Maliyappanahalli34b585f2013-10-01 15:49:05 -0700109 /* Voice usecase */
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800110 USECASE_VOICE_CALL,
111
Shiv Maliyappanahalli34b585f2013-10-01 15:49:05 -0700112 /* Voice extension usecases */
113 USECASE_VOICE2_CALL,
114 USECASE_VOLTE_CALL,
115 USECASE_QCHAT_CALL,
Vicky Sehrawat111aeb32014-02-12 17:58:59 -0800116 USECASE_VOWLAN_CALL,
Narsinga Rao Chella05573b72013-11-15 15:21:40 -0800117 USECASE_COMPRESS_VOIP_CALL,
Shiv Maliyappanahalli34b585f2013-10-01 15:49:05 -0700118
Shiv Maliyappanahallida107642013-10-17 11:16:13 -0700119 USECASE_INCALL_REC_UPLINK,
120 USECASE_INCALL_REC_DOWNLINK,
121 USECASE_INCALL_REC_UPLINK_AND_DOWNLINK,
Helen Zenge56b4852013-12-03 16:54:40 -0800122 USECASE_INCALL_REC_UPLINK_COMPRESS,
123 USECASE_INCALL_REC_DOWNLINK_COMPRESS,
124 USECASE_INCALL_REC_UPLINK_AND_DOWNLINK_COMPRESS,
Shiv Maliyappanahallida107642013-10-17 11:16:13 -0700125
Shiv Maliyappanahallif3b9a422013-10-22 16:38:08 -0700126 USECASE_INCALL_MUSIC_UPLINK,
127 USECASE_INCALL_MUSIC_UPLINK2,
128
Gopikrishnaiah Anandanf538cef2013-10-28 14:06:03 -0700129 USECASE_AUDIO_SPKR_CALIB_RX,
130 USECASE_AUDIO_SPKR_CALIB_TX,
Divya Narayanan Poojaryab9b1ef2014-09-12 15:52:36 +0530131
132 USECASE_AUDIO_PLAYBACK_AFE_PROXY,
133 USECASE_AUDIO_RECORD_AFE_PROXY,
134
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800135 AUDIO_USECASE_MAX
136} audio_usecase_t;
137
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800138#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
139
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800140/*
141 * tinyAlsa library interprets period size as number of frames
142 * one frame = channel_count * sizeof (pcm sample)
143 * so if format = 16-bit PCM and channels = Stereo, frame size = 2 ch * 2 = 4 bytes
144 * DEEP_BUFFER_OUTPUT_PERIOD_SIZE = 1024 means 1024 * 4 = 4096 bytes
145 * We should take care of returning proper size when AudioFlinger queries for
146 * the buffer size of an input/output stream
147 */
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800148
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -0700149enum {
150 OFFLOAD_CMD_EXIT, /* exit compress offload thread loop*/
151 OFFLOAD_CMD_DRAIN, /* send a full drain request to DSP */
152 OFFLOAD_CMD_PARTIAL_DRAIN, /* send a partial drain request to DSP */
153 OFFLOAD_CMD_WAIT_FOR_BUFFER, /* wait for buffer released by DSP */
154};
155
156enum {
157 OFFLOAD_STATE_IDLE,
158 OFFLOAD_STATE_PLAYING,
159 OFFLOAD_STATE_PAUSED,
160};
161
162struct offload_cmd {
163 struct listnode node;
164 int cmd;
165 int data[];
166};
167
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800168struct stream_out {
169 struct audio_stream_out stream;
Eric Laurent150dbfe2013-02-27 14:31:02 -0800170 pthread_mutex_t lock; /* see note below on mutex acquisition order */
Eric Laurent35455462015-06-19 16:30:44 -0700171 pthread_mutex_t pre_lock; /* acquire before lock to avoid DOS by playback thread */
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -0700172 pthread_cond_t cond;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800173 struct pcm_config config;
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -0700174 struct compr_config compr_config;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800175 struct pcm *pcm;
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -0700176 struct compress *compr;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800177 int standby;
Venkata Narendra Kumar Guttac9e9e2c2014-07-09 16:29:28 +0530178 bool voip_out_avail;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800179 int pcm_device_id;
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -0700180 unsigned int sample_rate;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800181 audio_channel_mask_t channel_mask;
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -0700182 audio_format_t format;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800183 audio_devices_t devices;
184 audio_output_flags_t flags;
185 audio_usecase_t usecase;
186 /* Array of supported channel mask configurations. +1 so that the last entry is always 0 */
187 audio_channel_mask_t supported_channel_masks[MAX_SUPPORTED_CHANNEL_MASKS + 1];
Eric Laurenta9024de2013-04-04 09:19:12 -0700188 bool muted;
Glenn Kasten2ccd7ba2013-09-10 09:04:31 -0700189 uint64_t written; /* total frames written, not cleared when entering standby */
Eric Laurentc4aef752013-09-12 17:45:53 -0700190 audio_io_handle_t handle;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800191
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -0700192 int non_blocking;
Alexy Joseph3a2fec32014-12-03 02:46:47 -0800193 bool use_small_bufs;
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -0700194 int playback_started;
195 int offload_state;
196 pthread_cond_t offload_cond;
197 pthread_t offload_thread;
198 struct listnode offload_cmd_list;
199 bool offload_thread_blocked;
200
201 stream_callback_t offload_callback;
202 void *offload_cookie;
Haynes Mathew George352f27b2013-07-26 00:00:15 -0700203 struct compr_gapless_mdata gapless_mdata;
204 int send_new_metadata;
Alexy Joseph505da3f2015-09-10 01:31:51 -0700205 bool send_next_track_params;
206 bool is_compr_metadata_avail;
ApurupaPattapu9d6b4362014-02-27 10:24:11 -0800207 unsigned int bit_width;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800208
209 struct audio_device *dev;
210};
211
212struct stream_in {
213 struct audio_stream_in stream;
Eric Laurent150dbfe2013-02-27 14:31:02 -0800214 pthread_mutex_t lock; /* see note below on mutex acquisition order */
Eric Laurent35455462015-06-19 16:30:44 -0700215 pthread_mutex_t pre_lock; /* acquire before lock to avoid DOS by capture thread */
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800216 struct pcm_config config;
217 struct pcm *pcm;
218 int standby;
Venkata Narendra Kumar Guttac9e9e2c2014-07-09 16:29:28 +0530219 bool voip_in_avail;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800220 int source;
221 int pcm_device_id;
Divya Narayanan Poojaryab9b1ef2014-09-12 15:52:36 +0530222 audio_devices_t device;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800223 audio_channel_mask_t channel_mask;
224 audio_usecase_t usecase;
Ravi Kumar Alamandaf70ffb42013-04-16 15:55:53 -0700225 bool enable_aec;
Ravi Kumar Alamanda198185e2013-11-07 15:42:19 -0800226 bool enable_ns;
Narsinga Rao Chella05573b72013-11-15 15:21:40 -0800227 audio_format_t format;
Andy Hung6cd0c612016-01-15 17:46:57 -0800228 int64_t frames_read; /* total frames read, not cleared when entering standby */
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800229
230 struct audio_device *dev;
231};
232
233typedef enum {
234 PCM_PLAYBACK,
235 PCM_CAPTURE,
Narsinga Rao Chella05573b72013-11-15 15:21:40 -0800236 VOICE_CALL,
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800237 VOIP_CALL,
238 PCM_HFP_CALL
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800239} usecase_type_t;
240
Ravi Kumar Alamanda096c87f2013-02-28 20:54:57 -0800241union stream_ptr {
242 struct stream_in *in;
243 struct stream_out *out;
244};
245
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800246struct audio_usecase {
Ravi Kumar Alamanda3b1816c2013-02-27 23:01:21 -0800247 struct listnode list;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800248 audio_usecase_t id;
249 usecase_type_t type;
250 audio_devices_t devices;
Ravi Kumar Alamanda71c84b72013-03-10 23:50:28 -0700251 snd_device_t out_snd_device;
252 snd_device_t in_snd_device;
Ravi Kumar Alamanda096c87f2013-02-28 20:54:57 -0800253 union stream_ptr stream;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800254};
255
Naresh Tanniru2d19ab42014-05-11 19:56:25 +0530256struct sound_card_status {
257 pthread_mutex_t lock;
258 int state;
259};
260
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800261struct audio_device {
262 struct audio_hw_device device;
Eric Laurent150dbfe2013-02-27 14:31:02 -0800263 pthread_mutex_t lock; /* see note below on mutex acquisition order */
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800264 struct mixer *mixer;
265 audio_mode_t mode;
266 audio_devices_t out_device;
Eric Laurentc8400632013-02-14 19:04:54 -0800267 struct stream_in *active_input;
Ravi Kumar Alamanda096c87f2013-02-28 20:54:57 -0800268 struct stream_out *primary_output;
Divya Narayanan Poojaryab9b1ef2014-09-12 15:52:36 +0530269 struct stream_out *voice_tx_output;
270 struct stream_out *current_call_output;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800271 bool bluetooth_nrec;
272 bool screen_off;
Eric Laurentb23d5282013-05-14 15:27:20 -0700273 int *snd_dev_ref_cnt;
Ravi Kumar Alamanda3b1816c2013-02-27 23:01:21 -0800274 struct listnode usecase_list;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800275 struct audio_route *audio_route;
276 int acdb_settings;
Jean-Michel Trivic56336b2013-05-24 16:55:17 -0700277 bool speaker_lr_swap;
Shiv Maliyappanahalli34b585f2013-10-01 15:49:05 -0700278 struct voice voice;
Eric Laurent07eeafd2013-10-06 12:52:49 -0700279 unsigned int cur_hdmi_channels;
Krishnankutty Kolathappilly9b7e96b2014-02-14 14:45:49 -0800280 unsigned int cur_wfd_channels;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800281
Apoorv Raghuvanshi84fa2fe2013-12-04 11:57:47 -0800282 int snd_card;
ApurupaPattapu9d6b4362014-02-27 10:24:11 -0800283 unsigned int cur_codec_backend_samplerate;
284 unsigned int cur_codec_backend_bit_width;
Eric Laurentb23d5282013-05-14 15:27:20 -0700285 void *platform;
Subhash Chandra Bose Naripeddy148144e2014-04-01 21:03:10 -0700286 unsigned int offload_usecases_state;
Eric Laurentda46bfb2014-08-25 22:39:29 -0500287 void *extspk;
288
Eric Laurentc4aef752013-09-12 17:45:53 -0700289 void *visualizer_lib;
Subhash Chandra Bose Naripeddy1d089162013-11-13 13:31:50 -0800290 int (*visualizer_start_output)(audio_io_handle_t, int);
291 int (*visualizer_stop_output)(audio_io_handle_t, int);
292 void *offload_effects_lib;
293 int (*offload_effects_start_output)(audio_io_handle_t, int);
294 int (*offload_effects_stop_output)(audio_io_handle_t, int);
Naresh Tanniru2d19ab42014-05-11 19:56:25 +0530295
296 struct sound_card_status snd_card_status;
Steve Kondik3abbbc82014-11-29 14:14:43 -0800297
298 /* The pcm_params use_case_table is loaded by adev_verify_devices() upon
299 * calling adev_open().
300 *
301 * If an entry is not NULL, it can be used to determine if extended precision
302 * or other capabilities are present for the device corresponding to that usecase.
303 */
304 struct pcm_params *use_case_table[AUDIO_USECASE_MAX];
Ethan Chen79c356c2015-06-07 12:26:14 -0700305 amplifier_device_t *amp;
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800306};
307
Apoorv Raghuvanshi6e262842013-10-06 14:39:35 -0700308int select_devices(struct audio_device *adev,
309 audio_usecase_t uc_id);
310int disable_audio_route(struct audio_device *adev,
Haynes Mathew Georgeea098922014-04-24 17:53:50 -0700311 struct audio_usecase *usecase);
Apoorv Raghuvanshi6e262842013-10-06 14:39:35 -0700312int disable_snd_device(struct audio_device *adev,
Haynes Mathew Georgeea098922014-04-24 17:53:50 -0700313 snd_device_t snd_device);
Gopikrishnaiah Anandanf538cef2013-10-28 14:06:03 -0700314int enable_snd_device(struct audio_device *adev,
Haynes Mathew Georgeea098922014-04-24 17:53:50 -0700315 snd_device_t snd_device);
316
Gopikrishnaiah Anandanf538cef2013-10-28 14:06:03 -0700317int enable_audio_route(struct audio_device *adev,
Haynes Mathew Georgeea098922014-04-24 17:53:50 -0700318 struct audio_usecase *usecase);
319
Apoorv Raghuvanshi6e262842013-10-06 14:39:35 -0700320struct audio_usecase *get_usecase_from_list(struct audio_device *adev,
321 audio_usecase_t uc_id);
Krishnankutty Kolathappillyeff07ef2013-11-21 20:39:59 -0800322
Mingming Yin90e2cd82014-06-06 17:11:23 -0700323int pcm_ioctl(struct pcm *pcm, int request, ...);
Venkata Narendra Kumar Guttac9e9e2c2014-07-09 16:29:28 +0530324int get_snd_card_state(struct audio_device *adev);
Mingming Yin90e2cd82014-06-06 17:11:23 -0700325
Subhash Chandra Bose Naripeddy148144e2014-04-01 21:03:10 -0700326bool is_offload_usecase(audio_usecase_t uc_id);
327
Krishnankutty Kolathappillyeff07ef2013-11-21 20:39:59 -0800328#define LITERAL_TO_STRING(x) #x
329#define CHECK(condition) LOG_ALWAYS_FATAL_IF(!(condition), "%s",\
330 __FILE__ ":" LITERAL_TO_STRING(__LINE__)\
331 " ASSERT_FATAL(" #condition ") failed.")
332
Eric Laurent150dbfe2013-02-27 14:31:02 -0800333/*
334 * NOTE: when multiple mutexes have to be acquired, always take the
335 * stream_in or stream_out mutex first, followed by the audio_device mutex.
336 */
337
Eric Laurentb23d5282013-05-14 15:27:20 -0700338#endif // QCOM_AUDIO_HW_H