rockbox/firmware/target/arm/as3525/ascodec-target.h
Jack Halpin e905ca61d4 FS#10344 - AMSSansa Dynamically adjust core voltage to extend playtime.
Lower CVDD core voltage to 1.10 volts when the frequency is less than 200 MHz.

 

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21577 a1c6a512-1295-4272-9138-f99709370657
2009-06-30 17:56:21 +00:00

56 lines
2 KiB
C

/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Driver for AS3514 audio codec
*
* Copyright (c) 2007 Daniel Ankers
* Copyright (c) 2007 Christian Gmeiner
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#ifndef _ASCODEC_TARGET_H
#define _ASCODEC_TARGET_H
#include "as3514.h"
/* Charge Pump and Power management Settings */
#define AS314_CP_DCDC3_SETTING \
((0<<7) | /* CP_SW Auto-Switch Margin 0=200/300 1=150/255 */ \
(0<<6) | /* CP_on 0=Normal op 1=Chg Pump Always On */ \
(0<<5) | /* LREG_CPnot Always write 0 */ \
(0<<3) | /* DCDC3p BVDD setting 3.6/3.2/3.1/3.0 */ \
(1<<2) | /* LREG_off 1=Auto mode switching 0=Length Reg only*/\
(0<<0) ) /* CVDDp Core Voltage Setting 1.2/1.15/1.10/1.05*/
#define CVDD_1_20 0
#define CVDD_1_15 1
#define CVDD_1_10 2
#define CVDD_1_05 3
void ascodec_init(void);
int ascodec_write(unsigned int index, unsigned int value);
int ascodec_read(unsigned int index);
int ascodec_readbytes(int index, int len, unsigned char *data);
void ascodec_lock(void);
void ascodec_unlock(void);
#endif /* !_ASCODEC_TARGET_H */