diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2013-04-15 10:54:51 -0300 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2013-04-15 07:01:59 -0500 |
commit | f65070b3779013656d03ed74f8d176489da53537 (patch) | |
tree | 5a1002619974fbff27bee1fc530d4efa40d6cdcf /src/handsfree-audio.c | |
parent | 4e7f0690e9827eef6cf413611c589bb023fcb7c1 (diff) | |
download | ofono-f65070b3779013656d03ed74f8d176489da53537.tar.bz2 |
handsfree-audio: Send the selected codec
This patch removes the hard-coded CVSD codec, and adds the selected
codec in the NewConnection method call, notifying the agent the codec
previously selected for the audio connection.
Diffstat (limited to 'src/handsfree-audio.c')
-rw-r--r-- | src/handsfree-audio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 8e8d4606..7f5b33cb 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@ -67,11 +67,10 @@ static guint sco_watch = 0; static GSList *drivers = 0; static ofono_bool_t has_wideband = FALSE; -static void send_new_connection(const char *card, int fd) +static void send_new_connection(const char *card, int fd, uint8_t codec) { DBusMessage *msg; DBusMessageIter iter; - uint8_t codec = HFP_CODEC_CVSD; msg = dbus_message_new_method_call(agent->owner, agent->path, HFP_AUDIO_AGENT_INTERFACE, "NewConnection"); @@ -150,7 +149,7 @@ static gboolean sco_accept(GIOChannel *io, GIOCondition cond, return TRUE; } - send_new_connection(card->path, nsk); + send_new_connection(card->path, nsk, card->selected_codec); close(nsk); return TRUE; @@ -252,7 +251,7 @@ static gboolean sco_connect_cb(GIOChannel *io, GIOCondition cond, sk = g_io_channel_unix_get_fd(io); - send_new_connection(card->path, sk); + send_new_connection(card->path, sk, card->selected_codec); close(sk); |