diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-11-09 00:36:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:11 -0500 |
commit | 84486d53b7fab2cf939acd378959fc4896d3bb68 (patch) | |
tree | 5d20712f556029eb0ed280f3c8a1509b4c519be9 /drivers/media | |
parent | 35f8d4d623953b5d868d9735a4c10e57dca6dc97 (diff) |
[PATCH] v4l: 675: tvp5150 included on makefile
- Tvp5150 included on makefile.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/tvp5150.c | 653 |
1 files changed, 472 insertions, 181 deletions
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index e575877f8269..bd1201d7adf1 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c | |||
@@ -9,16 +9,17 @@ | |||
9 | #include <linux/i2c.h> | 9 | #include <linux/i2c.h> |
10 | #include <linux/videodev.h> | 10 | #include <linux/videodev.h> |
11 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
12 | #include <linux/video_decoder.h> | ||
12 | 13 | ||
13 | #include "tvp5150_reg.h" | 14 | #include "tvp5150_reg.h" |
14 | 15 | ||
15 | MODULE_DESCRIPTION("Texas Instruments TVP5150A video decoder driver");/* standard i2c insmod options */ | 16 | MODULE_DESCRIPTION("Texas Instruments TVP5150A video decoder driver"); /* standard i2c insmod options */ |
16 | MODULE_AUTHOR("Mauro Carvalho Chehab"); | 17 | MODULE_AUTHOR("Mauro Carvalho Chehab"); |
17 | MODULE_LICENSE("GPL"); | 18 | MODULE_LICENSE("GPL"); |
18 | 19 | ||
19 | static unsigned short normal_i2c[] = { | 20 | static unsigned short normal_i2c[] = { |
20 | 0xb8 >>1, | 21 | 0xb8 >> 1, |
21 | 0xba >>1, | 22 | 0xba >> 1, |
22 | I2C_CLIENT_END | 23 | I2C_CLIENT_END |
23 | }; | 24 | }; |
24 | 25 | ||
@@ -36,228 +37,519 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); | |||
36 | 37 | ||
37 | struct tvp5150 { | 38 | struct tvp5150 { |
38 | struct i2c_client *client; | 39 | struct i2c_client *client; |
40 | |||
41 | int norm; | ||
42 | int input; | ||
43 | int enable; | ||
44 | int bright; | ||
45 | int contrast; | ||
46 | int hue; | ||
47 | int sat; | ||
39 | }; | 48 | }; |
40 | 49 | ||
41 | static inline int tvp5150_read(struct i2c_client *c,unsigned char addr) | 50 | static inline int tvp5150_read(struct i2c_client *c, unsigned char addr) |
42 | { | 51 | { |
43 | unsigned char buffer[1]; | 52 | unsigned char buffer[1]; |
44 | int rc; | 53 | int rc; |
45 | /* struct tvp5150 *core = i2c_get_clientdata(c); */ | ||
46 | 54 | ||
47 | buffer[0] = addr; | 55 | buffer[0] = addr; |
48 | if (1 != (rc = i2c_master_send(c, buffer, 1))) | 56 | if (1 != (rc = i2c_master_send(c, buffer, 1))) |
49 | dprintk(0,"i2c i/o error: rc == %d (should be 1)\n", rc); | 57 | dprintk(0, "i2c i/o error: rc == %d (should be 1)\n", rc); |
50 | 58 | ||
51 | msleep(10); | 59 | msleep(10); |
52 | 60 | ||
53 | if (1 != (rc = i2c_master_recv(c, buffer, 1))) | 61 | if (1 != (rc = i2c_master_recv(c, buffer, 1))) |
54 | dprintk(0,"i2c i/o error: rc == %d (should be 1)\n", rc); | 62 | dprintk(0, "i2c i/o error: rc == %d (should be 1)\n", rc); |
55 | 63 | ||
56 | return (buffer[0]); | 64 | return (buffer[0]); |
57 | } | 65 | } |
58 | 66 | ||
59 | static inline void tvp5150_write(struct i2c_client *c,unsigned char addr, unsigned char value) | 67 | static inline void tvp5150_write(struct i2c_client *c, unsigned char addr, |
68 | unsigned char value) | ||
60 | { | 69 | { |
61 | unsigned char buffer[2]; | 70 | unsigned char buffer[2]; |
62 | int rc; | 71 | int rc; |
63 | /* struct tvp5150 *core = i2c_get_clientdata(c); */ | 72 | /* struct tvp5150 *core = i2c_get_clientdata(c); */ |
64 | 73 | ||
65 | buffer[0] = addr; | 74 | buffer[0] = addr; |
66 | buffer[2] = addr; | 75 | buffer[1] = value; |
76 | dprintk(1,"tvp5150: writing 0x%02x 0x%02x\n",buffer[0],buffer[1]); | ||
67 | if (2 != (rc = i2c_master_send(c, buffer, 2))) | 77 | if (2 != (rc = i2c_master_send(c, buffer, 2))) |
68 | dprintk(0,"i2c i/o error: rc == %d (should be 2)\n", rc); | 78 | dprintk(0, "i2c i/o error: rc == %d (should be 2)\n", rc); |
69 | } | 79 | } |
70 | 80 | ||
71 | static void dump_reg (struct i2c_client *c) | 81 | static void dump_reg(struct i2c_client *c) |
72 | { | 82 | { |
73 | dprintk (2, "tvp5150: Video input source selection #1 = 0x%02x\n", tvp5150_read(c,TVP5150_VD_IN_SRC_SEL_1)); | 83 | printk("tvp5150: Video input source selection #1 = 0x%02x\n", |
74 | dprintk (2, "tvp5150: Analog channel controls = 0x%02x\n", tvp5150_read(c,TVP5150_ANAL_CHL_CTL)); | 84 | tvp5150_read(c, TVP5150_VD_IN_SRC_SEL_1)); |
75 | dprintk (2, "tvp5150: Operation mode controls = 0x%02x\n", tvp5150_read(c,TVP5150_OP_MODE_CTL)); | 85 | printk("tvp5150: Analog channel controls = 0x%02x\n", |
76 | dprintk (2, "tvp5150: Miscellaneous controls = 0x%02x\n", tvp5150_read(c,TVP5150_MISC_CTL)); | 86 | tvp5150_read(c, TVP5150_ANAL_CHL_CTL)); |
77 | dprintk (2, "tvp5150: Autoswitch mask: TVP5150A / TVP5150AM = 0x%02x\n", tvp5150_read(c,TVP5150_AUTOSW_MSK)); | 87 | printk("tvp5150: Operation mode controls = 0x%02x\n", |
78 | dprintk (2, "tvp5150: Color killer threshold control = 0x%02x\n", tvp5150_read(c,TVP5150_COLOR_KIL_THSH_CTL)); | 88 | tvp5150_read(c, TVP5150_OP_MODE_CTL)); |
79 | dprintk (2, "tvp5150: Luminance processing control #1 = 0x%02x\n", tvp5150_read(c,TVP5150_LUMA_PROC_CTL_1)); | 89 | printk("tvp5150: Miscellaneous controls = 0x%02x\n", |
80 | dprintk (2, "tvp5150: Luminance processing control #2 = 0x%02x\n", tvp5150_read(c,TVP5150_LUMA_PROC_CTL_2)); | 90 | tvp5150_read(c, TVP5150_MISC_CTL)); |
81 | dprintk (2, "tvp5150: Brightness control = 0x%02x\n", tvp5150_read(c,TVP5150_BRIGHT_CTL)); | 91 | printk("tvp5150: Autoswitch mask: TVP5150A / TVP5150AM = 0x%02x\n", |
82 | dprintk (2, "tvp5150: Color saturation control = 0x%02x\n", tvp5150_read(c,TVP5150_SATURATION_CTL)); | 92 | tvp5150_read(c, TVP5150_AUTOSW_MSK)); |
83 | dprintk (2, "tvp5150: Hue control = 0x%02x\n", tvp5150_read(c,TVP5150_HUE_CTL)); | 93 | printk("tvp5150: Color killer threshold control = 0x%02x\n", |
84 | dprintk (2, "tvp5150: Contrast control = 0x%02x\n", tvp5150_read(c,TVP5150_CONTRAST_CTL)); | 94 | tvp5150_read(c, TVP5150_COLOR_KIL_THSH_CTL)); |
85 | dprintk (2, "tvp5150: Outputs and data rates select = 0x%02x\n", tvp5150_read(c,TVP5150_DATA_RATE_SEL)); | 95 | printk("tvp5150: Luminance processing control #1 = 0x%02x\n", |
86 | dprintk (2, "tvp5150: Luminance processing control #3 = 0x%02x\n", tvp5150_read(c,TVP5150_LUMA_PROC_CTL_3)); | 96 | tvp5150_read(c, TVP5150_LUMA_PROC_CTL_1)); |
87 | dprintk (2, "tvp5150: Configuration shared pins = 0x%02x\n", tvp5150_read(c,TVP5150_CONF_SHARED_PIN)); | 97 | printk("tvp5150: Luminance processing control #2 = 0x%02x\n", |
88 | dprintk (2, "tvp5150: Active video cropping start MSB = 0x%02x\n", tvp5150_read(c,TVP5150_ACT_VD_CROP_ST_MSB)); | 98 | tvp5150_read(c, TVP5150_LUMA_PROC_CTL_2)); |
89 | dprintk (2, "tvp5150: Active video cropping start LSB = 0x%02x\n", tvp5150_read(c,TVP5150_ACT_VD_CROP_ST_LSB)); | 99 | printk("tvp5150: Brightness control = 0x%02x\n", |
90 | dprintk (2, "tvp5150: Active video cropping stop MSB = 0x%02x\n", tvp5150_read(c,TVP5150_ACT_VD_CROP_STP_MSB)); | 100 | tvp5150_read(c, TVP5150_BRIGHT_CTL)); |
91 | dprintk (2, "tvp5150: Active video cropping stop LSB = 0x%02x\n", tvp5150_read(c,TVP5150_ACT_VD_CROP_STP_LSB)); | 101 | printk("tvp5150: Color saturation control = 0x%02x\n", |
92 | dprintk (2, "tvp5150: Genlock/RTC = 0x%02x\n", tvp5150_read(c,TVP5150_GENLOCK)); | 102 | tvp5150_read(c, TVP5150_SATURATION_CTL)); |
93 | dprintk (2, "tvp5150: Horizontal sync start = 0x%02x\n", tvp5150_read(c,TVP5150_HORIZ_SYNC_START)); | 103 | printk("tvp5150: Hue control = 0x%02x\n", |
94 | dprintk (2, "tvp5150: Vertical blanking start = 0x%02x\n", tvp5150_read(c,TVP5150_VERT_BLANKING_START)); | 104 | tvp5150_read(c, TVP5150_HUE_CTL)); |
95 | dprintk (2, "tvp5150: Vertical blanking stop = 0x%02x\n", tvp5150_read(c,TVP5150_VERT_BLANKING_STOP)); | 105 | printk("tvp5150: Contrast control = 0x%02x\n", |
96 | dprintk (2, "tvp5150: Chrominance processing control #1 = 0x%02x\n", tvp5150_read(c,TVP5150_CHROMA_PROC_CTL_1)); | 106 | tvp5150_read(c, TVP5150_CONTRAST_CTL)); |
97 | dprintk (2, "tvp5150: Chrominance processing control #2 = 0x%02x\n", tvp5150_read(c,TVP5150_CHROMA_PROC_CTL_2)); | 107 | printk("tvp5150: Outputs and data rates select = 0x%02x\n", |
98 | dprintk (2, "tvp5150: Interrupt reset register B = 0x%02x\n", tvp5150_read(c,TVP5150_INT_RESET_REG_B)); | 108 | tvp5150_read(c, TVP5150_DATA_RATE_SEL)); |
99 | dprintk (2, "tvp5150: Interrupt enable register B = 0x%02x\n", tvp5150_read(c,TVP5150_INT_ENABLE_REG_B)); | 109 | printk("tvp5150: Luminance processing control #3 = 0x%02x\n", |
100 | dprintk (2, "tvp5150: Interrupt configuration register B = 0x%02x\n", tvp5150_read(c,TVP5150_INTT_CONFIG_REG_B)); | 110 | tvp5150_read(c, TVP5150_LUMA_PROC_CTL_3)); |
101 | dprintk (2, "tvp5150: Video standard = 0x%02x\n", tvp5150_read(c,TVP5150_VIDEO_STD)); | 111 | printk("tvp5150: Configuration shared pins = 0x%02x\n", |
102 | dprintk (2, "tvp5150: Cb gain factor = 0x%02x\n", tvp5150_read(c,TVP5150_CB_GAIN_FACT)); | 112 | tvp5150_read(c, TVP5150_CONF_SHARED_PIN)); |
103 | dprintk (2, "tvp5150: Cr gain factor = 0x%02x\n", tvp5150_read(c,TVP5150_CR_GAIN_FACTOR)); | 113 | printk("tvp5150: Active video cropping start MSB = 0x%02x\n", |
104 | dprintk (2, "tvp5150: Macrovision on counter = 0x%02x\n", tvp5150_read(c,TVP5150_MACROVISION_ON_CTR)); | 114 | tvp5150_read(c, TVP5150_ACT_VD_CROP_ST_MSB)); |
105 | dprintk (2, "tvp5150: Macrovision off counter = 0x%02x\n", tvp5150_read(c,TVP5150_MACROVISION_OFF_CTR)); | 115 | printk("tvp5150: Active video cropping start LSB = 0x%02x\n", |
106 | dprintk (2, "tvp5150: revision select (TVP5150AM1 only) = 0x%02x\n", tvp5150_read(c,TVP5150_REV_SELECT)); | 116 | tvp5150_read(c, TVP5150_ACT_VD_CROP_ST_LSB)); |
107 | dprintk (2, "tvp5150: MSB of device ID = 0x%02x\n", tvp5150_read(c,TVP5150_MSB_DEV_ID)); | 117 | printk("tvp5150: Active video cropping stop MSB = 0x%02x\n", |
108 | dprintk (2, "tvp5150: LSB of device ID = 0x%02x\n", tvp5150_read(c,TVP5150_LSB_DEV_ID)); | 118 | tvp5150_read(c, TVP5150_ACT_VD_CROP_STP_MSB)); |
109 | dprintk (2, "tvp5150: ROM major version = 0x%02x\n", tvp5150_read(c,TVP5150_ROM_MAJOR_VER)); | 119 | printk("tvp5150: Active video cropping stop LSB = 0x%02x\n", |
110 | dprintk (2, "tvp5150: ROM minor version = 0x%02x\n", tvp5150_read(c,TVP5150_ROM_MINOR_VER)); | 120 | tvp5150_read(c, TVP5150_ACT_VD_CROP_STP_LSB)); |
111 | dprintk (2, "tvp5150: Vertical line count MSB = 0x%02x\n", tvp5150_read(c,TVP5150_VERT_LN_COUNT_MSB)); | 121 | printk("tvp5150: Genlock/RTC = 0x%02x\n", |
112 | dprintk (2, "tvp5150: Vertical line count LSB = 0x%02x\n", tvp5150_read(c,TVP5150_VERT_LN_COUNT_LSB)); | 122 | tvp5150_read(c, TVP5150_GENLOCK)); |
113 | dprintk (2, "tvp5150: Interrupt status register B = 0x%02x\n", tvp5150_read(c,TVP5150_INT_STATUS_REG_B)); | 123 | printk("tvp5150: Horizontal sync start = 0x%02x\n", |
114 | dprintk (2, "tvp5150: Interrupt active register B = 0x%02x\n", tvp5150_read(c,TVP5150_INT_ACTIVE_REG_B)); | 124 | tvp5150_read(c, TVP5150_HORIZ_SYNC_START)); |
115 | dprintk (2, "tvp5150: Status register #1 = 0x%02x\n", tvp5150_read(c,TVP5150_STATUS_REG_1)); | 125 | printk("tvp5150: Vertical blanking start = 0x%02x\n", |
116 | dprintk (2, "tvp5150: Status register #2 = 0x%02x\n", tvp5150_read(c,TVP5150_STATUS_REG_2)); | 126 | tvp5150_read(c, TVP5150_VERT_BLANKING_START)); |
117 | dprintk (2, "tvp5150: Status register #3 = 0x%02x\n", tvp5150_read(c,TVP5150_STATUS_REG_3)); | 127 | printk("tvp5150: Vertical blanking stop = 0x%02x\n", |
118 | dprintk (2, "tvp5150: Status register #4 = 0x%02x\n", tvp5150_read(c,TVP5150_STATUS_REG_4)); | 128 | tvp5150_read(c, TVP5150_VERT_BLANKING_STOP)); |
119 | dprintk (2, "tvp5150: Status register #5 = 0x%02x\n", tvp5150_read(c,TVP5150_STATUS_REG_5)); | 129 | printk("tvp5150: Chrominance processing control #1 = 0x%02x\n", |
120 | dprintk (2, "tvp5150: Closed caption data registers = 0x%02x\n", tvp5150_read(c,TVP5150_CC_DATA_REG1)); | 130 | tvp5150_read(c, TVP5150_CHROMA_PROC_CTL_1)); |
121 | dprintk (2, "tvp5150: Closed caption data registers = 0x%02x\n", tvp5150_read(c,TVP5150_CC_DATA_REG2)); | 131 | printk("tvp5150: Chrominance processing control #2 = 0x%02x\n", |
122 | dprintk (2, "tvp5150: Closed caption data registers = 0x%02x\n", tvp5150_read(c,TVP5150_CC_DATA_REG3)); | 132 | tvp5150_read(c, TVP5150_CHROMA_PROC_CTL_2)); |
123 | dprintk (2, "tvp5150: Closed caption data registers = 0x%02x\n", tvp5150_read(c,TVP5150_CC_DATA_REG4)); | 133 | printk("tvp5150: Interrupt reset register B = 0x%02x\n", |
124 | dprintk (2, "tvp5150: WSS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_WSS_DATA_REG1)); | 134 | tvp5150_read(c, TVP5150_INT_RESET_REG_B)); |
125 | dprintk (2, "tvp5150: WSS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_WSS_DATA_REG2)); | 135 | printk("tvp5150: Interrupt enable register B = 0x%02x\n", |
126 | dprintk (2, "tvp5150: WSS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_WSS_DATA_REG3)); | 136 | tvp5150_read(c, TVP5150_INT_ENABLE_REG_B)); |
127 | dprintk (2, "tvp5150: WSS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_WSS_DATA_REG4)); | 137 | printk("tvp5150: Interrupt configuration register B = 0x%02x\n", |
128 | dprintk (2, "tvp5150: WSS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_WSS_DATA_REG5)); | 138 | tvp5150_read(c, TVP5150_INTT_CONFIG_REG_B)); |
129 | dprintk (2, "tvp5150: WSS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_WSS_DATA_REG6)); | 139 | printk("tvp5150: Video standard = 0x%02x\n", |
130 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG1)); | 140 | tvp5150_read(c, TVP5150_VIDEO_STD)); |
131 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG2)); | 141 | printk("tvp5150: Cb gain factor = 0x%02x\n", |
132 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG3)); | 142 | tvp5150_read(c, TVP5150_CB_GAIN_FACT)); |
133 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG4)); | 143 | printk("tvp5150: Cr gain factor = 0x%02x\n", |
134 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG5)); | 144 | tvp5150_read(c, TVP5150_CR_GAIN_FACTOR)); |
135 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG6)); | 145 | printk("tvp5150: Macrovision on counter = 0x%02x\n", |
136 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG7)); | 146 | tvp5150_read(c, TVP5150_MACROVISION_ON_CTR)); |
137 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG8)); | 147 | printk("tvp5150: Macrovision off counter = 0x%02x\n", |
138 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG9)); | 148 | tvp5150_read(c, TVP5150_MACROVISION_OFF_CTR)); |
139 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG10)); | 149 | printk("tvp5150: revision select (TVP5150AM1 only) = 0x%02x\n", |
140 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG11)); | 150 | tvp5150_read(c, TVP5150_REV_SELECT)); |
141 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG12)); | 151 | printk("tvp5150: MSB of device ID = 0x%02x\n", |
142 | dprintk (2, "tvp5150: VPS data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VPS_DATA_REG13)); | 152 | tvp5150_read(c, TVP5150_MSB_DEV_ID)); |
143 | dprintk (2, "tvp5150: VITC data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VITC_DATA_REG1)); | 153 | printk("tvp5150: LSB of device ID = 0x%02x\n", |
144 | dprintk (2, "tvp5150: VITC data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VITC_DATA_REG2)); | 154 | tvp5150_read(c, TVP5150_LSB_DEV_ID)); |
145 | dprintk (2, "tvp5150: VITC data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VITC_DATA_REG3)); | 155 | printk("tvp5150: ROM major version = 0x%02x\n", |
146 | dprintk (2, "tvp5150: VITC data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VITC_DATA_REG4)); | 156 | tvp5150_read(c, TVP5150_ROM_MAJOR_VER)); |
147 | dprintk (2, "tvp5150: VITC data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VITC_DATA_REG5)); | 157 | printk("tvp5150: ROM minor version = 0x%02x\n", |
148 | dprintk (2, "tvp5150: VITC data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VITC_DATA_REG6)); | 158 | tvp5150_read(c, TVP5150_ROM_MINOR_VER)); |
149 | dprintk (2, "tvp5150: VITC data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VITC_DATA_REG7)); | 159 | printk("tvp5150: Vertical line count MSB = 0x%02x\n", |
150 | dprintk (2, "tvp5150: VITC data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VITC_DATA_REG8)); | 160 | tvp5150_read(c, TVP5150_VERT_LN_COUNT_MSB)); |
151 | dprintk (2, "tvp5150: VITC data registers = 0x%02x\n", tvp5150_read(c,TVP5150_VITC_DATA_REG9)); | 161 | printk("tvp5150: Vertical line count LSB = 0x%02x\n", |
152 | dprintk (2, "tvp5150: VBI FIFO read data = 0x%02x\n", tvp5150_read(c,TVP5150_VBI_FIFO_READ_DATA)); | 162 | tvp5150_read(c, TVP5150_VERT_LN_COUNT_LSB)); |
153 | dprintk (2, "tvp5150: Teletext filter 1 = 0x%02x\n", tvp5150_read(c,TVP5150_TELETEXT_FIL_1_1)); | 163 | printk("tvp5150: Interrupt status register B = 0x%02x\n", |
154 | dprintk (2, "tvp5150: Teletext filter 1 = 0x%02x\n", tvp5150_read(c,TVP5150_TELETEXT_FIL_1_2)); | 164 | tvp5150_read(c, TVP5150_INT_STATUS_REG_B)); |
155 | dprintk (2, "tvp5150: Teletext filter 1 = 0x%02x\n", tvp5150_read(c,TVP5150_TELETEXT_FIL_1_3)); | 165 | printk("tvp5150: Interrupt active register B = 0x%02x\n", |
156 | dprintk (2, "tvp5150: Teletext filter 1 = 0x%02x\n", tvp5150_read(c,TVP5150_TELETEXT_FIL_1_4)); | 166 | tvp5150_read(c, TVP5150_INT_ACTIVE_REG_B)); |
157 | dprintk (2, "tvp5150: Teletext filter 1 = 0x%02x\n", tvp5150_read(c,TVP5150_TELETEXT_FIL_1_5)); | 167 | printk("tvp5150: Status register #1 = 0x%02x\n", |
158 | dprintk (2, "tvp5150: Teletext filter 2 = 0x%02x\n", tvp5150_read(c,TVP5150_TELETEXT_FIL_2_1)); | 168 | tvp5150_read(c, TVP5150_STATUS_REG_1)); |
159 | dprintk (2, "tvp5150: Teletext filter 2 = 0x%02x\n", tvp5150_read(c,TVP5150_TELETEXT_FIL_2_2)); | 169 | printk("tvp5150: Status register #2 = 0x%02x\n", |
160 | dprintk (2, "tvp5150: Teletext filter 2 = 0x%02x\n", tvp5150_read(c,TVP5150_TELETEXT_FIL_2_3)); | 170 | tvp5150_read(c, TVP5150_STATUS_REG_2)); |
161 | dprintk (2, "tvp5150: Teletext filter 2 = 0x%02x\n", tvp5150_read(c,TVP5150_TELETEXT_FIL_2_4)); | 171 | printk("tvp5150: Status register #3 = 0x%02x\n", |
162 | dprintk (2, "tvp5150: Teletext filter 2 = 0x%02x\n", tvp5150_read(c,TVP5150_TELETEXT_FIL_2_5)); | 172 | tvp5150_read(c, TVP5150_STATUS_REG_3)); |
163 | dprintk (2, "tvp5150: Teletext filter enable = 0x%02x\n", tvp5150_read(c,TVP5150_TELETEXT_FIL_ENA)); | 173 | printk("tvp5150: Status register #4 = 0x%02x\n", |
164 | dprintk (2, "tvp5150: Interrupt status register A = 0x%02x\n", tvp5150_read(c,TVP5150_INT_STATUS_REG_A)); | 174 | tvp5150_read(c, TVP5150_STATUS_REG_4)); |
165 | dprintk (2, "tvp5150: Interrupt enable register A = 0x%02x\n", tvp5150_read(c,TVP5150_INT_ENABLE_REG_A)); | 175 | printk("tvp5150: Status register #5 = 0x%02x\n", |
166 | dprintk (2, "tvp5150: Interrupt configuration = 0x%02x\n", tvp5150_read(c,TVP5150_INT_CONF)); | 176 | tvp5150_read(c, TVP5150_STATUS_REG_5)); |
167 | dprintk (2, "tvp5150: VDP configuration RAM data = 0x%02x\n", tvp5150_read(c,TVP5150_VDP_CONF_RAM_DATA)); | 177 | printk("tvp5150: Closed caption data registers = 0x%02x\n", |
168 | dprintk (2, "tvp5150: Configuration RAM address low byte = 0x%02x\n", tvp5150_read(c,TVP5150_CONF_RAM_ADDR_LOW)); | 178 | tvp5150_read(c, TVP5150_CC_DATA_REG1)); |
169 | dprintk (2, "tvp5150: Configuration RAM address high byte = 0x%02x\n", tvp5150_read(c,TVP5150_CONF_RAM_ADDR_HIGH)); | 179 | printk("tvp5150: Closed caption data registers = 0x%02x\n", |
170 | dprintk (2, "tvp5150: VDP status register = 0x%02x\n", tvp5150_read(c,TVP5150_VDP_STATUS_REG)); | 180 | tvp5150_read(c, TVP5150_CC_DATA_REG2)); |
171 | dprintk (2, "tvp5150: FIFO word count = 0x%02x\n", tvp5150_read(c,TVP5150_FIFO_WORD_COUNT)); | 181 | printk("tvp5150: Closed caption data registers = 0x%02x\n", |
172 | dprintk (2, "tvp5150: FIFO interrupt threshold = 0x%02x\n", tvp5150_read(c,TVP5150_FIFO_INT_THRESHOLD)); | 182 | tvp5150_read(c, TVP5150_CC_DATA_REG3)); |
173 | dprintk (2, "tvp5150: FIFO reset = 0x%02x\n", tvp5150_read(c,TVP5150_FIFO_RESET)); | 183 | printk("tvp5150: Closed caption data registers = 0x%02x\n", |
174 | dprintk (2, "tvp5150: Line number interrupt = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_NUMBER_INT)); | 184 | tvp5150_read(c, TVP5150_CC_DATA_REG4)); |
175 | dprintk (2, "tvp5150: Pixel alignment register low byte = 0x%02x\n", tvp5150_read(c,TVP5150_PIX_ALIGN_REG_LOW)); | 185 | printk("tvp5150: WSS data registers = 0x%02x\n", |
176 | dprintk (2, "tvp5150: Pixel alignment register high byte = 0x%02x\n", tvp5150_read(c,TVP5150_PIX_ALIGN_REG_HIGH)); | 186 | tvp5150_read(c, TVP5150_WSS_DATA_REG1)); |
177 | dprintk (2, "tvp5150: FIFO output control = 0x%02x\n", tvp5150_read(c,TVP5150_FIFO_OUT_CTRL)); | 187 | printk("tvp5150: WSS data registers = 0x%02x\n", |
178 | dprintk (2, "tvp5150: Full field enable 1 = 0x%02x\n", tvp5150_read(c,TVP5150_FULL_FIELD_ENA_1)); | 188 | tvp5150_read(c, TVP5150_WSS_DATA_REG2)); |
179 | dprintk (2, "tvp5150: Full field enable 2 = 0x%02x\n", tvp5150_read(c,TVP5150_FULL_FIELD_ENA_2)); | 189 | printk("tvp5150: WSS data registers = 0x%02x\n", |
180 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_1)); | 190 | tvp5150_read(c, TVP5150_WSS_DATA_REG3)); |
181 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_2)); | 191 | printk("tvp5150: WSS data registers = 0x%02x\n", |
182 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_3)); | 192 | tvp5150_read(c, TVP5150_WSS_DATA_REG4)); |
183 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_4)); | 193 | printk("tvp5150: WSS data registers = 0x%02x\n", |
184 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_5)); | 194 | tvp5150_read(c, TVP5150_WSS_DATA_REG5)); |
185 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_6)); | 195 | printk("tvp5150: WSS data registers = 0x%02x\n", |
186 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_7)); | 196 | tvp5150_read(c, TVP5150_WSS_DATA_REG6)); |
187 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_8)); | 197 | printk("tvp5150: VPS data registers = 0x%02x\n", |
188 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_9)); | 198 | tvp5150_read(c, TVP5150_VPS_DATA_REG1)); |
189 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_10)); | 199 | printk("tvp5150: VPS data registers = 0x%02x\n", |
190 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_11)); | 200 | tvp5150_read(c, TVP5150_VPS_DATA_REG2)); |
191 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_12)); | 201 | printk("tvp5150: VPS data registers = 0x%02x\n", |
192 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_13)); | 202 | tvp5150_read(c, TVP5150_VPS_DATA_REG3)); |
193 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_14)); | 203 | printk("tvp5150: VPS data registers = 0x%02x\n", |
194 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_15)); | 204 | tvp5150_read(c, TVP5150_VPS_DATA_REG4)); |
195 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_16)); | 205 | printk("tvp5150: VPS data registers = 0x%02x\n", |
196 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_17)); | 206 | tvp5150_read(c, TVP5150_VPS_DATA_REG5)); |
197 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_18)); | 207 | printk("tvp5150: VPS data registers = 0x%02x\n", |
198 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_19)); | 208 | tvp5150_read(c, TVP5150_VPS_DATA_REG6)); |
199 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_20)); | 209 | printk("tvp5150: VPS data registers = 0x%02x\n", |
200 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_21)); | 210 | tvp5150_read(c, TVP5150_VPS_DATA_REG7)); |
201 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_22)); | 211 | printk("tvp5150: VPS data registers = 0x%02x\n", |
202 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_23)); | 212 | tvp5150_read(c, TVP5150_VPS_DATA_REG8)); |
203 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_24)); | 213 | printk("tvp5150: VPS data registers = 0x%02x\n", |
204 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_25)); | 214 | tvp5150_read(c, TVP5150_VPS_DATA_REG9)); |
205 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_27)); | 215 | printk("tvp5150: VPS data registers = 0x%02x\n", |
206 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_28)); | 216 | tvp5150_read(c, TVP5150_VPS_DATA_REG10)); |
207 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_29)); | 217 | printk("tvp5150: VPS data registers = 0x%02x\n", |
208 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_30)); | 218 | tvp5150_read(c, TVP5150_VPS_DATA_REG11)); |
209 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_31)); | 219 | printk("tvp5150: VPS data registers = 0x%02x\n", |
210 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_32)); | 220 | tvp5150_read(c, TVP5150_VPS_DATA_REG12)); |
211 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_33)); | 221 | printk("tvp5150: VPS data registers = 0x%02x\n", |
212 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_34)); | 222 | tvp5150_read(c, TVP5150_VPS_DATA_REG13)); |
213 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_35)); | 223 | printk("tvp5150: VITC data registers = 0x%02x\n", |
214 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_36)); | 224 | tvp5150_read(c, TVP5150_VITC_DATA_REG1)); |
215 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_37)); | 225 | printk("tvp5150: VITC data registers = 0x%02x\n", |
216 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_38)); | 226 | tvp5150_read(c, TVP5150_VITC_DATA_REG2)); |
217 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_39)); | 227 | printk("tvp5150: VITC data registers = 0x%02x\n", |
218 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_40)); | 228 | tvp5150_read(c, TVP5150_VITC_DATA_REG3)); |
219 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_41)); | 229 | printk("tvp5150: VITC data registers = 0x%02x\n", |
220 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_42)); | 230 | tvp5150_read(c, TVP5150_VITC_DATA_REG4)); |
221 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_43)); | 231 | printk("tvp5150: VITC data registers = 0x%02x\n", |
222 | dprintk (2, "tvp5150: Line mode registers = 0x%02x\n", tvp5150_read(c,TVP5150_LINE_MODE_REG_44)); | 232 | tvp5150_read(c, TVP5150_VITC_DATA_REG5)); |
223 | dprintk (2, "tvp5150: Full field mode register = 0x%02x\n", tvp5150_read(c,TVP5150_FULL_FIELD_MODE_REG)); | 233 | printk("tvp5150: VITC data registers = 0x%02x\n", |
234 | tvp5150_read(c, TVP5150_VITC_DATA_REG6)); | ||
235 | printk("tvp5150: VITC data registers = 0x%02x\n", | ||
236 | tvp5150_read(c, TVP5150_VITC_DATA_REG7)); | ||
237 | printk("tvp5150: VITC data registers = 0x%02x\n", | ||
238 | tvp5150_read(c, TVP5150_VITC_DATA_REG8)); | ||
239 | printk("tvp5150: VITC data registers = 0x%02x\n", | ||
240 | tvp5150_read(c, TVP5150_VITC_DATA_REG9)); | ||
241 | printk("tvp5150: VBI FIFO read data = 0x%02x\n", | ||
242 | tvp5150_read(c, TVP5150_VBI_FIFO_READ_DATA)); | ||
243 | printk("tvp5150: Teletext filter 1 = 0x%02x\n", | ||
244 | tvp5150_read(c, TVP5150_TELETEXT_FIL_1_1)); | ||
245 | printk("tvp5150: Teletext filter 1 = 0x%02x\n", | ||
246 | tvp5150_read(c, TVP5150_TELETEXT_FIL_1_2)); | ||
247 | printk("tvp5150: Teletext filter 1 = 0x%02x\n", | ||
248 | tvp5150_read(c, TVP5150_TELETEXT_FIL_1_3)); | ||
249 | printk("tvp5150: Teletext filter 1 = 0x%02x\n", | ||
250 | tvp5150_read(c, TVP5150_TELETEXT_FIL_1_4)); | ||
251 | printk("tvp5150: Teletext filter 1 = 0x%02x\n", | ||
252 | tvp5150_read(c, TVP5150_TELETEXT_FIL_1_5)); | ||
253 | printk("tvp5150: Teletext filter 2 = 0x%02x\n", | ||
254 | tvp5150_read(c, TVP5150_TELETEXT_FIL_2_1)); | ||
255 | printk("tvp5150: Teletext filter 2 = 0x%02x\n", | ||
256 | tvp5150_read(c, TVP5150_TELETEXT_FIL_2_2)); | ||
257 | printk("tvp5150: Teletext filter 2 = 0x%02x\n", | ||
258 | tvp5150_read(c, TVP5150_TELETEXT_FIL_2_3)); | ||
259 | printk("tvp5150: Teletext filter 2 = 0x%02x\n", | ||
260 | tvp5150_read(c, TVP5150_TELETEXT_FIL_2_4)); | ||
261 | printk("tvp5150: Teletext filter 2 = 0x%02x\n", | ||
262 | tvp5150_read(c, TVP5150_TELETEXT_FIL_2_5)); | ||
263 | printk("tvp5150: Teletext filter enable = 0x%02x\n", | ||
264 | tvp5150_read(c, TVP5150_TELETEXT_FIL_ENA)); | ||
265 | printk("tvp5150: Interrupt status register A = 0x%02x\n", | ||
266 | tvp5150_read(c, TVP5150_INT_STATUS_REG_A)); | ||
267 | printk("tvp5150: Interrupt enable register A = 0x%02x\n", | ||
268 | tvp5150_read(c, TVP5150_INT_ENABLE_REG_A)); | ||
269 | printk("tvp5150: Interrupt configuration = 0x%02x\n", | ||
270 | tvp5150_read(c, TVP5150_INT_CONF)); | ||
271 | printk("tvp5150: VDP configuration RAM data = 0x%02x\n", | ||
272 | tvp5150_read(c, TVP5150_VDP_CONF_RAM_DATA)); | ||
273 | printk("tvp5150: Configuration RAM address low byte = 0x%02x\n", | ||
274 | tvp5150_read(c, TVP5150_CONF_RAM_ADDR_LOW)); | ||
275 | printk("tvp5150: Configuration RAM address high byte = 0x%02x\n", | ||
276 | tvp5150_read(c, TVP5150_CONF_RAM_ADDR_HIGH)); | ||
277 | printk("tvp5150: VDP status register = 0x%02x\n", | ||
278 | tvp5150_read(c, TVP5150_VDP_STATUS_REG)); | ||
279 | printk("tvp5150: FIFO word count = 0x%02x\n", | ||
280 | tvp5150_read(c, TVP5150_FIFO_WORD_COUNT)); | ||
281 | printk("tvp5150: FIFO interrupt threshold = 0x%02x\n", | ||
282 | tvp5150_read(c, TVP5150_FIFO_INT_THRESHOLD)); | ||
283 | printk("tvp5150: FIFO reset = 0x%02x\n", | ||
284 | tvp5150_read(c, TVP5150_FIFO_RESET)); | ||
285 | printk("tvp5150: Line number interrupt = 0x%02x\n", | ||
286 | tvp5150_read(c, TVP5150_LINE_NUMBER_INT)); | ||
287 | printk("tvp5150: Pixel alignment register low byte = 0x%02x\n", | ||
288 | tvp5150_read(c, TVP5150_PIX_ALIGN_REG_LOW)); | ||
289 | printk("tvp5150: Pixel alignment register high byte = 0x%02x\n", | ||
290 | tvp5150_read(c, TVP5150_PIX_ALIGN_REG_HIGH)); | ||
291 | printk("tvp5150: FIFO output control = 0x%02x\n", | ||
292 | tvp5150_read(c, TVP5150_FIFO_OUT_CTRL)); | ||
293 | printk("tvp5150: Full field enable 1 = 0x%02x\n", | ||
294 | tvp5150_read(c, TVP5150_FULL_FIELD_ENA_1)); | ||
295 | printk("tvp5150: Full field enable 2 = 0x%02x\n", | ||
296 | tvp5150_read(c, TVP5150_FULL_FIELD_ENA_2)); | ||
297 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
298 | tvp5150_read(c, TVP5150_LINE_MODE_REG_1)); | ||
299 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
300 | tvp5150_read(c, TVP5150_LINE_MODE_REG_2)); | ||
301 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
302 | tvp5150_read(c, TVP5150_LINE_MODE_REG_3)); | ||
303 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
304 | tvp5150_read(c, TVP5150_LINE_MODE_REG_4)); | ||
305 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
306 | tvp5150_read(c, TVP5150_LINE_MODE_REG_5)); | ||
307 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
308 | tvp5150_read(c, TVP5150_LINE_MODE_REG_6)); | ||
309 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
310 | tvp5150_read(c, TVP5150_LINE_MODE_REG_7)); | ||
311 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
312 | tvp5150_read(c, TVP5150_LINE_MODE_REG_8)); | ||
313 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
314 | tvp5150_read(c, TVP5150_LINE_MODE_REG_9)); | ||
315 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
316 | tvp5150_read(c, TVP5150_LINE_MODE_REG_10)); | ||
317 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
318 | tvp5150_read(c, TVP5150_LINE_MODE_REG_11)); | ||
319 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
320 | tvp5150_read(c, TVP5150_LINE_MODE_REG_12)); | ||
321 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
322 | tvp5150_read(c, TVP5150_LINE_MODE_REG_13)); | ||
323 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
324 | tvp5150_read(c, TVP5150_LINE_MODE_REG_14)); | ||
325 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
326 | tvp5150_read(c, TVP5150_LINE_MODE_REG_15)); | ||
327 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
328 | tvp5150_read(c, TVP5150_LINE_MODE_REG_16)); | ||
329 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
330 | tvp5150_read(c, TVP5150_LINE_MODE_REG_17)); | ||
331 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
332 | tvp5150_read(c, TVP5150_LINE_MODE_REG_18)); | ||
333 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
334 | tvp5150_read(c, TVP5150_LINE_MODE_REG_19)); | ||
335 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
336 | tvp5150_read(c, TVP5150_LINE_MODE_REG_20)); | ||
337 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
338 | tvp5150_read(c, TVP5150_LINE_MODE_REG_21)); | ||
339 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
340 | tvp5150_read(c, TVP5150_LINE_MODE_REG_22)); | ||
341 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
342 | tvp5150_read(c, TVP5150_LINE_MODE_REG_23)); | ||
343 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
344 | tvp5150_read(c, TVP5150_LINE_MODE_REG_24)); | ||
345 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
346 | tvp5150_read(c, TVP5150_LINE_MODE_REG_25)); | ||
347 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
348 | tvp5150_read(c, TVP5150_LINE_MODE_REG_27)); | ||
349 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
350 | tvp5150_read(c, TVP5150_LINE_MODE_REG_28)); | ||
351 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
352 | tvp5150_read(c, TVP5150_LINE_MODE_REG_29)); | ||
353 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
354 | tvp5150_read(c, TVP5150_LINE_MODE_REG_30)); | ||
355 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
356 | tvp5150_read(c, TVP5150_LINE_MODE_REG_31)); | ||
357 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
358 | tvp5150_read(c, TVP5150_LINE_MODE_REG_32)); | ||
359 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
360 | tvp5150_read(c, TVP5150_LINE_MODE_REG_33)); | ||
361 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
362 | tvp5150_read(c, TVP5150_LINE_MODE_REG_34)); | ||
363 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
364 | tvp5150_read(c, TVP5150_LINE_MODE_REG_35)); | ||
365 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
366 | tvp5150_read(c, TVP5150_LINE_MODE_REG_36)); | ||
367 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
368 | tvp5150_read(c, TVP5150_LINE_MODE_REG_37)); | ||
369 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
370 | tvp5150_read(c, TVP5150_LINE_MODE_REG_38)); | ||
371 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
372 | tvp5150_read(c, TVP5150_LINE_MODE_REG_39)); | ||
373 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
374 | tvp5150_read(c, TVP5150_LINE_MODE_REG_40)); | ||
375 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
376 | tvp5150_read(c, TVP5150_LINE_MODE_REG_41)); | ||
377 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
378 | tvp5150_read(c, TVP5150_LINE_MODE_REG_42)); | ||
379 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
380 | tvp5150_read(c, TVP5150_LINE_MODE_REG_43)); | ||
381 | printk("tvp5150: Line mode registers = 0x%02x\n", | ||
382 | tvp5150_read(c, TVP5150_LINE_MODE_REG_44)); | ||
383 | printk("tvp5150: Full field mode register = 0x%02x\n", | ||
384 | tvp5150_read(c, TVP5150_FULL_FIELD_MODE_REG)); | ||
224 | } | 385 | } |
225 | 386 | ||
226 | /**************************************************************************** | 387 | /**************************************************************************** |
227 | Basic functions | 388 | Basic functions |
228 | ****************************************************************************/ | 389 | ****************************************************************************/ |
229 | enum tvp5150_input { | 390 | enum tvp5150_input { |
230 | TVP5150_ANALOG_CH0 = 0, | 391 | TVP5150_ANALOG_CH0 = 0, |
231 | TVP5150_SVIDEO = 1, | 392 | TVP5150_SVIDEO = 1, |
232 | TVP5150_ANALOG_CH1 = 2, | 393 | TVP5150_ANALOG_CH1 = 2, |
233 | TVP5150_BLACK_SCREEN = 8 | 394 | TVP5150_BLACK_SCREEN = 8 |
234 | }; | 395 | }; |
235 | 396 | ||
236 | static inline void tvp5150_selmux(struct i2c_client *c, enum tvp5150_input input) | 397 | static inline void tvp5150_selmux(struct i2c_client *c, |
398 | enum tvp5150_input input) | ||
237 | { | 399 | { |
238 | tvp5150_write(c,TVP5150_VD_IN_SRC_SEL_1,input); | 400 | int tvp_input; |
401 | |||
402 | /* FIXME: It is dependent of basic driver */ | ||
403 | switch (input) | ||
404 | { | ||
405 | case 2: | ||
406 | tvp_input=TVP5150_ANALOG_CH0; | ||
407 | break; | ||
408 | case 0: | ||
409 | tvp_input=TVP5150_ANALOG_CH1; | ||
410 | break; | ||
411 | case 1: | ||
412 | tvp_input=TVP5150_SVIDEO; | ||
413 | break; | ||
414 | default: | ||
415 | tvp_input=TVP5150_BLACK_SCREEN; | ||
416 | } | ||
417 | |||
418 | tvp5150_write(c, TVP5150_VD_IN_SRC_SEL_1, tvp_input); | ||
239 | }; | 419 | }; |
240 | 420 | ||
241 | static inline void tvp5150_reset(struct i2c_client *c) | 421 | static inline void tvp5150_reset(struct i2c_client *c) |
242 | { | 422 | { |
243 | /* Automatic offset and AGC enabled*/ | 423 | tvp5150_write(c, TVP5150_CONF_SHARED_PIN, 2); |
244 | tvp5150_write(c,TVP5150_ANAL_CHL_CTL,0x15); | 424 | |
425 | /* Automatic offset and AGC enabled */ | ||
426 | tvp5150_write(c, TVP5150_ANAL_CHL_CTL, 0x15); | ||
245 | 427 | ||
246 | /* Normal Operation */ | 428 | /* Normal Operation */ |
247 | tvp5150_write(c,TVP5150_OP_MODE_CTL,0x00); | 429 | // tvp5150_write(c, TVP5150_OP_MODE_CTL, 0x00); |
248 | 430 | ||
249 | /* Activate YCrCb output 0x9 or 0xd ? */ | 431 | /* Activate YCrCb output 0x9 or 0xd ? */ |
250 | tvp5150_write(c,TVP5150_MISC_CTL,0x09); | 432 | tvp5150_write(c, TVP5150_MISC_CTL, 0x6f); |
251 | 433 | ||
252 | /* Activates video std autodetection for PAL/M and PAL/N */ | 434 | /* Activates video std autodetection for PAL/M and PAL/N */ |
253 | tvp5150_write(c,TVP5150_AUTOSW_MSK,0xf0); | 435 | tvp5150_write(c, TVP5150_AUTOSW_MSK, 0xf0); |
254 | 436 | ||
255 | /* Default format: 0x47, 4:2:2: 0x40 */ | 437 | /* Default format: 0x47, 4:2:2: 0x40 */ |
256 | tvp5150_write(c,TVP5150_DATA_RATE_SEL,0x47); | 438 | tvp5150_write(c, TVP5150_DATA_RATE_SEL, 0x47); |
439 | |||
440 | tvp5150_selmux(c, TVP5150_ANALOG_CH0); | ||
257 | 441 | ||
258 | tvp5150_selmux(c,TVP5150_ANALOG_CH0); | 442 | tvp5150_write(c, TVP5150_CHROMA_PROC_CTL_1, 0x0c); |
443 | tvp5150_write(c, TVP5150_CHROMA_PROC_CTL_2, 0x54); | ||
444 | |||
445 | tvp5150_write(c, 0x27, 0x20); /* ?????????? */ | ||
446 | |||
447 | tvp5150_write(c, TVP5150_VIDEO_STD, 0x0); /* Auto switch */ | ||
448 | |||
449 | tvp5150_write(c, TVP5150_HUE_CTL, 0x0); | ||
259 | }; | 450 | }; |
260 | 451 | ||
452 | /**************************************************************************** | ||
453 | I2C Command | ||
454 | ****************************************************************************/ | ||
455 | static int tvp5150_command(struct i2c_client *client, | ||
456 | unsigned int cmd, void *arg) | ||
457 | { | ||
458 | struct tvp5150 *decoder = i2c_get_clientdata(client); | ||
459 | |||
460 | switch (cmd) { | ||
461 | |||
462 | case 0: | ||
463 | case DECODER_INIT: | ||
464 | tvp5150_reset(client); | ||
465 | break; | ||
466 | |||
467 | case DECODER_DUMP: | ||
468 | dump_reg(client); | ||
469 | break; | ||
470 | |||
471 | case DECODER_GET_CAPABILITIES: | ||
472 | { | ||
473 | struct video_decoder_capability *cap = arg; | ||
474 | |||
475 | cap->flags = VIDEO_DECODER_PAL | | ||
476 | VIDEO_DECODER_NTSC | | ||
477 | VIDEO_DECODER_SECAM | | ||
478 | VIDEO_DECODER_AUTO | VIDEO_DECODER_CCIR; | ||
479 | cap->inputs = 3; | ||
480 | cap->outputs = 1; | ||
481 | break; | ||
482 | } | ||
483 | case DECODER_GET_STATUS: | ||
484 | { | ||
485 | break; | ||
486 | } | ||
487 | |||
488 | case DECODER_SET_GPIO: | ||
489 | break; | ||
490 | |||
491 | case DECODER_SET_VBI_BYPASS: | ||
492 | break; | ||
493 | |||
494 | case DECODER_SET_NORM: | ||
495 | { | ||
496 | int *iarg = arg; | ||
497 | |||
498 | switch (*iarg) { | ||
499 | |||
500 | case VIDEO_MODE_NTSC: | ||
501 | break; | ||
502 | |||
503 | case VIDEO_MODE_PAL: | ||
504 | break; | ||
505 | |||
506 | case VIDEO_MODE_SECAM: | ||
507 | break; | ||
508 | |||
509 | case VIDEO_MODE_AUTO: | ||
510 | break; | ||
511 | |||
512 | default: | ||
513 | return -EINVAL; | ||
514 | |||
515 | } | ||
516 | decoder->norm = *iarg; | ||
517 | break; | ||
518 | } | ||
519 | case DECODER_SET_INPUT: | ||
520 | { | ||
521 | int *iarg = arg; | ||
522 | if (*iarg < 0 || *iarg > 3) { | ||
523 | return -EINVAL; | ||
524 | } | ||
525 | |||
526 | tvp5150_selmux(client, *iarg); | ||
527 | |||
528 | break; | ||
529 | } | ||
530 | case DECODER_SET_OUTPUT: | ||
531 | { | ||
532 | int *iarg = arg; | ||
533 | |||
534 | /* not much choice of outputs */ | ||
535 | if (*iarg != 0) { | ||
536 | return -EINVAL; | ||
537 | } | ||
538 | break; | ||
539 | } | ||
540 | case DECODER_ENABLE_OUTPUT: | ||
541 | // int *iarg = arg; | ||
542 | // int enable = (*iarg != 0); | ||
543 | |||
544 | break; | ||
545 | |||
546 | case DECODER_SET_PICTURE: | ||
547 | default: | ||
548 | return -EINVAL; | ||
549 | } | ||
550 | |||
551 | return 0; | ||
552 | } | ||
261 | 553 | ||
262 | /**************************************************************************** | 554 | /**************************************************************************** |
263 | I2C Client & Driver | 555 | I2C Client & Driver |
@@ -271,10 +563,8 @@ static struct i2c_client client_template = | |||
271 | .driver = &driver, | 563 | .driver = &driver, |
272 | }; | 564 | }; |
273 | 565 | ||
274 | static int | 566 | static int tvp5150_detect_client (struct i2c_adapter *adapter, |
275 | tvp5150_detect_client (struct i2c_adapter *adapter, | 567 | int address, int kind) |
276 | int address, | ||
277 | int kind) | ||
278 | { | 568 | { |
279 | struct i2c_client *client; | 569 | struct i2c_client *client; |
280 | struct tvp5150 *core; | 570 | struct tvp5150 *core; |
@@ -297,7 +587,7 @@ tvp5150_detect_client (struct i2c_adapter *adapter, | |||
297 | client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); | 587 | client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); |
298 | if (client == 0) | 588 | if (client == 0) |
299 | return -ENOMEM; | 589 | return -ENOMEM; |
300 | memcpy(client,&client_template,sizeof(struct i2c_client)); | 590 | memcpy(client,&client_template,sizeof(struct i2c_client)); |
301 | 591 | ||
302 | core = kmalloc(sizeof(struct tvp5150), GFP_KERNEL); | 592 | core = kmalloc(sizeof(struct tvp5150), GFP_KERNEL); |
303 | if (core == 0) { | 593 | if (core == 0) { |
@@ -315,7 +605,6 @@ tvp5150_detect_client (struct i2c_adapter *adapter, | |||
315 | return rv; | 605 | return rv; |
316 | } | 606 | } |
317 | 607 | ||
318 | tvp5150_reset(client); | ||
319 | dump_reg (client); | 608 | dump_reg (client); |
320 | 609 | ||
321 | return 0; | 610 | return 0; |
@@ -360,6 +649,8 @@ static struct i2c_driver driver = { | |||
360 | 649 | ||
361 | .attach_adapter = tvp5150_attach_adapter, | 650 | .attach_adapter = tvp5150_attach_adapter, |
362 | .detach_client = tvp5150_detach_client, | 651 | .detach_client = tvp5150_detach_client, |
652 | |||
653 | .command = tvp5150_command, | ||
363 | }; | 654 | }; |
364 | 655 | ||
365 | static int __init | 656 | static int __init |