diff options
author | Thom Johansen <thomj@rockbox.org> | 2006-05-11 22:55:24 +0000 |
---|---|---|
committer | Thom Johansen <thomj@rockbox.org> | 2006-05-11 22:55:24 +0000 |
commit | a4bfe37c6cdcc2e70b2b6d5d486531fa2986370b (patch) | |
tree | 24f01ed56d3197d66e2f66cabbd4a9814ce14b72 /apps/sound_menu.c | |
parent | 5725b8cbcbe11c006fe92874dcc5d834e006daa6 (diff) | |
download | rockbox-a4bfe37c6cdcc2e70b2b6d5d486531fa2986370b.tar.gz rockbox-a4bfe37c6cdcc2e70b2b6d5d486531fa2986370b.zip |
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
Diffstat (limited to 'apps/sound_menu.c')
-rw-r--r-- | apps/sound_menu.c | 20 |
1 files changed, 15 insertions, 5 deletions
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) | |||
302 | sizeof(names)/sizeof(struct opt_items), NULL ); | 302 | sizeof(names)/sizeof(struct opt_items), NULL ); |
303 | } | 303 | } |
304 | 304 | ||
305 | /* To be removed when we add support for sample rates and channel settings */ | ||
306 | #ifndef HAVE_UDA1380 | ||
305 | static bool recfrequency(void) | 307 | static bool recfrequency(void) |
306 | { | 308 | { |
307 | static const struct opt_items names[] = { | 309 | static const struct opt_items names[] = { |
@@ -327,12 +329,11 @@ static bool recchannels(void) | |||
327 | &global_settings.rec_channels, INT, | 329 | &global_settings.rec_channels, INT, |
328 | names, 2, NULL ); | 330 | names, 2, NULL ); |
329 | } | 331 | } |
332 | #endif | ||
330 | 333 | ||
334 | #if CONFIG_CODEC == MAS3587F | ||
331 | static bool recquality(void) | 335 | static bool recquality(void) |
332 | { | 336 | { |
333 | #ifdef HAVE_UDA1380 | ||
334 | (void)recquality(); | ||
335 | #endif | ||
336 | return set_int(str(LANG_RECORDING_QUALITY), "", UNIT_INT, | 337 | return set_int(str(LANG_RECORDING_QUALITY), "", UNIT_INT, |
337 | &global_settings.rec_quality, | 338 | &global_settings.rec_quality, |
338 | NULL, 1, 0, 7, NULL ); | 339 | NULL, 1, 0, 7, NULL ); |
@@ -343,7 +344,7 @@ static bool receditable(void) | |||
343 | return set_bool(str(LANG_RECORDING_EDITABLE), | 344 | return set_bool(str(LANG_RECORDING_EDITABLE), |
344 | &global_settings.rec_editable); | 345 | &global_settings.rec_editable); |
345 | } | 346 | } |
346 | 347 | #endif | |
347 | 348 | ||
348 | static bool rectimesplit(void) | 349 | static bool rectimesplit(void) |
349 | { | 350 | { |
@@ -901,20 +902,29 @@ bool recording_menu(bool no_source) | |||
901 | struct menu_item items[13]; | 902 | struct menu_item items[13]; |
902 | bool result; | 903 | bool result; |
903 | 904 | ||
904 | #ifndef HAVE_UDA1380 | 905 | #if CONFIG_CODEC == MAS3587F |
905 | items[i].desc = ID2P(LANG_RECORDING_QUALITY); | 906 | items[i].desc = ID2P(LANG_RECORDING_QUALITY); |
906 | items[i++].function = recquality; | 907 | items[i++].function = recquality; |
907 | #endif | 908 | #endif |
909 | /* We don't support frequency selection for UDA1380 yet. Let it just stay at | ||
910 | the default 44100 Hz. */ | ||
911 | #ifndef HAVE_UDA1380 | ||
908 | items[i].desc = ID2P(LANG_RECORDING_FREQUENCY); | 912 | items[i].desc = ID2P(LANG_RECORDING_FREQUENCY); |
909 | items[i++].function = recfrequency; | 913 | items[i++].function = recfrequency; |
914 | #endif | ||
910 | if(!no_source) { | 915 | if(!no_source) { |
911 | items[i].desc = ID2P(LANG_RECORDING_SOURCE); | 916 | items[i].desc = ID2P(LANG_RECORDING_SOURCE); |
912 | items[i++].function = recsource; | 917 | items[i++].function = recsource; |
913 | } | 918 | } |
919 | /* We don't support other configurations than stereo yet either */ | ||
920 | #ifndef HAVE_UDA1380 | ||
914 | items[i].desc = ID2P(LANG_RECORDING_CHANNELS); | 921 | items[i].desc = ID2P(LANG_RECORDING_CHANNELS); |
915 | items[i++].function = recchannels; | 922 | items[i++].function = recchannels; |
923 | #endif | ||
924 | #if CONFIG_CODEC == MAS3587F | ||
916 | items[i].desc = ID2P(LANG_RECORDING_EDITABLE); | 925 | items[i].desc = ID2P(LANG_RECORDING_EDITABLE); |
917 | items[i++].function = receditable; | 926 | items[i++].function = receditable; |
927 | #endif | ||
918 | items[i].desc = ID2P(LANG_RECORD_TIMESPLIT); | 928 | items[i].desc = ID2P(LANG_RECORD_TIMESPLIT); |
919 | items[i++].function = rectimesplit; | 929 | items[i++].function = rectimesplit; |
920 | items[i].desc = ID2P(LANG_RECORD_PRERECORD_TIME); | 930 | items[i].desc = ID2P(LANG_RECORD_PRERECORD_TIME); |