New config option for optical out on iriver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6960 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e02a1a534d
commit
8782bc8392
6 changed files with 39 additions and 4 deletions
|
@ -3136,3 +3136,9 @@ desc: in onplay menu. insert a track/playlist randomly into dynamic playlist
|
|||
eng: "Insert shuffled"
|
||||
voice:
|
||||
new:
|
||||
|
||||
id: LANG_SPDIF_ENABLE
|
||||
desc: in playback settings menu. enable/disable the optical out
|
||||
eng: "Optical output"
|
||||
voice:
|
||||
new:
|
||||
|
|
|
@ -400,7 +400,11 @@ static const struct bit_entry hd_bits[] =
|
|||
{3, S_O(backlight_fade_out), 3, "backlight fade out",
|
||||
"off,500ms,1s,2s,3s,4s,5s,10s"},
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_SPDIF_POWER
|
||||
{1, S_O(spdif_enable), false, "spdif enable", off_on},
|
||||
#endif
|
||||
|
||||
/* new stuff to be added at the end */
|
||||
|
||||
/* Sum of all bit sizes must not grow beyond 0xB8*8 = 1472 */
|
||||
|
@ -840,6 +844,10 @@ void settings_apply(void)
|
|||
#if CONFIG_HWCODEC == MASNONE && !defined(SIMULATOR)
|
||||
pcm_crossfade_enable(global_settings.crossfade);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SPDIF_POWER
|
||||
spdif_power_enable(global_settings.spdif_enable);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -204,6 +204,10 @@ struct user_settings
|
|||
int battery_capacity; /* in mAh */
|
||||
int battery_type; /* for units which can take multiple types (Ondio). */
|
||||
|
||||
#ifdef HAVE_SPDIF_POWER
|
||||
bool spdif_enable; /* S/PDIF power on/off */
|
||||
#endif
|
||||
|
||||
/* resume settings */
|
||||
|
||||
bool resume; /* resume option: 0=off, 1=on */
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
#include "talk.h"
|
||||
#include "timefuncs.h"
|
||||
#include "misc.h"
|
||||
#include "power.h"
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
#include "peakmeter.h"
|
||||
#endif
|
||||
|
@ -659,6 +661,18 @@ static bool resume(void)
|
|||
return set_bool( str(LANG_RESUME), &global_settings.resume);
|
||||
}
|
||||
|
||||
#ifdef HAVE_SPDIF_POWER
|
||||
static bool spdif(void)
|
||||
{
|
||||
bool rc = set_bool_options(str(LANG_SPDIF_ENABLE),
|
||||
&global_settings.spdif_enable,
|
||||
STR(LANG_ON),
|
||||
STR(LANG_OFF),
|
||||
spdif_power_enable);
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool autocreatebookmark(void)
|
||||
{
|
||||
bool retval = false;
|
||||
|
@ -1120,6 +1134,9 @@ static bool playback_settings_menu(void)
|
|||
{ ID2P(LANG_FADE_ON_STOP), set_fade_on_stop },
|
||||
#if CONFIG_HWCODEC == MASNONE
|
||||
{ ID2P(LANG_CROSSFADE), crossfade },
|
||||
#endif
|
||||
#ifdef HAVE_SPDIF_POWER
|
||||
{ ID2P(LANG_SPDIF_ENABLE), spdif },
|
||||
#endif
|
||||
{ ID2P(LANG_ID3_ORDER), id3_order },
|
||||
};
|
||||
|
|
|
@ -71,7 +71,7 @@ void power_init(void)
|
|||
GPIO_ENABLE |= 0x80000000;
|
||||
GPIO_FUNCTION |= 0x80000000;
|
||||
#ifdef HAVE_SPDIF_POWER
|
||||
spdif_power_enable(true);
|
||||
spdif_power_enable(false);
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAVE_POWEROFF_ON_PB5
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
#define BOOTFILE_EXT ".iriver"
|
||||
#define BOOTFILE "rockbox" BOOTFILE_EXT
|
||||
|
||||
#endif
|
||||
|
||||
/* Define this if you can control the S/PDIF power */
|
||||
#define HAVE_SPDIF_POWER
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue