2002-05-16 21:03:57 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
2010-10-31 21:09:34 +00:00
|
|
|
* $Id: dac.h 24158 2010-01-03 11:31:14Z Buschel $
|
2002-05-16 21:03:57 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2002 by Linus Nielsen Feltzing
|
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* 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.
|
2002-05-16 21:03:57 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
2010-10-31 21:09:34 +00:00
|
|
|
#ifndef _DAC3550A_H_
|
|
|
|
#define _DAC3550A_H_
|
2002-05-16 21:03:57 +00:00
|
|
|
|
2002-08-16 07:16:52 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2002-05-16 21:03:57 +00:00
|
|
|
/*
|
2010-01-03 11:31:14 +00:00
|
|
|
DAC I2C defs
|
2002-05-16 21:03:57 +00:00
|
|
|
*/
|
|
|
|
#define DAC_ADR 0x9a
|
2010-01-03 11:31:14 +00:00
|
|
|
#define DAC_DEV_WRITE (DAC_ADR | 0x00)
|
2002-05-16 21:03:57 +00:00
|
|
|
|
2010-01-03 11:31:14 +00:00
|
|
|
#define DAC_REG_WRITE 0xc0
|
2002-05-16 21:03:57 +00:00
|
|
|
|
|
|
|
/* registers..*/
|
|
|
|
#define DAC_SR_REG 1
|
|
|
|
#define DAC_AVOL 2
|
|
|
|
#define DAC_GCFG 3
|
|
|
|
|
2010-10-31 21:09:34 +00:00
|
|
|
/* function prototypes */
|
|
|
|
extern int tenthdb2reg(int db);
|
2003-11-03 23:36:36 +00:00
|
|
|
extern int dac_volume(unsigned int left, unsigned int right, bool deemph);
|
|
|
|
extern void dac_enable(bool enable);
|
|
|
|
extern void dac_line_in(bool enable);
|
2002-08-14 12:54:38 +00:00
|
|
|
extern void dac_init(void);
|
2002-05-16 21:03:57 +00:00
|
|
|
|
2010-10-31 21:09:34 +00:00
|
|
|
#endif /* _DAC3550A_H_ */
|
2002-08-16 07:16:52 +00:00
|
|
|
|