#ifndef TUNER_CTRL_H #define TUNER_CTRL_H #ifdef TUNER_NTSC #define LOBAND_MINFREQ 55.25 #define LOBAND_MAXFREQ 160.00 #define MIDBAND_MINFREQ 160.01 #define MIDBAND_MAXFREQ 454.00 #define HIBAND_MINFREQ 454.01 #define HIBAND_MAXFREQ 801.25 #define PCARRIER_FREQ 45.75 #define SCAN_SEPARATION 6 #else /*TUNER_PAL*/ #define LOBAND_MINFREQ 48.25 #define LOBAND_MAXFREQ 170.00 #define MIDBAND_MINFREQ 170.01 #define MIDBAND_MAXFREQ 450.00 #define HIBAND_MINFREQ 450.01 #define HIBAND_MAXFREQ 855.25 #define PCARRIER_FREQ 38.90 #define SCAN_SEPARATION 7 #endif #ifdef TUNER_APITYPE_LG #define LOBAND_CMD 0x01 #define MIDBAND_CMD 0x02 #define HIBAND_CMD 0x08 #endif #ifdef TUNER_APITYPE_TEMIC #define LOBAND_CMD 0x02 #define MIDBAND_CMD 0x04 #define HIBAND_CMD 0x01 #endif #ifdef TUNER_APITYPE_ALPS #define LOBAND_CMD 0x14 #define MIDBAND_CMD 0x12 #define HIBAND_CMD 0x11 #endif #ifdef TUNER_APITYPE_PHILIPS_MK3 #define LOBAND_CMD 0x01 #define MIDBAND_CMD 0x02 #define HIBAND_CMD 0x04 #endif #ifndef LOBAND_CMD /* TUNER_APITYPE_PHILIPS */ #define LOBAND_CMD 0xa0 #define MIDBAND_CMD 0x90 #define HIBAND_CMD 0x30 #endif #ifndef TUNER_WR_I2CADDR #define TUNER_WR_I2CADDR 0xC0 #define TUNER_RD_I2CADDR 0xC1 #endif #define CTRL_STEP_50 0x00 #define CTRL_STEP_31p25 0x02 #define CTRL_STEP_62p5 0x06 #define CTRL_FASTTUNE 0x40 #define CTRL_SIGNATURE 0x88 #define SCAN_START LOBAND_MINFREQ #define SCAN_END HIBAND_MAXFREQ #define SCAN_FSTEP 0.25 #define SCAN_LOCKVAL 0xa int set_channel(int fd, float new_freq, float old_freq, uint8_t *lockval); #endif