hal: use stream specific app type for MBDRC am: 4012509d42
am: ff018310e9
Change-Id: Id11177ca86c3ceaa4952e5b35ef77d60312cf61d
diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h
index c7d6768..2ca76fa 100644
--- a/hal/audio_extn/audio_extn.h
+++ b/hal/audio_extn/audio_extn.h
@@ -81,7 +81,7 @@
#define audio_extn_usb_is_capture_supported() (false)
#define audio_extn_usb_get_max_channels(dir) (0)
#define audio_extn_usb_get_max_bit_width(dir) (0)
-#define audio_extn_usb_sup_sample_rates(t, s, l) (0)
+#define audio_extn_usb_sup_sample_rates(t, s, l) ((t), (s), (l), 0) /* fix unused warn */
#define audio_extn_usb_alive(adev) (false)
#else
void audio_extn_usb_init(void *adev);
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 2847666..0af8699 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -996,9 +996,9 @@
return ret;
}
-static ssize_t read_usb_sup_sample_rates(bool is_playback __unused,
- uint32_t *supported_sample_rates __unused,
- uint32_t max_rates __unused)
+static ssize_t read_usb_sup_sample_rates(bool is_playback,
+ uint32_t *supported_sample_rates,
+ uint32_t max_rates)
{
ssize_t count = audio_extn_usb_sup_sample_rates(is_playback,
supported_sample_rates,
@@ -3984,6 +3984,7 @@
out->error_log = NULL;
pthread_cond_destroy(&out->cond);
+ pthread_mutex_destroy(&out->pre_lock);
pthread_mutex_destroy(&out->lock);
free(stream);
ALOGV("%s: exit", __func__);
@@ -4529,6 +4530,9 @@
error_log_destroy(in->error_log);
in->error_log = NULL;
+ pthread_mutex_destroy(&in->pre_lock);
+ pthread_mutex_destroy(&in->lock);
+
free(stream);
return;
@@ -4696,6 +4700,7 @@
}
if (adev->adm_deinit)
adev->adm_deinit(adev->adm_data);
+ pthread_mutex_destroy(&adev->lock);
free(device);
}