audio: Copy generic HAL and bt-audio configs from Cuttlefish

cherry-picked from upstream device/linaro/dragonboard project.

Existing HAL copied from goldfish days seem to be obsolete
and didn't work as expected with both analog speakers (WIP)
and BT audio profiles. So copied generic audio HAL from
Cuttlefish and verified BT and analog audio playback.

Change-Id: Ib7fbea1c02240663e3406865f3a21544b1aec793
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Amit Pundir <pundiramit@gmail.com>
diff --git a/device-common.mk b/device-common.mk
index 1d955b0..5309c5d 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -90,11 +90,13 @@
     android.hardware.audio@4.0-impl:32 \
     android.hardware.audio.effect@4.0-impl:32 \
     android.hardware.audio@2.0-service \
-    android.hardware.soundtrigger@2.0-impl
+    android.hardware.soundtrigger@2.0-impl \
+    android.hardware.bluetooth.audio@2.0-impl
 
 # Build default bluetooth a2dp and usb audio HALs
 PRODUCT_PACKAGES += \
     audio.a2dp.default \
+    audio.bluetooth.default \
     audio.usb.default \
     audio.r_submix.default
 
diff --git a/manifest.xml b/manifest.xml
index d108ec5..fee2945 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -27,6 +27,24 @@
         </interface>
     </hal>
     <hal format="hidl">
+        <name>android.hardware.bluetooth.a2dp</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IBluetoothAudioOffload</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.bluetooth.audio</name>
+        <transport>hwbinder</transport>
+        <version>2.0</version>
+        <interface>
+            <name>IBluetoothAudioProvidersFactory</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
         <name>android.hardware.configstore</name>
         <transport>hwbinder</transport>
         <version>1.1</version>
@@ -134,24 +152,6 @@
         </interface>
     </hal>
     <hal format="hidl">
-        <name>android.hardware.bluetooth.a2dp</name>
-        <transport>hwbinder</transport>
-        <version>1.0</version>
-        <interface>
-            <name>IBluetoothAudioOffload</name>
-            <instance>default</instance>
-        </interface>
-    </hal>
-    <hal format="hidl">
-        <name>android.hardware.bluetooth.audio</name>
-        <transport>hwbinder</transport>
-        <version>2.0</version>
-        <interface>
-            <name>IBluetoothAudioProvidersFactory</name>
-            <instance>default</instance>
-        </interface>
-    </hal>
-    <hal format="hidl">
         <name>android.hardware.wifi.supplicant</name>
         <transport>hwbinder</transport>
         <version>1.2</version>