mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
rk27xx - add support for i2s in master mode. Based on patch by Andrew Ryabinin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30746 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e8e06f81f9
commit
0dc76136ca
1 changed files with 15 additions and 6 deletions
|
@ -130,7 +130,7 @@ static void i2s_init(void)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_RK27XX_CODEC)
|
#if defined(HAVE_RK27XX_CODEC)
|
||||||
/* iomux I2S internal */
|
/* iomux I2S internal */
|
||||||
SCU_IOMUXA_CON &= ~(1<<18); /* i2s external bit */
|
SCU_IOMUXA_CON &= ~(1<<19); /* i2s external bit */
|
||||||
SCU_IOMUXB_CON &= ~((1<<4) | /* i2s_mclk */
|
SCU_IOMUXB_CON &= ~((1<<4) | /* i2s_mclk */
|
||||||
(1<<3) | /* i2s_sdo */
|
(1<<3) | /* i2s_sdo */
|
||||||
(1<<2) | /* i2s_sdi */
|
(1<<2) | /* i2s_sdi */
|
||||||
|
@ -138,7 +138,7 @@ static void i2s_init(void)
|
||||||
(1<<0)); /* i2s_bck */
|
(1<<0)); /* i2s_bck */
|
||||||
#else
|
#else
|
||||||
/* iomux I2S external */
|
/* iomux I2S external */
|
||||||
SCU_IOMUXA_CON |= (1<<18); /* i2s external bit */
|
SCU_IOMUXA_CON |= (1<<19); /* i2s external bit */
|
||||||
SCU_IOMUXB_CON |= ((1<<4) | /* i2s_mclk */
|
SCU_IOMUXB_CON |= ((1<<4) | /* i2s_mclk */
|
||||||
(1<<3) | /* i2s_sdo */
|
(1<<3) | /* i2s_sdo */
|
||||||
(1<<2) | /* i2s_sdi */
|
(1<<2) | /* i2s_sdi */
|
||||||
|
@ -158,7 +158,11 @@ static void i2s_init(void)
|
||||||
(1<<4) | /* 16bit samples */
|
(1<<4) | /* 16bit samples */
|
||||||
(0<<3) | /* stereo */
|
(0<<3) | /* stereo */
|
||||||
(0<<1) | /* I2S IF */
|
(0<<1) | /* I2S IF */
|
||||||
|
#ifdef CODEC_SLAVE
|
||||||
|
(1<<0); /* master mode */
|
||||||
|
#else
|
||||||
(0<<0); /* slave mode */
|
(0<<0); /* slave mode */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* the fifo is 16x32bits according to my tests
|
/* the fifo is 16x32bits according to my tests
|
||||||
* while the docs state 32x32bits
|
* while the docs state 32x32bits
|
||||||
|
@ -173,8 +177,13 @@ static void i2s_init(void)
|
||||||
(0<<4) | /* Req1 for Tx fifo */
|
(0<<4) | /* Req1 for Tx fifo */
|
||||||
(1<<3) | /* Req2 for Rx fifo */
|
(1<<3) | /* Req2 for Rx fifo */
|
||||||
(0<<2) | /* normal operation */
|
(0<<2) | /* normal operation */
|
||||||
(0<<1) | /* start Tx (in master mode) */
|
#ifdef CODEC_SLAVE
|
||||||
(0<<0); /* start Rx (in master mode) */
|
(1<<1) | /* start Tx (master mode) */
|
||||||
|
(1<<0); /* start Rx (master mode) */
|
||||||
|
#else
|
||||||
|
(0<<1) | /* not used in slave mode */
|
||||||
|
(0<<0); /* not used in slave mode */
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void pcm_play_dma_init(void)
|
void pcm_play_dma_init(void)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue