1 | /*************************************************************************************
|
---|
2 | * $Id$
|
---|
3 | *
|
---|
4 | * Copyright (C) 2005 Bogdan D. [email protected]
|
---|
5 | *
|
---|
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
---|
7 | * software and associated documentation files (the "Software"), to deal in the Software
|
---|
8 | * without restriction, including without limitation the rights to use, copy, modify,
|
---|
9 | * merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
---|
10 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
---|
11 | *
|
---|
12 | * The above copyright notice and this permission notice shall be included in all copies or
|
---|
13 | * substantial portions of the Software.
|
---|
14 | *
|
---|
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
---|
16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
|
---|
17 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM,
|
---|
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
---|
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
20 | *
|
---|
21 | * Except as contained in this notice, the name of the author shall not be used in advertising or
|
---|
22 | * otherwise to promote the sale, use or other dealings in this Software without prior written
|
---|
23 | * authorization from the author.
|
---|
24 | *
|
---|
25 | * $Log$
|
---|
26 | * Revision 1.3 2005/09/24 21:56:00 bogdand
|
---|
27 | * Changed the license to a X/MIT one
|
---|
28 | *
|
---|
29 | * Revision 1.2 2005/07/01 22:43:11 daniels
|
---|
30 | * Change all misc.h and os.h references to <X11/foo.h>.
|
---|
31 | *
|
---|
32 | *
|
---|
33 | ************************************************************************************/
|
---|
34 |
|
---|
35 | #ifndef __UDA1380_H__
|
---|
36 | #define __UDA1380_H__
|
---|
37 |
|
---|
38 | #include "xf86i2c.h"
|
---|
39 |
|
---|
40 | typedef struct {
|
---|
41 | I2CDevRec d;
|
---|
42 |
|
---|
43 | CARD16 analog_mixer_settings; /* register 0x03 */
|
---|
44 |
|
---|
45 | } UDA1380Rec, *UDA1380Ptr;
|
---|
46 |
|
---|
47 | #define UDA1380_ADDR_1 0x30
|
---|
48 | #define UDA1380_ADDR_2 0x34
|
---|
49 |
|
---|
50 | UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr);
|
---|
51 | Bool uda1380_init(UDA1380Ptr t);
|
---|
52 | void uda1380_shutdown(UDA1380Ptr t);
|
---|
53 | void uda1380_setvolume(UDA1380Ptr t, INT32);
|
---|
54 | void uda1380_mute(UDA1380Ptr t, Bool);
|
---|
55 | void uda1380_setparameters(UDA1380Ptr t);
|
---|
56 | void uda1380_getstatus(UDA1380Ptr t);
|
---|
57 | void uda1380_dumpstatus(UDA1380Ptr t);
|
---|
58 |
|
---|
59 | #define UDA1380SymbolsList \
|
---|
60 | "Detect_uda1380", \
|
---|
61 | "uda1380_init", \
|
---|
62 | "uda1380_shutdown", \
|
---|
63 | "uda1380_setvolume", \
|
---|
64 | "uda1380_mute", \
|
---|
65 | "uda1380_setparameters", \
|
---|
66 | "uda1380_getstatus", \
|
---|
67 | "uda1380_dumpstatus"
|
---|
68 |
|
---|
69 | #define xf86_Detect_uda1380 ((UDA1380Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_uda1380"))
|
---|
70 | #define xf86_uda1380_init ((Bool (*)(UDA1380Ptr))LoaderSymbol("uda1380_init"))
|
---|
71 | #define xf86_uda1380_shutdown ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_shutdown"))
|
---|
72 | #define xf86_uda1380_setvolume ((void (*)(UDA1380Ptr, CARD16))LoaderSymbol("uda1380_setvolume"))
|
---|
73 | #define xf86_uda1380_mute ((void (*)(UDA1380Ptr, Bool))LoaderSymbol("uda1380_mute"))
|
---|
74 | #define xf86_uda1380_setparameters ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_setparameters"))
|
---|
75 | #define xf86_uda1380_getstatus ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_getstatus"))
|
---|
76 | #define xf86_uda1380_dumpstatus ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_dumpstatus"))
|
---|
77 |
|
---|
78 | #endif
|
---|