hal: qahw: Update proprietary flags to avoid clash with AOSP
Update proprietary flags to avoid clash with AOSP
Remove QAP compilation flag defined within function
CRs-Fixed: 2069262
Change-Id: I826c03fce0baffc1bbadc29e200b1c5c184aebf3
diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h
index a1b1344..76874c0 100644
--- a/hal/audio_extn/audio_extn.h
+++ b/hal/audio_extn/audio_extn.h
@@ -99,16 +99,24 @@
#define AUDIO_FORMAT_AC4 0x23000000UL
#endif
-#ifndef AUDIO_OUTPUT_FLAG_TIMESTAMP
-#define AUDIO_OUTPUT_FLAG_TIMESTAMP 0x10000
+#ifndef AUDIO_OUTPUT_FLAG_MAIN
+#define AUDIO_OUTPUT_FLAG_MAIN 0x8000000
#endif
-#ifndef AUDIO_OUTPUT_FLAG_BD10
-#define AUDIO_OUTPUT_FLAG_BD10 0x20000
+#ifndef AUDIO_OUTPUT_FLAG_ASSOCIATED
+#define AUDIO_OUTPUT_FLAG_ASSOCIATED 0x10000000
+#endif
+
+#ifndef AUDIO_OUTPUT_FLAG_TIMESTAMP
+#define AUDIO_OUTPUT_FLAG_TIMESTAMP 0x20000000
+#endif
+
+#ifndef AUDIO_OUTPUT_FLAG_BD
+#define AUDIO_OUTPUT_FLAG_BD 0x40000000
#endif
#ifndef AUDIO_OUTPUT_FLAG_INTERACTIVE
-#define AUDIO_OUTPUT_FLAG_INTERACTIVE 0x40000
+#define AUDIO_OUTPUT_FLAG_INTERACTIVE 0x80000000
#endif
#ifndef COMPRESS_METADATA_NEEDED
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index f74c23e..c0e28c6 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -4998,7 +4998,7 @@
out->a2dp_compress_mute = false;
out->dynamic_pm_qos_enabled = 0;
- if ((flags & AUDIO_OUTPUT_FLAG_BD10) &&
+ if ((flags & AUDIO_OUTPUT_FLAG_BD) &&
(property_get_bool("audio.matrix.limiter.enable", false)))
platform_set_device_params(out, DEVICE_PARAM_LIMITER_ID, 1);
diff --git a/qahw_api/test/qahw_playback_test.c b/qahw_api/test/qahw_playback_test.c
index 2ead153..a069629 100644
--- a/qahw_api/test/qahw_playback_test.c
+++ b/qahw_api/test/qahw_playback_test.c
@@ -158,11 +158,11 @@
"music_offload_wma_format_tag=%d;"
#ifndef AUDIO_OUTPUT_FLAG_ASSOCIATED
-#define AUDIO_OUTPUT_FLAG_ASSOCIATED 0x8000
+#define AUDIO_OUTPUT_FLAG_ASSOCIATED 0x10000000
#endif
#ifndef AUDIO_OUTPUT_FLAG_INTERACTIVE
-#define AUDIO_OUTPUT_FLAG_INTERACTIVE 0x40000
+#define AUDIO_OUTPUT_FLAG_INTERACTIVE 0x80000000
#endif
static bool request_wake_lock(bool wakelock_acquired, bool enable)
@@ -2002,11 +2002,9 @@
{"mode", required_argument, 0, 'm'},
{"effect-preset", required_argument, 0, 'p'},
{"effect-strength", required_argument, 0, 'S'},
-#ifdef QAP
{"render-format", required_argument, 0, 'x'},
{"timestamp-file", required_argument, 0, 'y'},
{"framesize-file", required_argument, 0, 'z'},
-#endif
{"output-ch-map", required_argument, 0, 'O'},
{"input-ch-map", required_argument, 0, 'I'},
{"mixer-coeffs", required_argument, 0, 'M'},
@@ -2036,11 +2034,7 @@
while ((opt = getopt_long(argc,
argv,
-#ifdef QAP
"-f:r:c:b:d:s:v:V:l:t:a:w:k:PD:KF:Ee:A:u:m:S:C:p::x:y:z:qQhI:O:M:o:i:h:",
-#else
- "-f:r:c:b:d:s:v:V:l:t:a:w:k:PD:KF:Ee:A:u:m:S:C:p:qQhI:O:M:o:i:h:",
-#endif
long_options,
&option_index)) != -1) {
@@ -2179,7 +2173,6 @@
case 'o':
mm_params.num_output_channels = atoi(optarg);
break;
-#ifdef QAP
case 'x':
render_format = atoi(optarg);
break;
@@ -2190,7 +2183,6 @@
stream_param[i].framesize_filename = optarg;
fprintf(stderr, "file name is %s\n", stream_param[i].framesize_filename);
break;
-#endif
case 'C':
fprintf(log_file, " In Device config \n");
fprintf(stderr, " In Device config \n");
@@ -2254,9 +2246,7 @@
break;
case 'h':
usage();
-#ifdef QAP
hal_test_qap_usage();
-#endif
return 0;
break;