Lines Matching full:encoder
3 * bt856 - BT856A Digital Video Encoder (Rockwell Part)
27 MODULE_DESCRIPTION("Brooktree-856A video encoder driver");
55 static inline int bt856_write(struct bt856 *encoder, u8 reg, u8 value) in bt856_write() argument
57 struct i2c_client *client = v4l2_get_subdevdata(&encoder->sd); in bt856_write()
59 encoder->reg[reg - BT856_REG_OFFSET] = value; in bt856_write()
63 static inline int bt856_setbit(struct bt856 *encoder, u8 reg, u8 bit, u8 value) in bt856_setbit() argument
65 return bt856_write(encoder, reg, in bt856_setbit()
66 (encoder->reg[reg - BT856_REG_OFFSET] & ~(1 << bit)) | in bt856_setbit()
70 static void bt856_dump(struct bt856 *encoder) in bt856_dump() argument
74 v4l2_info(&encoder->sd, "register dump:\n"); in bt856_dump()
76 printk(KERN_CONT " %02x", encoder->reg[i]); in bt856_dump()
84 struct bt856 *encoder = to_bt856(sd); in bt856_init() local
88 bt856_write(encoder, 0xdc, 0x18); in bt856_init()
89 bt856_write(encoder, 0xda, 0); in bt856_init()
90 bt856_write(encoder, 0xde, 0); in bt856_init()
92 bt856_setbit(encoder, 0xdc, 3, 1); in bt856_init()
93 /*bt856_setbit(encoder, 0xdc, 6, 0);*/ in bt856_init()
94 bt856_setbit(encoder, 0xdc, 4, 1); in bt856_init()
96 if (encoder->norm & V4L2_STD_NTSC) in bt856_init()
97 bt856_setbit(encoder, 0xdc, 2, 0); in bt856_init()
99 bt856_setbit(encoder, 0xdc, 2, 1); in bt856_init()
101 bt856_setbit(encoder, 0xdc, 1, 1); in bt856_init()
102 bt856_setbit(encoder, 0xde, 4, 0); in bt856_init()
103 bt856_setbit(encoder, 0xde, 3, 1); in bt856_init()
105 bt856_dump(encoder); in bt856_init()
111 struct bt856 *encoder = to_bt856(sd); in bt856_s_std_output() local
116 bt856_setbit(encoder, 0xdc, 2, 0); in bt856_s_std_output()
118 bt856_setbit(encoder, 0xdc, 2, 1); in bt856_s_std_output()
119 bt856_setbit(encoder, 0xda, 0, 0); in bt856_s_std_output()
120 /*bt856_setbit(encoder, 0xda, 0, 1);*/ in bt856_s_std_output()
124 encoder->norm = std; in bt856_s_std_output()
126 bt856_dump(encoder); in bt856_s_std_output()
133 struct bt856 *encoder = to_bt856(sd); in bt856_s_routing() local
142 bt856_setbit(encoder, 0xde, 4, 0); in bt856_s_routing()
143 bt856_setbit(encoder, 0xde, 3, 1); in bt856_s_routing()
144 bt856_setbit(encoder, 0xdc, 3, 1); in bt856_s_routing()
145 bt856_setbit(encoder, 0xdc, 6, 0); in bt856_s_routing()
148 bt856_setbit(encoder, 0xde, 4, 0); in bt856_s_routing()
149 bt856_setbit(encoder, 0xde, 3, 1); in bt856_s_routing()
150 bt856_setbit(encoder, 0xdc, 3, 1); in bt856_s_routing()
151 bt856_setbit(encoder, 0xdc, 6, 1); in bt856_s_routing()
154 bt856_setbit(encoder, 0xdc, 3, 0); in bt856_s_routing()
155 bt856_setbit(encoder, 0xde, 4, 1); in bt856_s_routing()
162 bt856_dump(encoder); in bt856_s_routing()
186 struct bt856 *encoder; in bt856_probe() local
196 encoder = devm_kzalloc(&client->dev, sizeof(*encoder), GFP_KERNEL); in bt856_probe()
197 if (encoder == NULL) in bt856_probe()
199 sd = &encoder->sd; in bt856_probe()
201 encoder->norm = V4L2_STD_NTSC; in bt856_probe()
203 bt856_write(encoder, 0xdc, 0x18); in bt856_probe()
204 bt856_write(encoder, 0xda, 0); in bt856_probe()
205 bt856_write(encoder, 0xde, 0); in bt856_probe()
207 bt856_setbit(encoder, 0xdc, 3, 1); in bt856_probe()
208 /*bt856_setbit(encoder, 0xdc, 6, 0);*/ in bt856_probe()
209 bt856_setbit(encoder, 0xdc, 4, 1); in bt856_probe()
211 if (encoder->norm & V4L2_STD_NTSC) in bt856_probe()
212 bt856_setbit(encoder, 0xdc, 2, 0); in bt856_probe()
214 bt856_setbit(encoder, 0xdc, 2, 1); in bt856_probe()
216 bt856_setbit(encoder, 0xdc, 1, 1); in bt856_probe()
217 bt856_setbit(encoder, 0xde, 4, 0); in bt856_probe()
218 bt856_setbit(encoder, 0xde, 3, 1); in bt856_probe()
221 bt856_dump(encoder); in bt856_probe()