diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2004-11-07 08:09:08 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2004-11-07 08:09:08 +0000 |
| commit | 6fde243d52ed9b327b41cb75364e899555ccdf51 (patch) | |
| tree | 9d7c9658205155d28599772fa15acef7146150ff | |
| parent | 1c9ab1ba692cde7ebcd98b13811b274cf9e7a00b (diff) | |
| download | rockbox-6fde243d52ed9b327b41cb75364e899555ccdf51.zip rockbox-6fde243d52ed9b327b41cb75364e899555ccdf51.tar.gz rockbox-6fde243d52ed9b327b41cb75364e899555ccdf51.tar.bz2 rockbox-6fde243d52ed9b327b41cb75364e899555ccdf51.tar.xz | |
Player: Slightly shorter MAS poll interval fixes playback of 384 kbps 48 kHz layer 2 files. Others: Correct serial bitrate allows increasing the postpone_dma_tick delay a bit without disturbing playback of same files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5387 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/mp3_playback.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/firmware/mp3_playback.c b/firmware/mp3_playback.c index 234dc6a..a7284ae 100644 --- a/firmware/mp3_playback.c +++ b/firmware/mp3_playback.c @@ -335,19 +335,12 @@ static const unsigned int prescale_table[] = bool dma_on; /* The DMA is active */ #if CONFIG_HWCODEC == MAS3507D -static void mas_poll_start(int interval_in_ms) +static void mas_poll_start(void) { unsigned int count; - count = (FREQ * interval_in_ms) / 1000 / 8; + count = 9 * FREQ / 10000 / 8; /* 0.9 ms */ - if(count > 0xffff) - { - panicf("Error! The MAS poll interval is too long (%d ms)\n", - interval_in_ms); - return; - } - /* We are using timer 1 */ TSTR &= ~0x02; /* Stop the timer */ @@ -371,7 +364,7 @@ static void postpone_dma_tick(void) { unsigned int count; - count = FREQ / 2000 / 8; + count = 8 * FREQ / 10000 / 8; /* 0.8 ms */ /* We are using timer 1 */ @@ -1014,7 +1007,7 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness, #endif #if CONFIG_HWCODEC == MAS3507D - mas_poll_start(1); + mas_poll_start(); mas_writereg(MAS_REG_KPRESCALE, 0xe9400); dac_enable(true); |