summaryrefslogtreecommitdiff
path: root/firmware/target/arm/pnx0101
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-12-12 11:01:07 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-12-12 11:01:07 +0000
commite69d567d9ebf7d236ff9663b11ac396cc71dcd75 (patch)
tree093b9d1bc979d79be1fcd0daac1d8daf8ac55503 /firmware/target/arm/pnx0101
parent0ad97d13fc52b28de566dc0ddaf7245583eec2cc (diff)
downloadrockbox-e69d567d9ebf7d236ff9663b11ac396cc71dcd75.tar.gz
rockbox-e69d567d9ebf7d236ff9663b11ac396cc71dcd75.zip
Bring consistency to pcm implementation and samplerate handling. Less low-level duplication. A small test_sampr fix so it works on coldfire again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19400 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/pnx0101')
-rw-r--r--firmware/target/arm/pnx0101/pcm-pnx0101.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/firmware/target/arm/pnx0101/pcm-pnx0101.c b/firmware/target/arm/pnx0101/pcm-pnx0101.c
index 4f90c5f829..20fca48039 100644
--- a/firmware/target/arm/pnx0101/pcm-pnx0101.c
+++ b/firmware/target/arm/pnx0101/pcm-pnx0101.c
@@ -27,7 +27,7 @@
27short __attribute__((section(".dmabuf"))) dma_buf_left[DMA_BUF_SAMPLES]; 27short __attribute__((section(".dmabuf"))) dma_buf_left[DMA_BUF_SAMPLES];
28short __attribute__((section(".dmabuf"))) dma_buf_right[DMA_BUF_SAMPLES]; 28short __attribute__((section(".dmabuf"))) dma_buf_right[DMA_BUF_SAMPLES];
29 29
30static int pcm_freq = HW_SAMPR_DEFAULT; /* 44.1 is default */ 30static int pcm_sampr = HW_SAMPR_DEFAULT; /* 44.1 is default */
31 31
32unsigned short* p IBSS_ATTR; 32unsigned short* p IBSS_ATTR;
33size_t p_size IBSS_ATTR; 33size_t p_size IBSS_ATTR;
@@ -147,8 +147,6 @@ void pcm_init(void)
147{ 147{
148 int i; 148 int i;
149 149
150 pcm_set_frequency(HW_SAMPR_DEFAULT);
151
152 memset(dma_buf_left, 0, sizeof(dma_buf_left)); 150 memset(dma_buf_left, 0, sizeof(dma_buf_left));
153 memset(dma_buf_right, 0, sizeof(dma_buf_right)); 151 memset(dma_buf_right, 0, sizeof(dma_buf_right));
154 152
@@ -193,15 +191,8 @@ void pcm_postinit(void)
193 pcm_apply_settings(); 191 pcm_apply_settings();
194} 192}
195 193
196void pcm_set_frequency(unsigned int frequency) 194void pcm_dma_apply_settings(void)
197{
198 (void)frequency;
199 pcm_freq = HW_SAMPR_DEFAULT;
200}
201
202void pcm_apply_settings(void)
203{ 195{
204 pcm_curr_sampr = pcm_freq;
205} 196}
206 197
207size_t pcm_get_bytes_waiting(void) 198size_t pcm_get_bytes_waiting(void)