summaryrefslogtreecommitdiff
path: root/audio/headset.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2010-10-15 10:53:54 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2010-10-15 10:53:54 +0300
commitcf0e128d6f68b90277614f526361d7c62213e3ff (patch)
treea92080d825df7e1ebf395642b3ca25d5f4327033 /audio/headset.c
parent60d5a0b117ccc4a7397c8f5d6d1fe733dac2ee6d (diff)
downloadbluez-cf0e128d6f68b90277614f526361d7c62213e3ff.tar.gz
Set initial HFP/HSP mic and speaker gain values to max instead of min
To avoid the issue of applications thinking that the headset is muted if it hasn't sent any update for the gain values it's better to initialize them to the maximum (15) instead of the minimum (0).
Diffstat (limited to 'audio/headset.c')
-rw-r--r--audio/headset.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/headset.c b/audio/headset.c
index 9955d4b8b..0763585ab 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -1376,6 +1376,8 @@ void headset_connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
DBG("%s: Connected to %s", dev->path, hs_address);
hs->slc = g_new0(struct headset_slc, 1);
+ hs->slc->sp_gain = 15;
+ hs->slc->mic_gain = 15;
hs->slc->nrec = TRUE;
/* In HFP mode wait for Service Level Connection */