Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: m-labs/flickernoise
base: e240f4e
...
head fork: m-labs/flickernoise
compare: 9a58ed8
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 7 additions and 6 deletions.
  1. +6 −5 src/gui/audio.c
  2. +1 −1  src/shortcuts.c
View
11 src/gui/audio.c
@@ -79,7 +79,7 @@ static void set_level(int channel, unsigned int val)
{
int request;
- val = val | (val << 8);
+ val = channel ? val | (mic_boost << 8) : val | (val << 8);
request = channel ? SOUND_MIXER_WRITE(SOUND_MIXER_MIC) : SOUND_MIXER_WRITE(SOUND_MIXER_LINE);
ioctl(mixer_fd, request, &val);
}
@@ -119,9 +119,9 @@ static void mute_callback(mtk_event *e, void *arg)
}
}
-static void set_micboost(int boost)
+static inline void set_micboost(int boost)
{
- ioctl(mixer_fd, SOUND_MIXER_WRITE(SOUND_MIXER_MIC_BOOST), &boost);
+ set_level(1, (mic_mute ? 0 : mic_vol) | (boost << 8));
}
static void micboost_callback(mtk_event *e, void *arg)
@@ -145,16 +145,17 @@ void load_audio_config(void)
mtk_cmdf(appid, "b_mutmic.set(-state %s)", mic_mute ? "on" : "off");
mtk_cmdf(appid, "b_micboost.set(-state %s)", mic_boost ? "on" : "off");
+ set_micboost(mic_boost);
+
if(line_mute)
set_level(0, 0);
else
set_level(0, line_vol);
+
if(mic_mute)
set_level(1, 0);
else
set_level(1, mic_vol);
-
- set_micboost(mic_boost);
}
static void set_config(void)
View
2  src/shortcuts.c
@@ -105,7 +105,7 @@ static void shortcuts_callback(mtk_event *e, int count)
clean_shutdown(1);
else if(ctrl && (e[i].press.code == MTK_KEY_F1))
switch_resolution();
- else if(ctrl && (e[i].press.code == MTK_KEY_PAUSE))
+ else if(e[i].press.code == MTK_KEY_SYSRQ)
fbgrab(NULL);
else if(ctrl && (e[i].press.code == MTK_KEY_H))
help();

No commit comments for this range

Something went wrong with that request. Please try again.