summaryrefslogtreecommitdiffstats
path: root/audio_a2dp_hw
diff options
context:
space:
mode:
Diffstat (limited to 'audio_a2dp_hw')
-rwxr-xr-xaudio_a2dp_hw/audio_a2dp_hw.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/audio_a2dp_hw/audio_a2dp_hw.c b/audio_a2dp_hw/audio_a2dp_hw.c
index c7abf8c..d65f3af 100755
--- a/audio_a2dp_hw/audio_a2dp_hw.c
+++ b/audio_a2dp_hw/audio_a2dp_hw.c
@@ -89,7 +89,7 @@
#define FNLOG() ALOGV("%s", __FUNCTION__);
#define DEBUG(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__)
-#define ASSERTC(cond, msg, val) if (!(cond)) {LOGE("### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);}
+#define ASSERTC(cond, msg, val) if (!(cond)) {ALOGE("### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);}
/*****************************************************************************
** Local type definitions
@@ -573,12 +573,19 @@ static int out_standby(struct audio_stream *stream)
{
struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream;
+ int retVal = 0;
+
FNLOG();
+ pthread_mutex_lock(&out->lock);
+
if (out->state == AUDIO_A2DP_STATE_STARTED)
- return suspend_audio_datapath(out, true);
+ retVal = suspend_audio_datapath(out, true);
else
- return 0;
+ retVal = 0;
+ pthread_mutex_unlock (&out->lock);
+
+ return retVal;
}
static int out_dump(const struct audio_stream *stream, int fd)