diff options
author | Thom Johansen <thomj@rockbox.org> | 2006-03-21 23:20:17 +0000 |
---|---|---|
committer | Thom Johansen <thomj@rockbox.org> | 2006-03-21 23:20:17 +0000 |
commit | b0960aed111d63695f328d47b181a0bd620b42cb (patch) | |
tree | 95598c4ff1df1329e377962348529122e7d52173 /firmware/sound.c | |
parent | a27123fe81aa01997a2897cfb9b5872e41c71703 (diff) | |
download | rockbox-b0960aed111d63695f328d47b181a0bd620b42cb.tar.gz rockbox-b0960aed111d63695f328d47b181a0bd620b42cb.zip |
Enabled channel configuration and stereo width option on software codec
platforms.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9173 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/sound.c')
-rw-r--r-- | firmware/sound.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/firmware/sound.c b/firmware/sound.c index 501e01e2d4..a3eb6da8a8 100644 --- a/firmware/sound.c +++ b/firmware/sound.c | |||
@@ -458,10 +458,14 @@ static void set_prescaled_volume(void) | |||
458 | #endif /* (CONFIG_CODEC == MAS3507D) || defined HAVE_UDA1380 */ | 458 | #endif /* (CONFIG_CODEC == MAS3507D) || defined HAVE_UDA1380 */ |
459 | #endif /* !SIMULATOR */ | 459 | #endif /* !SIMULATOR */ |
460 | 460 | ||
461 | #if CONFIG_CODEC != SWCODEC | ||
461 | int channel_configuration = SOUND_CHAN_STEREO; | 462 | int channel_configuration = SOUND_CHAN_STEREO; |
462 | int stereo_width = 100; | 463 | int stereo_width = 100; |
464 | #endif | ||
463 | 465 | ||
464 | #ifndef SIMULATOR | 466 | #ifndef SIMULATOR |
467 | |||
468 | #if CONFIG_CODEC != SWCODEC | ||
465 | static void set_channel_config(void) | 469 | static void set_channel_config(void) |
466 | { | 470 | { |
467 | /* default values: stereo */ | 471 | /* default values: stereo */ |
@@ -540,6 +544,8 @@ static void set_channel_config(void) | |||
540 | #endif | 544 | #endif |
541 | } | 545 | } |
542 | 546 | ||
547 | #endif /* CONFIG_CODEC != SWCODEC */ | ||
548 | |||
543 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | 549 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) |
544 | unsigned long mdb_shape_shadow = 0; | 550 | unsigned long mdb_shape_shadow = 0; |
545 | unsigned long loudness_shadow = 0; | 551 | unsigned long loudness_shadow = 0; |
@@ -631,19 +637,27 @@ void sound_set_treble(int value) | |||
631 | 637 | ||
632 | void sound_set_channels(int value) | 638 | void sound_set_channels(int value) |
633 | { | 639 | { |
640 | #if CONFIG_CODEC == SWCODEC | ||
641 | (void)value; | ||
642 | #else | ||
634 | if(!audio_is_initialized) | 643 | if(!audio_is_initialized) |
635 | return; | 644 | return; |
636 | channel_configuration = value; | 645 | channel_configuration = value; |
637 | set_channel_config(); | 646 | set_channel_config(); |
647 | #endif | ||
638 | } | 648 | } |
639 | 649 | ||
640 | void sound_set_stereo_width(int value) | 650 | void sound_set_stereo_width(int value) |
641 | { | 651 | { |
652 | #if CONFIG_CODEC == SWCODEC | ||
653 | (void)value; | ||
654 | #else | ||
642 | if(!audio_is_initialized) | 655 | if(!audio_is_initialized) |
643 | return; | 656 | return; |
644 | stereo_width = value; | 657 | stereo_width = value; |
645 | if (channel_configuration == SOUND_CHAN_CUSTOM) | 658 | if (channel_configuration == SOUND_CHAN_CUSTOM) |
646 | set_channel_config(); | 659 | set_channel_config(); |
660 | #endif | ||
647 | } | 661 | } |
648 | 662 | ||
649 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | 663 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) |