Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 2 files changed
  • 0 comments
  • 1 contributor
11  src/gui/audio.c
@@ -79,7 +79,7 @@ static void set_level(int channel, unsigned int val)
79 79
 {
80 80
 	int request;
81 81
 
82  
-	val = val | (val << 8);
  82
+	val = channel ? val | (mic_boost << 8) : val | (val << 8);
83 83
 	request = channel ? SOUND_MIXER_WRITE(SOUND_MIXER_MIC) : SOUND_MIXER_WRITE(SOUND_MIXER_LINE);
84 84
 	ioctl(mixer_fd, request, &val);
85 85
 }
@@ -119,9 +119,9 @@ static void mute_callback(mtk_event *e, void *arg)
119 119
 	}
120 120
 }
121 121
 
122  
-static void set_micboost(int boost)
  122
+static inline void set_micboost(int boost)
123 123
 {
124  
-	ioctl(mixer_fd, SOUND_MIXER_WRITE(SOUND_MIXER_MIC_BOOST), &boost);
  124
+	set_level(1, (mic_mute ? 0 : mic_vol) | (boost << 8));
125 125
 }
126 126
 
127 127
 static void micboost_callback(mtk_event *e, void *arg)
@@ -145,16 +145,17 @@ void load_audio_config(void)
145 145
 	mtk_cmdf(appid, "b_mutmic.set(-state %s)", mic_mute ? "on" : "off");
146 146
 	mtk_cmdf(appid, "b_micboost.set(-state %s)", mic_boost ? "on" : "off");
147 147
 
  148
+	set_micboost(mic_boost);
  149
+
148 150
 	if(line_mute)
149 151
 		set_level(0, 0);
150 152
 	else
151 153
 		set_level(0, line_vol);
  154
+
152 155
 	if(mic_mute)
153 156
 		set_level(1, 0);
154 157
 	else
155 158
 		set_level(1, mic_vol);
156  
-
157  
-	set_micboost(mic_boost);
158 159
 }
159 160
 
160 161
 static void set_config(void)
2  src/shortcuts.c
@@ -105,7 +105,7 @@ static void shortcuts_callback(mtk_event *e, int count)
105 105
 				clean_shutdown(1);
106 106
 			else if(ctrl && (e[i].press.code == MTK_KEY_F1))
107 107
 				switch_resolution();
108  
-			else if(ctrl && (e[i].press.code == MTK_KEY_PAUSE))
  108
+			else if(e[i].press.code == MTK_KEY_SYSRQ)
109 109
 				fbgrab(NULL);
110 110
 			else if(ctrl && (e[i].press.code == MTK_KEY_H))
111 111
 				help();

No commit comments for this range

Something went wrong with that request. Please try again.