summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/lang/english.lang56
-rw-r--r--apps/menus/sound_menu.c7
-rw-r--r--apps/settings.h3
-rw-r--r--apps/settings_list.c5
-rw-r--r--firmware/drivers/audio/eros_qn_codec.c6
-rw-r--r--manual/configure_rockbox/sound_settings.tex18
6 files changed, 94 insertions, 1 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 6bba65f6a9..c299a9dac8 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -16935,3 +16935,59 @@
16935 *: "Expert" 16935 *: "Expert"
16936 </voice> 16936 </voice>
16937</phrase> 16937</phrase>
16938<phrase>
16939 id: LANG_STEREOSW_MODE
16940 desc: Stereo Switch Mode
16941 user: core
16942 <source>
16943 *: "Stereo Switch Mode"
16944 </source>
16945 <dest>
16946 *: "Stereo Switch Mode"
16947 </dest>
16948 <voice>
16949 *: "Stereo Switch Mode"
16950 </voice>
16951</phrase>
16952<phrase>
16953 id: LANG_REVERSE
16954 desc: in settings_menu
16955 user: core
16956 <source>
16957 *: "Reverse"
16958 </source>
16959 <dest>
16960 *: "Reverse"
16961 </dest>
16962 <voice>
16963 *: "Reverse"
16964 </voice>
16965</phrase>
16966<phrase>
16967 id: LANG_ALWAYS_ZERO
16968 desc: in settings_menu
16969 user: core
16970 <source>
16971 *: "Always 0"
16972 </source>
16973 <dest>
16974 *: "Always 0"
16975 </dest>
16976 <voice>
16977 *: "Always 0"
16978 </voice>
16979</phrase>
16980<phrase>
16981 id: LANG_ALWAYS_ONE
16982 desc: in settings_menu
16983 user: core
16984 <source>
16985 *: "Always 1"
16986 </source>
16987 <dest>
16988 *: "Always 1"
16989 </dest>
16990 <voice>
16991 *: "Always 1"
16992 </voice>
16993</phrase> \ No newline at end of file
diff --git a/apps/menus/sound_menu.c b/apps/menus/sound_menu.c
index d72e3c7fa7..fcb0dff080 100644
--- a/apps/menus/sound_menu.c
+++ b/apps/menus/sound_menu.c
@@ -135,6 +135,10 @@ MENUITEM_SETTING(depth_3d, &global_settings.depth_3d, NULL);
135MENUITEM_SETTING(roll_off, &global_settings.roll_off, NULL); 135MENUITEM_SETTING(roll_off, &global_settings.roll_off, NULL);
136#endif 136#endif
137 137
138#ifdef HAVE_EROS_QN_CODEC
139MENUITEM_SETTING(stereosw_mode, &global_settings.stereosw_mode,NULL);
140#endif
141
138#ifdef AUDIOHW_HAVE_POWER_MODE 142#ifdef AUDIOHW_HAVE_POWER_MODE
139MENUITEM_SETTING(power_mode, &global_settings.power_mode, NULL); 143MENUITEM_SETTING(power_mode, &global_settings.power_mode, NULL);
140#endif 144#endif
@@ -253,6 +257,9 @@ MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio,
253#ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF 257#ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF
254 ,&roll_off 258 ,&roll_off
255#endif 259#endif
260#ifdef HAVE_EROS_QN_CODEC
261 ,&stereosw_mode
262#endif
256#ifdef AUDIOHW_HAVE_POWER_MODE 263#ifdef AUDIOHW_HAVE_POWER_MODE
257 ,&power_mode 264 ,&power_mode
258#endif 265#endif
diff --git a/apps/settings.h b/apps/settings.h
index e3b11430cd..1df1e0b418 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -899,6 +899,9 @@ struct user_settings
899 (CONFIG_KEYPAD == IRIVER_H10_PAD) 899 (CONFIG_KEYPAD == IRIVER_H10_PAD)
900 bool clear_settings_on_hold; 900 bool clear_settings_on_hold;
901#endif 901#endif
902#if defined(HAVE_EROS_QN_CODEC)
903 int stereosw_mode; /* indicates normal, reverse, always 0, always 1 operation */
904#endif
902}; 905};
903 906
904/** global variables **/ 907/** global variables **/
diff --git a/apps/settings_list.c b/apps/settings_list.c
index dc33c27c95..d60fa510d8 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -2295,6 +2295,11 @@ const struct settings_list settings[] = {
2295 OFFON_SETTING(0, clear_settings_on_hold, LANG_CLEAR_SETTINGS_ON_HOLD, 2295 OFFON_SETTING(0, clear_settings_on_hold, LANG_CLEAR_SETTINGS_ON_HOLD,
2296 true, "clear settings on hold", NULL), 2296 true, "clear settings on hold", NULL),
2297#endif 2297#endif
2298#if defined(HAVE_EROS_QN_CODEC)
2299 CHOICE_SETTING(0, stereosw_mode, LANG_STEREOSW_MODE, 0, "stereo switch mode",
2300 "normal,reverse,always0,always1", sound_settings_apply, 4,
2301 ID2P(LANG_NORMAL), ID2P(LANG_REVERSE), ID2P(LANG_ALWAYS_ZERO), ID2P(LANG_ALWAYS_ONE)),
2302#endif
2298}; 2303};
2299 2304
2300const int nb_settings = sizeof(settings)/sizeof(*settings); 2305const int nb_settings = sizeof(settings)/sizeof(*settings);
diff --git a/firmware/drivers/audio/eros_qn_codec.c b/firmware/drivers/audio/eros_qn_codec.c
index 095b3b5305..1d6753eb3a 100644
--- a/firmware/drivers/audio/eros_qn_codec.c
+++ b/firmware/drivers/audio/eros_qn_codec.c
@@ -51,10 +51,14 @@ int eros_qn_get_volume_limit(void)
51 51
52void eros_qn_switch_output(int select) 52void eros_qn_switch_output(int select)
53{ 53{
54 if (select == 0) 54 /* normal operation 0, reverse operation 1, or always 0 */
55 if ((select == 0 && global_settings.stereosw_mode == 0) \
56 || (select == 1 && global_settings.stereosw_mode == 1) \
57 || global_settings.stereosw_mode == 2)
55 { 58 {
56 gpio_set_level(GPIO_STEREOSW_SEL, 0); 59 gpio_set_level(GPIO_STEREOSW_SEL, 0);
57 } 60 }
61 /* normal operation 1, reverse operation 0, or always 1 */
58 else 62 else
59 { 63 {
60 gpio_set_level(GPIO_STEREOSW_SEL, 1); 64 gpio_set_level(GPIO_STEREOSW_SEL, 1);
diff --git a/manual/configure_rockbox/sound_settings.tex b/manual/configure_rockbox/sound_settings.tex
index 951eded31c..fd69d63317 100644
--- a/manual/configure_rockbox/sound_settings.tex
+++ b/manual/configure_rockbox/sound_settings.tex
@@ -193,6 +193,24 @@ change to customise your listening experience.
193 the effect of widening the stereo field. A value of 100\% will leave the 193 the effect of widening the stereo field. A value of 100\% will leave the
194 stereo field unaltered. 194 stereo field unaltered.
195 195
196\opt{erosqnative}{
197 \section{Stereo Switch Mode}
198 The Eros Q and related devices contain a stereo switch in the audio path.
199 This may be connected differently depending on the hardware revision. This
200 setting allows the behavior of the stereo switch to be changed if one of
201 the two outputs (Headphones or Line Out) is not working. There are four modes:
202 \begin{description}
203 \item[Normal.]
204 Headphones output uses a value of 0, and Line Out uses a value of 1.
205 \item[Reverse.]
206 Headphones output uses a value of 1, and Line Out uses a value of 0.
207 \item[Always 0.]
208 Both outputs use a value of 0.
209 \item[Always 1.]
210 Both outputs use a value of 1.
211 \end{description}
212}
213
196\opt{dac_power_mode}{ 214\opt{dac_power_mode}{
197 \opt{fiiom3k}{ 215 \opt{fiiom3k}{
198 \section{DAC Power Mode} 216 \section{DAC Power Mode}