hal: Add support for Native Audio(44.1kHz) on msm8952

- Changes for device/Usecase selection
- Add new and combo devices for headphones
- Combo device handling
- Add new backend and logic to handle multiple
  backends
- Remove hardcoded mixers and select them
  dynamically based on the device.
- Port all the above changes from msm8974
  platfrom to msm8916

Change-Id: Ib9c9e8fcd6530e35700fa2369f2029cf2de3199f
diff --git a/hal/msm8916/platform.h b/hal/msm8916/platform.h
index aae05d0..e56bad1 100644
--- a/hal/msm8916/platform.h
+++ b/hal/msm8916/platform.h
@@ -37,7 +37,11 @@
 /*
  * Below are the devices for which is back end is same, SLIMBUS_0_RX.
  * All these devices are handled by the internal HW codec. We can
- * enable any one of these devices at any time
+ * enable any one of these devices at any time. An exception here is
+ * 44.1k headphone which uses different backend. This is filtered
+ * as different hal internal device in the code but remains same
+ * as standard android device AUDIO_DEVICE_OUT_WIRED_HEADPHONE
+ * for other layers.
  */
 #define AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND \
     (AUDIO_DEVICE_OUT_EARPIECE | AUDIO_DEVICE_OUT_SPEAKER | \
@@ -163,13 +167,16 @@
 };
 
 #define DEFAULT_OUTPUT_SAMPLING_RATE 48000
-#define OUTPUT_SAMPLING_RATE_44100   44100
-
+#define OUTPUT_SAMPLING_RATE_44100      44100
+#define MAX_PORT                        6
+#define ALL_CODEC_BACKEND_PORT          0
+#define HEADPHONE_44_1_BACKEND_PORT     5
 enum {
     DEFAULT_CODEC_BACKEND,
     HEADPHONE_44_1_BACKEND,
     MAX_CODEC_BACKENDS
 };
+#define AUDIO_PARAMETER_KEY_NATIVE_AUDIO "audio.nat.codec.enabled"
 
 #define ALL_SESSION_VSID                0xFFFFFFFF
 #define DEFAULT_MUTE_RAMP_DURATION_MS   20