handsfree-audio: Set socket parameters

In the AG case, the voice setting needs to be set before we can
use Transparent SCO mode, which is necessary for Wideband speech
support.
This commit is contained in:
Vinicius Costa Gomes 2013-09-10 21:09:42 -03:00 committed by Denis Kenzior
parent ff16aed8bd
commit e84bd27b99
1 changed files with 5 additions and 0 deletions

View File

@ -478,6 +478,11 @@ int ofono_handsfree_card_connect_sco(struct ofono_handsfree_card *card)
addr.sco_family = AF_BLUETOOTH;
bt_str2ba(card->remote, &addr.sco_bdaddr);
if (apply_settings_from_codec(sk, card->selected_codec) == FALSE) {
close(sk);
return -1;
}
ret = connect(sk, (struct sockaddr *) &addr, sizeof(addr));
if (ret < 0 && errno != EINPROGRESS) {
close(sk);