hal: Add XML parser for platform info
change 1
Add XML parser which parses the platform_info.xml
on the device. That xml contains ACDB ID information
and is populated from the device project folder to
the /etc folder on the device. It is used to overwrite
hardcoded ACDB ID's in platform.c.
change 2
Move platform_parser to root hal directory. Rename
platform_parser to platform_info. Change name of
XML file read from platform_info.xml to
audio_platform_info.xml. The xml now only needs
information for ACDB ID's that you want overwritten.
Names in the XML now match sound device enums in
platform.c.
(cherry-picked from CAF commits
61764e3b8069b819c3da19a6bb38b37ad173bf50, 5588688cbdd065a3572afb032e48a265790dfea2)
Change-Id: Ie5978f609bbe9d60a64e20a0906d6bd7a8c48e1b
diff --git a/hal/platform_api.h b/hal/platform_api.h
index 81fbc08..7d54381 100644
--- a/hal/platform_api.h
+++ b/hal/platform_api.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef QCOM_AUDIO_PLATFORM_API_H
-#define QCOM_AUDIO_PLATFORM_API_H
+#ifndef AUDIO_PLATFORM_API_H
+#define AUDIO_PLATFORM_API_H
void *platform_init(struct audio_device *adev);
void platform_deinit(void *platform);
@@ -23,6 +23,8 @@
void platform_add_backend_name(void *platform, char *mixer_path,
snd_device_t snd_device);
int platform_get_pcm_device_id(audio_usecase_t usecase, int device_type);
+int platform_get_snd_device_index(char *snd_device_index_name);
+int platform_set_snd_device_acdb_id(snd_device_t snd_device, unsigned int acdb_id);
int platform_send_audio_calibration(void *platform, snd_device_t snd_device);
int platform_switch_voice_call_device_pre(void *platform);
int platform_switch_voice_call_enable_device_config(void *platform,
@@ -54,4 +56,7 @@
int platform_start_incall_music_usecase(void *platform);
int platform_stop_incall_music_usecase(void *platform);
-#endif // QCOM_AUDIO_PLATFORM_API_H
+/* From platform_info_parser.c */
+int platform_info_init(void);
+
+#endif // AUDIO_PLATFORM_API_H