Lines Matching refs:buf
106 u8 buf[64]; in tt3650_ci_msg() local
117 buf[0] = SYNC_BYTE_OUT; in tt3650_ci_msg()
118 buf[1] = id; in tt3650_ci_msg()
119 buf[2] = cmd; in tt3650_ci_msg()
120 buf[3] = write_len; in tt3650_ci_msg()
122 memcpy(buf + 4, data, write_len); in tt3650_ci_msg()
125 ret = dvb_usb_generic_rw(d, buf, 4 + write_len, in tt3650_ci_msg()
126 buf, rlen, /* delay_ms */ 0); in tt3650_ci_msg()
131 if (SYNC_BYTE_IN != buf[0] || id != buf[1]) in tt3650_ci_msg()
134 memcpy(data, buf + 4, read_len); in tt3650_ci_msg()
140 ret, SYNC_BYTE_OUT, id, cmd, 3, buf); in tt3650_ci_msg()
163 u8 buf[3]; in tt3650_ci_read_attribute_mem() local
169 buf[0] = (address >> 8) & 0x0F; in tt3650_ci_read_attribute_mem()
170 buf[1] = address; in tt3650_ci_read_attribute_mem()
172 ret = tt3650_ci_msg_locked(ca, TT3650_CMD_CI_RD_ATTR, buf, 2, 3); in tt3650_ci_read_attribute_mem()
175 __func__, address, ret, buf[2]); in tt3650_ci_read_attribute_mem()
180 return buf[2]; in tt3650_ci_read_attribute_mem()
186 u8 buf[3]; in tt3650_ci_write_attribute_mem() local
194 buf[0] = (address >> 8) & 0x0F; in tt3650_ci_write_attribute_mem()
195 buf[1] = address; in tt3650_ci_write_attribute_mem()
196 buf[2] = value; in tt3650_ci_write_attribute_mem()
198 return tt3650_ci_msg_locked(ca, TT3650_CMD_CI_WR_ATTR, buf, 3, 3); in tt3650_ci_write_attribute_mem()
205 u8 buf[2]; in tt3650_ci_read_cam_control() local
211 buf[0] = address & 3; in tt3650_ci_read_cam_control()
213 ret = tt3650_ci_msg_locked(ca, TT3650_CMD_CI_RD_CTRL, buf, 1, 2); in tt3650_ci_read_cam_control()
216 __func__, address, ret, buf[1]); in tt3650_ci_read_cam_control()
221 return buf[1]; in tt3650_ci_read_cam_control()
229 u8 buf[2]; in tt3650_ci_write_cam_control() local
237 buf[0] = address; in tt3650_ci_write_cam_control()
238 buf[1] = value; in tt3650_ci_write_cam_control()
240 return tt3650_ci_msg_locked(ca, TT3650_CMD_CI_WR_CTRL, buf, 2, 2); in tt3650_ci_write_cam_control()
247 u8 buf[1]; in tt3650_ci_set_video_port() local
256 buf[0] = enable; in tt3650_ci_set_video_port()
258 ret = tt3650_ci_msg_locked(ca, TT3650_CMD_CI_SET_VIDEO_PORT, buf, 1, 1); in tt3650_ci_set_video_port()
262 if (enable != buf[0]) { in tt3650_ci_set_video_port()
284 u8 buf[1]; in tt3650_ci_slot_reset() local
292 buf[0] = 0; in tt3650_ci_slot_reset()
296 ret = tt3650_ci_msg(d, TT3650_CMD_CI_RESET, buf, 1, 1); in tt3650_ci_slot_reset()
302 buf[0] = 1; in tt3650_ci_slot_reset()
304 ret = tt3650_ci_msg(d, TT3650_CMD_CI_RESET, buf, 1, 1); in tt3650_ci_slot_reset()
310 buf[0] = 0; /* FTA */ in tt3650_ci_slot_reset()
312 ret = tt3650_ci_msg(d, TT3650_CMD_CI_SET_VIDEO_PORT, buf, 1, 1); in tt3650_ci_slot_reset()
324 u8 buf[1]; in tt3650_ci_poll_slot_status() local
330 ret = tt3650_ci_msg_locked(ca, TT3650_CMD_CI_TEST, buf, 0, 1); in tt3650_ci_poll_slot_status()
334 if (1 == buf[0]) in tt3650_ci_poll_slot_status()
408 u8 buf[64]; in pctv452e_i2c_msg() local
418 buf[0] = SYNC_BYTE_OUT; in pctv452e_i2c_msg()
419 buf[1] = id; in pctv452e_i2c_msg()
420 buf[2] = PCTV_CMD_I2C; in pctv452e_i2c_msg()
421 buf[3] = snd_len + 3; in pctv452e_i2c_msg()
422 buf[4] = addr << 1; in pctv452e_i2c_msg()
423 buf[5] = snd_len; in pctv452e_i2c_msg()
424 buf[6] = rcv_len; in pctv452e_i2c_msg()
426 memcpy(buf + 7, snd_buf, snd_len); in pctv452e_i2c_msg()
428 ret = dvb_usb_generic_rw(d, buf, 7 + snd_len, in pctv452e_i2c_msg()
429 buf, /* rcv_len */ 64, in pctv452e_i2c_msg()
436 if (SYNC_BYTE_IN != buf[0] || id != buf[1]) in pctv452e_i2c_msg()
441 if (buf[5] < snd_len || buf[6] < rcv_len) in pctv452e_i2c_msg()
444 memcpy(rcv_buf, buf + 7, rcv_len); in pctv452e_i2c_msg()
452 buf[0], buf[1], buf[4], buf[5], buf[6]); in pctv452e_i2c_msg()
474 rcv_buf = msg[i].buf; in pctv452e_i2c_xfer()
478 snd_buf = msg[i].buf; in pctv452e_i2c_xfer()