summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ascodec-pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/ascodec-pp.c')
-rw-r--r--firmware/target/arm/ascodec-pp.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/firmware/target/arm/ascodec-pp.c b/firmware/target/arm/ascodec-pp.c
new file mode 100644
index 0000000000..30b6b1f8de
--- /dev/null
+++ b/firmware/target/arm/ascodec-pp.c
@@ -0,0 +1,66 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Driver for AS3514 audio codec
11 *
12 * Copyright (c) 2007 Daniel Ankers
13 * Copyright (c) 2007 Christian Gmeiner
14 *
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
19 *
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
22 *
23 ****************************************************************************/
24#include "cpu.h"
25#include "system.h"
26
27#include "audiohw.h"
28#include "i2s.h"
29
30/*
31 * Initialise the PP I2C and I2S.
32 */
33void audiohw_init(void)
34{
35 /* normal outputs for CDI and I2S pin groups */
36 DEV_INIT2 &= ~0x300;
37
38 /*mini2?*/
39 DEV_INIT1 &=~0x3000000;
40 /*mini2?*/
41
42 /* device reset */
43 DEV_RS |= DEV_I2S;
44 DEV_RS &=~DEV_I2S;
45
46 /* I2S device reset */
47 DEV_RS |= DEV_I2S;
48 DEV_RS &=~DEV_I2S;
49
50 /* I2S device enable */
51 DEV_EN |= DEV_I2S;
52
53 /* enable external dev clock clocks */
54 DEV_EN |= DEV_EXTCLOCKS;
55
56 /* external dev clock to 24MHz */
57 outl(inl(0x70000018) & ~0xc, 0x70000018);
58
59 i2s_reset();
60
61 audiohw_preinit();
62}
63
64void audiohw_postinit(void)
65{
66}