diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2003-07-22 18:34:23 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2003-07-22 18:34:23 +0000 |
commit | 4bb3f80f2737ff86c4a8fdb074a1a7bce0aa3624 (patch) | |
tree | 83b7ef70d19188765012ac5ba648a85c32f17637 /firmware/mpeg.c | |
parent | cad92039846dfe6da48b385c350f3456bb990527 (diff) | |
download | rockbox-4bb3f80f2737ff86c4a8fdb074a1a7bce0aa3624.tar.gz rockbox-4bb3f80f2737ff86c4a8fdb074a1a7bce0aa3624.zip |
Setting the lowest mic gain no longer turns off the mic (bug #774349)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3865 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r-- | firmware/mpeg.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 22776150dc..b59c058598 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -2142,7 +2142,7 @@ static void init_recording(void) | |||
2142 | mas_writereg(0xa3, 0x90); | 2142 | mas_writereg(0xa3, 0x90); |
2143 | } | 2143 | } |
2144 | 2144 | ||
2145 | /* Enable the Left A/D Converter */ | 2145 | /* Enable A/D Converters */ |
2146 | mas_codec_writereg(0x0, 0xcccd); | 2146 | mas_codec_writereg(0x0, 0xcccd); |
2147 | 2147 | ||
2148 | /* Copy left channel to right (mono mode) */ | 2148 | /* Copy left channel to right (mono mode) */ |
@@ -2925,14 +2925,15 @@ void mpeg_set_recording_options(int frequency, int quality, | |||
2925 | } | 2925 | } |
2926 | } | 2926 | } |
2927 | 2927 | ||
2928 | void mpeg_set_recording_gain(int left, int right, int mic) | 2928 | /* If use_mic is true, the left gain is used */ |
2929 | void mpeg_set_recording_gain(int left, int right, bool use_mic) | ||
2929 | { | 2930 | { |
2930 | /* Enable both left and right A/D */ | 2931 | /* Enable both left and right A/D */ |
2931 | mas_codec_writereg(0x0, | 2932 | mas_codec_writereg(0x0, |
2932 | (left << 12) | | 2933 | (left << 12) | |
2933 | (right << 8) | | 2934 | (right << 8) | |
2934 | (mic << 4) | | 2935 | (left << 4) | |
2935 | (mic?0x0008:0) | /* Connect left A/D to mic */ | 2936 | (use_mic?0x0008:0) | /* Connect left A/D to mic */ |
2936 | 0x0007); | 2937 | 0x0007); |
2937 | } | 2938 | } |
2938 | 2939 | ||