hal: Fix the samplerate/bitwidth comparison
Change-Id: If507ee28d4b3333dd91af286f2653554590fd7c4
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index ff52da8..313d5ff 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -18,7 +18,7 @@
*/
#define LOG_TAG "msm8974_platform"
-/*#define LOG_NDEBUG 0*/
+#define LOG_NDEBUG 0
#define LOG_NDDEBUG 0
#include <stdlib.h>
@@ -2331,18 +2331,16 @@
list_for_each(node, &adev->usecase_list) {
struct audio_usecase *curr_usecase;
curr_usecase = node_to_item(node, struct audio_usecase, list);
- if (curr_usecase->id == USECASE_AUDIO_PLAYBACK_OFFLOAD) {
- struct stream_out *out =
- (struct stream_out*) curr_usecase->stream.out;
- if (out != NULL ) {
- ALOGV("Offload playback running bw %d sr %d",
- out->bit_width, out->sample_rate);
- if (*new_bit_width != out->bit_width) {
- *new_bit_width = out->bit_width;
- }
- if (*new_sample_rate != out->sample_rate) {
- *new_sample_rate = out->sample_rate;
- }
+ struct stream_out *out =
+ (struct stream_out*) curr_usecase->stream.out;
+ if (out != NULL ) {
+ ALOGV("Offload playback running bw %d sr %d",
+ out->bit_width, out->sample_rate);
+ if (*new_bit_width < out->bit_width) {
+ *new_bit_width = out->bit_width;
+ }
+ if (*new_sample_rate < out->sample_rate) {
+ *new_sample_rate = out->sample_rate;
}
}
}