Compiling v4l DVB drivers for SAA7134 and XC2028
Support for the XC2028 tuner is not part of the Linux 2.6.24 kernel. Support is however available in video 4 linux (v4l) tree
Use mercurial to checkout the latest driver code. Compile the code against the current kernel (2.6.24.3-34.fc8), and then install the modules.
hg clone http://linuxtv.org/hg/v4l-dvb/ cd v4l-dvb make make install
Note: If moving from the v4l-dvb-experimental tree, the E506R card has changed to card 136 (AVerMedia Cardbus TV/Radio (E506R)), and the tuner has stayed at 71 (Xceive xc2028/xc3028 tuner). Given that I have hard code the card and tuner id's into the modprobe.conf, this must be changed.
The v4l-dvb driver requires the firmware 'xc3028-v27.fw'. To generate this file, follow the instructions in the file 'linux/Documentation/video4linux/extract_xc3028.pl' [2]. This will result in a firmware file, which must be copied to '/lib/firmware'.
Unfortunately I haven't got these drivers to work with a M103C.
Links
- http://mcentral.de/wiki/index.php5/AverMedia_Cardbus_Hybrid_TV_FM_E506R
- http://mcentral.de/wiki/index.php5/AVerMedia_AverTV_Hybrid_FM_PCI_A16D
Appendices
[1] /etc/modprobe.conf
# # AVerMedia M103-C Hybrid MiniPCI module. Card 136 is an # AVerMedia cardbus E506R, but it has an XC30x8 tunner and # MT253 demodulator. Tuner 71 is the Xceive XC3028 tuner # driver, which also supports the XC3018 tuner. # options saa7134 alsa=1 card=136,136,136,136 tuner=71,71,71,71 i2c_scan=1
[2] Comment from linux/Documentation/video4linux/extract_xc3028.pl
# In order to use, you need to: # 1) Download the windows driver with something like: # wget http://www.steventoth.net/linux/xc5000/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip # 2) Extract the file hcw85bda.sys from the zip into the current dir: # unzip -j HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip Driver85/hcw85bda.sys # 3) run the script: # ./extract_xc3028.pl # 4) copy the generated file: # cp xc3028-v27.fw /lib/firmware
[3] Crash loading saa734 driver
saa7130/34: v4l2 driver version 0.2.14 loaded saa7133[0]: found at 0000:05:08.0, rev: 209, irq: 23, latency: 32, mmio: 0xd0400000 saa7133[0]: subsystem: 1461:f636, board: AVerMedia Cardbus TV/Radio (E506R) [card=136,insmod option] saa7133[0]: board init: gpio is effffff tuner' 3-0061: chip found @ 0xc2 (saa7133[0]) xc2028 3-0061: type set to XCeive xc2028/xc3028 tuner xc2028 3-0061: xc2028/3028 firmware name not set! saa7133[0]: i2c eeprom 00: 61 14 36 f6 00 00 00 00 00 00 00 00 00 00 00 00 saa7133[0]: i2c eeprom 10: ff ff ff ff ff 20 ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom 20: 01 40 01 02 02 01 01 03 08 ff 00 0e ff ff ff ff saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom 40: ff 65 00 ff c2 1e ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c scan: found device @ 0xa0 [eeprom] saa7133[0]: i2c scan: found device @ 0xc2 [???] xc2028 3-0061: Loading 80 firmware images from xc3028-v27.fw, type: xc2028 firmware, ver 2.7 BUG: unable to handle kernel NULL pointer dereference at virtual address 00000130 printing eip: f8bad003 *pde = 3f3f7067 Oops: 0000 [#1] SMP Modules linked in: saa7134(U) wctdm(U) zaptel(U) crc_ccitt ipv6 nf_conntrack_sip nf_conntrack_ftp ipt_REJECT xt_multiport iptable_filter xt_DSCP ipt_LOG xt_state iptable_mangle xt_tcpudp iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack ip_tables x_tables nls_utf8 loop xfs snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd soundcore snd_page_alloc tda1004x(U) videobuf_dvb(U) tuner(U) tea5767(U) tda8290(U) tda18271(U) tda827x(U) tuner_xc2028(U) xc5000(U) tda9887(U) tuner_simple(U) tuner_types(U) mt20xx(U) tea5761(U) ves1x93(U) compat_ioctl32(U) v4l2_common(U) ir_kbd_i2c(U) ir_common(U) tveeprom(U) dvb_ttpci(U) stv0299(U) saa7146_vv(U) saa7146(U) videobuf_dma_sg(U) videobuf_core(U) b2c2_flexcop_pci(U) videodev(U) b2c2_flexcop(U) v4l1_compat(U) ttpci_eeprom(U) dvb_core(U) i2c_i801 pcspkr serio_raw iTCO_wdt i2c_core iTCO_vendor_support e1000 i6300esb button pl2303 usbserial sr_mod sg cdrom sata_svw dm_snapshot dm_zero dm_mirror dm_mod ata_piix libata sd_mod scsi_mod raid456 async_xor async_memcpy async_tx xor raid1 ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd Pid: 31743, comm: modprobe Not tainted (2.6.24.3-34.fc8 #1) EIP: 0060:[<f8bad003>] EFLAGS: 00210246 CPU: 0 EIP is at saa7134_tuner_callback+0x3/0x15c [saa7134] EAX: deb57000 EBX: 00000000 ECX: 00000000 EDX: 00000000 ESI: cf73f000 EDI: cf73f06c EBP: cf73f000 ESP: deb39ba4 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 Process modprobe (pid: 31743, ti=deb39000 task=dc666690 task.ti=deb39000) Stack: cf73f000 f8bff85f f8c011cf f8c00f2d 00000003 00000061 00000050 df1c75f0 deb39c38 00000002 00000007 00000000 c0425b78 c040b08a 00000004 17d78400 dded1000 deb39cc0 cf73f06c c1811aa0 cf73f000 00000000 00000000 cf73f000 Call Trace: [<f8bff85f>] generic_set_freq+0x9bb/0x170d [tuner_xc2028] [<c0425b78>] find_busiest_group+0x204/0x5f3 [<c040b08a>] sched_clock+0x8/0x18 [<f8bfe7bb>] xc2028_set_config+0xb4/0xbe [tuner_xc2028] [<f8c00940>] xc2028_set_analog_freq+0x1df/0x1e7 [tuner_xc2028] [<f8cd0453>] fe_set_config+0x1a/0x54 [tuner] [<f8cd0434>] fe_set_params+0x4d/0x52 [tuner] [<c0424818>] __wake_up_common+0x32/0x5c [<f8ccfaa6>] set_tv_freq+0x15c/0x163 [tuner] [<c062b2c3>] mutex_lock+0x1a/0x29 [<f896d8b3>] i2c_clients_command+0x86/0xa9 [i2c_core] [<f8ccfba5>] set_freq+0xf8/0x146 [tuner] [<c043b896>] call_usermodehelper_exec+0x9f/0xa9 [<f8cd119d>] tuner_command+0x664/0x1106 [tuner] [<f896d89e>] i2c_clients_command+0x71/0xa9 [i2c_core] [<f8bb3f34>] saa7134_video_init2+0xd/0x2e [saa7134] [<f8baf44b>] saa7134_initdev+0x63d/0x98e [saa7134] [<c050a33f>] pci_device_probe+0x36/0x57 [<c05717c1>] driver_probe_device+0xe7/0x165 [<c04fc15f>] kobject_uevent_env+0x353/0x377 [<c05718e5>] __driver_attach+0x0/0xa5 [<c0571955>] __driver_attach+0x70/0xa5 [<c0570d77>] bus_for_each_dev+0x37/0x59 [<c057161f>] driver_attach+0x16/0x18 [<c05718e5>] __driver_attach+0x0/0xa5 [<c0571029>] bus_add_driver+0x6d/0x197 [<c050a46e>] __pci_register_driver+0x48/0x74 [<c044d204>] sys_init_module+0x14d6/0x15f9 [<c0488e3b>] do_sync_read+0xc7/0x10a [<f89f3587>] videobuf_mmap_free+0x0/0x1e [videobuf_core] [<c04051da>] syscall_call+0x7/0xb ======================= Code: <8b> 83 30 01 00 00 83 f8 36 74 0e 83 f8 47 0f 85 3e 01 00 00 e9 92 EIP: [<f8bad003>] saa7134_tuner_callback+0x3/0x15c [saa7134] SS:ESP 0068:deb39ba4 ---[ end trace 8ba6032b54766938 ]---