123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- extern int dvb_usb_vp702x_debug;
- /* commands are read and written with USB control messages */
- /* consecutive read/write operation */
- /* the out-buffer of these consecutive operations contain sub-commands when b[0] = 0
- * request: 0xB2; i: 0; v: 0; b[0] = 0, b[1] = subcmd, additional buffer
- * the returning buffer looks as follows
- * request: 0xB3; i: 0; v: 0; b[0] = 0xB3, additional buffer */
- /* additional in buffer:
- * 0 1 2 3 4 5 6 7 8
- * N/A N/A 0x05 signal-quality N/A N/A signal-strength lock==0 N/A */
- /* additional in buffer:
- * 0 1 2 3 4 5 6 7 8
- * N/A 'U' 'S' 'B' '7' '0' '2' 'X' N/A */
- /* additional out buffer:
- * 0 1 2 3 4
- * len X1 X2 X3 X4
- * additional in buffer:
- * 0 1 2
- * N/A 0 0 b[1] == b[2] == 0 -> success, failure otherwise */
- /* additional out buffer:
- * 0 1 2
- * 0x00 0xff 1 = on, 0 = off
- * additional in buffer:
- * 0 1 2
- * N/A 0 0 b[1] == b[2] == 0 -> success failure otherwise */
- /*
- /* additional in buffer:
- * 0 1 2 3 4 5 6 7 8
- * N/A N/A 0x0A or 0x0B MAC0 MAC1 MAC2 MAC3 MAC4 MAC5 */
- /* additional in buffer:
- * 0 1 ... 14 15 16
- * PID0_MSB PID0_LSB ... PID7_MSB PID7_LSB PID_active (bits) */
- /* request: 0xB2; i: 0; v: 0;
- * b[0] != 0 -> tune and lock a channel
- * 0 1 2 3 4 5 6 7
- * freq0 freq1 divstep srate0 srate1 srate2 flag chksum
- */
- /* one direction requests */
- /* IN i: 0; v: 0; b[0] == request, b[1] == key */
- /* IN i: 0; v: 0; b[0] == request, b[1] == 0, b[2] = pid number */
- /* OUT i: offset; v: value to write; no extra buffer */
- /* IN i: bufferlen; v: offset; buffer with bufferlen bytes */
- /* IN i: 0; v: 0; bufferlen 10 */
- /* IN i: 0; v: register; b[0] = value */
- /* IN i: offset; v: 0; b[0] = value */
- /* OUT i: offset; v: value to write; 1 byte extra buffer */
- /* IN i: 0 = power off, 1 = power on */
- /* IN i: register, v: value to write, no extra buffer */
- /* IN i: 0, v: 0, no extra buffer */
- struct vp702x_device_state {
- struct mutex buf_mutex;
- int buf_len;
- u8 *buf;
- };
- extern struct dvb_frontend * vp702x_fe_attach(struct dvb_usb_device *d);
- extern int vp702x_usb_inout_op(struct dvb_usb_device *d, u8 *o, int olen, u8 *i, int ilen, int msec);
- extern int vp702x_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen);
|