From a4bfe37c6cdcc2e70b2b6d5d486531fa2986370b Mon Sep 17 00:00:00 2001 From: Thom Johansen Date: Thu, 11 May 2006 22:55:24 +0000 Subject: Optical S/PDIF recording and monitoring for Iriver H1x0. Removed unsupported recording options on Iriver. Sample rate displayed in recording screen reflects the real S/PDIF sample rate when doing S/PDIF recording. Testing would be appreciated. Thanks to Jens Arnold for fixing the DMA hang issue. Will reset settings! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9916 a1c6a512-1295-4272-9138-f99709370657 --- apps/sound_menu.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'apps/sound_menu.c') diff --git a/apps/sound_menu.c b/apps/sound_menu.c index 1d389f30de..d3377a3efa 100644 --- a/apps/sound_menu.c +++ b/apps/sound_menu.c @@ -302,6 +302,8 @@ static bool recsource(void) sizeof(names)/sizeof(struct opt_items), NULL ); } +/* To be removed when we add support for sample rates and channel settings */ +#ifndef HAVE_UDA1380 static bool recfrequency(void) { static const struct opt_items names[] = { @@ -327,12 +329,11 @@ static bool recchannels(void) &global_settings.rec_channels, INT, names, 2, NULL ); } +#endif +#if CONFIG_CODEC == MAS3587F static bool recquality(void) { -#ifdef HAVE_UDA1380 - (void)recquality(); -#endif return set_int(str(LANG_RECORDING_QUALITY), "", UNIT_INT, &global_settings.rec_quality, NULL, 1, 0, 7, NULL ); @@ -343,7 +344,7 @@ static bool receditable(void) return set_bool(str(LANG_RECORDING_EDITABLE), &global_settings.rec_editable); } - +#endif static bool rectimesplit(void) { @@ -901,20 +902,29 @@ bool recording_menu(bool no_source) struct menu_item items[13]; bool result; -#ifndef HAVE_UDA1380 +#if CONFIG_CODEC == MAS3587F items[i].desc = ID2P(LANG_RECORDING_QUALITY); items[i++].function = recquality; #endif +/* We don't support frequency selection for UDA1380 yet. Let it just stay at + the default 44100 Hz. */ +#ifndef HAVE_UDA1380 items[i].desc = ID2P(LANG_RECORDING_FREQUENCY); items[i++].function = recfrequency; +#endif if(!no_source) { items[i].desc = ID2P(LANG_RECORDING_SOURCE); items[i++].function = recsource; } +/* We don't support other configurations than stereo yet either */ +#ifndef HAVE_UDA1380 items[i].desc = ID2P(LANG_RECORDING_CHANNELS); items[i++].function = recchannels; +#endif +#if CONFIG_CODEC == MAS3587F items[i].desc = ID2P(LANG_RECORDING_EDITABLE); items[i++].function = receditable; +#endif items[i].desc = ID2P(LANG_RECORD_TIMESPLIT); items[i++].function = rectimesplit; items[i].desc = ID2P(LANG_RECORD_PRERECORD_TIME); -- cgit v1.2.3