audio: support custom acdb for external device
add the specific external device setting in audio_platform_info.xml
For example:
<external_specific_dev>
<ext_device name="SND_DEVICE_OUT_USB_HEADSET" usbid="18d1:5034" acdb_id="10" />
</external_specific_dev>
Bug: 117336751
Test: manual test ok
Change-Id: Ie9abcadd9bcd6d06c5d8f0a9807c3935ee4a1d35
Signed-off-by: Carter Hsu <carterhsu@google.com>
Signed-off-by: Robert Lee <lerobert@google.com>
(cherry picked from commit 017c63ae09841070e587d0f9f5c396efcb07e46d)
diff --git a/hal/platform_api.h b/hal/platform_api.h
index f4acf1f..f9e5f2a 100644
--- a/hal/platform_api.h
+++ b/hal/platform_api.h
@@ -185,6 +185,9 @@
const char *operator,
const char *mixer_path,
unsigned int acdb_id);
+void platform_add_external_specific_device(snd_device_t snd_device,
+ const char *name,
+ unsigned int acdb_id);
void platform_get_parameters(void *platform, struct str_parms *query,
struct str_parms *reply);
int platform_set_parameters(void *platform, struct str_parms *parms);