1
0
Fork 0
forked from len0rd/rockbox

Removed the uda1380_mute() calls, since they were called in interrupt context, which could lead to a big crash. This will reintroduce a slight pop when starting/stopping playbac, and when switching tracks.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7357 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2005-08-19 12:29:28 +00:00
parent d71f7824a1
commit 7db258f3c7

View file

@ -191,12 +191,6 @@ void pcm_play_data(void (*get_more)(unsigned char** start, long* size))
get_more((unsigned char **)&start, (long *)&size); get_more((unsigned char **)&start, (long *)&size);
get_more(&next_start, &next_size); get_more(&next_start, &next_size);
dma_start(start, size); dma_start(start, size);
#if defined(HAVE_UDA1380)
uda1380_mute(false);
#elif defined(HAVE_TLV320)
tlv320_mute(false);
#endif
} }
long pcm_get_bytes_waiting(void) long pcm_get_bytes_waiting(void)
@ -207,12 +201,6 @@ long pcm_get_bytes_waiting(void)
void pcm_play_stop(void) void pcm_play_stop(void)
{ {
if (pcm_playing) { if (pcm_playing) {
#if defined(HAVE_UDA1380)
uda1380_mute(true);
#elif defined(HAVE_TLV320)
tlv320_mute(true);
#endif
dma_stop(); dma_stop();
} }
} }
@ -230,23 +218,11 @@ void pcm_play_pause(bool play)
IIS2CONFIG = (pcm_freq << 12) | 0x300 | 4 << 2; IIS2CONFIG = (pcm_freq << 12) | 0x300 | 4 << 2;
EBU1CONFIG = (7 << 12) | (3 << 8) | (1 << 5) | (5 << 2); EBU1CONFIG = (7 << 12) | (3 << 8) | (1 << 5) | (5 << 2);
DCR0 |= DMA_EEXT | DMA_START; DCR0 |= DMA_EEXT | DMA_START;
#if defined(HAVE_UDA1380)
uda1380_mute(false);
#elif defined(HAVE_TLV320)
tlv320_mute(false);
#endif
} }
else if(!pcm_paused && !play) else if(!pcm_paused && !play)
{ {
logf("pause"); logf("pause");
#if defined(HAVE_UDA1380)
uda1380_mute(true);
#elif defined(HAVE_TLV320)
tlv320_mute(true);
#endif
/* Disable DMA peripheral request. */ /* Disable DMA peripheral request. */
DCR0 &= ~DMA_EEXT; DCR0 &= ~DMA_EEXT;
IIS2CONFIG = 0x800; IIS2CONFIG = 0x800;
@ -326,11 +302,11 @@ void pcm_init(void)
pcm_set_frequency(44100); pcm_set_frequency(44100);
/* Turn on headphone power with audio output muted. */ /* Turn on headphone power */
#if defined(HAVE_UDA1380) #if defined(HAVE_UDA1380)
uda1380_mute(true); uda1380_mute(false);
#elif defined(HAVE_TLV320) #elif defined(HAVE_TLV320)
tlv320_mute(true); tlv320_mute(false);
#endif #endif
sleep(HZ/4); sleep(HZ/4);
#if defined(HAVE_UDA1380) #if defined(HAVE_UDA1380)