VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.16.0/msp3430.h@ 99743

Last change on this file since 99743 was 52145, checked in by vboxsync, 10 years ago

Additions/x11/x11include: add header files for X.Org Server 1.16.

  • Property svn:eol-style set to native
File size: 3.4 KB
Line 
1#ifndef __MSP3430_H__
2#define __MSP3430_H__
3
4#include "xf86i2c.h"
5
6typedef struct {
7 I2CDevRec d;
8
9 int standard;
10 int connector;
11 int mode;
12
13 CARD8 hardware_version, major_revision, product_code, rom_version;
14#ifdef MSP_DEBUG
15 CARD8 registers_present[256];
16#endif
17
18 CARD16 chip_id;
19 CARD8 chip_family;
20 Bool recheck; /*reinitialization needed after channel change */
21 CARD8 c_format; /*current state of audio format */
22 CARD16 c_standard; /*current state of standard register */
23 CARD8 c_source; /*current state of source register */
24 CARD8 c_matrix; /*current state of matrix register */
25 CARD8 c_fmmatrix; /*current state of fmmatrix register */
26 int c_mode; /* current state of mode for autoswitchimg */
27 CARD8 volume;
28} MSP3430Rec, *MSP3430Ptr;
29
30#define MSP3430_ADDR_1 0x80
31#define MSP3430_ADDR_2 0x84
32#define MSP3430_ADDR_3 0x88
33
34#define MSP3430_PAL 1
35#define MSP3430_NTSC 2
36#define MSP3430_PAL_DK1 (0x100 | MSP3430_PAL)
37#define MSP3430_SECAM 3
38
39#define MSP3430_CONNECTOR_1 1 /* tuner on AIW cards */
40#define MSP3430_CONNECTOR_2 2 /* SVideo on AIW cards */
41#define MSP3430_CONNECTOR_3 3 /* composite on AIW cards */
42
43#define MSP3430_ADDR(a) ((a)->d.SlaveAddr)
44
45#define MSP3430_FAST_MUTE 0xFF
46/* a handy volume transform function, -1000..1000 -> 0x01..0x7F */
47#define MSP3430_VOLUME(value) (0x01+(0x7F-0x01)*log(value+1001)/log(2001))
48
49/*----------------------------------------------------------*/
50
51/* MSP chip families */
52#define MSPFAMILY_UNKNOWN 0
53#define MSPFAMILY_34x0D 1
54#define MSPFAMILY_34x5D 2
55#define MSPFAMILY_34x0G 3
56#define MSPFAMILY_34x5G 4
57
58/* values for MSP standard */
59#define MSPSTANDARD_UNKNOWN 0x00
60#define MSPSTANDARD_AUTO 0x01
61#define MSPSTANDARD_FM_M 0x02
62#define MSPSTANDARD_FM_BG 0x03
63#define MSPSTANDARD_FM_DK1 0x04
64#define MSPSTANDARD_FM_DK2 0x04
65#define MSPSTANDARD_NICAM_BG 0x08
66#define MSPSTANDARD_NICAM_L 0x09
67#define MSPSTANDARD_NICAM_I 0x0A
68#define MSPSTANDARD_NICAM_DK 0x0B
69
70/* values for MSP format */
71#define MSPFORMAT_UNKNOWN 0x00
72#define MSPFORMAT_FM 0x10
73#define MSPFORMAT_1xFM 0x00|MSPFORMAT_FM
74#define MSPFORMAT_2xFM 0x01|MSPFORMAT_FM
75#define MSPFORMAT_NICAM 0x20
76#define MSPFORMAT_NICAM_FM 0x00|MSPFORMAT_NICAM
77#define MSPFORMAT_NICAM_AM 0x01|MSPFORMAT_NICAM
78#define MSPFORMAT_SCART 0x30
79
80/* values for MSP mode */
81#define MSPMODE_UNKNOWN 0
82/* automatic modes */
83#define MSPMODE_STEREO_AB 1
84#define MSPMODE_STEREO_A 2
85#define MSPMODE_STEREO_B 3
86/* forced modes */
87#define MSPMODE_MONO 4
88#define MSPMODE_STEREO 5
89#define MSPMODE_AB 6
90#define MSPMODE_A 7
91#define MSPMODE_B 8
92/*----------------------------------------------------------*/
93
94#define xf86_InitMSP3430 InitMSP3430
95extern _X_EXPORT void InitMSP3430(MSP3430Ptr m);
96
97#define xf86_DetectMSP3430 DetectMSP3430
98extern _X_EXPORT MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr);
99
100#define xf86_ResetMSP3430 ResetMSP3430
101extern _X_EXPORT void ResetMSP3430(MSP3430Ptr m);
102
103#define xf86_MSP3430SetVolume MSP3430SetVolume
104extern _X_EXPORT void MSP3430SetVolume(MSP3430Ptr m, CARD8 value);
105
106#define xf86_MSP3430SetSAP MSP3430SetSAP
107extern _X_EXPORT void MSP3430SetSAP(MSP3430Ptr m, int mode);
108
109#define MSP3430SymbolsList \
110 "InitMSP3430", \
111 "DetectMSP3430", \
112 "ResetMSP3430", \
113 "MSP3430SetVolume", \
114 "MSP3430SetSAP"
115
116#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette