diff options
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/apps/settings.c b/apps/settings.c index 4901957263..6349372326 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "config.h" | 27 | #include "config.h" |
28 | #include "action.h" | 28 | #include "action.h" |
29 | #include "crc32.h" | 29 | #include "crc32.h" |
30 | #include "sound.h" | ||
30 | #include "settings.h" | 31 | #include "settings.h" |
31 | #include "debug.h" | 32 | #include "debug.h" |
32 | #include "usb.h" | 33 | #include "usb.h" |
@@ -55,7 +56,6 @@ | |||
55 | #include "powermgmt.h" | 56 | #include "powermgmt.h" |
56 | #include "keyboard.h" | 57 | #include "keyboard.h" |
57 | #include "version.h" | 58 | #include "version.h" |
58 | #include "sound.h" | ||
59 | #include "rbunicode.h" | 59 | #include "rbunicode.h" |
60 | #include "dircache.h" | 60 | #include "dircache.h" |
61 | #include "splash.h" | 61 | #include "splash.h" |
@@ -718,8 +718,12 @@ void sound_settings_apply(void) | |||
718 | #if CONFIG_CODEC == SWCODEC | 718 | #if CONFIG_CODEC == SWCODEC |
719 | sound_set_dsp_callback(dsp_callback); | 719 | sound_set_dsp_callback(dsp_callback); |
720 | #endif | 720 | #endif |
721 | #ifdef AUDIOHW_HAVE_BASS | ||
721 | sound_set(SOUND_BASS, global_settings.bass); | 722 | sound_set(SOUND_BASS, global_settings.bass); |
723 | #endif | ||
724 | #ifdef AUDIOHW_HAVE_TREBLE | ||
722 | sound_set(SOUND_TREBLE, global_settings.treble); | 725 | sound_set(SOUND_TREBLE, global_settings.treble); |
726 | #endif | ||
723 | sound_set(SOUND_BALANCE, global_settings.balance); | 727 | sound_set(SOUND_BALANCE, global_settings.balance); |
724 | sound_set(SOUND_VOLUME, global_settings.volume); | 728 | sound_set(SOUND_VOLUME, global_settings.volume); |
725 | sound_set(SOUND_CHANNELS, global_settings.channel_config); | 729 | sound_set(SOUND_CHANNELS, global_settings.channel_config); |
@@ -734,13 +738,36 @@ void sound_settings_apply(void) | |||
734 | sound_set(SOUND_MDB_ENABLE, global_settings.mdb_enable); | 738 | sound_set(SOUND_MDB_ENABLE, global_settings.mdb_enable); |
735 | sound_set(SOUND_SUPERBASS, global_settings.superbass); | 739 | sound_set(SOUND_SUPERBASS, global_settings.superbass); |
736 | #endif | 740 | #endif |
737 | 741 | #ifdef AUDIOHW_HAVE_BASS_CUTOFF | |
738 | #ifdef HAVE_WM8758 | ||
739 | sound_set(SOUND_BASS_CUTOFF, global_settings.bass_cutoff); | 742 | sound_set(SOUND_BASS_CUTOFF, global_settings.bass_cutoff); |
743 | #endif | ||
744 | #ifdef AUDIOHW_HAVE_TREBLE_CUTOFF | ||
740 | sound_set(SOUND_TREBLE_CUTOFF, global_settings.treble_cutoff); | 745 | sound_set(SOUND_TREBLE_CUTOFF, global_settings.treble_cutoff); |
741 | #endif | 746 | #endif |
742 | } | 747 | #ifdef AUDIOHW_HAVE_DEPTH_3D |
748 | sound_set(SOUND_DEPTH_3D, global_settings.depth_3d); | ||
749 | #endif | ||
750 | #ifdef AUDIOHW_HAVE_EQ | ||
751 | int b; | ||
743 | 752 | ||
753 | for (b = 0; b < AUDIOHW_EQ_BAND_NUM; b++) | ||
754 | { | ||
755 | int setting = sound_enum_hw_eq_band_setting(b, AUDIOHW_EQ_GAIN); | ||
756 | sound_set(setting, global_settings.hw_eq_bands[b].gain); | ||
757 | |||
758 | #ifdef AUDIOHW_HAVE_EQ_FREQUENCY | ||
759 | setting = sound_enum_hw_eq_band_setting(b, AUDIOHW_EQ_FREQUENCY); | ||
760 | if (setting != -1) | ||
761 | sound_set(setting, global_settings.hw_eq_bands[b].frequency); | ||
762 | #endif /* AUDIOHW_HAVE_EQ_FREQUENCY */ | ||
763 | #ifdef AUDIOHW_HAVE_EQ_WIDTH | ||
764 | setting = sound_enum_hw_eq_band_setting(b, AUDIOHW_EQ_WIDTH); | ||
765 | if (setting != -1) | ||
766 | sound_set(setting, global_settings.hw_eq_bands[b].width); | ||
767 | #endif /* AUDIOHW_HAVE_EQ_WIDTH */ | ||
768 | } | ||
769 | #endif | ||
770 | } | ||
744 | 771 | ||
745 | void settings_apply(bool read_disk) | 772 | void settings_apply(bool read_disk) |
746 | { | 773 | { |