Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: HAVE_RECORDING bug

HAVE_RECORDING bug

From: James Vasile <list.collection_at_gmail.com>
Date: Tue, 20 May 2008 17:43:57 -0400

I downloaded the daily build of Rockbox yesterday for my video ipod. Today
I decided to recompile without the audio recording features (I don't have a
mic on this ipod). When I commented out the line defining HAVE_RECORDING,
it wouldn't compile without the below patch because SOUND_LEFT_GAIN,
SOUND_RIGHT_GAIN and SOUND_MIC_GAIN only get defined in
firmware/export/audiohw.h if HAVE_RECORDING is defined. In order for
HAVE_RECORDING to work properly, that value needs to be tested in wm8758.c
as it is in, say, wm8731.c.

I haven't gotten very deep in the code, but casual inspection suggests
as3514.c and other some others might suffer from the same defect. The one
file patched below was the only one I needed to change for this target.

Index: firmware/drivers/audio/wm8758.c
===================================================================
--- firmware/drivers/audio/wm8758.c (revision 17585)
+++ firmware/drivers/audio/wm8758.c (working copy)
@@ -38,9 +38,11 @@
     [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
     [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
     [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
+#if defined(HAVE_RECORDING)
     [SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0},
     [SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0},
     [SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16},
+#endif
     [SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 1},
     [SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1},
 };
Received on 2008-05-20


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa