Fix duplicate symbol error in Bluetooth/system/
Duplicate symbol error comes up when switch -fcommon to -fno-common
Bug: b/151457797
Test: mm libbt-sbc-decoder
Change-Id: Ia27261a813564c91d1964e6b99c778d7cc2cb3d3
GitOrigin-RevId: 06fc043b90703cba39212f20bceb6f10cf939d77
diff --git a/system/embdrv/sbc/decoder/srce/dequant.c b/system/embdrv/sbc/decoder/srce/dequant.c
index e2bce9e..2dccd73 100644
--- a/system/embdrv/sbc/decoder/srce/dequant.c
+++ b/system/embdrv/sbc/decoder/srce/dequant.c
@@ -117,8 +117,57 @@
#define SBC_DEQUANT_SCALING_FACTOR 1.38019122262781f
#endif
-const uint32_t dequant_long_scaled[17];
-const uint32_t dequant_long_unscaled[17];
+const uint32_t dequant_long_scaled[17] = {
+ 0, 0,
+ 0x1ee9e116, /* bits=2 0.24151243 1/3 * (1/1.38019122262781)
+ (0x00000008)*/
+ 0x0d3fa99c, /* bits=3 0.10350533 1/7 * (1/1.38019122262781)
+ (0x00000013)*/
+ 0x062ec69e, /* bits=4 0.04830249 1/15 * (1/1.38019122262781)
+ (0x00000029)*/
+ 0x02fddbfa, /* bits=5 0.02337217 1/31 * (1/1.38019122262781)
+ (0x00000055)*/
+ 0x0178d9f5, /* bits=6 0.01150059 1/63 * (1/1.38019122262781)
+ (0x000000ad)*/
+ 0x00baf129, /* bits=7 0.00570502 1/127 * (1/1.38019122262781)
+ (0x0000015e)*/
+ 0x005d1abe, /* bits=8 0.00284132 1/255 * (1/1.38019122262781)
+ (0x000002bf)*/
+ 0x002e760d, /* bits=9 0.00141788 1/511 * (1/1.38019122262781)
+ (0x00000582)*/
+ 0x00173536, /* bits=10 0.00070825 1/1023 * (1/1.38019122262781)
+ (0x00000b07)*/
+ 0x000b9928, /* bits=11 0.00035395 1/2047 * (1/1.38019122262781)
+ (0x00001612)*/
+ 0x0005cc37, /* bits=12 0.00017693 1/4095 * (1/1.38019122262781)
+ (0x00002c27)*/
+ 0x0002e604, /* bits=13 0.00008846 1/8191 * (1/1.38019122262781)
+ (0x00005852)*/
+ 0x000172fc, /* bits=14 0.00004422 1/16383 * (1/1.38019122262781)
+ (0x0000b0a7)*/
+ 0x0000b97d, /* bits=15 0.00002211 1/32767 * (1/1.38019122262781)
+ (0x00016150)*/
+ 0x00005cbe, /* bits=16 0.00001106 1/65535 * (1/1.38019122262781)
+ (0x0002c2a5)*/
+};
+
+const uint32_t dequant_long_unscaled[17] = {
+ 0, 0, 0x2aaaaaab, /* bits=2 0.33333333 1/3 (0x00000005)*/
+ 0x12492492, /* bits=3 0.14285714 1/7 (0x0000000e)*/
+ 0x08888889, /* bits=4 0.06666667 1/15 (0x0000001d)*/
+ 0x04210842, /* bits=5 0.03225806 1/31 (0x0000003e)*/
+ 0x02082082, /* bits=6 0.01587302 1/63 (0x0000007e)*/
+ 0x01020408, /* bits=7 0.00787402 1/127 (0x000000fe)*/
+ 0x00808081, /* bits=8 0.00392157 1/255 (0x000001fd)*/
+ 0x00402010, /* bits=9 0.00195695 1/511 (0x000003fe)*/
+ 0x00200802, /* bits=10 0.00097752 1/1023 (0x000007fe)*/
+ 0x00100200, /* bits=11 0.00048852 1/2047 (0x00000ffe)*/
+ 0x00080080, /* bits=12 0.00024420 1/4095 (0x00001ffe)*/
+ 0x00040020, /* bits=13 0.00012209 1/8191 (0x00003ffe)*/
+ 0x00020008, /* bits=14 0.00006104 1/16383 (0x00007ffe)*/
+ 0x00010002, /* bits=15 0.00003052 1/32767 (0x0000fffe)*/
+ 0x00008001, /* bits=16 0.00001526 1/65535 (0x0001fffc)*/
+};
/** Scales x by y bits to the right, adding a rounding factor.
*/
diff --git a/system/embdrv/sbc/decoder/srce/framing.c b/system/embdrv/sbc/decoder/srce/framing.c
index f835b52..7c1c087 100644
--- a/system/embdrv/sbc/decoder/srce/framing.c
+++ b/system/embdrv/sbc/decoder/srce/framing.c
@@ -96,57 +96,6 @@
0x7f, 0x62, 0x45, 0x58, 0x0b, 0x16, 0x31, 0x2c, 0x97, 0x8a, 0xad, 0xb0,
0xe3, 0xfe, 0xd9, 0xc4};
#endif
-const uint32_t dequant_long_scaled[17] = {
- 0, 0,
- 0x1ee9e116, /* bits=2 0.24151243 1/3 * (1/1.38019122262781)
- (0x00000008)*/
- 0x0d3fa99c, /* bits=3 0.10350533 1/7 * (1/1.38019122262781)
- (0x00000013)*/
- 0x062ec69e, /* bits=4 0.04830249 1/15 * (1/1.38019122262781)
- (0x00000029)*/
- 0x02fddbfa, /* bits=5 0.02337217 1/31 * (1/1.38019122262781)
- (0x00000055)*/
- 0x0178d9f5, /* bits=6 0.01150059 1/63 * (1/1.38019122262781)
- (0x000000ad)*/
- 0x00baf129, /* bits=7 0.00570502 1/127 * (1/1.38019122262781)
- (0x0000015e)*/
- 0x005d1abe, /* bits=8 0.00284132 1/255 * (1/1.38019122262781)
- (0x000002bf)*/
- 0x002e760d, /* bits=9 0.00141788 1/511 * (1/1.38019122262781)
- (0x00000582)*/
- 0x00173536, /* bits=10 0.00070825 1/1023 * (1/1.38019122262781)
- (0x00000b07)*/
- 0x000b9928, /* bits=11 0.00035395 1/2047 * (1/1.38019122262781)
- (0x00001612)*/
- 0x0005cc37, /* bits=12 0.00017693 1/4095 * (1/1.38019122262781)
- (0x00002c27)*/
- 0x0002e604, /* bits=13 0.00008846 1/8191 * (1/1.38019122262781)
- (0x00005852)*/
- 0x000172fc, /* bits=14 0.00004422 1/16383 * (1/1.38019122262781)
- (0x0000b0a7)*/
- 0x0000b97d, /* bits=15 0.00002211 1/32767 * (1/1.38019122262781)
- (0x00016150)*/
- 0x00005cbe, /* bits=16 0.00001106 1/65535 * (1/1.38019122262781)
- (0x0002c2a5)*/
-};
-
-const uint32_t dequant_long_unscaled[17] = {
- 0, 0, 0x2aaaaaab, /* bits=2 0.33333333 1/3 (0x00000005)*/
- 0x12492492, /* bits=3 0.14285714 1/7 (0x0000000e)*/
- 0x08888889, /* bits=4 0.06666667 1/15 (0x0000001d)*/
- 0x04210842, /* bits=5 0.03225806 1/31 (0x0000003e)*/
- 0x02082082, /* bits=6 0.01587302 1/63 (0x0000007e)*/
- 0x01020408, /* bits=7 0.00787402 1/127 (0x000000fe)*/
- 0x00808081, /* bits=8 0.00392157 1/255 (0x000001fd)*/
- 0x00402010, /* bits=9 0.00195695 1/511 (0x000003fe)*/
- 0x00200802, /* bits=10 0.00097752 1/1023 (0x000007fe)*/
- 0x00100200, /* bits=11 0.00048852 1/2047 (0x00000ffe)*/
- 0x00080080, /* bits=12 0.00024420 1/4095 (0x00001ffe)*/
- 0x00040020, /* bits=13 0.00012209 1/8191 (0x00003ffe)*/
- 0x00020008, /* bits=14 0.00006104 1/16383 (0x00007ffe)*/
- 0x00010002, /* bits=15 0.00003052 1/32767 (0x0000fffe)*/
- 0x00008001, /* bits=16 0.00001526 1/65535 (0x0001fffc)*/
-};
#if defined(OI_DEBUG) || defined(PRINT_SAMPLES) || defined(PRINT_SCALEFACTORS)
#include <stdio.h>