diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2009-03-22 01:50:48 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2009-03-22 01:50:48 +0000 |
commit | b7f7655dc2ae979fee8b01ed894224e5c2f7c719 (patch) | |
tree | 6540a83276514c2ea27b9c633ac9872588e126be /firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c | |
parent | 6a76ebbab10594f425edbd26e1fa35b0e37a61e5 (diff) | |
download | rockbox-b7f7655dc2ae979fee8b01ed894224e5c2f7c719.tar.gz rockbox-b7f7655dc2ae979fee8b01ed894224e5c2f7c719.zip |
imx31/mc13783: Do some housekeeping with register macros, function names and other defines. No functional changes (except to alter a couple int priorities).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20442 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c b/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c index deaa2a0dcd..00f196a512 100644 --- a/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c | |||
@@ -130,8 +130,8 @@ void pcm_play_dma_init(void) | |||
130 | sdma_channel_init(DMA_PLAY_CH_NUM, &dma_play_cd, &dma_play_bd); | 130 | sdma_channel_init(DMA_PLAY_CH_NUM, &dma_play_cd, &dma_play_bd); |
131 | sdma_channel_set_priority(DMA_PLAY_CH_NUM, DMA_PLAY_CH_PRIORITY); | 131 | sdma_channel_set_priority(DMA_PLAY_CH_NUM, DMA_PLAY_CH_PRIORITY); |
132 | 132 | ||
133 | imx31_clkctl_module_clock_gating(CG_SSI1, CGM_ON_ALL); | 133 | ccm_module_clock_gating(CG_SSI1, CGM_ON_RUN_WAIT); |
134 | imx31_clkctl_module_clock_gating(CG_SSI2, CGM_ON_ALL); | 134 | ccm_module_clock_gating(CG_SSI2, CGM_ON_RUN_WAIT); |
135 | 135 | ||
136 | /* Reset & disable SSIs */ | 136 | /* Reset & disable SSIs */ |
137 | SSI_SCR1 &= ~SSI_SCR_SSIEN; | 137 | SSI_SCR1 &= ~SSI_SCR_SSIEN; |
@@ -178,12 +178,12 @@ void pcm_play_dma_init(void) | |||
178 | SSI_STCR_TEFS | SSI_STCR_TFEN0; | 178 | SSI_STCR_TEFS | SSI_STCR_TFEN0; |
179 | 179 | ||
180 | /* 16 bits per word, 2 words per frame */ | 180 | /* 16 bits per word, 2 words per frame */ |
181 | SSI_STCCR2 = SSI_STRCCR_WL16 | SSI_STRCCR_DCw(2-1) | | 181 | SSI_STCCR2 = SSI_STRCCR_WL16 | ((2-1) << SSI_STRCCR_DC_POS) | |
182 | SSI_STRCCR_PMw(4-1); | 182 | ((4-1) << SSI_STRCCR_PM_POS); |
183 | 183 | ||
184 | /* Transmit low watermark */ | 184 | /* Transmit low watermark */ |
185 | SSI_SFCSR2 = (SSI_SFCSR2 & ~SSI_SFCSR_TFWM0) | | 185 | SSI_SFCSR2 = (SSI_SFCSR2 & ~SSI_SFCSR_TFWM0) | |
186 | SSI_SFCSR_TFWM0w(8-SDMA_SSI_TXFIFO_WML); | 186 | ((8-SDMA_SSI_TXFIFO_WML) << SSI_SFCSR_TFWM0_POS); |
187 | SSI_STMSK2 = 0; | 187 | SSI_STMSK2 = 0; |
188 | 188 | ||
189 | /* SSI1 - provides MCLK to codec. Receives data from codec. */ | 189 | /* SSI1 - provides MCLK to codec. Receives data from codec. */ |
@@ -201,7 +201,7 @@ void pcm_play_dma_init(void) | |||
201 | * The hardware seems to force a divide by 4 even if all bits are | 201 | * The hardware seems to force a divide by 4 even if all bits are |
202 | * zero but comply by setting DIV2 and the others to zero. | 202 | * zero but comply by setting DIV2 and the others to zero. |
203 | */ | 203 | */ |
204 | SSI_STCCR1 = SSI_STRCCR_DIV2 | SSI_STRCCR_PMw(1-1); | 204 | SSI_STCCR1 = SSI_STRCCR_DIV2 | ((1-1) << SSI_STRCCR_PM_POS); |
205 | 205 | ||
206 | /* SSI1 - receive - asynchronous clocks */ | 206 | /* SSI1 - receive - asynchronous clocks */ |
207 | SSI_SCR1 = SSI_SCR_I2S_MODE_SLAVE; | 207 | SSI_SCR1 = SSI_SCR_I2S_MODE_SLAVE; |
@@ -210,12 +210,12 @@ void pcm_play_dma_init(void) | |||
210 | SSI_SRCR_REFS; | 210 | SSI_SRCR_REFS; |
211 | 211 | ||
212 | /* 16 bits per word, 2 words per frame */ | 212 | /* 16 bits per word, 2 words per frame */ |
213 | SSI_SRCCR1 = SSI_STRCCR_WL16 | SSI_STRCCR_DCw(2-1) | | 213 | SSI_SRCCR1 = SSI_STRCCR_WL16 | ((2-1) << SSI_STRCCR_DC_POS) | |
214 | SSI_STRCCR_PMw(4-1); | 214 | ((4-1) << SSI_STRCCR_PM_POS); |
215 | 215 | ||
216 | /* Receive high watermark */ | 216 | /* Receive high watermark */ |
217 | SSI_SFCSR1 = (SSI_SFCSR1 & ~SSI_SFCSR_RFWM0) | | 217 | SSI_SFCSR1 = (SSI_SFCSR1 & ~SSI_SFCSR_RFWM0) | |
218 | SSI_SFCSR_RFWM0w(SDMA_SSI_RXFIFO_WML); | 218 | (SDMA_SSI_RXFIFO_WML << SSI_SFCSR_RFWM0_POS); |
219 | SSI_SRMSK1 = 0; | 219 | SSI_SRMSK1 = 0; |
220 | 220 | ||
221 | /* Enable SSI1 (codec clock) */ | 221 | /* Enable SSI1 (codec clock) */ |
@@ -252,7 +252,7 @@ static void play_start_pcm(void) | |||
252 | static void play_stop_pcm(void) | 252 | static void play_stop_pcm(void) |
253 | { | 253 | { |
254 | /* Wait for FIFO to empty */ | 254 | /* Wait for FIFO to empty */ |
255 | while (SSI_SFCSR_TFCNT0r(SSI_SFCSR2) > 0); | 255 | while (SSI_SFCSR_TFCNT0 & SSI_SFCSR2); |
256 | 256 | ||
257 | /* Disable transmission */ | 257 | /* Disable transmission */ |
258 | SSI_STCR2 &= ~SSI_STCR_TFEN0; | 258 | SSI_STCR2 &= ~SSI_STCR_TFEN0; |