From a0a5d73f402091d99db877a78644032df11c50ec Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 9 Dec 2015 16:41:21 +0100 Subject: [PATCH] hsp: send microphone and speaker gain --- src/hsp_ag.c | 4 ++-- src/hsp_hs.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hsp_ag.c b/src/hsp_ag.c index ab003982d..b771c9b67 100644 --- a/src/hsp_ag.c +++ b/src/hsp_ag.c @@ -406,7 +406,7 @@ static void hsp_run(void){ int gain = ag_microphone_gain; ag_microphone_gain = -1; char buffer[10]; - sprintf(buffer, "%s=%d\r\n", HSP_MICROPHONE_GAIN, ag_microphone_gain); + sprintf(buffer, "%s=%d\r\n", HSP_MICROPHONE_GAIN, gain); err = hsp_ag_send_str_over_rfcomm(rfcomm_cid, buffer); if (err) { ag_microphone_gain = gain; @@ -418,7 +418,7 @@ static void hsp_run(void){ int gain = ag_speaker_gain; ag_speaker_gain = -1; char buffer[10]; - sprintf(buffer, "%s=%d\r\n", HSP_SPEAKER_GAIN, ag_speaker_gain); + sprintf(buffer, "%s=%d\r\n", HSP_SPEAKER_GAIN, gain); err = hsp_ag_send_str_over_rfcomm(rfcomm_cid, buffer); if (err) { ag_speaker_gain = gain; diff --git a/src/hsp_hs.c b/src/hsp_hs.c index a6d3ae7f4..76424b64e 100644 --- a/src/hsp_hs.c +++ b/src/hsp_hs.c @@ -351,7 +351,7 @@ static void hsp_run(void){ int gain = hs_microphone_gain; hs_microphone_gain = -1; char buffer[20]; - sprintf(buffer, "%s=%d\r\n", HSP_HS_MICROPHONE_GAIN, hs_microphone_gain); + sprintf(buffer, "%s=%d\r\n", HSP_HS_MICROPHONE_GAIN, gain); err = hsp_hs_send_str_over_rfcomm(rfcomm_cid, buffer); if (err) { hs_microphone_gain = gain; @@ -363,7 +363,7 @@ static void hsp_run(void){ int gain = hs_speaker_gain; hs_speaker_gain = -1; char buffer[20]; - sprintf(buffer, "%s=%d\r\n", HSP_HS_SPEAKER_GAIN, hs_speaker_gain); + sprintf(buffer, "%s=%d\r\n", HSP_HS_SPEAKER_GAIN, gain); err = hsp_hs_send_str_over_rfcomm(rfcomm_cid, buffer); if (err) { hs_speaker_gain = gain;