ioctl_bt848.h revision 24086
123599Smarkm/*
223599Smarkm * extensions to ioctl_meteor.h for the bt848 cards
323599Smarkm */
423599Smarkm
523599Smarkm/*
624086Sfsmp * frequency sets
723599Smarkm */
824086Sfsmp#define CHNLSET_NABCST		1
924086Sfsmp#define CHNLSET_CABLEIRC	2
1024086Sfsmp#define CHNLSET_CABLEHRC	3
1124086Sfsmp#define CHNLSET_WEUROPE		4
1224086Sfsmp#define CHNLSET_MIN		CHNLSET_NABCST
1324086Sfsmp#define CHNLSET_MAX		CHNLSET_WEUROPE
1423599Smarkm
1523599Smarkm
1623599Smarkm/*
1723936Sfsmp * constants for various tuner registers
1823936Sfsmp */
1923936Sfsmp#define BT848_HUEMIN		(-90)
2023936Sfsmp#define BT848_HUEMAX		90
2123936Sfsmp#define BT848_HUECENTER		0
2223936Sfsmp#define BT848_HUERANGE		179.3
2323936Sfsmp#define BT848_HUEREGMIN		(-128)
2423936Sfsmp#define BT848_HUEREGMAX		127
2523936Sfsmp#define BT848_HUESTEPS		256
2623936Sfsmp
2723936Sfsmp#define BT848_BRIGHTMIN		(-50)
2823936Sfsmp#define BT848_BRIGHTMAX		50
2923936Sfsmp#define BT848_BRIGHTCENTER	0
3023936Sfsmp#define BT848_BRIGHTRANGE	99.6
3123936Sfsmp#define BT848_BRIGHTREGMIN	(-128)
3223936Sfsmp#define BT848_BRIGHTREGMAX	127
3323936Sfsmp#define BT848_BRIGHTSTEPS	256
3423936Sfsmp
3523936Sfsmp#define BT848_CONTRASTMIN	0
3623936Sfsmp#define BT848_CONTRASTMAX	237
3723936Sfsmp#define BT848_CONTRASTCENTER	100
3823936Sfsmp#define BT848_CONTRASTRANGE	236.57
3923936Sfsmp#define BT848_CONTRASTREGMIN	0
4023936Sfsmp#define BT848_CONTRASTREGMAX	511
4123936Sfsmp#define BT848_CONTRASTSTEPS	512
4223936Sfsmp
4323936Sfsmp#define BT848_CHROMAMIN		0
4423936Sfsmp#define BT848_CHROMAMAX		284
4523936Sfsmp#define BT848_CHROMACENTER	100
4623936Sfsmp#define BT848_CHROMARANGE	283.89
4723936Sfsmp#define BT848_CHROMAREGMIN	0
4823936Sfsmp#define BT848_CHROMAREGMAX	511
4923936Sfsmp#define BT848_CHROMASTEPS	512
5023936Sfsmp
5123936Sfsmp#define BT848_SATUMIN		0
5223936Sfsmp#define BT848_SATUMAX		202
5323936Sfsmp#define BT848_SATUCENTER	100
5423936Sfsmp#define BT848_SATURANGE		201.18
5523936Sfsmp#define BT848_SATUREGMIN	0
5623936Sfsmp#define BT848_SATUREGMAX	511
5723936Sfsmp#define BT848_SATUSTEPS		512
5823936Sfsmp
5923936Sfsmp#define BT848_SATVMIN		0
6023936Sfsmp#define BT848_SATVMAX		284
6123936Sfsmp#define BT848_SATVCENTER	100
6223936Sfsmp#define BT848_SATVRANGE		283.89
6323936Sfsmp#define BT848_SATVREGMIN	0
6423936Sfsmp#define BT848_SATVREGMAX	511
6523936Sfsmp#define BT848_SATVSTEPS		512
6623936Sfsmp
6723936Sfsmp
6824086Sfsmp/*
6924086Sfsmp * audio stuff
7024086Sfsmp */
7124086Sfsmp#define AUDIO_TUNER		0x00	/* command for the audio routine */
7224086Sfsmp#define AUDIO_EXTERN		0x01	/* don't confuse them with bit */
7324086Sfsmp#define AUDIO_INTERN		0x02	/* settings */
7424086Sfsmp#define AUDIO_MUTE		0x80
7524086Sfsmp#define AUDIO_UNMUTE		0x81
7624086Sfsmp
7724086Sfsmp
7824086Sfsmp/*
7924086Sfsmp * EEProm stuff
8024086Sfsmp */
8124045Sfsmpstruct eeProm {
8224045Sfsmp	u_char bytes[ 256 ];
8324045Sfsmp};
8424045Sfsmp
8524045Sfsmp
8623936Sfsmp/*
8723599Smarkm * XXX: this is a hack, should be in ioctl_meteor.h
8823599Smarkm * here to avoid touching that file for now...
8923599Smarkm */
9023599Smarkm#define	TVTUNER_SETCHNL    _IOW('x', 32, unsigned int)	/* set channel */
9123599Smarkm#define	TVTUNER_GETCHNL    _IOR('x', 32, unsigned int)	/* get channel */
9223599Smarkm#define	TVTUNER_SETTYPE    _IOW('x', 33, unsigned int)	/* set tuner type */
9323599Smarkm#define	TVTUNER_GETTYPE    _IOR('x', 33, unsigned int)	/* get tuner type */
9423599Smarkm#define	TVTUNER_GETSTATUS  _IOR('x', 34, unsigned int)	/* get tuner status */
9523936Sfsmp#define	TVTUNER_SETFREQ    _IOW('x', 35, unsigned int)	/* set frequency */
9623936Sfsmp#define	TVTUNER_GETFREQ    _IOR('x', 36, unsigned int)	/* get frequency */
9723599Smarkm
9823599Smarkm
9924086Sfsmp#define BT848_SHUE	_IOW('x', 37, int)		/* set hue */
10024086Sfsmp#define BT848_GHUE	_IOR('x', 37, int)		/* get hue */
10123936Sfsmp#define	BT848_SBRIG	_IOW('x', 38, int)		/* set brightness */
10224086Sfsmp#define BT848_GBRIG	_IOR('x', 38, int)		/* get brightness */
10323936Sfsmp#define	BT848_SCSAT	_IOW('x', 39, int)		/* set chroma sat */
10424086Sfsmp#define BT848_GCSAT	_IOR('x', 39, int)		/* get UV saturation */
10524086Sfsmp#define	BT848_SCONT	_IOW('x', 40, int)		/* set contrast */
10623936Sfsmp#define	BT848_GCONT	_IOR('x', 40, int)		/* get contrast */
10723936Sfsmp#define	BT848_SVSAT	_IOW('x', 41, int)		/* set chroma V sat */
10824086Sfsmp#define BT848_GVSAT	_IOR('x', 41, int)		/* get V saturation */
10923936Sfsmp#define	BT848_SUSAT	_IOW('x', 42, int)		/* set chroma U sat */
11024086Sfsmp#define BT848_GUSAT	_IOR('x', 42, int)		/* get U saturation */
11123936Sfsmp
11224045Sfsmp#define	BT848_SCBARS	_IOR('x', 43, int)		/* set colorbar */
11324045Sfsmp#define	BT848_CCBARS	_IOR('x', 44, int)		/* clear colorbar */
11423936Sfsmp
11524045Sfsmp#define	BT848_EEPROM	_IOR('x', 45, struct eeProm)
11624045Sfsmp
11724086Sfsmp#define	BT848_SAUDIO	_IOW('x', 46, int)		/* set audio channel */
11824086Sfsmp#define BT848_GAUDIO	_IOR('x', 47, int)		/* get audio channel */
11924086Sfsmp#define	BT848_SBTSC	_IOW('x', 48, int)		/* set audio channel */
12024086Sfsmp
12123599Smarkm/*
12223599Smarkm * XXX: more bad magic,
12323599Smarkm *      we need to fix the METEORGINPUT to return something public
12423599Smarkm *      duplicate them here for now...
12523599Smarkm */
12623599Smarkm#define	METEOR_DEV0		0x00001000
12723599Smarkm#define	METEOR_DEV1		0x00002000
12823599Smarkm#define	METEOR_DEV2		0x00004000
129