aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/i2c/msp3430.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-06-28 22:07:26 +0000
committermarha <marha@users.sourceforge.net>2009-06-28 22:07:26 +0000
commit3562e78743202e43aec8727005182a2558117eca (patch)
tree8f9113a77d12470c5c851a2a8e4cb02e89df7d43 /xorg-server/hw/xfree86/i2c/msp3430.h
downloadvcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.gz
vcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.bz2
vcxsrv-3562e78743202e43aec8727005182a2558117eca.zip
Checked in the following released items:
xkeyboard-config-1.4.tar.gz ttf-bitstream-vera-1.10.tar.gz font-alias-1.0.1.tar.gz font-sun-misc-1.0.0.tar.gz font-sun-misc-1.0.0.tar.gz font-sony-misc-1.0.0.tar.gz font-schumacher-misc-1.0.0.tar.gz font-mutt-misc-1.0.0.tar.gz font-misc-misc-1.0.0.tar.gz font-misc-meltho-1.0.0.tar.gz font-micro-misc-1.0.0.tar.gz font-jis-misc-1.0.0.tar.gz font-isas-misc-1.0.0.tar.gz font-dec-misc-1.0.0.tar.gz font-daewoo-misc-1.0.0.tar.gz font-cursor-misc-1.0.0.tar.gz font-arabic-misc-1.0.0.tar.gz font-winitzki-cyrillic-1.0.0.tar.gz font-misc-cyrillic-1.0.0.tar.gz font-cronyx-cyrillic-1.0.0.tar.gz font-screen-cyrillic-1.0.1.tar.gz font-xfree86-type1-1.0.1.tar.gz font-adobe-utopia-type1-1.0.1.tar.gz font-ibm-type1-1.0.0.tar.gz font-bitstream-type1-1.0.0.tar.gz font-bitstream-speedo-1.0.0.tar.gz font-bh-ttf-1.0.0.tar.gz font-bh-type1-1.0.0.tar.gz font-bitstream-100dpi-1.0.0.tar.gz font-bh-lucidatypewriter-100dpi-1.0.0.tar.gz font-bh-100dpi-1.0.0.tar.gz font-adobe-utopia-100dpi-1.0.1.tar.gz font-adobe-100dpi-1.0.0.tar.gz font-util-1.0.1.tar.gz font-bitstream-75dpi-1.0.0.tar.gz font-bh-lucidatypewriter-75dpi-1.0.0.tar.gz font-adobe-utopia-75dpi-1.0.1.tar.gz font-bh-75dpi-1.0.0.tar.gz bdftopcf-1.0.1.tar.gz font-adobe-75dpi-1.0.0.tar.gz mkfontscale-1.0.6.tar.gz openssl-0.9.8k.tar.gz bigreqsproto-1.0.2.tar.gz xtrans-1.2.2.tar.gz resourceproto-1.0.2.tar.gz inputproto-1.4.4.tar.gz compositeproto-0.4.tar.gz damageproto-1.1.0.tar.gz zlib-1.2.3.tar.gz xkbcomp-1.0.5.tar.gz freetype-2.3.9.tar.gz pthreads-w32-2-8-0-release.tar.gz pixman-0.12.0.tar.gz kbproto-1.0.3.tar.gz evieext-1.0.2.tar.gz fixesproto-4.0.tar.gz recordproto-1.13.2.tar.gz randrproto-1.2.2.tar.gz scrnsaverproto-1.1.0.tar.gz renderproto-0.9.3.tar.gz xcmiscproto-1.1.2.tar.gz fontsproto-2.0.2.tar.gz xextproto-7.0.3.tar.gz xproto-7.0.14.tar.gz libXdmcp-1.0.2.tar.gz libxkbfile-1.0.5.tar.gz libfontenc-1.0.4.tar.gz libXfont-1.3.4.tar.gz libX11-1.1.5.tar.gz libXau-1.0.4.tar.gz libxcb-1.1.tar.gz xorg-server-1.5.3.tar.gz
Diffstat (limited to 'xorg-server/hw/xfree86/i2c/msp3430.h')
-rw-r--r--xorg-server/hw/xfree86/i2c/msp3430.h114
1 files changed, 114 insertions, 0 deletions
diff --git a/xorg-server/hw/xfree86/i2c/msp3430.h b/xorg-server/hw/xfree86/i2c/msp3430.h
new file mode 100644
index 000000000..1cb9b869d
--- /dev/null
+++ b/xorg-server/hw/xfree86/i2c/msp3430.h
@@ -0,0 +1,114 @@
+#ifndef __MSP3430_H__
+#define __MSP3430_H__
+
+#include "xf86i2c.h"
+
+typedef struct {
+ I2CDevRec d;
+
+ int standard;
+ int connector;
+ int mode;
+
+ CARD8 hardware_version, major_revision, product_code, rom_version;
+#ifdef MSP_DEBUG
+ CARD8 registers_present[256];
+#endif
+
+ CARD16 chip_id;
+ CARD8 chip_family;
+ Bool recheck; /*reinitialization needed after channel change */
+ CARD8 c_format; /*current state of audio format */
+ CARD16 c_standard; /*current state of standard register */
+ CARD8 c_source; /*current state of source register */
+ CARD8 c_matrix; /*current state of matrix register */
+ CARD8 c_fmmatrix; /*current state of fmmatrix register */
+ int c_mode; /* current state of mode for autoswitchimg */
+ CARD8 volume;
+ } MSP3430Rec, * MSP3430Ptr;
+
+
+#define MSP3430_ADDR_1 0x80
+#define MSP3430_ADDR_2 0x84
+#define MSP3430_ADDR_3 0x88
+
+#define MSP3430_PAL 1
+#define MSP3430_NTSC 2
+#define MSP3430_PAL_DK1 (0x100 | MSP3430_PAL)
+#define MSP3430_SECAM 3
+
+#define MSP3430_CONNECTOR_1 1 /* tuner on AIW cards */
+#define MSP3430_CONNECTOR_2 2 /* SVideo on AIW cards */
+#define MSP3430_CONNECTOR_3 3 /* composite on AIW cards */
+
+#define MSP3430_ADDR(a) ((a)->d.SlaveAddr)
+
+#define MSP3430_FAST_MUTE 0xFF
+/* a handy volume transform function, -1000..1000 -> 0x01..0x7F */
+#define MSP3430_VOLUME(value) (0x01+(0x7F-0x01)*log(value+1001)/log(2001))
+
+/*----------------------------------------------------------*/
+
+/* MSP chip families */
+#define MSPFAMILY_UNKNOWN 0
+#define MSPFAMILY_34x0D 1
+#define MSPFAMILY_34x5D 2
+#define MSPFAMILY_34x0G 3
+#define MSPFAMILY_34x5G 4
+
+/* values for MSP standard */
+#define MSPSTANDARD_UNKNOWN 0x00
+#define MSPSTANDARD_AUTO 0x01
+#define MSPSTANDARD_FM_M 0x02
+#define MSPSTANDARD_FM_BG 0x03
+#define MSPSTANDARD_FM_DK1 0x04
+#define MSPSTANDARD_FM_DK2 0x04
+#define MSPSTANDARD_NICAM_BG 0x08
+#define MSPSTANDARD_NICAM_L 0x09
+#define MSPSTANDARD_NICAM_I 0x0A
+#define MSPSTANDARD_NICAM_DK 0x0B
+
+/* values for MSP format */
+#define MSPFORMAT_UNKNOWN 0x00
+#define MSPFORMAT_FM 0x10
+#define MSPFORMAT_1xFM 0x00|MSPFORMAT_FM
+#define MSPFORMAT_2xFM 0x01|MSPFORMAT_FM
+#define MSPFORMAT_NICAM 0x20
+#define MSPFORMAT_NICAM_FM 0x00|MSPFORMAT_NICAM
+#define MSPFORMAT_NICAM_AM 0x01|MSPFORMAT_NICAM
+#define MSPFORMAT_SCART 0x30
+
+/* values for MSP mode */
+#define MSPMODE_UNKNOWN 0
+/* automatic modes */
+#define MSPMODE_STEREO_AB 1
+#define MSPMODE_STEREO_A 2
+#define MSPMODE_STEREO_B 3
+/* forced modes */
+#define MSPMODE_MONO 4
+#define MSPMODE_STEREO 5
+#define MSPMODE_AB 6
+#define MSPMODE_A 7
+#define MSPMODE_B 8
+/*----------------------------------------------------------*/
+
+void InitMSP3430(MSP3430Ptr m);
+MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr);
+void ResetMSP3430(MSP3430Ptr m);
+void MSP3430SetVolume (MSP3430Ptr m, CARD8 value);
+void MSP3430SetSAP (MSP3430Ptr m, int mode);
+
+#define MSP3430SymbolsList \
+ "InitMSP3430", \
+ "DetectMSP3430", \
+ "ResetMSP3430", \
+ "MSP3430SetVolume", \
+ "MSP3430SetSAP"
+
+#define xf86_DetectMSP3430 ((MSP3430Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("DetectMSP3430"))
+#define xf86_ResetMSP3430 ((void (*)(MSP3430Ptr))LoaderSymbol("ResetMSP3430"))
+#define xf86_MSP3430SetVolume ((void (*)(MSP3430Ptr, CARD8))LoaderSymbol("MSP3430SetVolume"))
+#define xf86_MSP3430SetSAP ((void (*)(MSP3430Ptr, int))LoaderSymbol("MSP3430SetSAP"))
+#define xf86_InitMSP3430 ((void (*)(MSP3430Ptr))LoaderSymbol("InitMSP3430"))
+
+#endif