040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync/*************************************************************************************
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Copyright (C) 2005 Bogdan D. bogdand@users.sourceforge.net
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Permission is hereby granted, free of charge, to any person obtaining a copy of this
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * software and associated documentation files (the "Software"), to deal in the Software
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * without restriction, including without limitation the rights to use, copy, modify,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * merge, publish, distribute, sublicense, and/or sell copies of the Software,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * The above copyright notice and this permission notice shall be included in all copies or
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * substantial portions of the Software.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Except as contained in this notice, the name of the author shall not be used in advertising or
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * otherwise to promote the sale, use or other dealings in this Software without prior written
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * authorization from the author.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Revision 1.3 2005/09/24 21:56:00 bogdand
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Changed the license to a X/MIT one
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Revision 1.2 2005/07/01 22:43:11 daniels
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Change all misc.h and os.h references to <X11/foo.h>.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync ************************************************************************************/
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#ifndef __UDA1380_H__
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define __UDA1380_H__
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#include "xf86i2c.h"
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynctypedef struct {
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync I2CDevRec d;
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync CARD16 analog_mixer_settings; /* register 0x03 */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync } UDA1380Rec, *UDA1380Ptr;
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define UDA1380_ADDR_1 0x30
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define UDA1380_ADDR_2 0x34
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncUDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncBool uda1380_init(UDA1380Ptr t);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid uda1380_shutdown(UDA1380Ptr t);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid uda1380_setvolume(UDA1380Ptr t, INT32);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid uda1380_mute(UDA1380Ptr t, Bool);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid uda1380_setparameters(UDA1380Ptr t);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid uda1380_getstatus(UDA1380Ptr t);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid uda1380_dumpstatus(UDA1380Ptr t);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define UDA1380SymbolsList \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync "Detect_uda1380", \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync "uda1380_init", \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync "uda1380_shutdown", \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync "uda1380_setvolume", \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync "uda1380_mute", \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync "uda1380_setparameters", \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync "uda1380_getstatus", \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync "uda1380_dumpstatus"
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define xf86_Detect_uda1380 ((UDA1380Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_uda1380"))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define xf86_uda1380_init ((Bool (*)(UDA1380Ptr))LoaderSymbol("uda1380_init"))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define xf86_uda1380_shutdown ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_shutdown"))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define xf86_uda1380_setvolume ((void (*)(UDA1380Ptr, CARD16))LoaderSymbol("uda1380_setvolume"))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define xf86_uda1380_mute ((void (*)(UDA1380Ptr, Bool))LoaderSymbol("uda1380_mute"))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define xf86_uda1380_setparameters ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_setparameters"))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define xf86_uda1380_getstatus ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_getstatus"))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define xf86_uda1380_dumpstatus ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_dumpstatus"))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#endif