diff options
author | Dan Everton <dan@iocaine.org> | 2007-11-24 07:51:00 +0000 |
---|---|---|
committer | Dan Everton <dan@iocaine.org> | 2007-11-24 07:51:00 +0000 |
commit | d7e1f7714699fa201bda4f14ed38bfce10949d94 (patch) | |
tree | 594b7a18c82f9fcedc8cd8681bb5e8aa196e1bfd /firmware/export | |
parent | a334bd2891d50fca3b073e2262d6b37ae624f1a0 (diff) |
Commit FS#7440. The iPod Video doesn't actually have a hardware equalizer. It does have hardware bass/treble settings with configurable cutoff. So make the bass/treble settings use the hardware and remove the hardware equalizer configuration.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15782 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/audiohw.h | 4 | ||||
-rw-r--r-- | firmware/export/sound.h | 4 | ||||
-rw-r--r-- | firmware/export/wm8758.h | 8 |
3 files changed, 14 insertions, 2 deletions
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h index c5093a151a..5dc7550478 100644 --- a/firmware/export/audiohw.h +++ b/firmware/export/audiohw.h @@ -67,6 +67,10 @@ enum { SOUND_RIGHT_GAIN, SOUND_MIC_GAIN, #endif +#ifdef HAVE_WM8758 + SOUND_BASS_CUTOFF, + SOUND_TREBLE_CUTOFF, +#endif }; enum Channel { diff --git a/firmware/export/sound.h b/firmware/export/sound.h index 929b83b9e6..5933f4cc75 100644 --- a/firmware/export/sound.h +++ b/firmware/export/sound.h @@ -41,6 +41,10 @@ void sound_set_bass(int value); void sound_set_treble(int value); void sound_set_channels(int value); void sound_set_stereo_width(int value); +#ifdef HAVE_WM8758 +void sound_set_bass_cutoff(int value); +void sound_set_treble_cutoff(int value); +#endif #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) void sound_set_loudness(int value); void sound_set_avc(int value); diff --git a/firmware/export/wm8758.h b/firmware/export/wm8758.h index 6d3220a5fc..df60851550 100644 --- a/firmware/export/wm8758.h +++ b/firmware/export/wm8758.h @@ -32,12 +32,12 @@ extern int audiohw_set_master_vol(int vol_l, int vol_r); extern int audiohw_set_lineout_vol(int vol_l, int vol_r); extern int audiohw_set_mixer_vol(int channel1, int channel2); extern void audiohw_set_bass(int value); +extern void audiohw_set_bass_cutoff(int value); extern void audiohw_set_treble(int value); +extern void audiohw_set_treble_cutoff(int value); extern void audiohw_set_nsorder(int order); extern void audiohw_set_sample_rate(int sampling_control); -extern void audiohw_set_equalizer_band(int band, int freq, int bw, int gain); - #define RESET 0x00 #define PWRMGMT1 0x01 #define PWRMGMT2 0x02 @@ -70,6 +70,10 @@ extern void audiohw_set_equalizer_band(int band, int freq, int bw, int gain); #define EQ3 0x14 #define EQ4 0x15 #define EQ5 0x16 +#define EQ_GAIN_MASK 0x001f +#define EQ_CUTOFF_MASK 0x0060 +#define EQ_GAIN_VALUE(x) (((-x) + 12) & 0x1f) +#define EQ_CUTOFF_VALUE(x) ((((x) - 1) & 0x03) << 5) /* Register settings for the supported samplerates: */ #define WM8758_8000HZ 0x4d |