Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/flickernoise
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e240f4e
Choose a base ref
...
head repository: m-labs/flickernoise
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9a58ed8
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 28, 2012

  1. Copy the full SHA
    bfe53bb View commit details

Commits on Mar 29, 2012

  1. Copy the full SHA
    9a58ed8 View commit details
Showing with 7 additions and 6 deletions.
  1. +6 −5 src/gui/audio.c
  2. +1 −1 src/shortcuts.c
11 changes: 6 additions & 5 deletions src/gui/audio.c
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion src/shortcuts.c
Original file line number Diff line number Diff line change
@@ -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();