summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaynes Mathew George <hgeorge@codeaurora.org>2015-02-25 20:32:03 -0800
committerArne Coucheron <arco68@gmail.com>2016-05-11 00:12:21 +0200
commit07141988e6ad9a9106fa3262867ebf3246611d69 (patch)
treed5882f3fee5c797a909fb3436682f23f463b0e0c
parente515bd789606c51449eeffea01b4d0312d1c63ca (diff)
downloadhardware_qcom_audio-07141988e6ad9a9106fa3262867ebf3246611d69.tar.gz
hardware_qcom_audio-07141988e6ad9a9106fa3262867ebf3246611d69.tar.bz2
hardware_qcom_audio-07141988e6ad9a9106fa3262867ebf3246611d69.zip
audio: fix member initialization
Re-apply missing mutex and condition var initialization code from I7018f38f29a19b130185b285f4acf22219e4228c Change-Id: If1d6b3d4f65c30154d3d6c9e0192a1ce72c0d495 CRs-Fixed: 587676
-rw-r--r--hal/audio_hw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index cf2edee0..af02741f 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -2363,6 +2363,9 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
return -ENOMEM;
}
+ pthread_mutex_init(&out->lock, (const pthread_mutexattr_t *) NULL);
+ pthread_cond_init(&out->cond, (const pthread_condattr_t *) NULL);
+
if (devices == AUDIO_DEVICE_NONE)
devices = AUDIO_DEVICE_OUT_SPEAKER;
@@ -2594,9 +2597,6 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
/* out->muted = false; by calloc() */
/* out->written = 0; by calloc() */
- pthread_mutex_init(&out->lock, (const pthread_mutexattr_t *) NULL);
- pthread_cond_init(&out->cond, (const pthread_condattr_t *) NULL);
-
config->format = out->stream.common.get_format(&out->stream.common);
config->channel_mask = out->stream.common.get_channels(&out->stream.common);
config->sample_rate = out->stream.common.get_sample_rate(&out->stream.common);