A few preparations for the D2 PCM driver: move driver up to TCC780x level, move FIQ...
[Rockbox.git] / firmware / target / arm / tcc780x / pcm-tcc780x.c
bloba9312749c8e0609251396823db6eeb20b9f25ca6
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Karl Kurbjun
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #include "system.h"
20 #include "kernel.h"
21 #include "logf.h"
22 #include "audio.h"
23 #include "sound.h"
24 #include "file.h"
26 void pcm_postinit(void)
30 const void * pcm_play_dma_get_peak_buffer(int *count)
32 (void) count;
33 return 0;
36 void pcm_play_dma_init(void)
40 void pcm_apply_settings(void)
44 void pcm_set_frequency(unsigned int frequency)
46 (void) frequency;
49 void pcm_play_dma_start(const void *addr, size_t size)
51 (void) addr;
52 (void) size;
55 void pcm_play_dma_stop(void)
59 void pcm_play_lock(void)
63 void pcm_play_unlock(void)
67 void pcm_play_dma_pause(bool pause)
69 (void) pause;
72 size_t pcm_get_bytes_waiting(void)
74 return 0;
77 void fiq_handler(void)
79 /* Clear FIQ status */
80 CREQ = DAI_TX_IRQ_MASK | DAI_RX_IRQ_MASK;
82 /* Return from FIQ */
83 asm volatile (
84 "subs pc, lr, #4 \r\n"