Bluetooth: Audio: Fix initialization of not present module
Do not initialize the media control service if it is not configured. This is a temporary fix, there is an issue to fix this properly: https://github.com/zephyrproject-rtos/zephyr/issues/42965 Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
This commit is contained in:
parent
e3a7ed4766
commit
8e509b47a9
1 changed files with 8 additions and 1 deletions
|
@ -2694,16 +2694,23 @@ int media_proxy_pl_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set up the media control service */
|
/* Set up the media control service */
|
||||||
|
/* TODO: Fix initialization - who initializes what
|
||||||
|
* https://github.com/zephyrproject-rtos/zephyr/issues/42965
|
||||||
|
* Temporarily only initializing if service is present
|
||||||
|
*/
|
||||||
|
#ifdef CONFIG_BT_MCS
|
||||||
#ifdef CONFIG_BT_MPL_OBJECTS
|
#ifdef CONFIG_BT_MPL_OBJECTS
|
||||||
ret = bt_mcs_init(&ots_cbs);
|
ret = bt_mcs_init(&ots_cbs);
|
||||||
#else
|
#else
|
||||||
ret = bt_mcs_init(NULL);
|
ret = bt_mcs_init(NULL);
|
||||||
#endif /* CONFIG_BT_MPL_OBJECTS */
|
#endif /* CONFIG_BT_MPL_OBJECTS */
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
BT_ERR("Could not init MCS: %d", ret);
|
BT_ERR("Could not init MCS: %d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
BT_WARN("MCS not configured");
|
||||||
|
#endif /* CONFIG_BT_MCS */
|
||||||
|
|
||||||
/* Get a Content Control ID */
|
/* Get a Content Control ID */
|
||||||
pl.content_ctrl_id = bt_ccid_get_value();
|
pl.content_ctrl_id = bt_ccid_get_value();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue