char *local;
char *path;
DBusMessage *msg;
+ unsigned char selected_codec;
const struct ofono_handsfree_card_driver *driver;
void *driver_data;
};
card = g_new0(struct ofono_handsfree_card, 1);
+ card->selected_codec = HFP_CODEC_CVSD;
+
card_list = g_slist_prepend(card_list, card);
for (l = drivers; l; l = l->next) {
g_free(card);
}
+ofono_bool_t ofono_handsfree_card_set_codec(struct ofono_handsfree_card *card,
+ unsigned char codec)
+{
+ if (codec == HFP_CODEC_CVSD)
+ goto done;
+
+ if (codec == HFP_CODEC_MSBC && has_wideband)
+ goto done;
+
+ return FALSE;
+
+done:
+ card->selected_codec = codec;
+
+ return TRUE;
+}
+
ofono_bool_t ofono_handsfree_audio_has_wideband(void)
{
return has_wideband;