// Tuner API type, set one in saa_var.h #define TUNER_API_PHILIPS 0 #define TUNER_API_PHILIPS_MK3 1 #define TUNER_API_LG 2 #define TUNER_API_ALPS 3 #define TUNER_API_TEMIC 4 // TV picture/broadcast standard, set one in saa_var.h #define TV_STD_PAL_B_G 0 #define TV_STD_PAL_I 1 #define TV_STD_PAL_D_K 2 #define TV_STD_PAL_L 3 #define TV_STD_PAL_LACCENT 4 #define TV_STD_NTSC 5 #define TV_STD_NTSC_JAPAN 6 #define TV_STD_SECAM_B_G 7 #define TV_STD_SECAM_D_K 8 #define TV_STD_SECAM_L 9 #define TV_STD_SECAM_LACCENT 10 // Video IF (picture carrier) frequency, MHz #define FREQ_VIF_PAL 38.90 #define FREQ_VIF_PAL_LACCENT 33.95 #define FREQ_VIF_NTSC 45.75 #define FREQ_VIF_NTSC_JAPAN 58.75 // Sound carrier frequency, MHz (for completeness, not used so far) #define FREQ_SND_PAL_B_G 5.5 #define FREQ_SND_PAL_I 6.0 #define FREQ_SND_PAL_D_K_L 6.5 #define FREQ_SND_NTSC 4.5 // Bands. MK3 spec followed for PAL, not sure if universally applicable #define FREQ_LOBAND_PAL 48.25 #define FREQ_LOBAND_NTSC 55.25 #define FREQ_MIDBAND 160.0 #define FREQ_HIBAND_PAL 442.0 #define FREQ_HIBAND_NTSC 454.0 #define FREQ_HIGHEST_PAL 863.25 #define FREQ_HIGHEST_NTSC 801.25 // Control and aux byte (tuner) /* * Control byte (MSB first): 1 CP T2 T1 T0 RSA RSB OS * * Charge pump CP = 1 (high) for TV, 0 preferred for FM * Test mode setting T2 = 0, T1 = 0 or 1 (MK3), T0 = 1 * Freq step size RSA RSB = 0 0 (50 kHz, FM), 0 1 (31.25 kHz), * 1 0 (166.7 kHz), 1 1 (62.5 kHz) * PLL tuning not disabled OS = 0 * * Auxiliary byte (MK3 only): ATC AL2 AL1 AL0 0 0 0 0 * * AGC time constant ATC = 0 (2 sec) * AGC top setting AL2 AL1 AL0 can take several values but the ones that * matter are 1 0 0 (106 dBuV, PAL, NTSC, FM) and 1 0 1 (103, L/L'). * Upon power-on reset this gets set to 112 dBuV so it must be set on init */ #define CTRL_BYTE 0xce #define CTRL_BYTE_MK3 0xde #define AUX_BYTE 0x40 #define AUX_BYTE_L_LACCENT 0x50 // Band selection commands for the different tuner types, from saa support code #define CMD_LO_PHILIPS 0xa0 #define CMD_MID_PHILIPS 0x90 #define CMD_HI_PHILIPS 0x30 #define CMD_LO_PHILIPS_MK3 0x01 #define CMD_MID_PHILIPS_MK3 0x02 #define CMD_HI_PHILIPS_MK3 0x04 #define CMD_LO_LG 0x01 #define CMD_MID_LG 0x02 #define CMD_HI_LG 0x08 #define CMD_LO_ALPS 0x14 #define CMD_MID_ALPS 0x12 #define CMD_HI_ALPS 0x11 #define CMD_LO_TEMIC 0x02 #define CMD_MID_TEMIC 0x04 #define CMD_HI_TEMIC 0x01 // TDA988x data bytes (IF, crucial for MK3 and possibly for other types too) #define B_DATA_PAL_NTSC 0x16 #define B_DATA_PAL_L 0x06 #define B_DATA_PAL_LACCENT 0x86 #define B_DATA_NTSC_JAPAN 0x12 #define C_DATA_PAL 0x74 #define C_DATA_PAL_L 0x54 #define C_DATA_NTSC 0x30 #define E_DATA_PAL_B_G 0x49 #define E_DATA_PAL_I 0x4a #define E_DATA_PAL_D_K_L 0x4b #define E_DATA_PAL_LACCENT 0x53 #define E_DATA_NTSC 0x44 // IF and tuner i2c write address #define TDA988X_ADDRESS 0x86 #define TUNER_ADDRESS 0xc0 #define TUNER_ADDRESS_ALT 0xc2