hikey: Enable usb audio support am: 52ebc4660f
am: 0a9dd893e8

* commit '0a9dd893e87d40f3c01bec997f6ec68b23aab5b5':
  hikey: Enable usb audio support

Change-Id: Ie882b057c0af8c5b11e5248dad2815b317f7eee7
diff --git a/audio/audio_policy.conf b/audio/audio_policy.conf
index dc1c653..82b5979 100644
--- a/audio/audio_policy.conf
+++ b/audio/audio_policy.conf
@@ -71,8 +71,8 @@
     inputs {
       usb_device {
         sampling_rates dynamic
-        channel_masks AUDIO_CHANNEL_IN_STEREO
-        formats AUDIO_FORMAT_PCM_16_BIT
+        channel_masks dynamic
+        formats dynamic
         devices AUDIO_DEVICE_IN_USB_DEVICE
       }
     }
diff --git a/device.mk b/device.mk
index ed87bd4..5953761 100644
--- a/device.mk
+++ b/device.mk
@@ -49,8 +49,12 @@
 # Build and run only ART
 PRODUCT_RUNTIMES := runtime_libart_default
 
-# Build BT a2dp audio HAL
-PRODUCT_PACKAGES += audio.a2dp.default
+# Build HiKey HDMI, bluetooth a2dp and usb audio HALs
+PRODUCT_PACKAGES += audio.primary.hikey \
+		    audio.a2dp.default \
+		    audio.usb.default \
+		    audio.r_submix.default \
+		    tinyplay
 
 # Include USB speed switch App
 PRODUCT_PACKAGES += UsbSpeedSwitch
@@ -61,9 +65,6 @@
 # Build gralloc for hikey
 PRODUCT_PACKAGES += gralloc.hikey
 
-# Build Audio Hal for hikey
-PRODUCT_PACKAGES += audio.primary.hikey
-
 # Set zygote config
 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote64_32
 PRODUCT_COPY_FILES += system/core/rootdir/init.zygote64_32.rc:root/init.zygote64_32.rc
@@ -80,7 +81,8 @@
         frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \
         frameworks/native/data/etc/android.software.app_widgets.xml:system/etc/permissions/android.software.app_widgets.xml \
         frameworks/native/data/etc/android.software.backup.xml:system/etc/permissions/android.software.backup.xml \
-        frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml
+        frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
+        frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml
 
 # Include vendor binaries
 $(call inherit-product-if-exists, vendor/linaro/hikey/device-vendor.mk)