audiohw: remove unused BALANCE_CAP and CLIPPING_CAP
rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Mon, 20 Jul 2026 12:47:13 -0400
| Newsgroups | gmane.comp.systems.archos.rockbox.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit f463f4a17a9441def4e51cd1568d7fd36d261749 Author: Skye <[email protected]> Date: Wed May 20 18:04:01 2026 +0900 audiohw: remove unused BALANCE_CAP and CLIPPING_CAP Change-Id: I8905e9a656fcba20c8adeb840d148bcd97511665 diff --git a/firmware/drivers/audio/ctru.c b/firmware/drivers/audio/ctru.c index 05cca2e76f..b973b1fb87 100644 --- a/firmware/drivers/audio/ctru.c +++ b/firmware/drivers/audio/ctru.c @@ -37,9 +37,6 @@ void audiohw_set_volume(int vol_l, int vol_r) (void)vol_l; (void)vol_r; } -#if defined(AUDIOHW_HAVE_BALANCE) -void audiohw_set_balance(int value) { (void)value; } -#endif #ifndef HAVE_SW_TONE_CONTROLS #if defined(AUDIOHW_HAVE_BASS) void audiohw_set_bass(int value) { (void)value; } diff --git a/firmware/drivers/audio/sdl.c b/firmware/drivers/audio/sdl.c index 7250f36124..d85fba9933 100644 --- a/firmware/drivers/audio/sdl.c +++ b/firmware/drivers/audio/sdl.c @@ -75,9 +75,6 @@ void audiohw_set_prescaler(int value) } #endif /* AUDIOHW_HAVE_PRESCALER */ -#if defined(AUDIOHW_HAVE_BALANCE) -void audiohw_set_balance(int value) { (void)value; } -#endif #ifndef HAVE_SW_TONE_CONTROLS #if defined(AUDIOHW_HAVE_BASS) void audiohw_set_bass(int value) { (void)value; } diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h index 25e6f46b3d..c6308b3aff 100644 --- a/firmware/export/audiohw.h +++ b/firmware/export/audiohw.h @@ -28,19 +28,17 @@ /* define some audiohw caps */ #define TREBLE_CAP (1 << 0) #define BASS_CAP (1 << 1) -#define BALANCE_CAP (1 << 2) -#define CLIPPING_CAP (1 << 3) -#define PRESCALER_CAP (1 << 4) -#define BASS_CUTOFF_CAP (1 << 5) -#define TREBLE_CUTOFF_CAP (1 << 6) -#define EQ_CAP (1 << 7) -#define DEPTH_3D_CAP (1 << 8) -#define LINEOUT_CAP (1 << 9) -#define MONO_VOL_CAP (1 << 10) -#define LIN_GAIN_CAP (1 << 11) -#define MIC_GAIN_CAP (1 << 12) -#define FILTER_ROLL_OFF_CAP (1 << 13) -#define POWER_MODE_CAP (1 << 14) +#define PRESCALER_CAP (1 << 2) +#define BASS_CUTOFF_CAP (1 << 3) +#define TREBLE_CUTOFF_CAP (1 << 4) +#define EQ_CAP (1 << 5) +#define DEPTH_3D_CAP (1 << 6) +#define LINEOUT_CAP (1 << 7) +#define MONO_VOL_CAP (1 << 8) +#define LIN_GAIN_CAP (1 << 9) +#define MIC_GAIN_CAP (1 << 10) +#define FILTER_ROLL_OFF_CAP (1 << 11) +#define POWER_MODE_CAP (1 << 12) /* Used by every driver to export its min/max/default values for its audio settings. */ @@ -270,14 +268,6 @@ struct sound_settings_info #define AUDIOHW_HAVE_TREBLE_CUTOFF #endif -#if (AUDIOHW_CAPS & BALANCE_CAP) -#define AUDIOHW_HAVE_BALANCE -#endif - -#if (AUDIOHW_CAPS & CLIPPING_CAP) -#define AUDIOHW_HAVE_CLIPPING -#endif - #if (AUDIOHW_CAPS & PRESCALER_CAP) #define AUDIOHW_HAVE_PRESCALER #endif @@ -460,7 +450,7 @@ void audiohw_close(void); * Set new volume value * @param val to set in centibels. * NOTE: AUDIOHW_CAPS need to contain - * CLIPPING_CAP + * MONO_VOL_CAP */ void audiohw_set_volume(int val); #else /* Stereo volume */ @@ -481,7 +471,6 @@ void audiohw_set_volume(int vol_l, int vol_r); void audiohw_set_lineout_volume(int vol_l, int vol_r); #endif -#ifndef AUDIOHW_HAVE_CLIPPING #if defined(AUDIOHW_HAVE_BASS) || defined(AUDIOHW_HAVE_TREBLE) \ || defined(AUDIOHW_HAVE_EQ) /** @@ -492,17 +481,6 @@ void audiohw_set_lineout_volume(int vol_l, int vol_r); */ void audiohw_set_prescaler(int val); #endif -#endif /* !AUDIOHW_HAVE_CLIPPING */ - -#ifdef AUDIOHW_HAVE_BALANCE -/** - * Set new balance value - * @param val to set. - * NOTE: AUDIOHW_CAPS need to contain - * BALANCE_CAP - */ -void audiohw_set_balance(int val); -#endif #ifdef AUDIOHW_HAVE_TREBLE /** diff --git a/firmware/sound.c b/firmware/sound.c index 40975abfc6..c7d510dc2f 100644 --- a/firmware/sound.c +++ b/firmware/sound.c @@ -196,7 +196,6 @@ int sound_current(int setting) } /* switch(setting) */ }/* sound_current */ -#if !defined(AUDIOHW_HAVE_CLIPPING) /* * The prescaler compensates for any kind of boosts, to prevent clipping. * @@ -304,7 +303,6 @@ static void set_prescaled_volume(void) audiohw_set_lineout_volume(0, 0); #endif /* AUDIOHW_HAVE_LINEOUT */ } -#endif /* AUDIOIHW_HAVE_CLIPPING */ void sound_set_volume(int value) { @@ -325,12 +323,8 @@ void sound_set_volume(int value) global_status.volume = value; #endif -#if defined(AUDIOHW_HAVE_CLIPPING) - audiohw_set_volume(value); -#else sound_prescaler.volume = sound_value_to_cb(SOUND_VOLUME, value); set_prescaled_volume(); -#endif } void sound_set_balance(int value) @@ -338,12 +332,8 @@ void sound_set_balance(int value) if (!audio_is_initialized) return; -#if defined(AUDIOHW_HAVE_BALANCE) - audiohw_set_balance(value); -#else sound_prescaler.balance = value; set_prescaled_volume(); -#endif } #if defined(AUDIOHW_HAVE_BASS) @@ -354,10 +344,8 @@ void sound_set_bass(int value) audiohw_set_bass(value); -#if !defined(AUDIOHW_HAVE_CLIPPING) sound_prescaler.bass = sound_value_to_cb(SOUND_BASS, value); set_prescaled_volume(); -#endif } #endif /* AUDIOHW_HAVE_BASS */ @@ -369,10 +357,8 @@ void sound_set_treble(int value) audiohw_set_treble(value); -#if !defined(AUDIOHW_HAVE_CLIPPING) sound_prescaler.treble = sound_value_to_cb(SOUND_TREBLE, value); set_prescaled_volume(); -#endif } #endif /* AUDIOHW_HAVE_TREBLE */ @@ -517,11 +503,9 @@ static void sound_set_hw_eq_band_gain(unsigned int band, int value) audiohw_set_eq_band_gain(band, value); -#if !defined (AUDIOHW_HAVE_CLIPPING) int setting = sound_enum_hw_eq_band_setting(band, AUDIOHW_EQ_GAIN); sound_prescaler.eq_gain[band] = sound_value_to_cb(setting, value); set_prescaled_volume(); -#endif /* AUDIOHW_HAVE_CLIPPING */ } void sound_set_hw_eq_band1_gain(int value) diff --git a/firmware/target/hosted/android/android-codec.c b/firmware/target/hosted/android/android-codec.c index 6e069210df..794ad947ed 100644 --- a/firmware/target/hosted/android/android-codec.c +++ b/firmware/target/hosted/android/android-codec.c @@ -28,11 +28,6 @@ void audiohw_set_volume(int volume) pcm_set_mixer_volume(volume); } -void audiohw_set_balance(int balance) -{ - (void)balance; -} - void audiohw_close(void) { pcm_shutdown(); -- rockbox-cvs mailing list [email protected] https://lists.haxx.se/mailman/listinfo/rockbox-cvs