1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Driver for AS3514 audio codec
12 * Copyright (c) 2007 Daniel Ankers
13 * Copyright (c) 2007 Christian Gmeiner
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.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 ****************************************************************************/
29 #include "ascodec-target.h"
32 * Initialise the PP I2C and I2S.
34 void audiohw_init(void)
36 /* normal outputs for CDI and I2S pin groups */
40 DEV_INIT1
&=~0x3000000;
43 /* I2S device reset */
47 /* I2S device enable */
50 /* enable external dev clock clocks */
51 DEV_EN
|= DEV_EXTCLOCKS
;
53 /* external dev clock to 24MHz */
54 outl(inl(0x70000018) & ~0xc, 0x70000018);
57 /* Prevent pops on startup */
59 GPIO_SET_BITWISE(GPIOG_OUTPUT_VAL
, 0x08);
60 GPIOG_OUTPUT_EN
|= 0x08;
68 void ascodec_suppressor_on(bool on
)
70 /* CHECK: Good for c200 too? */
73 /* Set pop prevention */
74 GPIO_SET_BITWISE(GPIOG_OUTPUT_VAL
, 0x08);
76 /* Release pop prevention */
77 GPIO_CLEAR_BITWISE(GPIOG_OUTPUT_VAL
, 0x08);