hsp: send microphone and speaker gain

This commit is contained in:
Matthias Ringwald 2015-12-09 16:41:21 +01:00
parent cd13042dd3
commit a0a5d73f40
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;