1
0
Fork 0
forked from len0rd/rockbox

iPod Nano 2G: "Fix" the latest PCM issues, channel swap and vinyl popping. The latter is a revert of the cache coherency patch for now, we need to find a better solution in the long term...

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23308 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sparmann 2009-10-21 18:52:09 +00:00
parent 0c89c0ef7c
commit 7bff585d83
2 changed files with 11 additions and 8 deletions

View file

@ -105,6 +105,8 @@
/* Define the type of audio codec */ /* Define the type of audio codec */
#define HAVE_WM8975 #define HAVE_WM8975
#define HAVE_PCM_DMA_ADDRESS
/* Define this for LCD backlight available */ /* Define this for LCD backlight available */
#define HAVE_BACKLIGHT #define HAVE_BACKLIGHT
#define HAVE_BACKLIGHT_BRIGHTNESS #define HAVE_BACKLIGHT_BRIGHTNESS
@ -205,5 +207,5 @@
#define USB_VENDOR_ID 0x05AC #define USB_VENDOR_ID 0x05AC
#define USB_PRODUCT_ID 0x1260 #define USB_PRODUCT_ID 0x1260
#define USB_NUM_ENDPOINTS 5 #define USB_NUM_ENDPOINTS 5
/* #define USE_ROCKBOX_USB - needs testing */ #define USE_ROCKBOX_USB
#define USB_DEVBSS_ATTR __attribute__((aligned(16))) #define USB_DEVBSS_ATTR __attribute__((aligned(16)))

View file

@ -105,7 +105,7 @@ static void play_next(void *addr, size_t size)
dma_callback); dma_callback);
/* DMA channel on */ /* DMA channel on */
clean_dcache(); // clean_dcache();
dma_enable_channel(DMA_IISOUT_CHANNEL); dma_enable_channel(DMA_IISOUT_CHANNEL);
} }
@ -139,7 +139,8 @@ void pcm_play_dma_start(const void *addr, size_t size)
PCON5 = (PCON5 & ~(0xFFFF0000)) | 0x77720000; PCON5 = (PCON5 & ~(0xFFFF0000)) | 0x77720000;
PCON6 = (PCON6 & ~(0x0F000000)) | 0x02000000; PCON6 = (PCON6 & ~(0x0F000000)) | 0x02000000;
I2STXCON = (0x10 << 16) | /* burst length */ I2STXCON = (1 << 20) | /* undocumented */
(DMA_IISOUT_BLEN << 16) | /* burst length */
(0 << 15) | /* 0 = falling edge */ (0 << 15) | /* 0 = falling edge */
(0 << 13) | /* 0 = basic I2S format */ (0 << 13) | /* 0 = basic I2S format */
(0 << 12) | /* 0 = MSB first */ (0 << 12) | /* 0 = MSB first */
@ -162,7 +163,7 @@ void pcm_play_dma_start(const void *addr, size_t size)
#endif #endif
/* S3: DMA channel 0 on */ /* S3: DMA channel 0 on */
clean_dcache(); // clean_dcache();
dma_enable_channel(DMA_IISOUT_CHANNEL); dma_enable_channel(DMA_IISOUT_CHANNEL);
/* S4: IIS Tx clock on */ /* S4: IIS Tx clock on */
@ -190,14 +191,14 @@ void pcm_play_dma_stop(void)
(0 << 0); /* 0 = LRCK on */ (0 << 0); /* 0 = LRCK on */
} }
/* pause playback by disabling further DMA requests */ /* pause playback by disabling the I2S interface */
void pcm_play_dma_pause(bool pause) void pcm_play_dma_pause(bool pause)
{ {
if (pause) { if (pause) {
I2STXCOM &= ~(1 << 1); /* DMA request enable */ I2STXCOM |= (1 << 0); /* LRCK off */
} }
else { else {
I2STXCOM |= (1 << 1); /* DMA request enable */ I2STXCOM &= ~(1 << 0); /* LRCK on */
} }
} }
@ -267,7 +268,7 @@ const void * pcm_play_dma_get_peak_buffer(int *count)
void * pcm_dma_addr(void *addr) void * pcm_dma_addr(void *addr)
{ {
if (addr != NULL) if (addr != NULL)
addr = UNCACHED_ADDR(addr); addr = (void*)((uintptr_t)addr | 0x40000000);
return addr; return addr;
} }
#endif #endif