Thread: digital tuner card AF9035 and kernel-source-3.2.0
hey have digital tuner card af9035 chip, working before done update. came busy in mythtv, went backend of mythtv , had error unknown.
figured better recompile drivers after downloading essentials build, kernel source, headers, kernel package.
put few ln -s linux-source drivers in af9035 source folder compile normal.
few warnings not this. first time have seen error.
having trouble using kernel-source-3.2.0 linux-headers-3.2.0-24-generic
anyone got solutions?code:/home/media/installer/af903x_src/af903x-devices.c: in function ‘af903x_frontend_attach’: /home/media/installer/af903x_src/af903x-devices.c:96:1: warning: control reaches end of non-void function [-wreturn-type] make[2]: *** [/home/media/installer/af903x_src/af903x-devices.o] error 1 make[1]: *** [_module_/home/media/installer/af903x_src] error 2 make[1]: leaving directory `/usr/src/linux-headers-3.2.0-24-generic' make: *** [default] error 2
sudo nano ~/installer/af903x_src/af903x-devices.c
code:#include "af903x.h" bool devicepower; static int af903x_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) { int ret =0; #if linux_version_code > kernel_version(2,6,18) deb_data("%s: onoff:%d\n", __func__, onoff); if ( pdc->fc[adap->id].benpid != onoff ) dl_resetpid((byte)adap->id); pdc->fc[adap->id].benpid = onoff; dl_pidonoff((byte)adap->id,onoff); #endif return ret; } static int af903x_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pidnum, int onoff) { int ret = 0; #if linux_version_code > kernel_version(2,6,18) pid pid; deb_data("- %s: set pid filter, index %d, pid %x, onoff %d, now_onoff %d.\n", __func__, index, pidnum, onoff, pdc->fc[adap->id].benpid); if (onoff && !pdc->fc[adap->id].benpid) { dl_resetpid((byte)adap->id); pdc->fc[adap->id].benpid = onoff; dl_pidonoff((byte)adap->id,onoff); pid.sectiontype = sectiontype_table; pid.table = 0x00; pid.duration = 0xff; } pid.value = (word)pidnum; if (onoff){ ret = dl_addpid((byte)adap->id, index, pid); }else{ ret = dl_removepid((byte)adap->id, index, pid); } #endif return ret; } static int af903x_download_firmware(struct usb_device *udev, const struct firmware *fw) { int ret=0; deb_data("- enter %s function -\n",__function__); return ret; } static int af903x_powerctrl(struct dvb_usb_device *d, int onoff) { int ret; devicepower = onoff; #if linux_version_code > kernel_version(2,6,18) deb_data("- enter %s function - chip=%d:%s\n",__function__, d->adapter->id, onoff?"on":"off"); ret = dl_apctrl(d->adapter->id, onoff); #else deb_data("- enter %s function - %s\n",__function__, onoff?"on":"off"); ret = dl_apctrl(0, onoff); #endif if(ret) deb_data(" af903x_powerctrl fail: 0x%04x\n", ret); return ret; } static int af903x_identify_state(struct usb_device *udev, struct dvb_usb_device_properties *props, struct dvb_usb_device_description **desc, int *cold) { deb_data("- enter %s function -\n",__function__); *cold = 0; return 0; } static int af903x_frontend_attach(struct dvb_usb_adapter *adap) { #if linux_version_code > kernel_version(2,6,18) deb_data("- enter %s function - chip=%d\n", __function__, adap->id); #else deb_data("- enter %s function - \n", __function__); #endif adap->fe = af903x_attach(1); return adap->fe == null ? -enodev : 0; } static int af903x_tuner_attach(struct dvb_usb_adapter *adap) { #if linux_version_code > kernel_version(2,6,18) deb_data("- enter %s function - chip=%d\n",__function__, adap->id); #else deb_data("- enter %s function - \n", __function__); #endif tuner_attach(adap->fe); return 0; } static int af903x_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) { #if linux_version_code > kernel_version(2,6,18) deb_data("- enter %s function - (%s) streaming state chip=%d\n",__function__, onoff?"on":"off", adap->id); //pid off dl_resetpid((byte)adap->id); pdc->fc[adap->id].benpid = 0; dl_pidonoff((byte)adap->id,0); #else deb_data("- enter %s function - (%s) streaming state \n",__function__, onoff?"on":"off"); #endif return 0; } struct usb_device_id af903x_usb_id_table[] = { { usb_device(0x15a4,0x1000) }, { usb_device(0x15a4,0x1001) }, { usb_device(0x15a4,0x1002) }, { usb_device(0x15a4,0x1003) }, { usb_device(0x15a4,0x9035) }, { 0}, /* terminating entry */ }; module_device_table(usb, af903x_usb_id_table); struct dvb_usb_device_properties af903x_properties[] = { { .usb_ctrl = device_specific, .download_firmware = af903x_download_firmware, .no_reconnect = 1, .power_ctrl = af903x_powerctrl, .identify_state = af903x_identify_state, #if linux_version_code == kernel_version(2,6,18) .caps = dvb_usb_has_pid_filter | dvb_usb_need_pid_filtering, .pid_filter_count = 32, .frontend_attach = af903x_frontend_attach, .tuner_attach = af903x_tuner_attach, .streaming_ctrl = af903x_streaming_ctrl, .urb = { .type = dvb_usb_bulk, .count = 10, .endpoint = 0x84, .u = { .bulk = { .buffersize = 65424, } } }, #else .num_adapters = 1, .adapter = { { .caps = dvb_usb_adap_has_pid_filter | dvb_usb_adap_pid_filter_can_be_turned_off, .pid_filter_count = 32, .pid_filter = af903x_pid_filter, .pid_filter_ctrl = af903x_pid_filter_ctrl, .frontend_attach = af903x_frontend_attach, .tuner_attach = af903x_tuner_attach, .streaming_ctrl = af903x_streaming_ctrl, .stream = { .type = usb_bulk, .count = 4, .endpoint = 0x84, .u = { .bulk = { .buffersize = 65424, } } } }, { .caps = dvb_usb_adap_has_pid_filter | dvb_usb_adap_pid_filter_can_be_turned_off, .pid_filter_count = 32, .pid_filter = af903x_pid_filter, .pid_filter_ctrl = af903x_pid_filter_ctrl, .frontend_attach = af903x_frontend_attach, .tuner_attach = af903x_tuner_attach, .streaming_ctrl = af903x_streaming_ctrl, .stream = { .type = usb_bulk, .count = 4, .endpoint = 0x85, .u = { .bulk = { .buffersize = 65424, } } } }, }, #endif .num_device_descs =1, .devices = { { "itetech usb2.0 dvb-t recevier", { &af903x_usb_id_table[0], &af903x_usb_id_table[1],&af903x_usb_id_table[2], &af903x_usb_id_table[3], &af903x_usb_id_table[4], null}, { null }, }, {null}, } } }; int af903x_device_count = array_size(af903x_properties);
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Hardware [mythbuntu] digital tuner card AF9035 and kernel-source-3.2.0
Ubuntu
Comments
Post a Comment