Hi, just wanted to know where the b2c2-usb driver development is going nowadays? Made an impulse buy of the Technisat AirStar box (rev 2.1 with FlexCop III and TDTC9251DH01C (mt352)) a month ago and would now like to use it in linux, so I'd be very intrested to see it supported. I realize the b2c2-directory under dvb-kernel in cvs is temporary and that the driver is going through lot of changes, still, just for the heck of it I cleaned the 50 or so warnings and errors to get it to compile cleanly against 2.6.11-rc4 (make SUBDIRS=../dvb-kernel/b2c2). (Also requires applying http://www.linuxtv.org/pipermail/linux-dvb/2005-February/000015.html) Attached are the changes made, feel free to ignore it if something else is happening. After modprobing dvb-core mt352 mt312 i2c-core stv0299 nxt2002, and then insmodding b2c2-flexcop.ko and b2c2-flexcop-usb.ko it says .. b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip loaded successfully b2c2-flexcop: unkown FlexCop Revision: 0. Please report the linux-dvb@xxxxxxxxxxxx b2c2-flexcop: reading of MAC address failed. DVB: registering new adapter (FlexCop Digital TV device). b2c2-flexcop: i2c master_xfer failed b2c2-flexcop: i2c master_xfer failed b2c2-flexcop: i2c master_xfer failed b2c2-flexcop: i2c master_xfer failed i2c_readbytes: i2c read error (addr 0a, err == -121) b2c2-flexcop: i2c master_xfer failed mt312_read: ret == -121 b2c2-flexcop: no frontend driver found for this B2C2/FlexCop adapter usbcore: registered new driver dvb_b2c2_usb So still quite useless, but at least it loads :). Btw, would the specs referred to here http://pvrguide.no-ip.com/bbs-old/viewtopic.php?t=16643 be available from somewhere? Thanks, -samuli -------------- next part -------------- Index: Makefile =================================================================== RCS file: /cvs/linuxtv/dvb-kernel/b2c2/Makefile,v retrieving revision 1.7 diff -r1.7 Makefile 2c2 < obj-$(CONFIG_B2C2_FLEXCOP) += b2c2-flexcop.o --- > obj-$(CONFIG_DVB_B2C2_SKYSTAR) += b2c2-flexcop.o 7,8c7,8 < #b2c2-flexcop-usb-objs = flexcop-usb.o < #obj-$(CONFIG_B2C2_FLEXCOP_USB) += b2c2-flexcop-usb.o --- > b2c2-flexcop-usb-objs = flexcop-usb.o > obj-$(CONFIG_DVB_B2C2_USB) += b2c2-flexcop-usb.o Index: flexcop-common.h =================================================================== RCS file: /cvs/linuxtv/dvb-kernel/b2c2/flexcop-common.h,v retrieving revision 1.11 diff -r1.11 flexcop-common.h 75a76 > void flexcop_reset(struct flexcop_device *fc); Index: flexcop-usb.c =================================================================== RCS file: /cvs/linuxtv/dvb-kernel/b2c2/flexcop-usb.c,v retrieving revision 1.4 diff -r1.4 flexcop-usb.c 9c9 < #include "flexcop-common.h" --- > #include "flexcop.h" 31,55d30 < /* debug */ < #define dprintk(level,args...) \ < do { if ((debug & level)) { printk(args); } } while (0) < #define debug_dump(b,l) if (debug) {\ < int i; deb_xfer("%s: %d > ",__FUNCTION__,l); \ < for (i = 0; i < l; i++) deb_xfer("%02x ", b[i]); \ < deb_xfer("\n");\ < } < < #define deb_info(args...) dprintk(0x01,args) < #define deb_ts(args...) dprintk(0x02,args) < #define deb_ctrl(args...) dprintk(0x04,args) < #define deb_i2c(args...) dprintk(0x08,args) < < struct usb_b2c2_usb { < struct usb_device *udev; < struct usb_interface *uintf; < < u8 *iso_buffer; < int buffer_size; < dma_addr_t iso_dma_handle; < struct urb *iso_urb[B2C2_USB_NUM_ISO_URB]; < }; < < 149a125,136 > struct usb_b2c2_usb { > struct usb_device *udev; > struct usb_interface *uintf; > > u8 *iso_buffer; > int buffer_size; > dma_addr_t iso_dma_handle; > struct urb *iso_urb[B2C2_USB_NUM_ISO_URB]; > /* just a hack to retain the flexcop_device i2c callback structure */ > b2c2_usb_request_t i2c_req; > }; > 169a157,159 > /* common */ > int b2c2_flexcop_debug; > 179c169 < static int b2c2_usb_readwrite_dw(struct b2c2_device *card, u16 wRegOffsPCI, u32 *val, u8 read) --- > static int b2c2_usb_readwrite_dw(struct flexcop_device *card, u16 wRegOffsPCI, u32 *val, u8 read) 197c187 < b2c2_err("error while %s dword from %d (%d).",read ? "reading" : "writing", --- > deb_info("error while %s dword from %d (%d).",read ? "reading" : "writing", 280c270 < static int b2c2_usb_memory_raw_req(struct b2c2_device *b2c2,u8 req,u32 dwAddr,u8 *buf,u16 len) --- > static int b2c2_usb_memory_raw_req(struct flexcop_device *b2c2,u8 req,u32 dwAddr,u8 *buf,u16 len) 287c277 < static int b2c2_usb_memory_req(struct b2c2_device *b2c2,u8 req,u8 dwAddress,void *pvData, u32 len) --- > static int b2c2_usb_memory_req(struct flexcop_device *b2c2,u8 req,u8 dwAddress,void *pvData, u32 len) 290c280 < u16 wMax; --- > u16 wMax = 0; 329c319 < u8 b2c2_usb_memory_readb(struct b2c2_device *b2c2, u32 dwAddress) --- > u8 b2c2_usb_memory_readb(struct flexcop_device *b2c2, u32 dwAddress) 358a349,352 > #if 0 > /* How is this going to be done? flexcop-sram at least isn't very compatible > * with the current usb code. > */ 382a377 > #endif 384c379 < /* usb i2c stuff */ --- > /* usb i2c stuff 387a383,386 > */ > static int b2c2_usb_i2c_req(struct flexcop_device *fc, > flexcop_access_op_t func, flexcop_i2c_port_t port, > u8 chipaddr, u8 addr, u8 *buf, u16 buflen) 388a388 > struct usb_b2c2_usb *b2c2 = fc->bus_specific; 419,420c419,421 < len = usb_control_msg(b2c2->udev,pipe, < req, --- > len = usb_control_msg(b2c2->udev, > pipe, > b2c2->i2c_req, 431,442d431 < static u32 b2c2_usb_read_dw_old(struct b2c2_device *card, u16 wRegOffsPCI) < { < err("do not use this functions. "); < return -EINVAL; < } < < static int b2c2_usb_write_dw_old(struct b2c2_device *card, u16 wRegOffsPCI, u32 val) < { < err("do not use this functions. "); < return -EINVAL; < } < 444c433 < static flexcop_ibi_value b2c2_usb_read_ibi_reg(struct b2c2_device *card, flexcop_ibi_register reg) --- > static flexcop_ibi_value b2c2_usb_read_ibi_reg(struct flexcop_device *card, flexcop_ibi_register reg) 452c441 < static int b2c2_usb_write_ibi_reg(struct b2c2_device *card, flexcop_ibi_register reg, flexcop_ibi_value val) --- > static int b2c2_usb_write_ibi_reg(struct flexcop_device *card, flexcop_ibi_register reg, flexcop_ibi_value val) 457c446,447 < static int b2c2_usb_i2c_read(struct b2c2_device *card, u8 port, u8 chipaddr, u8 addr, u8 *buf, u16 len) --- > /* I guess these are no longer used? > static int b2c2_usb_i2c_read(struct flexcop_device *card, u8 port, u8 chipaddr, u8 addr, u8 *buf, u16 len) 463c453 < static int b2c2_usb_i2c_write(struct b2c2_device *card, u8 port, u8 chipaddr, u8 addr, u8 *buf, u16 len) --- > static int b2c2_usb_i2c_write(struct flexcop_device *card, u8 port, u8 chipaddr, u8 addr, u8 *buf, u16 len) 468,469c458,460 < < static void b2c2_dumpfourreg(struct b2c2_device *card, u16 offs) --- > */ > > static void b2c2_dumpfourreg(struct flexcop_device *card, u16 offs) 476c467 < deb_ctrl("dump: offset: %03x, %08x, %08x, %08x, %08x\n",offs,r0.raw,r1.raw,r2.raw,r3.raw); --- > deb_info("dump: offset: %03x, %08x, %08x, %08x, %08x\n",offs,r0.raw,r1.raw,r2.raw,r3.raw); 481c472 < struct usb_b2c2_usb *b2c2 = urb->context; --- > // struct usb_b2c2_usb *b2c2 = urb->context; 487c478 < static void open_stream_usb(struct b2c2_device *card, u16 pid) --- > static void open_stream_usb(struct flexcop_device *card) 492c483 < static void close_stream_usb(struct b2c2_device *card, u16 pid) --- > static void close_stream_usb(struct flexcop_device *card) 496a488,496 > static int stream_control(struct flexcop_device *fc, int onoff) > { > if (onoff) > open_stream_usb(fc); > else > close_stream_usb(fc); > return 0; > } > 558c558 < b2c2_err("submitting urb %d failed with %d.",i,ret); --- > deb_info("submitting urb %d failed with %d.",i,ret); 577c577 < struct b2c2_device *card = NULL; --- > struct flexcop_device *card = NULL; 582c582 < b2c2_err("cannot handle USB speed because it is to sLOW."); --- > deb_info("cannot handle USB speed because it is to sLOW."); 585c585 < b2c2_info("running at FULL speed."); --- > deb_info("running at FULL speed."); 588c588 < b2c2_info("running at HIGH speed."); --- > deb_info("running at HIGH speed."); 592c592 < b2c2_err("cannot handle USB speed because it is unkown."); --- > deb_info("cannot handle USB speed because it is unkown."); 597c597 < card = b2c2_device_kmalloc(sizeof(struct usb_b2c2_usb)); --- > card = flexcop_device_kmalloc(sizeof(struct usb_b2c2_usb)); 606c606 < --- > /* 609c609 < --- > */ 613,616c613,615 < card->i2c_read = b2c2_usb_i2c_read; < card->i2c_write = b2c2_usb_i2c_write; < card->open_stream = open_stream_usb; < card->close_stream = close_stream_usb; --- > card->i2c_request = b2c2_usb_i2c_req; > > card->stream_control = stream_control; 618a618,619 > card->pid_filtering = enable_hw_filters; > /* 620d620 < card->enable_hw_filters = enable_hw_filters; 625c625,626 < --- > */ > 639,640c640,641 < b2c2_flexcop_reset(card); < ret = b2c2_initialize(card); --- > flexcop_reset(card); > ret = flexcop_device_initialize(card); 643c644 < b2c2_info("%s error while loading driver (%d)",DRIVER_DESC,ret); --- > deb_info("%s error while loading driver (%d)",DRIVER_DESC,ret); 647c648 < b2c2_info("%s successfully initialized and connected.",DRIVER_DESC); --- > deb_info("%s successfully initialized and connected.",DRIVER_DESC); 660c661 < struct b2c2_device *card = usb_get_intfdata(intf); --- > struct flexcop_device *card = usb_get_intfdata(intf); 662a664,665 > close_stream_usb(card); > /* 664a668 > */ 668c672 < b2c2_info("%s successfully deinitialized and disconnected.",DRIVER_DESC); --- > deb_info("%s successfully deinitialized and disconnected.",DRIVER_DESC); 689c693 < b2c2_err("usb_register failed. Error number %d",result); --- > deb_info("usb_register failed. Error number %d",result); Index: flexcop.c =================================================================== RCS file: /cvs/linuxtv/dvb-kernel/b2c2/flexcop.c,v retrieving revision 1.8 diff -r1.8 flexcop.c 158c158 < static void flexcop_reset(struct flexcop_device *fc) --- > void flexcop_reset(struct flexcop_device *fc) 171a172 > EXPORT_SYMBOL(flexcop_reset);