audio: select camcorder snd device according to camera orientation
Add audio parameter indicating use of front or back camera to select
proper input path tuning in camcorder mode.
Also take device orientation for stereo channel swaping.
Bug: 118022272
Test: verified with camera service patch sending camera facing parameter
Change-Id: If24b47d922aeedaaa144f4a5f4cacddce2c9eeaf
(cherry picked from commit 5f4ca9505df8177127c1f1a7d292d684ec30ff50)
(cherry picked from commit 5727439e2f5302a225310f4af3f373e9e8424495)
diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h
index 6203cf8..41aa346 100644
--- a/hal/msm8974/platform.h
+++ b/hal/msm8974/platform.h
@@ -229,7 +229,7 @@
SND_DEVICE_IN_BT_SCO_MIC_SWB,
SND_DEVICE_IN_BT_SCO_MIC_SWB_NREC,
SND_DEVICE_IN_BT_A2DP,
- SND_DEVICE_IN_CAMCORDER_MIC,
+ SND_DEVICE_IN_CAMCORDER_LANDSCAPE,
SND_DEVICE_IN_VOICE_DMIC,
SND_DEVICE_IN_VOICE_DMIC_SB,
SND_DEVICE_IN_VOICE_DMIC_TMUS,
@@ -303,10 +303,16 @@
SND_DEVICE_IN_INCALL_REC_TX,
SND_DEVICE_IN_INCALL_REC_RX_TX,
SND_DEVICE_IN_LINE,
+ SND_DEVICE_IN_CAMCORDER_INVERT_LANDSCAPE,
+ SND_DEVICE_IN_CAMCORDER_PORTRAIT,
+ SND_DEVICE_IN_CAMCORDER_SELFIE_LANDSCAPE,
+ SND_DEVICE_IN_CAMCORDER_SELFIE_INVERT_LANDSCAPE,
+ SND_DEVICE_IN_CAMCORDER_SELFIE_PORTRAIT,
SND_DEVICE_IN_END,
SND_DEVICE_MAX = SND_DEVICE_IN_END,
-
+ /* For legacy xml file parsing */
+ SND_DEVICE_IN_CAMCORDER_MIC = SND_DEVICE_IN_CAMCORDER_LANDSCAPE,
};
#define INPUT_SAMPLING_RATE_DSD64 2822400
#define INPUT_SAMPLING_RATE_DSD128 5644800