summaryrefslogtreecommitdiffstats
path: root/hal/audio_hw.h
diff options
context:
space:
mode:
authorChaithanya Krishna Bacharaju <chaithan@codeaurora.org>2017-05-26 18:22:46 +0530
committerShiv Maliyappanahalli <smaliyap@codeaurora.org>2017-08-15 15:18:51 -0700
commit69d2e4c51eb69717e305daecb9bde2eca473f921 (patch)
tree48e1d2c1afb2d07742ee60881e81ad36698296e2 /hal/audio_hw.h
parent0515e043cb70a5991bfc3251ff3c4d652c6451ef (diff)
downloadhardware_qcom_audio-69d2e4c51eb69717e305daecb9bde2eca473f921.tar.gz
hardware_qcom_audio-69d2e4c51eb69717e305daecb9bde2eca473f921.tar.bz2
hardware_qcom_audio-69d2e4c51eb69717e305daecb9bde2eca473f921.zip
hal: Handle A2dp suspend scenario
Avoid writing data to A2dp output in case of non-offload and mute offload streams if A2dp is suspended. Restore device and unmute streams if muted as part of suspend. CRs-Fixed: 2066578 Change-Id: I3a222f128659de602ba1f6bed4d4e3cdcc7a379a
Diffstat (limited to 'hal/audio_hw.h')
-rw-r--r--hal/audio_hw.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/hal/audio_hw.h b/hal/audio_hw.h
index 91bf9548..561a967e 100644
--- a/hal/audio_hw.h
+++ b/hal/audio_hw.h
@@ -236,6 +236,7 @@ struct stream_out {
struct audio_stream_out stream;
pthread_mutex_t lock; /* see note below on mutex acquisition order */
pthread_mutex_t pre_lock; /* acquire before lock to avoid DOS by playback thread */
+ pthread_mutex_t compr_mute_lock; /* acquire before setting compress volume */
pthread_cond_t cond;
struct pcm_config config;
struct compr_config compr_config;
@@ -301,6 +302,9 @@ struct stream_out {
qahwi_stream_out_t qahwi_out;
bool is_iec61937_info_available;
+ bool a2dp_compress_mute;
+ float volume_l;
+ float volume_r;
};
struct stream_in {
@@ -502,6 +506,8 @@ int pcm_ioctl(struct pcm *pcm, int request, ...);
audio_usecase_t get_usecase_id_from_usecase_type(const struct audio_device *adev,
usecase_type_t type);
+int check_a2dp_restore(struct audio_device *adev, struct stream_out *out, bool restore);
+
int adev_open_output_stream(struct audio_hw_device *dev,
audio_io_handle_t handle,
audio_devices_t devices,