summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCástor Muñoz <cmvidal@gmail.com>2012-02-25 14:21:24 +0100
committerNils Wallménius <nils@rockbox.org>2012-02-25 14:51:52 +0100
commit8c7d372e45c186084d9ba4c9f60e3c5f39d64a35 (patch)
tree8f7e4aa55f294577516e3c49cb8fa00a754dce0e
parent31a05953e142b1ffff631cfb8b817880db7e4c27 (diff)
downloadrockbox-8c7d372e45c186084d9ba4c9f60e3c5f39d64a35.zip
rockbox-8c7d372e45c186084d9ba4c9f60e3c5f39d64a35.tar.gz
rockbox-8c7d372e45c186084d9ba4c9f60e3c5f39d64a35.tar.bz2
rockbox-8c7d372e45c186084d9ba4c9f60e3c5f39d64a35.tar.xz
FS#12519 - iPod Classic/6G: swap L-R audio channels by Cástor Muñoz
Fixes swapped left and right channels on ipod 6g and changes the i2s config to send samples as 16 bits instead of 16 zero padded to 24 bits to the dac. Change-Id: Icfecfdf0f6868bdb01c11dced604ebfceb874aa1 Signed-off-by: Nils Wallménius <nils@rockbox.org>
-rw-r--r--firmware/target/arm/s5l8702/pcm-s5l8702.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/firmware/target/arm/s5l8702/pcm-s5l8702.c b/firmware/target/arm/s5l8702/pcm-s5l8702.c
index 52a040c..b58ef0f 100644
--- a/firmware/target/arm/s5l8702/pcm-s5l8702.c
+++ b/firmware/target/arm/s5l8702/pcm-s5l8702.c
@@ -71,7 +71,7 @@ void INT_DMAC0C0(void)
if (!pcm_remaining)
{
pcm_lli->nextlli = NULL;
- pcm_lli->control = 0x75249000;
+ pcm_lli->control = 0x7524a000;
commit_dcache();
return;
}
@@ -92,7 +92,7 @@ void INT_DMAC0C0(void)
pcm_lli[i].srcaddr = (void*)dataptr;
pcm_lli[i].dstaddr = (void*)((int)&I2STXDB0);
pcm_lli[i].nextlli = chunksize ? &pcm_lli[i + 1] : lastlli;
- pcm_lli[i].control = (chunksize ? 0x75249000 : 0xf5249000) | (thislli / 2);
+ pcm_lli[i].control = (chunksize ? 0x7524a000 : 0xf524a000) | (thislli / 2);
dataptr += thislli;
i++;
}
@@ -105,7 +105,7 @@ void INT_DMAC0C0(void)
else lastlli->srcaddr = dataptr;
lastlli->dstaddr = (void*)((int)&I2STXDB0);
lastlli->nextlli = last ? NULL : pcm_lli;
- lastlli->control = (last ? 0xf5249000 : 0x75249000) | (lastsize / 2);
+ lastlli->control = (last ? 0xf524a000 : 0x7524a000) | (lastsize / 2);
dataptr += lastsize;
commit_dcache();
if (!(DMAC0C0CONFIG & 1) && (pcm_lli[0].control & 0xfff))
@@ -123,7 +123,6 @@ void pcm_play_dma_start(const void* addr, size_t size)
dataptr = (const unsigned char*)addr;
pcm_remaining = size;
I2STXCOM = 0xe;
- DMAC0CONFIG |= 4;
INT_DMAC0C0();
}
@@ -145,7 +144,7 @@ void pcm_play_dma_init(void)
PWRCON(0) &= ~(1 << 4);
PWRCON(1) &= ~(1 << 7);
I2S40 = 0x110;
- I2STXCON = 0xb100059;
+ I2STXCON = 0xb100019;
I2SCLKCON = 1;
VIC0INTENABLE = 1 << IRQ_DMAC0;