[go: nahoru, domu]

11da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*
21da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
31da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * philips saa7134 registers
41da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */
51da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
61da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* ------------------------------------------------------------------ */
71da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*
81da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * PCI ID's
91da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */
101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifndef PCI_DEVICE_ID_PHILIPS_SAA7130
111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# define PCI_DEVICE_ID_PHILIPS_SAA7130 0x7130
121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif
131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifndef PCI_DEVICE_ID_PHILIPS_SAA7133
141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# define PCI_DEVICE_ID_PHILIPS_SAA7133 0x7133
151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif
161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifndef PCI_DEVICE_ID_PHILIPS_SAA7134
171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# define PCI_DEVICE_ID_PHILIPS_SAA7134 0x7134
181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif
191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifndef PCI_DEVICE_ID_PHILIPS_SAA7135
201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# define PCI_DEVICE_ID_PHILIPS_SAA7135 0x7135
211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif
221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* ------------------------------------------------------------------ */
241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*
251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *  registers -- 32 bit
261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */
271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* DMA channels, n = 0 ... 6 */
291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_RS_BA1(n)			((0x200 >> 2) + 4*n)
304ac97914c6c35f6bf132071c718e034d0846b9f5Mauro Carvalho Chehab#define SAA7134_RS_BA2(n)			((0x204 >> 2) + 4*n)
311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_RS_PITCH(n)			((0x208 >> 2) + 4*n)
321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_RS_CONTROL(n)			((0x20c >> 2) + 4*n)
331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_RS_CONTROL_WSWAP		(0x01 << 25)
341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_RS_CONTROL_BSWAP		(0x01 << 24)
351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_RS_CONTROL_BURST_2		(0x01 << 21)
361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_RS_CONTROL_BURST_4		(0x02 << 21)
371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_RS_CONTROL_BURST_8		(0x03 << 21)
381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_RS_CONTROL_BURST_16		(0x04 << 21)
391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_RS_CONTROL_BURST_32		(0x05 << 21)
401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_RS_CONTROL_BURST_64		(0x06 << 21)
411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_RS_CONTROL_BURST_MAX		(0x07 << 21)
421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_RS_CONTROL_ME			(0x01 << 20)
431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_FIFO_SIZE                       (0x2a0 >> 2)
441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_THRESHOULD                      (0x2a4 >> 2)
451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
46bd15eba3a0f2b175bd80c21d5fc86c02ed4c56f6Ricardo Cerqueira#define SAA7133_NUM_SAMPLES			(0x588 >> 2)
47bd15eba3a0f2b175bd80c21d5fc86c02ed4c56f6Ricardo Cerqueira#define SAA7133_AUDIO_CHANNEL			(0x58c >> 2)
48bd15eba3a0f2b175bd80c21d5fc86c02ed4c56f6Ricardo Cerqueira#define SAA7133_AUDIO_FORMAT			(0x58f >> 2)
49bd15eba3a0f2b175bd80c21d5fc86c02ed4c56f6Ricardo Cerqueira#define SAA7133_DIGITAL_OUTPUT_SEL1		(0x46c >> 2)
50bd15eba3a0f2b175bd80c21d5fc86c02ed4c56f6Ricardo Cerqueira#define SAA7133_DIGITAL_OUTPUT_SEL2		(0x470 >> 2)
51bd15eba3a0f2b175bd80c21d5fc86c02ed4c56f6Ricardo Cerqueira#define SAA7133_DIGITAL_INPUT_XBAR1		(0x464 >> 2)
52bd15eba3a0f2b175bd80c21d5fc86c02ed4c56f6Ricardo Cerqueira#define SAA7133_ANALOG_IO_SELECT                (0x594 >> 2)
53bd15eba3a0f2b175bd80c21d5fc86c02ed4c56f6Ricardo Cerqueira
541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* main control */
551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_MAIN_CTRL                       (0x2a8 >> 2)
564ac97914c6c35f6bf132071c718e034d0846b9f5Mauro Carvalho Chehab#define   SAA7134_MAIN_CTRL_VPLLE		(1 << 15)
574ac97914c6c35f6bf132071c718e034d0846b9f5Mauro Carvalho Chehab#define   SAA7134_MAIN_CTRL_APLLE		(1 << 14)
584ac97914c6c35f6bf132071c718e034d0846b9f5Mauro Carvalho Chehab#define   SAA7134_MAIN_CTRL_EXOSC		(1 << 13)
594ac97914c6c35f6bf132071c718e034d0846b9f5Mauro Carvalho Chehab#define   SAA7134_MAIN_CTRL_EVFE1		(1 << 12)
604ac97914c6c35f6bf132071c718e034d0846b9f5Mauro Carvalho Chehab#define   SAA7134_MAIN_CTRL_EVFE2		(1 << 11)
614ac97914c6c35f6bf132071c718e034d0846b9f5Mauro Carvalho Chehab#define   SAA7134_MAIN_CTRL_ESFE		(1 << 10)
624ac97914c6c35f6bf132071c718e034d0846b9f5Mauro Carvalho Chehab#define   SAA7134_MAIN_CTRL_EBADC		(1 << 9)
634ac97914c6c35f6bf132071c718e034d0846b9f5Mauro Carvalho Chehab#define   SAA7134_MAIN_CTRL_EBDAC		(1 << 8)
641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_MAIN_CTRL_TE6			(1 << 6)
651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_MAIN_CTRL_TE5			(1 << 5)
661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_MAIN_CTRL_TE4			(1 << 4)
671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_MAIN_CTRL_TE3			(1 << 3)
681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_MAIN_CTRL_TE2			(1 << 2)
691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_MAIN_CTRL_TE1			(1 << 1)
701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_MAIN_CTRL_TE0			(1 << 0)
711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* DMA status */
731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_DMA_STATUS                      (0x2ac >> 2)
741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* audio / video status */
761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_AV_STATUS			(0x2c0 >> 2)
771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_STEREO		(1 << 17)
781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_DUAL                (1 << 16)
791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_PILOT               (1 << 15)
801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_SMB                 (1 << 14)
811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_DMB                 (1 << 13)
821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_VDSP                (1 << 12)
831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_IIC_STATUS          (3 << 10)
841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_MVM                 (7 << 7)
851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_FIDT                (1 << 6)
861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_INTL                (1 << 5)
871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_RDCAP               (1 << 4)
881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_PWR_ON              (1 << 3)
891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_LOAD_ERR            (1 << 2)
901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_TRIG_ERR            (1 << 1)
911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_AV_STATUS_CONF_ERR            (1 << 0)
921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* interrupt */
941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_IRQ1                            (0x2c4 >> 2)
951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA3_1               (1 << 25)
961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA3_0               (1 << 24)
971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA2_3               (1 << 19)
981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA2_2               (1 << 18)
991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA2_1               (1 << 17)
1001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA2_0               (1 << 16)
1011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA1_3               (1 << 11)
1021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA1_2               (1 << 10)
1031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA1_1               (1 <<  9)
1041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA1_0               (1 <<  8)
1051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA0_7               (1 <<  7)
1061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA0_6               (1 <<  6)
1071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA0_5               (1 <<  5)
1081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA0_4               (1 <<  4)
1091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA0_3               (1 <<  3)
1101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA0_2               (1 <<  2)
1111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA0_1               (1 <<  1)
1121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ1_INTE_RA0_0               (1 <<  0)
1131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_IRQ2                            (0x2c8 >> 2)
1153629e1dadff88d22f35f88d53edbac14fd8931deMauro Carvalho Chehab#define   SAA7134_IRQ2_INTE_GPIO23_N             (1 << 17)	/* negative edge */
1163629e1dadff88d22f35f88d53edbac14fd8931deMauro Carvalho Chehab#define   SAA7134_IRQ2_INTE_GPIO23_P             (1 << 16)	/* positive edge */
1173629e1dadff88d22f35f88d53edbac14fd8931deMauro Carvalho Chehab#define   SAA7134_IRQ2_INTE_GPIO22_N             (1 << 15)	/* negative edge */
1183629e1dadff88d22f35f88d53edbac14fd8931deMauro Carvalho Chehab#define   SAA7134_IRQ2_INTE_GPIO22_P             (1 << 14)	/* positive edge */
1193629e1dadff88d22f35f88d53edbac14fd8931deMauro Carvalho Chehab#define   SAA7134_IRQ2_INTE_GPIO18_N             (1 << 13)	/* negative edge */
1203629e1dadff88d22f35f88d53edbac14fd8931deMauro Carvalho Chehab#define   SAA7134_IRQ2_INTE_GPIO18_P             (1 << 12)	/* positive edge */
1213629e1dadff88d22f35f88d53edbac14fd8931deMauro Carvalho Chehab#define   SAA7134_IRQ2_INTE_GPIO16_N             (1 << 11)	/* negative edge */
1223629e1dadff88d22f35f88d53edbac14fd8931deMauro Carvalho Chehab#define   SAA7134_IRQ2_INTE_GPIO16_P             (1 << 10)	/* positive edge */
1233629e1dadff88d22f35f88d53edbac14fd8931deMauro Carvalho Chehab#define   SAA7134_IRQ2_INTE_SC2                 (1 <<  9)
1243629e1dadff88d22f35f88d53edbac14fd8931deMauro Carvalho Chehab#define   SAA7134_IRQ2_INTE_SC1                 (1 <<  8)
1253629e1dadff88d22f35f88d53edbac14fd8931deMauro Carvalho Chehab#define   SAA7134_IRQ2_INTE_SC0                 (1 <<  7)
1261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ2_INTE_DEC4                (1 <<  6)
1271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ2_INTE_DEC3                (1 <<  5)
1281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ2_INTE_DEC2                (1 <<  4)
1291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ2_INTE_DEC1                (1 <<  3)
1301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ2_INTE_DEC0                (1 <<  2)
1311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ2_INTE_PE                  (1 <<  1)
1321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ2_INTE_AR                  (1 <<  0)
1331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_IRQ_REPORT                      (0x2cc >> 2)
1351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_GPIO23             (1 << 17)
1361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_GPIO22             (1 << 16)
1371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_GPIO18             (1 << 15)
1383629e1dadff88d22f35f88d53edbac14fd8931deMauro Carvalho Chehab#define   SAA7134_IRQ_REPORT_GPIO16             (1 << 14)
1391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_LOAD_ERR           (1 << 13)
1401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_CONF_ERR           (1 << 12)
1411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_TRIG_ERR           (1 << 11)
1421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_MMC                (1 << 10)
1431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_FIDT               (1 <<  9)
1441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_INTL               (1 <<  8)
1451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_RDCAP              (1 <<  7)
1461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_PWR_ON             (1 <<  6)
1471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_PE                 (1 <<  5)
1481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_AR                 (1 <<  4)
1491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_DONE_RA3           (1 <<  3)
1501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_DONE_RA2           (1 <<  2)
1511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_DONE_RA1           (1 <<  1)
1521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define   SAA7134_IRQ_REPORT_DONE_RA0           (1 <<  0)
1531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_IRQ_STATUS                      (0x2d0 >> 2)
1541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* ------------------------------------------------------------------ */
1571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*
1581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *  registers -- 8 bit
1591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */
1601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* video decoder */
1621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_INCR_DELAY                      0x101
1631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_ANALOG_IN_CTRL1                 0x102
1641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_ANALOG_IN_CTRL2                 0x103
1651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_ANALOG_IN_CTRL3                 0x104
1661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_ANALOG_IN_CTRL4                 0x105
1671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_HSYNC_START                     0x106
1681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_HSYNC_STOP                      0x107
1691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_SYNC_CTRL                       0x108
170707b7f80b5873da7728979ba1b81c0daae736762Mikhail Domrachev#define   SAA7134_SYNC_CTRL_AUFD                (1 << 7)
1711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_LUMA_CTRL                       0x109
172707b7f80b5873da7728979ba1b81c0daae736762Mikhail Domrachev#define   SAA7134_LUMA_CTRL_LDEL                (1 << 5)
1731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_DEC_LUMA_BRIGHT                 0x10a
1741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_DEC_LUMA_CONTRAST               0x10b
1751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_DEC_CHROMA_SATURATION           0x10c
1761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_DEC_CHROMA_HUE                  0x10d
1771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CHROMA_CTRL1                    0x10e
178707b7f80b5873da7728979ba1b81c0daae736762Mikhail Domrachev#define   SAA7134_CHROMA_CTRL1_AUTO0            (1 << 1)
179707b7f80b5873da7728979ba1b81c0daae736762Mikhail Domrachev#define   SAA7134_CHROMA_CTRL1_FCTC             (1 << 2)
1801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CHROMA_GAIN                     0x10f
1811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CHROMA_CTRL2                    0x110
1821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_MODE_DELAY_CTRL                 0x111
1831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_ANALOG_ADC                      0x114
185707b7f80b5873da7728979ba1b81c0daae736762Mikhail Domrachev#define   SAA7134_ANALOG_ADC_AUTO1              (1 << 2)
1861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VGATE_START                     0x115
1871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VGATE_STOP                      0x116
1881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_MISC_VGATE_MSB                  0x117
1891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_RAW_DATA_GAIN                   0x118
1901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_RAW_DATA_OFFSET                 0x119
1911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_STATUS_VIDEO1                   0x11e
1921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_STATUS_VIDEO2                   0x11f
1931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* video scaler */
1951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_SOURCE_TIMING1                  0x000
1961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_SOURCE_TIMING2                  0x001
1971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_REGION_ENABLE                   0x004
1981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_SCALER_STATUS0                  0x006
1991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_SCALER_STATUS1                  0x007
2001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_START_GREEN                     0x00c
2011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_START_BLUE                      0x00d
2021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_START_RED                       0x00e
2031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_GREEN_PATH(x)                   (0x010 +x)
2041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_BLUE_PATH(x)                    (0x020 +x)
2051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_RED_PATH(x)                     (0x030 +x)
2061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define TASK_A                                  0x040
2081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define TASK_B                                  0x080
2091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_TASK_CONDITIONS(t)              (0x000 +t)
2101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_FIELD_HANDLING(t)               (0x001 +t)
2111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_DATA_PATH(t)                    (0x002 +t)
2121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_H_START1(t)                 (0x004 +t)
2131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_H_START2(t)                 (0x005 +t)
2141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_H_STOP1(t)                  (0x006 +t)
2151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_H_STOP2(t)                  (0x007 +t)
2161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_V_START1(t)                 (0x008 +t)
2171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_V_START2(t)                 (0x009 +t)
2181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_V_STOP1(t)                  (0x00a +t)
2191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_V_STOP2(t)                  (0x00b +t)
2201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_H_LEN1(t)                   (0x00c +t)
2211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_H_LEN2(t)                   (0x00d +t)
2221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_V_LEN1(t)                   (0x00e +t)
2231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_V_LEN2(t)                   (0x00f +t)
2241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_H_START1(t)               (0x014 +t)
2261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_H_START2(t)               (0x015 +t)
2271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_H_STOP1(t)                (0x016 +t)
2281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_H_STOP2(t)                (0x017 +t)
2291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_V_START1(t)               (0x018 +t)
2301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_V_START2(t)               (0x019 +t)
2311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_V_STOP1(t)                (0x01a +t)
2321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_V_STOP2(t)                (0x01b +t)
2331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_PIXELS1(t)                (0x01c +t)
2341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_PIXELS2(t)                (0x01d +t)
2351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_LINES1(t)                 (0x01e +t)
2361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_LINES2(t)                 (0x01f +t)
2371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_H_PRESCALE(t)                   (0x020 +t)
2391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_ACC_LENGTH(t)                   (0x021 +t)
2401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_LEVEL_CTRL(t)                   (0x022 +t)
2411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_FIR_PREFILTER_CTRL(t)           (0x023 +t)
2421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_LUMA_BRIGHT(t)                  (0x024 +t)
2431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_LUMA_CONTRAST(t)                (0x025 +t)
2441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CHROMA_SATURATION(t)            (0x026 +t)
2451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_H_SCALE_INC1(t)             (0x028 +t)
2461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_H_SCALE_INC2(t)             (0x029 +t)
2471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_PHASE_OFFSET_LUMA(t)        (0x02a +t)
2481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VBI_PHASE_OFFSET_CHROMA(t)      (0x02b +t)
2491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_H_SCALE_INC1(t)                 (0x02c +t)
2501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_H_SCALE_INC2(t)                 (0x02d +t)
2511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_H_PHASE_OFF_LUMA(t)             (0x02e +t)
2521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_H_PHASE_OFF_CHROMA(t)           (0x02f +t)
2531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_V_SCALE_RATIO1(t)               (0x030 +t)
2541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_V_SCALE_RATIO2(t)               (0x031 +t)
2551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_V_FILTER(t)                     (0x032 +t)
2561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_V_PHASE_OFFSET0(t)              (0x034 +t)
2571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_V_PHASE_OFFSET1(t)              (0x035 +t)
2581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_V_PHASE_OFFSET2(t)              (0x036 +t)
2591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_V_PHASE_OFFSET3(t)              (0x037 +t)
2601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* clipping & dma */
2621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_OFMT_VIDEO_A                    0x300
2631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_OFMT_DATA_A                     0x301
2641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_OFMT_VIDEO_B                    0x302
2651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_OFMT_DATA_B                     0x303
2661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_ALPHA_NOCLIP                    0x304
2671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_ALPHA_CLIP                      0x305
2681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_UV_PIXEL                        0x308
2691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CLIP_RED                        0x309
2701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CLIP_GREEN                      0x30a
2711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CLIP_BLUE                       0x30b
2721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* i2c bus */
2741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_I2C_ATTR_STATUS                 0x180
2751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_I2C_DATA                        0x181
2761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_I2C_CLOCK_SELECT                0x182
2771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_I2C_TIMER                       0x183
2781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* audio */
2801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_NICAM_ADD_DATA1                 0x140
2811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_NICAM_ADD_DATA2                 0x141
2821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_NICAM_STATUS                    0x142
2831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_AUDIO_STATUS                    0x143
2841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_NICAM_ERROR_COUNT               0x144
2851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_IDENT_SIF                       0x145
2861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_LEVEL_READOUT1                  0x146
2871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_LEVEL_READOUT2                  0x147
2881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_NICAM_ERROR_LOW                 0x148
2891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_NICAM_ERROR_HIGH                0x149
2901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_DCXO_IDENT_CTRL                 0x14a
2911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_DEMODULATOR                     0x14b
2921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_AGC_GAIN_SELECT                 0x14c
2931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CARRIER1_FREQ0                  0x150
2941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CARRIER1_FREQ1                  0x151
2951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CARRIER1_FREQ2                  0x152
2961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CARRIER2_FREQ0                  0x154
2971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CARRIER2_FREQ1                  0x155
2981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CARRIER2_FREQ2                  0x156
2991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_NUM_SAMPLES0                    0x158
3001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_NUM_SAMPLES1                    0x159
3011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_NUM_SAMPLES2                    0x15a
3021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_AUDIO_FORMAT_CTRL               0x15b
3031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_MONITOR_SELECT                  0x160
3041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_FM_DEEMPHASIS                   0x161
3051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_FM_DEMATRIX                     0x162
3061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CHANNEL1_LEVEL                  0x163
3071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_CHANNEL2_LEVEL                  0x164
3081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_NICAM_CONFIG                    0x165
3091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_NICAM_LEVEL_ADJUST              0x166
3101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_STEREO_DAC_OUTPUT_SELECT        0x167
3111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_I2S_OUTPUT_FORMAT               0x168
3121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_I2S_OUTPUT_SELECT               0x169
3131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_I2S_OUTPUT_LEVEL                0x16a
3141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_DSP_OUTPUT_SELECT               0x16b
3151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_AUDIO_MUTE_CTRL                 0x16c
3161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_SIF_SAMPLE_FREQ                 0x16d
3171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_ANALOG_IO_SELECT                0x16e
3181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_AUDIO_CLOCK0                    0x170
3191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_AUDIO_CLOCK1                    0x171
3201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_AUDIO_CLOCK2                    0x172
3211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_AUDIO_PLL_CTRL                  0x173
3221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_AUDIO_CLOCKS_PER_FIELD0         0x174
3231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_AUDIO_CLOCKS_PER_FIELD1         0x175
3241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_AUDIO_CLOCKS_PER_FIELD2         0x176
3251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
3261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* video port output */
3271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_PORT_CTRL0                0x190
3281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_PORT_CTRL1                0x191
3291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_PORT_CTRL2                0x192
3301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_PORT_CTRL3                0x193
3311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_PORT_CTRL4                0x194
3321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_PORT_CTRL5                0x195
3331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_PORT_CTRL6                0x196
3341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_PORT_CTRL7                0x197
3351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_VIDEO_PORT_CTRL8                0x198
3361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
3371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* transport stream interface */
3381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_TS_PARALLEL                     0x1a0
3391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_TS_PARALLEL_SERIAL              0x1a1
3401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_TS_SERIAL0                      0x1a2
3411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_TS_SERIAL1                      0x1a3
3421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_TS_DMA0                         0x1a4
3431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_TS_DMA1                         0x1a5
3441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_TS_DMA2                         0x1a6
3451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
3461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* GPIO Controls */
3471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_GPIO_GPRESCAN                   0x80
3481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_GPIO_27_25                      0x0E
3491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
3501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_GPIO_GPMODE0                    0x1B0
3511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_GPIO_GPMODE1                    0x1B1
3521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_GPIO_GPMODE2                    0x1B2
3531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_GPIO_GPMODE3                    0x1B3
3541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_GPIO_GPSTATUS0                  0x1B4
3551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_GPIO_GPSTATUS1                  0x1B5
3561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_GPIO_GPSTATUS2                  0x1B6
3571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_GPIO_GPSTATUS3                  0x1B7
3581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
3591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* I2S output */
3601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_I2S_AUDIO_OUTPUT                0x1c0
3611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
3621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* test modes */
3631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7134_SPECIAL_MODE                    0x1d0
364bb881f142465a7a70bc9a364786e39aa4aaba4d2Nickolay V. Shmyrev#define SAA7134_PRODUCTION_TEST_MODE            0x1d1
3651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
3661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* audio -- saa7133 + saa7135 only */
3671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7135_DSP_RWSTATE                     0x580
3681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7135_DSP_RWSTATE_ERR                 (1 << 3)
3691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7135_DSP_RWSTATE_IDA                 (1 << 2)
3701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7135_DSP_RWSTATE_RDB                 (1 << 1)
3711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SAA7135_DSP_RWSTATE_WRR                 (1 << 0)
3721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
373867bc6cccc511ccbf40609ccb6ede2aafdeb922eHartmut Hackmann#define SAA7135_DSP_RWCLEAR			0x586
374867bc6cccc511ccbf40609ccb6ede2aafdeb922eHartmut Hackmann#define SAA7135_DSP_RWCLEAR_RERR		    1
375867bc6cccc511ccbf40609ccb6ede2aafdeb922eHartmut Hackmann
37637df96d39eefd0c1db69a336895c4691d2bc63a1Dmitry Belimov#define SAA7133_I2S_AUDIO_CONTROL               0x591
377