xserver-multidpi/hw/xfree86/i2c/tda8425.h
Paulo Cesar Pereira de Andrade 49f77fff14 Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.

  This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)

  LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.

  xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00

42 lines
1.1 KiB
C

#ifndef __TDA8425_H__
#define __TDA8425_H__
#include "xf86i2c.h"
typedef struct {
I2CDevRec d;
int mux;
int stereo;
int v_left;
int v_right;
int bass;
int treble;
int src_sel;
Bool mute;
} TDA8425Rec, *TDA8425Ptr;
#define TDA8425_ADDR_1 0x82
/* the third parameter is meant to force detection of tda8425.
This is because tda8425 is write-only and complete implementation
of I2C protocol is not always available. Besides address there is no good
way to autodetect it so we have to _know_ it is there anyway */
#define xf86_Detect_tda8425 Detect_tda8425
extern _X_EXPORT TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr,Bool force);
#define xf86_tda8425_init tda8425_init
extern _X_EXPORT Bool tda8425_init(TDA8425Ptr t);
#define xf86_tda8425_setaudio tda8425_setaudio
extern _X_EXPORT void tda8425_setaudio(TDA8425Ptr t);
#define xf86_tda8425_mute tda8425_mute
extern _X_EXPORT void tda8425_mute(TDA8425Ptr t, Bool mute);
#define TDA8425SymbolsList \
"Detect_tda8425", \
"tda8425_init", \
"tda8425_setaudio", \
"tda8425_mute"
#endif