hal: add support for I2S based external modem
There are specific xml files used for I2S based external modem.
Add check to load the correct xml file.
For I2S based external modem, voice sample rate can be 8k or
16k based on vocoder type. Call csd client api to get the
correct sample rate to configure voice call.
Change-Id: Ie9799336620f49a890355be74fe1830eb348cabe
diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h
index e80d3f1..e2ec822 100644
--- a/hal/msm8974/platform.h
+++ b/hal/msm8974/platform.h
@@ -221,7 +221,7 @@
#define LIB_CSD_CLIENT "libcsd-client.so"
/* CSD-CLIENT related functions */
-typedef int (*init_t)();
+typedef int (*init_t)(bool);
typedef int (*deinit_t)();
typedef int (*disable_device_t)();
typedef int (*enable_device_config_t)(int, int);
@@ -235,6 +235,7 @@
typedef int (*stop_playback_t)(uint32_t);
typedef int (*start_record_t)(uint32_t, int);
typedef int (*stop_record_t)(uint32_t);
+typedef int (*get_sample_rate_t)(uint32_t *);
/* CSD Client structure */
struct csd_data {
void *csd_client;
@@ -252,6 +253,7 @@
stop_playback_t stop_playback;
start_record_t start_record;
stop_record_t stop_record;
+ get_sample_rate_t get_sample_rate;
};
#endif // QCOM_AUDIO_PLATFORM_H