Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Apr 2008 18:21:08 +0000 (11:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Apr 2008 18:21:08 +0000 (11:21 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (452 commits)
  V4L/DVB (7731): tuner-xc2028: fix signal strength calculus
  V4L/DVB (7730): tuner-xc2028: Fix SCODE load for MTS firmwares
  V4L/DVB (7729): Fix VIDIOCGAP corruption in ivtv
  V4L/DVB (7728): tea5761: bugzilla #10462: tea5761 autodetection code were broken
  V4L/DVB (7726): cx23885: Enable cx23417 support on the HVR1800
  V4L/DVB (7725): cx23885: Add generic cx23417 hardware encoder support
  V4L/DVB (7723): pvrusb2: Clean up input selection list generation in V4L interface
  V4L/DVB (7722): pvrusb2: Implement FM radio support for Gotview USB2.0 DVD 2
  V4L/DVB (7721): pvrusb2: Restructure cx23416 firmware loading to have a common exit point
  V4L/DVB (7720): pvrusb2: Fix bad error code on cx23416 firmware load failure
  V4L/DVB (7719): pvrusb2: Implement input selection enforcement
  V4L/DVB (7718): pvrusb2-dvb: update Kbuild selections
  V4L/DVB (7717): pvrusb2-dvb: add DVB-T support for Hauppauge pvrusb2 model 73xxx
  V4L/DVB (7716): pvrusb2: clean up global functions
  V4L/DVB (7715): pvrusb2: Clean out all use of __FUNCTION__
  V4L/DVB (7714): pvrusb2: Fix hang on module removal
  V4L/DVB (7713): pvrusb2: Implement cleaner DVB kernel thread shutdown
  V4L/DVB (7712): pvrusb2: Close connect/disconnect race
  V4L/DVB (7711): pvrusb2: Fix race on module unload
  V4L/DVB (7710): pvrusb2: Implement critical digital streaming quirk for onair devices
  ...

428 files changed:
Documentation/video4linux/CARDLIST.au0828 [new file with mode: 0644]
Documentation/video4linux/CARDLIST.bttv
Documentation/video4linux/CARDLIST.cx23885
Documentation/video4linux/CARDLIST.cx88
Documentation/video4linux/CARDLIST.saa7134
Documentation/video4linux/extract_xc3028.pl
drivers/media/Kconfig
drivers/media/common/ir-functions.c
drivers/media/common/ir-keymaps.c
drivers/media/common/saa7146_core.c
drivers/media/common/saa7146_i2c.c
drivers/media/common/saa7146_vbi.c
drivers/media/common/saa7146_video.c
drivers/media/dvb/b2c2/Kconfig
drivers/media/dvb/b2c2/Makefile
drivers/media/dvb/b2c2/flexcop-common.h
drivers/media/dvb/b2c2/flexcop-dma.c
drivers/media/dvb/b2c2/flexcop-eeprom.c
drivers/media/dvb/b2c2/flexcop-fe-tuner.c
drivers/media/dvb/b2c2/flexcop-i2c.c
drivers/media/dvb/b2c2/flexcop-misc.c
drivers/media/dvb/b2c2/flexcop-pci.c
drivers/media/dvb/b2c2/flexcop-reg.h
drivers/media/dvb/b2c2/flexcop-sram.c
drivers/media/dvb/b2c2/flexcop-usb.c
drivers/media/dvb/b2c2/flexcop.c
drivers/media/dvb/bt8xx/Kconfig
drivers/media/dvb/bt8xx/Makefile
drivers/media/dvb/bt8xx/dst.c
drivers/media/dvb/bt8xx/dst_ca.c
drivers/media/dvb/bt8xx/dvb-bt8xx.c
drivers/media/dvb/bt8xx/dvb-bt8xx.h
drivers/media/dvb/cinergyT2/cinergyT2.c
drivers/media/dvb/dvb-core/demux.h
drivers/media/dvb/dvb-core/dmxdev.c
drivers/media/dvb/dvb-core/dvb_ca_en50221.c
drivers/media/dvb/dvb-core/dvb_demux.c
drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/media/dvb/dvb-core/dvb_net.c
drivers/media/dvb/dvb-core/dvb_ringbuffer.c
drivers/media/dvb/dvb-core/dvb_ringbuffer.h
drivers/media/dvb/dvb-core/dvbdev.c
drivers/media/dvb/dvb-core/dvbdev.h
drivers/media/dvb/dvb-usb/Kconfig
drivers/media/dvb/dvb-usb/a800.c
drivers/media/dvb/dvb-usb/af9005.c
drivers/media/dvb/dvb-usb/au6610.c
drivers/media/dvb/dvb-usb/cxusb.c
drivers/media/dvb/dvb-usb/dib0700.h
drivers/media/dvb/dvb-usb/dib0700_core.c
drivers/media/dvb/dvb-usb/dib0700_devices.c
drivers/media/dvb/dvb-usb/dibusb-mb.c
drivers/media/dvb/dvb-usb/dibusb-mc.c
drivers/media/dvb/dvb-usb/digitv.c
drivers/media/dvb/dvb-usb/dtt200u.c
drivers/media/dvb/dvb-usb/dvb-usb-common.h
drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
drivers/media/dvb/dvb-usb/dvb-usb-ids.h
drivers/media/dvb/dvb-usb/dvb-usb-init.c
drivers/media/dvb/dvb-usb/dvb-usb.h
drivers/media/dvb/dvb-usb/gl861.c
drivers/media/dvb/dvb-usb/gp8psk-fe.c
drivers/media/dvb/dvb-usb/gp8psk.c
drivers/media/dvb/dvb-usb/m920x.c
drivers/media/dvb/dvb-usb/nova-t-usb2.c
drivers/media/dvb/dvb-usb/opera1.c
drivers/media/dvb/dvb-usb/ttusb2.c
drivers/media/dvb/dvb-usb/umt-010.c
drivers/media/dvb/dvb-usb/vp702x-fe.c
drivers/media/dvb/dvb-usb/vp702x.c
drivers/media/dvb/dvb-usb/vp7045.c
drivers/media/dvb/frontends/Kconfig
drivers/media/dvb/frontends/Makefile
drivers/media/dvb/frontends/au8522.c [new file with mode: 0644]
drivers/media/dvb/frontends/au8522.h [new file with mode: 0644]
drivers/media/dvb/frontends/bcm3510.c
drivers/media/dvb/frontends/bcm3510.h
drivers/media/dvb/frontends/bsbe1.h
drivers/media/dvb/frontends/bsru6.h
drivers/media/dvb/frontends/cx22700.c
drivers/media/dvb/frontends/cx22700.h
drivers/media/dvb/frontends/cx22702.c
drivers/media/dvb/frontends/cx22702.h
drivers/media/dvb/frontends/cx24110.c
drivers/media/dvb/frontends/cx24110.h
drivers/media/dvb/frontends/cx24113.h [new file with mode: 0644]
drivers/media/dvb/frontends/cx24123.c
drivers/media/dvb/frontends/cx24123.h
drivers/media/dvb/frontends/dib3000.h
drivers/media/dvb/frontends/dib3000mc.h
drivers/media/dvb/frontends/dib7000p.c
drivers/media/dvb/frontends/dib7000p.h
drivers/media/dvb/frontends/dvb-pll.c
drivers/media/dvb/frontends/dvb-pll.h
drivers/media/dvb/frontends/isl6405.c [new file with mode: 0644]
drivers/media/dvb/frontends/isl6405.h [new file with mode: 0644]
drivers/media/dvb/frontends/isl6421.h
drivers/media/dvb/frontends/itd1000.c [new file with mode: 0644]
drivers/media/dvb/frontends/itd1000.h [new file with mode: 0644]
drivers/media/dvb/frontends/itd1000_priv.h [new file with mode: 0644]
drivers/media/dvb/frontends/l64781.c
drivers/media/dvb/frontends/l64781.h
drivers/media/dvb/frontends/lgdt330x.c
drivers/media/dvb/frontends/lgdt330x.h
drivers/media/dvb/frontends/lnbp21.h
drivers/media/dvb/frontends/mt2060.h
drivers/media/dvb/frontends/mt2131.c
drivers/media/dvb/frontends/mt2131.h
drivers/media/dvb/frontends/mt2266.h
drivers/media/dvb/frontends/mt312.c
drivers/media/dvb/frontends/mt312.h
drivers/media/dvb/frontends/mt312_priv.h
drivers/media/dvb/frontends/mt352.c
drivers/media/dvb/frontends/mt352.h
drivers/media/dvb/frontends/nxt200x.c
drivers/media/dvb/frontends/nxt200x.h
drivers/media/dvb/frontends/nxt6000.c
drivers/media/dvb/frontends/nxt6000.h
drivers/media/dvb/frontends/or51132.c
drivers/media/dvb/frontends/or51132.h
drivers/media/dvb/frontends/or51211.c
drivers/media/dvb/frontends/or51211.h
drivers/media/dvb/frontends/qt1010.h
drivers/media/dvb/frontends/s5h1409.c
drivers/media/dvb/frontends/s5h1409.h
drivers/media/dvb/frontends/s5h1420.c
drivers/media/dvb/frontends/s5h1420.h
drivers/media/dvb/frontends/s5h1420_priv.h [new file with mode: 0644]
drivers/media/dvb/frontends/sp8870.c
drivers/media/dvb/frontends/sp8870.h
drivers/media/dvb/frontends/sp887x.c
drivers/media/dvb/frontends/sp887x.h
drivers/media/dvb/frontends/stv0297.c
drivers/media/dvb/frontends/stv0297.h
drivers/media/dvb/frontends/stv0299.c
drivers/media/dvb/frontends/stv0299.h
drivers/media/dvb/frontends/tda10021.c
drivers/media/dvb/frontends/tda10023.c
drivers/media/dvb/frontends/tda1002x.h
drivers/media/dvb/frontends/tda10048.c [new file with mode: 0644]
drivers/media/dvb/frontends/tda10048.h [new file with mode: 0644]
drivers/media/dvb/frontends/tda1004x.c
drivers/media/dvb/frontends/tda1004x.h
drivers/media/dvb/frontends/tda10086.c
drivers/media/dvb/frontends/tda10086.h
drivers/media/dvb/frontends/tda18271-common.c
drivers/media/dvb/frontends/tda18271-fe.c
drivers/media/dvb/frontends/tda18271-priv.h
drivers/media/dvb/frontends/tda18271-tables.c
drivers/media/dvb/frontends/tda18271.h
drivers/media/dvb/frontends/tda8083.c
drivers/media/dvb/frontends/tda8083.h
drivers/media/dvb/frontends/tda826x.c
drivers/media/dvb/frontends/tda826x.h
drivers/media/dvb/frontends/tda827x.c
drivers/media/dvb/frontends/tda827x.h
drivers/media/dvb/frontends/tua6100.c
drivers/media/dvb/frontends/tua6100.h
drivers/media/dvb/frontends/ves1820.c
drivers/media/dvb/frontends/ves1820.h
drivers/media/dvb/frontends/ves1x93.c
drivers/media/dvb/frontends/ves1x93.h
drivers/media/dvb/frontends/xc5000.c
drivers/media/dvb/frontends/xc5000.h
drivers/media/dvb/frontends/zl10353.c
drivers/media/dvb/frontends/zl10353.h
drivers/media/dvb/pluto2/pluto2.c
drivers/media/dvb/ttpci/av7110.c
drivers/media/dvb/ttpci/av7110.h
drivers/media/dvb/ttpci/av7110_hw.c
drivers/media/dvb/ttpci/av7110_ir.c
drivers/media/dvb/ttpci/av7110_v4l.c
drivers/media/dvb/ttpci/budget-av.c
drivers/media/dvb/ttpci/budget-ci.c
drivers/media/dvb/ttpci/budget-core.c
drivers/media/dvb/ttpci/budget.c
drivers/media/dvb/ttpci/budget.h
drivers/media/dvb/ttpci/ttpci-eeprom.c
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
drivers/media/dvb/ttusb-dec/ttusb_dec.c
drivers/media/dvb/ttusb-dec/ttusbdecfe.c
drivers/media/radio/dsbr100.c
drivers/media/radio/miropcm20-radio.c
drivers/media/radio/miropcm20-rds.c
drivers/media/radio/radio-aimslab.c
drivers/media/radio/radio-aztech.c
drivers/media/radio/radio-cadet.c
drivers/media/radio/radio-gemtek-pci.c
drivers/media/radio/radio-gemtek.c
drivers/media/radio/radio-maestro.c
drivers/media/radio/radio-maxiradio.c
drivers/media/radio/radio-rtrack2.c
drivers/media/radio/radio-sf16fmi.c
drivers/media/radio/radio-sf16fmr2.c
drivers/media/radio/radio-si470x.c
drivers/media/radio/radio-terratec.c
drivers/media/radio/radio-trust.c
drivers/media/radio/radio-typhoon.c
drivers/media/radio/radio-zoltrix.c
drivers/media/video/Kconfig
drivers/media/video/Makefile
drivers/media/video/adv7170.c
drivers/media/video/adv7175.c
drivers/media/video/arv.c
drivers/media/video/au0828/Kconfig [new file with mode: 0644]
drivers/media/video/au0828/Makefile [new file with mode: 0644]
drivers/media/video/au0828/au0828-cards.c [new file with mode: 0644]
drivers/media/video/au0828/au0828-cards.h [new file with mode: 0644]
drivers/media/video/au0828/au0828-core.c [new file with mode: 0644]
drivers/media/video/au0828/au0828-dvb.c [new file with mode: 0644]
drivers/media/video/au0828/au0828-i2c.c [new file with mode: 0644]
drivers/media/video/au0828/au0828-reg.h [new file with mode: 0644]
drivers/media/video/au0828/au0828.h [new file with mode: 0644]
drivers/media/video/bt819.c
drivers/media/video/bt856.c
drivers/media/video/bt8xx/bttv-cards.c
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/bt8xx/bttv-input.c
drivers/media/video/bt8xx/bttv-vbi.c
drivers/media/video/bt8xx/bttv.h
drivers/media/video/bt8xx/bttvp.h
drivers/media/video/bw-qcam.c
drivers/media/video/c-qcam.c
drivers/media/video/cafe_ccic.c
drivers/media/video/cpia.c
drivers/media/video/cpia.h
drivers/media/video/cpia2/cpia2_core.c
drivers/media/video/cpia2/cpia2_usb.c
drivers/media/video/cpia2/cpia2_v4l.c
drivers/media/video/cpia_usb.c
drivers/media/video/cx23885/Kconfig
drivers/media/video/cx23885/Makefile
drivers/media/video/cx23885/cx23885-417.c [new file with mode: 0644]
drivers/media/video/cx23885/cx23885-cards.c
drivers/media/video/cx23885/cx23885-core.c
drivers/media/video/cx23885/cx23885-dvb.c
drivers/media/video/cx23885/cx23885-i2c.c
drivers/media/video/cx23885/cx23885-video.c
drivers/media/video/cx23885/cx23885.h
drivers/media/video/cx25840/cx25840-core.c
drivers/media/video/cx25840/cx25840-core.h
drivers/media/video/cx25840/cx25840-firmware.c
drivers/media/video/cx25840/cx25840-vbi.c
drivers/media/video/cx88/Kconfig
drivers/media/video/cx88/cx88-alsa.c
drivers/media/video/cx88/cx88-blackbird.c
drivers/media/video/cx88/cx88-cards.c
drivers/media/video/cx88/cx88-core.c
drivers/media/video/cx88/cx88-dvb.c
drivers/media/video/cx88/cx88-i2c.c
drivers/media/video/cx88/cx88-input.c
drivers/media/video/cx88/cx88-mpeg.c
drivers/media/video/cx88/cx88-tvaudio.c
drivers/media/video/cx88/cx88-vbi.c
drivers/media/video/cx88/cx88-video.c
drivers/media/video/cx88/cx88.h
drivers/media/video/dabfirmware.h
drivers/media/video/dabusb.c
drivers/media/video/dpc7146.c
drivers/media/video/em28xx/Kconfig
drivers/media/video/em28xx/Makefile
drivers/media/video/em28xx/em28xx-audio.c
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/em28xx/em28xx-core.c
drivers/media/video/em28xx/em28xx-dvb.c [new file with mode: 0644]
drivers/media/video/em28xx/em28xx-i2c.c
drivers/media/video/em28xx/em28xx-input.c
drivers/media/video/em28xx/em28xx-reg.h [new file with mode: 0644]
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/em28xx/em28xx.h
drivers/media/video/et61x251/et61x251.h
drivers/media/video/et61x251/et61x251_core.c
drivers/media/video/hexium_gemini.c
drivers/media/video/hexium_orion.c
drivers/media/video/ir-kbd-i2c.c
drivers/media/video/ivtv/Kconfig
drivers/media/video/ivtv/ivtv-cards.c
drivers/media/video/ivtv/ivtv-cards.h
drivers/media/video/ivtv/ivtv-driver.c
drivers/media/video/ivtv/ivtv-driver.h
drivers/media/video/ivtv/ivtv-fileops.c
drivers/media/video/ivtv/ivtv-i2c.c
drivers/media/video/ivtv/ivtv-ioctl.c
drivers/media/video/ivtv/ivtv-irq.c
drivers/media/video/ivtv/ivtv-mailbox.c
drivers/media/video/ivtv/ivtv-queue.c
drivers/media/video/ivtv/ivtv-streams.c
drivers/media/video/ivtv/ivtv-yuv.c
drivers/media/video/meye.c
drivers/media/video/msp3400-driver.c
drivers/media/video/msp3400-kthreads.c
drivers/media/video/mt20xx.c
drivers/media/video/mt20xx.h
drivers/media/video/mt9m001.c [new file with mode: 0644]
drivers/media/video/mt9v022.c [new file with mode: 0644]
drivers/media/video/mxb.c
drivers/media/video/ov511.c
drivers/media/video/ov511.h
drivers/media/video/ovcamchip/ovcamchip_priv.h
drivers/media/video/pms.c
drivers/media/video/pvrusb2/Kconfig
drivers/media/video/pvrusb2/Makefile
drivers/media/video/pvrusb2/pvrusb2-context.c
drivers/media/video/pvrusb2/pvrusb2-context.h
drivers/media/video/pvrusb2/pvrusb2-ctrl.c
drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
drivers/media/video/pvrusb2/pvrusb2-debug.h
drivers/media/video/pvrusb2/pvrusb2-debugifc.c
drivers/media/video/pvrusb2/pvrusb2-devattr.c
drivers/media/video/pvrusb2/pvrusb2-devattr.h
drivers/media/video/pvrusb2/pvrusb2-dvb.c [new file with mode: 0644]
drivers/media/video/pvrusb2/pvrusb2-dvb.h [new file with mode: 0644]
drivers/media/video/pvrusb2/pvrusb2-encoder.c
drivers/media/video/pvrusb2/pvrusb2-fx2-cmd.h
drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
drivers/media/video/pvrusb2/pvrusb2-hdw.c
drivers/media/video/pvrusb2/pvrusb2-hdw.h
drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
drivers/media/video/pvrusb2/pvrusb2-io.c
drivers/media/video/pvrusb2/pvrusb2-io.h
drivers/media/video/pvrusb2/pvrusb2-main.c
drivers/media/video/pvrusb2/pvrusb2-std.c
drivers/media/video/pvrusb2/pvrusb2-sysfs.c
drivers/media/video/pvrusb2/pvrusb2-v4l2.c
drivers/media/video/pwc/pwc-if.c
drivers/media/video/pwc/pwc-v4l.c
drivers/media/video/pxa_camera.c [new file with mode: 0644]
drivers/media/video/saa5249.c
drivers/media/video/saa6588.c
drivers/media/video/saa7110.c
drivers/media/video/saa7111.c
drivers/media/video/saa7114.c
drivers/media/video/saa7115.c
drivers/media/video/saa711x.c
drivers/media/video/saa7134/Kconfig
drivers/media/video/saa7134/saa7134-alsa.c
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134-dvb.c
drivers/media/video/saa7134/saa7134-empress.c
drivers/media/video/saa7134/saa7134-i2c.c
drivers/media/video/saa7134/saa7134-input.c
drivers/media/video/saa7134/saa7134-reg.h
drivers/media/video/saa7134/saa7134-ts.c
drivers/media/video/saa7134/saa7134-tvaudio.c
drivers/media/video/saa7134/saa7134-vbi.c
drivers/media/video/saa7134/saa7134-video.c
drivers/media/video/saa7134/saa7134.h
drivers/media/video/saa717x.c [new file with mode: 0644]
drivers/media/video/saa7185.c
drivers/media/video/se401.c
drivers/media/video/sn9c102/sn9c102.h
drivers/media/video/sn9c102/sn9c102_core.c
drivers/media/video/sn9c102/sn9c102_sensor.h
drivers/media/video/soc_camera.c [new file with mode: 0644]
drivers/media/video/stk-webcam.c
drivers/media/video/stradis.c
drivers/media/video/stv680.c
drivers/media/video/tcm825x.c
drivers/media/video/tda8290.c
drivers/media/video/tda8290.h
drivers/media/video/tda9840.c
drivers/media/video/tda9887.c
drivers/media/video/tda9887.h
drivers/media/video/tea5761.c
drivers/media/video/tea5761.h
drivers/media/video/tea5767.c
drivers/media/video/tea5767.h
drivers/media/video/tea6415c.c
drivers/media/video/tea6420.c
drivers/media/video/tuner-core.c
drivers/media/video/tuner-i2c.h
drivers/media/video/tuner-simple.c
drivers/media/video/tuner-simple.h
drivers/media/video/tuner-types.c
drivers/media/video/tuner-xc2028-types.h
drivers/media/video/tuner-xc2028.c
drivers/media/video/tuner-xc2028.h
drivers/media/video/tvaudio.c
drivers/media/video/tveeprom.c
drivers/media/video/tvp5150.c
drivers/media/video/usbvideo/ibmcam.c
drivers/media/video/usbvideo/konicawc.c
drivers/media/video/usbvideo/quickcam_messenger.c
drivers/media/video/usbvideo/ultracam.c
drivers/media/video/usbvideo/usbvideo.c
drivers/media/video/usbvideo/vicam.c
drivers/media/video/usbvision/usbvision-core.c
drivers/media/video/usbvision/usbvision-i2c.c
drivers/media/video/usbvision/usbvision-video.c
drivers/media/video/v4l1-compat.c
drivers/media/video/videobuf-core.c
drivers/media/video/videobuf-dma-sg.c
drivers/media/video/videobuf-dvb.c
drivers/media/video/videobuf-vmalloc.c
drivers/media/video/videocodec.c
drivers/media/video/videodev.c
drivers/media/video/vino.c
drivers/media/video/vivi.c
drivers/media/video/vpx3220.c
drivers/media/video/w9966.c
drivers/media/video/w9968cf.c
drivers/media/video/w9968cf.h
drivers/media/video/zc0301/zc0301.h
drivers/media/video/zc0301/zc0301_core.c
drivers/media/video/zoran.h
drivers/media/video/zoran_card.c
drivers/media/video/zoran_card.h
drivers/media/video/zoran_device.c
drivers/media/video/zoran_driver.c
drivers/media/video/zr36016.c
drivers/media/video/zr36050.c
drivers/media/video/zr36060.c
drivers/media/video/zr364xx.c
include/linux/dvb/dmx.h
include/linux/i2c-id.h
include/linux/meye.h
include/linux/videodev2.h
include/media/ir-common.h
include/media/soc_camera.h [new file with mode: 0644]
include/media/tuner-types.h
include/media/tuner.h
include/media/v4l2-chip-ident.h
include/media/v4l2-dev.h
include/media/videobuf-core.h
include/media/videobuf-dma-sg.h
include/media/videobuf-dvb.h
include/media/videobuf-vmalloc.h

diff --git a/Documentation/video4linux/CARDLIST.au0828 b/Documentation/video4linux/CARDLIST.au0828
new file mode 100644 (file)
index 0000000..aaae360
--- /dev/null
@@ -0,0 +1,4 @@
+  0 -> Unknown board                            (au0828)
+  1 -> Hauppauge HVR950Q                        (au0828)        [2040:7200]
+  2 -> Hauppauge HVR850                         (au0828)        [2040:7240]
+  3 -> DViCO FusionHDTV USB                     (au0828)        [0fe9:d620]
index d97cf7cc60889e637f2772023e752fda4d44c5a3..f32efb6fb12c5111de62f875ec8361af5152e091 100644 (file)
 147 -> VoodooTV 200 (USA)                                  [121a:3000]
 148 -> DViCO FusionHDTV 2                                  [dbc0:d200]
 149 -> Typhoon TV-Tuner PCI (50684)
+150 -> Geovision GV-600                                    [008a:763c]
+151 -> Kozumi KTV-01C
index 0924e6e142c40a2f7d6a5dec0ae107ff5d616d8c..929b90c8387fafc30ed3e0715171a504e257b0e7 100644 (file)
@@ -5,3 +5,6 @@
   4 -> DViCO FusionHDTV5 Express                           [18ac:d500]
   5 -> Hauppauge WinTV-HVR1500Q                            [0070:7790,0070:7797]
   6 -> Hauppauge WinTV-HVR1500                             [0070:7710,0070:7717]
+  7 -> Hauppauge WinTV-HVR1200                             [0070:71d1]
+  8 -> Hauppauge WinTV-HVR1700                             [0070:8101]
+  9 -> Hauppauge WinTV-HVR1400                             [0070:8010]
index bc5593bd9704dc8497d6d69d01642938bb20f5b9..5439573464693ca9c3ac29ba9d10b0dd27a2fdf9 100644 (file)
  56 -> Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder   [0070:9600,0070:9601,0070:9602]
  57 -> ADS Tech Instant Video PCI                          [1421:0390]
  58 -> Pinnacle PCTV HD 800i                               [11bd:0051]
+ 59 -> DViCO FusionHDTV 5 PCI nano                         [18ac:d530]
+ 60 -> Pinnacle Hybrid PCTV                                [12ab:1788]
+ 61 -> Winfast TV2000 XP Global                            [107d:6f18]
+ 62 -> PowerColor Real Angel 330                           [14f1:ea3d]
+ 63 -> Geniatech X8000-MT DVBT                             [14f1:8852]
+ 64 -> DViCO FusionHDTV DVB-T PRO                          [18ac:db30]
+ 65 -> DViCO FusionHDTV 7 Gold                             [18ac:d610]
+ 66 -> Prolink Pixelview MPEG 8000GT                       [1554:4935]
+ 67 -> Kworld PlusTV HD PCI 120 (ATSC 120)                 [17de:08c1]
index 0424901ebc78b0a11f700a21d926e1b4b3fe4d2f..44d84dd15ad672d55b4a93db652f34d74cb3a664 100644 (file)
@@ -25,8 +25,8 @@
  24 -> KNC One TV-Station DVR                   [1894:a006]
  25 -> ASUS TV-FM 7133                          [1043:4843]
  26 -> Pinnacle PCTV Stereo (saa7134)           [11bd:002b]
- 27 -> Manli MuchTV M-TV002/Behold TV 403 FM
- 28 -> Manli MuchTV M-TV001/Behold TV 401
+ 27 -> Manli MuchTV M-TV002
+ 28 -> Manli MuchTV M-TV001
  29 -> Nagase Sangyo TransGear 3000TV           [1461:050c]
  30 -> Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM)  [1019:4cb4]
  31 -> Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM) [1019:4cb5]
 130 -> Beholder BeholdTV M6 / BeholdTV M6 Extra [5ace:6190,5ace:6193]
 131 -> Twinhan Hybrid DTV-DVB 3056 PCI          [1822:0022]
 132 -> Genius TVGO AM11MCE
+133 -> NXP Snake DVB-S reference design
+134 -> Medion/Creatix CTX953 Hybrid             [16be:0010]
+135 -> MSI TV@nywhere A/D v1.1                  [1462:8625]
+136 -> AVerMedia Cardbus TV/Radio (E506R)       [1461:f436]
+137 -> AVerMedia Hybrid TV/Radio (A16D)         [1461:f936]
+138 -> Avermedia M115                           [1461:a836]
+139 -> Compro VideoMate T750                    [185b:c900]
+140 -> Avermedia DVB-S Pro A700                 [1461:a7a1]
+141 -> Avermedia DVB-S Hybrid+FM A700           [1461:a7a2]
index cced8ac5c543b462c7cbc329c5ddac921bb05774..2cb816047fc128bb67323c00ffcd982fe5d174fc 100644 (file)
@@ -686,11 +686,11 @@ sub main_firmware($$$$)
        write_hunk(812664, 192);
 
        #
-       # Firmware 58, type: SCODE FW  HAS IF (0x60000000), IF = 4.50 MHz id: NTSC/M Jp (0000000000002000), size: 192
+       # Firmware 58, type: SCODE FW  MTS LCD NOGD MONO IF HAS IF (0x6002b004), IF = 4.50 MHz id: NTSC PAL/M PAL/N (000000000000b700), size: 192
        #
 
-       write_le32(0x60000000);                 # Type
-       write_le64(0x00000000, 0x00002000);     # ID
+       write_le32(0x6002b004);                 # Type
+       write_le64(0x00000000, 0x0000b700);     # ID
        write_le16(4500);                       # IF
        write_le32(192);                        # Size
        write_hunk(807672, 192);
@@ -706,10 +706,10 @@ sub main_firmware($$$$)
        write_hunk(807864, 192);
 
        #
-       # Firmware 60, type: SCODE FW  DTV78 ZARLINK456 HAS IF (0x62000100), IF = 4.76 MHz id: (0000000000000000), size: 192
+       # Firmware 60, type: SCODE FW  DTV6 QAM DTV7 DTV78 DTV8 ZARLINK456 HAS IF (0x620003e0), IF = 4.76 MHz id: (0000000000000000), size: 192
        #
 
-       write_le32(0x62000100);                 # Type
+       write_le32(0x620003e0);                 # Type
        write_le64(0x00000000, 0x00000000);     # ID
        write_le16(4760);                       # IF
        write_le32(192);                        # Size
@@ -726,30 +726,30 @@ sub main_firmware($$$$)
        write_hunk(811512, 192);
 
        #
-       # Firmware 62, type: SCODE FW  DTV7 ZARLINK456 HAS IF (0x62000080), IF = 5.26 MHz id: (0000000000000000), size: 192
+       # Firmware 62, type: SCODE FW  HAS IF (0x60000000), IF = 5.26 MHz id: (0000000000000000), size: 192
        #
 
-       write_le32(0x62000080);                 # Type
+       write_le32(0x60000000);                 # Type
        write_le64(0x00000000, 0x00000000);     # ID
        write_le16(5260);                       # IF
        write_le32(192);                        # Size
        write_hunk(810552, 192);
 
        #
-       # Firmware 63, type: SCODE FW  MONO HAS IF (0x60008000), IF = 5.32 MHz id: PAL/BG NICAM/B (0000000800000007), size: 192
+       # Firmware 63, type: SCODE FW  MONO HAS IF (0x60008000), IF = 5.32 MHz id: PAL/BG A2 NICAM (0000000f00000007), size: 192
        #
 
        write_le32(0x60008000);                 # Type
-       write_le64(0x00000008, 0x00000007);     # ID
+       write_le64(0x0000000f, 0x00000007);     # ID
        write_le16(5320);                       # IF
        write_le32(192);                        # Size
        write_hunk(810744, 192);
 
        #
-       # Firmware 64, type: SCODE FW  DTV8 CHINA HAS IF (0x64000200), IF = 5.40 MHz id: (0000000000000000), size: 192
+       # Firmware 64, type: SCODE FW  DTV7 DTV78 DTV8 DIBCOM52 CHINA HAS IF (0x65000380), IF = 5.40 MHz id: (0000000000000000), size: 192
        #
 
-       write_le32(0x64000200);                 # Type
+       write_le32(0x65000380);                 # Type
        write_le64(0x00000000, 0x00000000);     # ID
        write_le16(5400);                       # IF
        write_le32(192);                        # Size
@@ -766,50 +766,50 @@ sub main_firmware($$$$)
        write_hunk(809592, 192);
 
        #
-       # Firmware 66, type: SCODE FW  HAS IF (0x60000000), IF = 5.64 MHz id: PAL/BG A2/B (0000000200000007), size: 192
+       # Firmware 66, type: SCODE FW  HAS IF (0x60000000), IF = 5.64 MHz id: PAL/BG A2 (0000000300000007), size: 192
        #
 
        write_le32(0x60000000);                 # Type
-       write_le64(0x00000002, 0x00000007);     # ID
+       write_le64(0x00000003, 0x00000007);     # ID
        write_le16(5640);                       # IF
        write_le32(192);                        # Size
        write_hunk(808440, 192);
 
        #
-       # Firmware 67, type: SCODE FW  HAS IF (0x60000000), IF = 5.74 MHz id: PAL/BG NICAM/B (0000000800000007), size: 192
+       # Firmware 67, type: SCODE FW  HAS IF (0x60000000), IF = 5.74 MHz id: PAL/BG NICAM (0000000c00000007), size: 192
        #
 
        write_le32(0x60000000);                 # Type
-       write_le64(0x00000008, 0x00000007);     # ID
+       write_le64(0x0000000c, 0x00000007);     # ID
        write_le16(5740);                       # IF
        write_le32(192);                        # Size
        write_hunk(808632, 192);
 
        #
-       # Firmware 68, type: SCODE FW  DTV7 DIBCOM52 HAS IF (0x61000080), IF = 5.90 MHz id: (0000000000000000), size: 192
+       # Firmware 68, type: SCODE FW  HAS IF (0x60000000), IF = 5.90 MHz id: (0000000000000000), size: 192
        #
 
-       write_le32(0x61000080);                 # Type
+       write_le32(0x60000000);                 # Type
        write_le64(0x00000000, 0x00000000);     # ID
        write_le16(5900);                       # IF
        write_le32(192);                        # Size
        write_hunk(810360, 192);
 
        #
-       # Firmware 69, type: SCODE FW  MONO HAS IF (0x60008000), IF = 6.00 MHz id: PAL/I (0000000000000010), size: 192
+       # Firmware 69, type: SCODE FW  MONO HAS IF (0x60008000), IF = 6.00 MHz id: PAL/DK PAL/I SECAM/K3 SECAM/L SECAM/Lc NICAM (0000000c04c000f0), size: 192
        #
 
        write_le32(0x60008000);                 # Type
-       write_le64(0x00000000, 0x00000010);     # ID
+       write_le64(0x0000000c, 0x04c000f0);     # ID
        write_le16(6000);                       # IF
        write_le32(192);                        # Size
        write_hunk(808824, 192);
 
        #
-       # Firmware 70, type: SCODE FW  DTV6 QAM F6MHZ HAS IF (0x68000060), IF = 6.20 MHz id: (0000000000000000), size: 192
+       # Firmware 70, type: SCODE FW  DTV6 QAM ATSC LG60 F6MHZ HAS IF (0x68050060), IF = 6.20 MHz id: (0000000000000000), size: 192
        #
 
-       write_le32(0x68000060);                 # Type
+       write_le32(0x68050060);                 # Type
        write_le64(0x00000000, 0x00000000);     # ID
        write_le16(6200);                       # IF
        write_le32(192);                        # Size
@@ -846,11 +846,11 @@ sub main_firmware($$$$)
        write_hunk(809208, 192);
 
        #
-       # Firmware 74, type: SCODE FW  MONO HAS IF (0x60008000), IF = 6.50 MHz id: SECAM/K3 (0000000004000000), size: 192
+       # Firmware 74, type: SCODE FW  MONO HAS IF (0x60008000), IF = 6.50 MHz id: PAL/DK SECAM/K3 SECAM/L NICAM (0000000c044000e0), size: 192
        #
 
        write_le32(0x60008000);                 # Type
-       write_le64(0x00000000, 0x04000000);     # ID
+       write_le64(0x0000000c, 0x044000e0);     # ID
        write_le16(6500);                       # IF
        write_le32(192);                        # Size
        write_hunk(811128, 192);
index 11950698a2e7529611080fcd83c475b1ccf9511e..128bb9cd5755f57f7a8cab9895149edcb39680aa 100644 (file)
@@ -30,7 +30,7 @@ config VIDEO_V4L2_COMMON
        depends on (I2C || I2C=n) && VIDEO_DEV
        default (I2C || I2C=n) && VIDEO_DEV
 
-config VIDEO_V4L1
+config VIDEO_ALLOW_V4L1
        bool "Enable Video For Linux API 1 (DEPRECATED)"
        depends on VIDEO_DEV && VIDEO_V4L2_COMMON
        default VIDEO_DEV && VIDEO_V4L2_COMMON
@@ -59,10 +59,15 @@ config VIDEO_V4L1_COMPAT
          If you are unsure as to whether this is required, answer Y.
 
 config VIDEO_V4L2
-       bool
+       tristate
        depends on VIDEO_DEV && VIDEO_V4L2_COMMON
        default VIDEO_DEV && VIDEO_V4L2_COMMON
 
+config VIDEO_V4L1
+       tristate
+       depends on VIDEO_DEV && VIDEO_V4L2_COMMON && VIDEO_ALLOW_V4L1
+       default VIDEO_DEV && VIDEO_V4L2_COMMON && VIDEO_ALLOW_V4L1
+
 source "drivers/media/video/Kconfig"
 
 source "drivers/media/radio/Kconfig"
@@ -155,7 +160,7 @@ config VIDEOBUF_GEN
        tristate
 
 config VIDEOBUF_DMA_SG
-       depends on PCI
+       depends on HAS_DMA
        select VIDEOBUF_GEN
        tristate
 
index bb2a027b94837d40740503ad50a94dbb71dc2b74..2665052079258c6d015cc42f7109bfd1d11f6b8c 100644 (file)
@@ -34,7 +34,7 @@ static int repeat = 1;
 module_param(repeat, int, 0444);
 MODULE_PARM_DESC(repeat,"auto-repeat for IR keys (default: on)");
 
-static int debug = 0;    /* debug level (0,1,2) */
+static int debug;    /* debug level (0,1,2) */
 module_param(debug, int, 0644);
 
 #define dprintk(level, fmt, arg...)    if (debug >= level) \
index 2ab5a120470d98569a6f922afd08a463c446566a..a3485817e46c9e06b765bda262fdd9f8215b7168 100644 (file)
@@ -212,6 +212,51 @@ IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE] = {
 
 EXPORT_SYMBOL_GPL(ir_codes_pixelview);
 
+/*
+   Mauro Carvalho Chehab <mchehab@infradead.org>
+   present on PV MPEG 8000GT
+ */
+IR_KEYTAB_TYPE ir_codes_pixelview_new[IR_KEYTAB_SIZE] = {
+       [0x3c] = KEY_PAUSE,             /* Timeshift */
+       [0x12] = KEY_POWER,
+
+       [0x3d] = KEY_1,
+       [0x38] = KEY_2,
+       [0x18] = KEY_3,
+       [0x35] = KEY_4,
+       [0x39] = KEY_5,
+       [0x15] = KEY_6,
+       [0x36] = KEY_7,
+       [0x3a] = KEY_8,
+       [0x1e] = KEY_9,
+       [0x3e] = KEY_0,
+
+       [0x1c] = KEY_AGAIN,             /* LOOP */
+       [0x3f] = KEY_MEDIA,             /* Source */
+       [0x1f] = KEY_LAST,              /* +100 */
+       [0x1b] = KEY_MUTE,
+
+       [0x17] = KEY_CHANNELDOWN,
+       [0x16] = KEY_CHANNELUP,
+       [0x10] = KEY_VOLUMEUP,
+       [0x14] = KEY_VOLUMEDOWN,
+       [0x13] = KEY_ZOOM,
+
+       [0x19] = KEY_SHUFFLE,           /* SNAPSHOT */
+       [0x1a] = KEY_SEARCH,            /* scan */
+
+       [0x37] = KEY_REWIND,            /* << */
+       [0x32] = KEY_RECORD,            /* o (red) */
+       [0x33] = KEY_FORWARD,           /* >> */
+       [0x11] = KEY_STOP,              /* square */
+       [0x3b] = KEY_PLAY,              /* > */
+       [0x30] = KEY_PLAYPAUSE,         /* || */
+
+       [0x31] = KEY_TV,
+       [0x34] = KEY_RADIO,
+};
+EXPORT_SYMBOL_GPL(ir_codes_pixelview_new);
+
 IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE] = {
        [ 0x00 ] = KEY_0,
        [ 0x01 ] = KEY_1,
@@ -726,7 +771,11 @@ IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE] = {
        [ 0x12 ] = KEY_CHANNELUP,    // Channel +
        [ 0x13 ] = KEY_CHANNELDOWN,  // Channel -
        [ 0x06 ] = KEY_AGAIN,        // Recall
-       [ 0x10 ] = KEY_ENTER,      // Enter
+       [ 0x10 ] = KEY_ENTER,        // Enter
+
+       [ 0x19 ] = KEY_BACK,         // Rewind  ( <<< )
+       [ 0x1f ] = KEY_FORWARD,      // Forward ( >>> )
+       [ 0x0a ] = KEY_ANGLE,        // (no label, may be used as the PAUSE button)
 };
 
 EXPORT_SYMBOL_GPL(ir_codes_flyvideo);
@@ -1157,7 +1206,8 @@ EXPORT_SYMBOL_GPL(ir_codes_purpletv);
 
 /* Mapping for the 28 key remote control as seen at
    http://www.sednacomputer.com/photo/cardbus-tv.jpg
-   Pavel Mihaylov <bin@bash.info> */
+   Pavel Mihaylov <bin@bash.info>
+   Also for the remote bundled with Kozumi KTV-01C card */
 IR_KEYTAB_TYPE ir_codes_pctv_sedna[IR_KEYTAB_SIZE] = {
        [ 0x00 ] = KEY_0,
        [ 0x01 ] = KEY_1,
@@ -1188,6 +1238,11 @@ IR_KEYTAB_TYPE ir_codes_pctv_sedna[IR_KEYTAB_SIZE] = {
        [ 0x1c ] = KEY_RADIO,          /* FM Radio */
        [ 0x1d ] = KEY_RECORD,
        [ 0x1e ] = KEY_PAUSE,
+       /* additional codes for Kozumi's remote */
+       [0x14] = KEY_INFO,        /* OSD */
+       [0x16] = KEY_OK,          /* OK */
+       [0x17] = KEY_DIGITS,      /* Plus */
+       [0x1f] = KEY_PLAY,        /* Play */
 };
 
 EXPORT_SYMBOL_GPL(ir_codes_pctv_sedna);
@@ -1988,6 +2043,76 @@ IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE] = {
 
 EXPORT_SYMBOL_GPL(ir_codes_behold);
 
+/* Beholder Intl. Ltd. 2008
+ * Dmitry Belimov d.belimov@google.com
+ * Keytable is used by BeholdTV Columbus
+ * The "ascii-art picture" below (in comments, first row
+ * is the keycode in hex, and subsequent row(s) shows
+ * the button labels (several variants when appropriate)
+ * helps to descide which keycodes to assign to the buttons.
+ */
+IR_KEYTAB_TYPE ir_codes_behold_columbus[IR_KEYTAB_SIZE] = {
+
+       /*  0x13   0x11   0x1C   0x12  *
+        *  Mute  Source  TV/FM  Power *
+        *                             */
+
+       [0x13] = KEY_MUTE,
+       [0x11] = KEY_PROPS,
+       [0x1C] = KEY_TUNER,     /* KEY_TV/KEY_RADIO */
+       [0x12] = KEY_POWER,
+
+       /*  0x01    0x02    0x03  0x0D    *
+        *   1       2       3   Stereo   *
+        *                                *
+        *  0x04    0x05    0x06  0x19    *
+        *   4       5       6   Snapshot *
+        *                                *
+        *  0x07    0x08    0x09  0x10    *
+        *   7       8       9    Zoom    *
+        *                                */
+       [0x01] = KEY_1,
+       [0x02] = KEY_2,
+       [0x03] = KEY_3,
+       [0x0D] = KEY_SETUP,       /* Setup key */
+       [0x04] = KEY_4,
+       [0x05] = KEY_5,
+       [0x06] = KEY_6,
+       [0x19] = KEY_BOOKMARKS, /* Snapshot key */
+       [0x07] = KEY_7,
+       [0x08] = KEY_8,
+       [0x09] = KEY_9,
+       [0x10] = KEY_ZOOM,
+
+       /*  0x0A    0x00    0x0B       0x0C   *
+        * RECALL    0    ChannelUp  VolumeUp *
+        *                                    */
+       [0x0A] = KEY_AGAIN,
+       [0x00] = KEY_0,
+       [0x0B] = KEY_CHANNELUP,
+       [0x0C] = KEY_VOLUMEUP,
+
+       /*   0x1B      0x1D      0x15        0x18     *
+        * Timeshift  Record  ChannelDown  VolumeDown *
+        *                                            */
+
+       [0x1B] = KEY_REWIND,
+       [0x1D] = KEY_RECORD,
+       [0x15] = KEY_CHANNELDOWN,
+       [0x18] = KEY_VOLUMEDOWN,
+
+       /*   0x0E   0x1E     0x0F     0x1A  *
+        *   Stop   Pause  Previouse  Next  *
+        *                                  */
+
+       [0x0E] = KEY_STOP,
+       [0x1E] = KEY_PAUSE,
+       [0x0F] = KEY_PREVIOUS,
+       [0x1A] = KEY_NEXT,
+
+};
+EXPORT_SYMBOL_GPL(ir_codes_behold_columbus);
+
 /*
  * Remote control for the Genius TVGO A11MCE
  * Adrian Pardini <pardo.bsso@gmail.com>
@@ -2033,3 +2158,46 @@ IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE] = {
        [0x50] = KEY_BLUE,
 };
 EXPORT_SYMBOL_GPL(ir_codes_genius_tvgo_a11mce);
+
+/*
+ * Remote control for Powercolor Real Angel 330
+ * Daniel Fraga <fragabr@gmail.com>
+ */
+IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE] = {
+       [0x38] = KEY_SWITCHVIDEOMODE,   /* switch inputs */
+       [0x0c] = KEY_MEDIA,             /* Turn ON/OFF App */
+       [0x00] = KEY_0,
+       [0x01] = KEY_1,
+       [0x02] = KEY_2,
+       [0x03] = KEY_3,
+       [0x04] = KEY_4,
+       [0x05] = KEY_5,
+       [0x06] = KEY_6,
+       [0x07] = KEY_7,
+       [0x08] = KEY_8,
+       [0x09] = KEY_9,
+       [0x0a] = KEY_DIGITS,            /* single, double, tripple digit */
+       [0x29] = KEY_PREVIOUS,          /* previous channel */
+       [0x12] = KEY_BRIGHTNESSUP,
+       [0x13] = KEY_BRIGHTNESSDOWN,
+       [0x2b] = KEY_MODE,              /* stereo/mono */
+       [0x2c] = KEY_TEXT,              /* teletext */
+       [0x20] = KEY_UP,                /* channel up */
+       [0x21] = KEY_DOWN,              /* channel down */
+       [0x10] = KEY_RIGHT,             /* volume up */
+       [0x11] = KEY_LEFT,              /* volume down */
+       [0x0d] = KEY_MUTE,
+       [0x1f] = KEY_RECORD,
+       [0x17] = KEY_PLAY,
+       [0x16] = KEY_PAUSE,
+       [0x0b] = KEY_STOP,
+       [0x27] = KEY_FASTFORWARD,
+       [0x26] = KEY_REWIND,
+       [0x1e] = KEY_SEARCH,            /* autoscan */
+       [0x0e] = KEY_SHUFFLE,           /* snapshot */
+       [0x2d] = KEY_SETUP,
+       [0x0f] = KEY_SCREEN,            /* full screen */
+       [0x14] = KEY_RADIO,             /* FM radio */
+       [0x25] = KEY_POWER,             /* power */
+};
+EXPORT_SYMBOL_GPL(ir_codes_powercolor_real_angel);
index 7707b8c7394b17308c067b2813f6809e105c5072..89c7660b85d66cf4dc84c6da4baa9ba14461bd0e 100644 (file)
@@ -74,7 +74,7 @@ static inline int saa7146_wait_for_debi_done_sleep(struct saa7146_dev *dev,
                if (err) {
                        printk(KERN_ERR "%s: %s timed out while waiting for "
                                        "registers getting programmed\n",
-                                       dev->name, __FUNCTION__);
+                                       dev->name, __func__);
                        return -ETIMEDOUT;
                }
                msleep(1);
@@ -89,7 +89,7 @@ static inline int saa7146_wait_for_debi_done_sleep(struct saa7146_dev *dev,
                saa7146_read(dev, MC2);
                if (err) {
                        DEB_S(("%s: %s timed out while waiting for transfer "
-                               "completion\n", dev->name, __FUNCTION__));
+                               "completion\n", dev->name, __func__));
                        return -ETIMEDOUT;
                }
                msleep(1);
@@ -111,7 +111,7 @@ static inline int saa7146_wait_for_debi_done_busyloop(struct saa7146_dev *dev,
                if (!loops--) {
                        printk(KERN_ERR "%s: %s timed out while waiting for "
                                        "registers getting programmed\n",
-                                       dev->name, __FUNCTION__);
+                                       dev->name, __func__);
                        return -ETIMEDOUT;
                }
                udelay(1);
@@ -125,7 +125,7 @@ static inline int saa7146_wait_for_debi_done_busyloop(struct saa7146_dev *dev,
                saa7146_read(dev, MC2);
                if (!loops--) {
                        DEB_S(("%s: %s timed out while waiting for transfer "
-                               "completion\n", dev->name, __FUNCTION__));
+                               "completion\n", dev->name, __func__));
                        return -ETIMEDOUT;
                }
                udelay(5);
index 7e7689afae629c0a012979dc56a2dc6f30ade7d3..35b01ec40a5139d6e48b675338bd057360a0a79c 100644 (file)
@@ -203,7 +203,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
                                return -ERESTARTSYS;
 
                        printk(KERN_WARNING "%s %s [irq]: timed out waiting for end of xfer\n",
-                               dev->name, __FUNCTION__);
+                               dev->name, __func__);
                        return -EIO;
                }
                status = saa7146_read(dev, I2C_STATUS);
@@ -221,7 +221,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
                        }
                        if (time_after(jiffies,timeout)) {
                                printk(KERN_WARNING "%s %s: timed out waiting for MC2\n",
-                                       dev->name, __FUNCTION__);
+                                       dev->name, __func__);
                                return -EIO;
                        }
                }
@@ -238,7 +238,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
                                 * (no answer from nonexisistant device...)
                                 */
                                printk(KERN_WARNING "%s %s [poll]: timed out waiting for end of xfer\n",
-                                       dev->name, __FUNCTION__);
+                                       dev->name, __func__);
                                return -EIO;
                        }
                        if (++trial < 50 && short_delay)
index bfbd5a841ebf9f621642b60d1ca0324a650c6b84..74e2b56ecb5bb09b13135640872efb32445165b3 100644 (file)
@@ -407,8 +407,8 @@ static int vbi_open(struct saa7146_dev *dev, struct file *file)
        fh->vbi_fmt.start[1] = 312;
        fh->vbi_fmt.count[1] = 16;
 
-       videobuf_queue_pci_init(&fh->vbi_q, &vbi_qops,
-                           dev->pci, &dev->slock,
+       videobuf_queue_sg_init(&fh->vbi_q, &vbi_qops,
+                           &dev->pci->dev, &dev->slock,
                            V4L2_BUF_TYPE_VBI_CAPTURE,
                            V4L2_FIELD_SEQ_TB, // FIXME: does this really work?
                            sizeof(struct saa7146_buf),
index 66fdbd0e6a6ddfe5ad7f5a6a72045e574db95d56..3cbc6ebbe64939b5d7239dd40caa4b6ab38c58f0 100644 (file)
@@ -1410,8 +1410,8 @@ static int video_open(struct saa7146_dev *dev, struct file *file)
        sfmt = format_by_fourcc(dev,fh->video_fmt.pixelformat);
        fh->video_fmt.sizeimage = (fh->video_fmt.width * fh->video_fmt.height * sfmt->depth)/8;
 
-       videobuf_queue_pci_init(&fh->video_q, &video_qops,
-                           dev->pci, &dev->slock,
+       videobuf_queue_sg_init(&fh->video_q, &video_qops,
+                           &dev->pci->dev, &dev->slock,
                            V4L2_BUF_TYPE_VIDEO_CAPTURE,
                            V4L2_FIELD_INTERLACED,
                            sizeof(struct saa7146_buf),
index 3197aeb61d1f88181261e3db244b8531e64f9706..6ec5afba1ca7ee061779067f22b36ad352d43b96 100644 (file)
@@ -9,6 +9,11 @@ config DVB_B2C2_FLEXCOP
        select DVB_STV0297 if !DVB_FE_CUSTOMISE
        select DVB_BCM3510 if !DVB_FE_CUSTOMISE
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
+       select TUNER_SIMPLE if !DVB_FE_CUSTOMISE
+       select DVB_S5H1420 if !DVB_FE_CUSTOMISE
+       select DVB_TUNER_ITD1000 if !DVB_FE_CUSTOMISE
+       select DVB_ISL6421 if !DVB_FE_CUSTOMISE
+       select DVB_CX24123 if !DVB_FE_CUSTOMISE
        help
          Support for the digital TV receiver chip made by B2C2 Inc. included in
          Technisats PCI cards and USB boxes.
index e97ff60a1eff820c1c8df35d8d593c5d24240dfe..870e2848c2962418b343ef2ae4ae5fcc561c0a5d 100644 (file)
@@ -2,6 +2,7 @@ b2c2-flexcop-objs = flexcop.o flexcop-fe-tuner.o flexcop-i2c.o \
        flexcop-sram.o flexcop-eeprom.o flexcop-misc.o flexcop-hw-filter.o
 obj-$(CONFIG_DVB_B2C2_FLEXCOP) += b2c2-flexcop.o
 
+
 ifneq ($(CONFIG_DVB_B2C2_FLEXCOP_PCI),)
 b2c2-flexcop-objs += flexcop-dma.o
 endif
@@ -13,3 +14,4 @@ b2c2-flexcop-usb-objs = flexcop-usb.o
 obj-$(CONFIG_DVB_B2C2_FLEXCOP_USB) += b2c2-flexcop-usb.o
 
 EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
+EXTRA_CFLAGS += -Idrivers/media/video/
index 5a6c4fe249e7b5bd190c1a062e4f28320c022534..8ce06336e76f88372b83bc0297915b5c048238ca 100644 (file)
@@ -44,6 +44,14 @@ struct flexcop_dma {
        u32 size; /* size of each address in bytes */
 };
 
+struct flexcop_i2c_adapter {
+       struct flexcop_device *fc;
+       struct i2c_adapter i2c_adap;
+
+       u8 no_base_addr;
+       flexcop_i2c_port_t port;
+};
+
 /* Control structure for data definitions that are common to
  * the B2C2-based PCI and USB devices.
  */
@@ -72,7 +80,7 @@ struct flexcop_device {
        struct dmx_frontend mem_frontend;
        int (*fe_sleep) (struct dvb_frontend *);
 
-       struct i2c_adapter i2c_adap;
+       struct flexcop_i2c_adapter fc_i2c_adap[3];
        struct mutex i2c_mutex;
        struct module *owner;
 
@@ -87,7 +95,8 @@ struct flexcop_device {
        int               (*write_ibi_reg) (struct flexcop_device *, flexcop_ibi_register, flexcop_ibi_value);
 
 
-       int (*i2c_request) (struct flexcop_device*, flexcop_access_op_t, flexcop_i2c_port_t, u8 chipaddr, u8 addr, u8 *buf, u16 len);
+       int (*i2c_request) (struct flexcop_i2c_adapter*,
+               flexcop_access_op_t, u8 chipaddr, u8 addr, u8 *buf, u16 len);
        int (*stream_control) (struct flexcop_device*, int);
 
        int (*get_mac_addr) (struct flexcop_device *fc, int extended);
@@ -128,8 +137,8 @@ int flexcop_eeprom_check_mac_addr(struct flexcop_device *fc, int extended);
  * one. We have it in flexcop-i2c.c, because it is going via the actual
  * I2C-channel of the flexcop.
  */
-int flexcop_i2c_request(struct flexcop_device*, flexcop_access_op_t,
-                       flexcop_i2c_port_t, u8 chipaddr, u8 addr, u8 *buf, u16 len);
+int flexcop_i2c_request(struct flexcop_i2c_adapter*, flexcop_access_op_t,
+       u8 chipaddr, u8 addr, u8 *buf, u16 len);
 
 /* from flexcop-sram.c */
 int flexcop_sram_set_dest(struct flexcop_device *fc, flexcop_sram_dest_t dest, flexcop_sram_dest_target_t target);
index 6f592bc32d22ee136eb12fd0e4150af076370701..a91ed28f03a41d815f9edc2f32b7805535cf8ce1 100644 (file)
@@ -112,7 +112,7 @@ static int flexcop_dma_remap(struct flexcop_device *fc,
 {
        flexcop_ibi_register r = (dma_idx & FC_DMA_1) ? dma1_00c : dma2_01c;
        flexcop_ibi_value v = fc->read_ibi_reg(fc,r);
-       deb_info("%s\n",__FUNCTION__);
+       deb_info("%s\n",__func__);
        v.dma_0xc.remap_enable = onoff;
        fc->write_ibi_reg(fc,r,v);
        return 0;
@@ -162,7 +162,7 @@ int flexcop_dma_config_timer(struct flexcop_device *fc,
 
        flexcop_dma_remap(fc,dma_idx,0);
 
-       deb_info("%s\n",__FUNCTION__);
+       deb_info("%s\n",__func__);
        v.dma_0x4_write.dmatimer = cycles;
        fc->write_ibi_reg(fc,r,v);
        return 0;
index bbcf070a178ddd95ef0e33f8024c6a80958010ee..8a8ae8a3e6ba6954717739ef59487d8804698297 100644 (file)
@@ -114,15 +114,18 @@ static int flexcop_eeprom_request(struct flexcop_device *fc, flexcop_access_op_t
 {
        int i,ret = 0;
        u8 chipaddr =  0x50 | ((addr >> 8) & 3);
-       for (i = 0; i < retries; i++)
-               if ((ret = fc->i2c_request(fc,op,FC_I2C_PORT_EEPROM,chipaddr,addr & 0xff,buf,len)) == 0)
+       for (i = 0; i < retries; i++) {
+               ret = fc->i2c_request(&fc->fc_i2c_adap[1], op, chipaddr,
+                       addr & 0xff, buf, len);
+               if (ret == 0)
                        break;
+       }
        return ret;
 }
 
 static int flexcop_eeprom_lrc_read(struct flexcop_device *fc, u16 addr, u8 *buf, u16 len, int retries)
 {
-       int ret = flexcop_eeprom_request(fc,FC_READ,addr,buf,len,retries);
+       int ret = flexcop_eeprom_request(fc, FC_READ, addr, buf, len, retries);
        if (ret == 0)
                if (calc_lrc(buf, len - 1) != buf[len - 1])
                        ret = -EINVAL;
index 0378fd64659141ec73933149637552d71aacc0f8..7b0ea3bdfafbf9c1b00080a0e3a97a3478bce212 100644 (file)
@@ -5,6 +5,8 @@
  *
  * see flexcop.c for copyright information.
  */
+#include <media/tuner.h>
+
 #include "flexcop.h"
 
 #include "stv0299.h"
 #include "mt312.h"
 #include "lgdt330x.h"
 #include "dvb-pll.h"
+#include "tuner-simple.h"
+
+#include "s5h1420.h"
+#include "itd1000.h"
+
+#include "cx24123.h"
+#include "cx24113.h"
+
+#include "isl6421.h"
 
 /* lnb control */
 
@@ -180,13 +191,13 @@ static int samsung_tbmu24112_tuner_set_params(struct dvb_frontend* fe, struct dv
        buf[2] = 0x84;  /* 0xC4 */
        buf[3] = 0x08;
 
-       if (params->frequency < 1500000) buf[3] |= 0x10;
+       if (params->frequency < 1500000)
+               buf[3] |= 0x10;
 
        if (fe->ops.i2c_gate_ctrl)
                fe->ops.i2c_gate_ctrl(fe, 1);
-       if (i2c_transfer(&fc->i2c_adap, &msg, 1) != 1) {
+       if (i2c_transfer(&fc->fc_i2c_adap[0].i2c_adap, &msg, 1) != 1)
                return -EIO;
-       }
        return 0;
 }
 
@@ -241,7 +252,7 @@ static struct stv0299_config samsung_tbmu24112_config = {
        .mclk = 88000000UL,
        .invert = 0,
        .skip_reinit = 0,
-       .lock_output = STV0229_LOCKOUTPUT_LK,
+       .lock_output = STV0299_LOCKOUTPUT_LK,
        .volt13_op0_op1 = STV0299_VOLT13_OP1,
        .min_delay_ms = 100,
        .set_symbol_rate = samsung_tbmu24112_set_symbol_rate,
@@ -337,7 +348,7 @@ static int skystar23_samsung_tbdu18132_tuner_set_params(struct dvb_frontend* fe,
 
        if (fe->ops.i2c_gate_ctrl)
                fe->ops.i2c_gate_ctrl(fe, 1);
-       if (i2c_transfer(&fc->i2c_adap, &msg, 1) != 1)
+       if (i2c_transfer(&fc->fc_i2c_adap[0].i2c_adap, &msg, 1) != 1)
                return -EIO;
        return 0;
 }
@@ -386,10 +397,11 @@ static int alps_tdee4_stv0297_tuner_set_params(struct dvb_frontend* fe,
        if (fe->ops.i2c_gate_ctrl)
                fe->ops.i2c_gate_ctrl(fe, 0);
        deb_tuner("tuner buffer for %d Hz: %x %x %x %x\n",fep->frequency, buf[0],buf[1],buf[2],buf[3]);
-       ret = fc->i2c_request(fc, FC_WRITE, FC_I2C_PORT_TUNER, 0x61, buf[0], &buf[1], 3);
+       ret = fc->i2c_request(&fc->fc_i2c_adap[2],
+               FC_WRITE, 0x61, buf[0], &buf[1], 3);
        deb_tuner("tuner write returned: %d\n",ret);
 
-       return 0;
+       return ret;
 }
 
 static u8 alps_tdee4_stv0297_inittab[] = {
@@ -472,56 +484,159 @@ static struct stv0297_config alps_tdee4_stv0297_config = {
 //     .pll_set = alps_tdee4_stv0297_pll_set,
 };
 
+
+/* SkyStar2 rev2.7 (a/u) */
+static struct s5h1420_config skystar2_rev2_7_s5h1420_config = {
+       .demod_address = 0x53,
+       .invert = 1,
+       .repeated_start_workaround = 1,
+};
+
+static struct itd1000_config skystar2_rev2_7_itd1000_config = {
+       .i2c_address = 0x61,
+};
+
+/* SkyStar2 rev2.8 */
+static struct cx24123_config skystar2_rev2_8_cx24123_config = {
+       .demod_address = 0x55,
+       .dont_use_pll = 1,
+       .agc_callback = cx24113_agc_callback,
+};
+
+static const struct cx24113_config skystar2_rev2_8_cx24113_config = {
+       .i2c_addr = 0x54,
+       .xtal_khz = 10111,
+};
+
 /* try to figure out the frontend, each card/box can have on of the following list */
 int flexcop_frontend_init(struct flexcop_device *fc)
 {
        struct dvb_frontend_ops *ops;
+       struct i2c_adapter *i2c = &fc->fc_i2c_adap[0].i2c_adap;
+       struct i2c_adapter *i2c_tuner;
+
+       /* enable no_base_addr - no repeated start when reading */
+       fc->fc_i2c_adap[0].no_base_addr = 1;
+       fc->fe = dvb_attach(s5h1420_attach, &skystar2_rev2_7_s5h1420_config, i2c);
+       if (fc->fe != NULL) {
+               flexcop_ibi_value r108;
+               i2c_tuner = s5h1420_get_tuner_i2c_adapter(fc->fe);
+               ops = &fc->fe->ops;
+
+               fc->fe_sleep = ops->sleep;
+               ops->sleep   = flexcop_sleep;
+
+               fc->dev_type = FC_SKY_REV27;
+
+               /* enable no_base_addr - no repeated start when reading */
+               fc->fc_i2c_adap[2].no_base_addr = 1;
+               if (dvb_attach(isl6421_attach, fc->fe, &fc->fc_i2c_adap[2].i2c_adap, 0x08, 1, 1) == NULL)
+                       err("ISL6421 could NOT be attached");
+               else
+                       info("ISL6421 successfully attached");
+
+               /* the ITD1000 requires a lower i2c clock - it slows down the stuff for everyone - but is it a problem ? */
+               r108.raw = 0x00000506;
+               fc->write_ibi_reg(fc, tw_sm_c_108, r108);
+               if (i2c_tuner) {
+                       if (dvb_attach(itd1000_attach, fc->fe, i2c_tuner, &skystar2_rev2_7_itd1000_config) == NULL)
+                               err("ITD1000 could NOT be attached");
+                       else
+                               info("ITD1000 successfully attached");
+               }
+               goto fe_found;
+       }
+       fc->fc_i2c_adap[0].no_base_addr = 0; /* for the next devices we need it again */
+
+       /* try the sky v2.8 (cx24123, isl6421) */
+       fc->fe = dvb_attach(cx24123_attach,
+               &skystar2_rev2_8_cx24123_config, i2c);
+       if (fc->fe != NULL) {
+               i2c_tuner = cx24123_get_tuner_i2c_adapter(fc->fe);
+               if (i2c_tuner != NULL) {
+                       if (dvb_attach(cx24113_attach, fc->fe,
+                                       &skystar2_rev2_8_cx24113_config,
+                                       i2c_tuner) == NULL)
+                               err("CX24113 could NOT be attached");
+                       else
+                               info("CX24113 successfully attached");
+               }
+
+               fc->dev_type = FC_SKY_REV28;
+
+               fc->fc_i2c_adap[2].no_base_addr = 1;
+               if (dvb_attach(isl6421_attach, fc->fe,
+                      &fc->fc_i2c_adap[2].i2c_adap, 0x08, 0, 0) == NULL)
+                       err("ISL6421 could NOT be attached");
+               else
+                       info("ISL6421 successfully attached");
+
+               /* TODO on i2c_adap[1] addr 0x11 (EEPROM) there seems to be an
+                * IR-receiver (PIC16F818) - but the card has no input for
+                * that ??? */
+
+               goto fe_found;
+    }
 
        /* try the sky v2.6 (stv0299/Samsung tbmu24112(sl1935)) */
-       if ((fc->fe = dvb_attach(stv0299_attach, &samsung_tbmu24112_config, &fc->i2c_adap)) != NULL) {
+       fc->fe = dvb_attach(stv0299_attach, &samsung_tbmu24112_config, i2c);
+       if (fc->fe != NULL) {
                ops = &fc->fe->ops;
 
                ops->tuner_ops.set_params = samsung_tbmu24112_tuner_set_params;
 
                ops->set_voltage = flexcop_set_voltage;
 
-               fc->fe_sleep             = ops->sleep;
-               ops->sleep               = flexcop_sleep;
+               fc->fe_sleep = ops->sleep;
+               ops->sleep = flexcop_sleep;
+
+               fc->dev_type = FC_SKY;
+               goto fe_found;
+       }
 
-               fc->dev_type          = FC_SKY;
-               info("found the stv0299 at i2c address: 0x%02x",samsung_tbmu24112_config.demod_address);
-       } else
        /* try the air dvb-t (mt352/Samsung tdtc9251dh0(??)) */
-       if ((fc->fe = dvb_attach(mt352_attach, &samsung_tdtc9251dh0_config, &fc->i2c_adap)) != NULL ) {
-               fc->dev_type          = FC_AIR_DVB;
+       fc->fe = dvb_attach(mt352_attach, &samsung_tdtc9251dh0_config, i2c);
+       if (fc->fe != NULL) {
+               fc->dev_type = FC_AIR_DVB;
                fc->fe->ops.tuner_ops.calc_regs = samsung_tdtc9251dh0_calc_regs;
-               info("found the mt352 at i2c address: 0x%02x",samsung_tdtc9251dh0_config.demod_address);
-       } else
+               goto fe_found;
+       }
+
        /* try the air atsc 2nd generation (nxt2002) */
-       if ((fc->fe = dvb_attach(nxt200x_attach, &samsung_tbmv_config, &fc->i2c_adap)) != NULL) {
-               fc->dev_type          = FC_AIR_ATSC2;
+       fc->fe = dvb_attach(nxt200x_attach, &samsung_tbmv_config, i2c);
+       if (fc->fe != NULL) {
+               fc->dev_type = FC_AIR_ATSC2;
                dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL, DVB_PLL_SAMSUNG_TBMV);
-               info("found the nxt2002 at i2c address: 0x%02x",samsung_tbmv_config.demod_address);
-       } else
-       /* try the air atsc 3nd generation (lgdt3303) */
-       if ((fc->fe = dvb_attach(lgdt330x_attach, &air2pc_atsc_hd5000_config, &fc->i2c_adap)) != NULL) {
-               fc->dev_type          = FC_AIR_ATSC3;
-               dvb_attach(dvb_pll_attach, fc->fe, 0x61, &fc->i2c_adap, DVB_PLL_LG_TDVS_H06XF);
-               info("found the lgdt3303 at i2c address: 0x%02x",air2pc_atsc_hd5000_config.demod_address);
-       } else
+               goto fe_found;
+       }
+
+       fc->fe = dvb_attach(lgdt330x_attach, &air2pc_atsc_hd5000_config, i2c);
+       if (fc->fe != NULL) {
+               fc->dev_type = FC_AIR_ATSC3;
+               dvb_attach(simple_tuner_attach, fc->fe, i2c, 0x61,
+                               TUNER_LG_TDVS_H06XF);
+               goto fe_found;
+       }
+
        /* try the air atsc 1nd generation (bcm3510)/panasonic ct10s */
-       if ((fc->fe = dvb_attach(bcm3510_attach, &air2pc_atsc_first_gen_config, &fc->i2c_adap)) != NULL) {
-               fc->dev_type          = FC_AIR_ATSC1;
-               info("found the bcm3510 at i2c address: 0x%02x",air2pc_atsc_first_gen_config.demod_address);
-       } else
+       fc->fe = dvb_attach(bcm3510_attach, &air2pc_atsc_first_gen_config, i2c);
+       if (fc->fe != NULL) {
+               fc->dev_type = FC_AIR_ATSC1;
+               goto fe_found;
+       }
+
        /* try the cable dvb (stv0297) */
-       if ((fc->fe = dvb_attach(stv0297_attach, &alps_tdee4_stv0297_config, &fc->i2c_adap)) != NULL) {
-               fc->dev_type                        = FC_CABLE;
+       fc->fe = dvb_attach(stv0297_attach, &alps_tdee4_stv0297_config, i2c);
+       if (fc->fe != NULL) {
+               fc->dev_type = FC_CABLE;
                fc->fe->ops.tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params;
-               info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address);
-       } else
+               goto fe_found;
+       }
+
        /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */
-       if ((fc->fe = dvb_attach(vp310_mt312_attach, &skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) {
+       fc->fe = dvb_attach(vp310_mt312_attach,
+               &skystar23_samsung_tbdu18132_config, i2c);
+       if (fc->fe != NULL) {
                ops = &fc->fe->ops;
 
                ops->tuner_ops.set_params = skystar23_samsung_tbdu18132_tuner_set_params;
@@ -535,19 +650,21 @@ int flexcop_frontend_init(struct flexcop_device *fc)
                ops->sleep                  = flexcop_sleep;
 
                fc->dev_type                = FC_SKY_OLD;
-               info("found the vp310 (aka mt312) at i2c address: 0x%02x",skystar23_samsung_tbdu18132_config.demod_address);
+               goto fe_found;
        }
 
-       if (fc->fe == NULL) {
-               err("no frontend driver found for this B2C2/FlexCop adapter");
-               return -ENODEV;
-       } else {
-               if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) {
-                       err("frontend registration failed!");
-                       dvb_frontend_detach(fc->fe);
-                       fc->fe = NULL;
-                       return -EINVAL;
-               }
+       err("no frontend driver found for this B2C2/FlexCop adapter");
+       return -ENODEV;
+
+fe_found:
+       info("found '%s' .", fc->fe->ops.info.name);
+       if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) {
+               err("frontend registration failed!");
+               ops = &fc->fe->ops;
+               if (ops->release != NULL)
+                       ops->release(fc->fe);
+               fc->fe = NULL;
+               return -EINVAL;
        }
        fc->init_state |= FC_STATE_FE_INIT;
        return 0;
index 6bf858a436c98048653f1a6a0ef9eb9305709584..55973eaf371180d90534bced637142582e5373bc 100644 (file)
@@ -9,6 +9,8 @@
 
 #define FC_MAX_I2C_RETRIES 100000
 
+/* #define DUMP_I2C_MESSAGES */
+
 static int flexcop_i2c_operation(struct flexcop_device *fc, flexcop_ibi_value *r100)
 {
        int i;
@@ -38,30 +40,25 @@ static int flexcop_i2c_operation(struct flexcop_device *fc, flexcop_ibi_value *r
        return -EREMOTEIO;
 }
 
-static int flexcop_i2c_read4(struct flexcop_device *fc, flexcop_ibi_value r100, u8 *buf)
+static int flexcop_i2c_read4(struct flexcop_i2c_adapter *i2c,
+       flexcop_ibi_value r100, u8 *buf)
 {
        flexcop_ibi_value r104;
        int len = r100.tw_sm_c_100.total_bytes, /* remember total_bytes is buflen-1 */
                ret;
 
-       if ((ret = flexcop_i2c_operation(fc,&r100)) != 0) {
-               /* The Cablestar needs a different kind of i2c-transfer (does not
-                * support "Repeat Start"):
-                * wait for the ACK failure,
-                * and do a subsequent read with the Bit 30 enabled
-                */
-               r100.tw_sm_c_100.no_base_addr_ack_error = 1;
-               if ((ret = flexcop_i2c_operation(fc,&r100)) != 0) {
-                       deb_i2c("no_base_addr read failed. %d\n",ret);
-                       return ret;
-               }
+       r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr;
+       ret = flexcop_i2c_operation(i2c->fc, &r100);
+       if (ret != 0) {
+               deb_i2c("read failed. %d\n", ret);
+               return ret;
        }
 
        buf[0] = r100.tw_sm_c_100.data1_reg;
 
        if (len > 0) {
-               r104 = fc->read_ibi_reg(fc,tw_sm_c_104);
-               deb_i2c("read: r100: %08x, r104: %08x\n",r100.raw,r104.raw);
+               r104 = i2c->fc->read_ibi_reg(i2c->fc, tw_sm_c_104);
+               deb_i2c("read: r100: %08x, r104: %08x\n", r100.raw, r104.raw);
 
                /* there is at least one more byte, otherwise we wouldn't be here */
                buf[1] = r104.tw_sm_c_104.data2_reg;
@@ -85,17 +82,22 @@ static int flexcop_i2c_write4(struct flexcop_device *fc, flexcop_ibi_value r100,
        r104.tw_sm_c_104.data3_reg = len > 1 ? buf[2] : 0;
        r104.tw_sm_c_104.data4_reg = len > 2 ? buf[3] : 0;
 
-       deb_i2c("write: r100: %08x, r104: %08x\n",r100.raw,r104.raw);
+       deb_i2c("write: r100: %08x, r104: %08x\n", r100.raw, r104.raw);
 
        /* write the additional i2c data before doing the actual i2c operation */
-       fc->write_ibi_reg(fc,tw_sm_c_104,r104);
-       return flexcop_i2c_operation(fc,&r100);
+       fc->write_ibi_reg(fc, tw_sm_c_104, r104);
+       return flexcop_i2c_operation(fc, &r100);
 }
 
-int flexcop_i2c_request(struct flexcop_device *fc, flexcop_access_op_t op,
-               flexcop_i2c_port_t port, u8 chipaddr, u8 addr, u8 *buf, u16 len)
+int flexcop_i2c_request(struct flexcop_i2c_adapter *i2c,
+       flexcop_access_op_t op, u8 chipaddr, u8 addr, u8 *buf, u16 len)
 {
        int ret;
+
+#ifdef DUMP_I2C_MESSAGES
+       int i;
+#endif
+
        u16 bytes_to_transfer;
        flexcop_ibi_value r100;
 
@@ -103,7 +105,25 @@ int flexcop_i2c_request(struct flexcop_device *fc, flexcop_access_op_t op,
        r100.raw = 0;
        r100.tw_sm_c_100.chipaddr = chipaddr;
        r100.tw_sm_c_100.twoWS_rw = op;
-       r100.tw_sm_c_100.twoWS_port_reg = port;
+       r100.tw_sm_c_100.twoWS_port_reg = i2c->port;
+
+#ifdef DUMP_I2C_MESSAGES
+       printk(KERN_DEBUG "%d ", i2c->port);
+       if (op == FC_READ)
+               printk("rd(");
+       else
+               printk("wr(");
+
+       printk("%02x): %02x ", chipaddr, addr);
+#endif
+
+       /* in that case addr is the only value ->
+        * we write it twice as baseaddr and val0
+        * BBTI is doing it like that for ISL6421 at least */
+       if (i2c->no_base_addr && len == 0 && op == FC_WRITE) {
+               buf = &addr;
+               len = 1;
+       }
 
        while (len != 0) {
                bytes_to_transfer = len > 4 ? 4 : len;
@@ -112,9 +132,14 @@ int flexcop_i2c_request(struct flexcop_device *fc, flexcop_access_op_t op,
                r100.tw_sm_c_100.baseaddr = addr;
 
                if (op == FC_READ)
-                       ret = flexcop_i2c_read4(fc, r100, buf);
+                       ret = flexcop_i2c_read4(i2c, r100, buf);
                else
-                       ret = flexcop_i2c_write4(fc,r100, buf);
+                       ret = flexcop_i2c_write4(i2c->fc, r100, buf);
+
+#ifdef DUMP_I2C_MESSAGES
+               for (i = 0; i < bytes_to_transfer; i++)
+                       printk("%02x ", buf[i]);
+#endif
 
                if (ret < 0)
                        return ret;
@@ -122,7 +147,11 @@ int flexcop_i2c_request(struct flexcop_device *fc, flexcop_access_op_t op,
                buf  += bytes_to_transfer;
                addr += bytes_to_transfer;
                len  -= bytes_to_transfer;
-       };
+       }
+
+#ifdef DUMP_I2C_MESSAGES
+       printk("\n");
+#endif
 
        return 0;
 }
@@ -132,7 +161,7 @@ EXPORT_SYMBOL(flexcop_i2c_request);
 /* master xfer callback for demodulator */
 static int flexcop_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
 {
-       struct flexcop_device *fc = i2c_get_adapdata(i2c_adap);
+       struct flexcop_i2c_adapter *i2c = i2c_get_adapdata(i2c_adap);
        int i, ret = 0;
 
        /* Some drivers use 1 byte or 0 byte reads as probes, which this
@@ -142,34 +171,29 @@ static int flexcop_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs
        if (num == 1 && msgs[0].flags == I2C_M_RD && msgs[0].len <= 1)
                return 1;
 
-       if (mutex_lock_interruptible(&fc->i2c_mutex))
+       if (mutex_lock_interruptible(&i2c->fc->i2c_mutex))
                return -ERESTARTSYS;
 
-       /* reading */
-       if (num == 2 &&
-               msgs[0].flags == 0 &&
-               msgs[1].flags == I2C_M_RD &&
-               msgs[0].buf != NULL &&
-               msgs[1].buf != NULL) {
-
-               ret = fc->i2c_request(fc, FC_READ, FC_I2C_PORT_DEMOD, msgs[0].addr, msgs[0].buf[0], msgs[1].buf, msgs[1].len);
-
-       } else for (i = 0; i < num; i++) { /* writing command */
-               if (msgs[i].flags != 0 || msgs[i].buf == NULL || msgs[i].len < 2) {
-                       ret = -EINVAL;
+       for (i = 0; i < num; i++) {
+               /* reading */
+               if (i+1 < num && (msgs[i+1].flags == I2C_M_RD)) {
+                       ret = i2c->fc->i2c_request(i2c, FC_READ, msgs[i].addr,
+                               msgs[i].buf[0], msgs[i+1].buf, msgs[i+1].len);
+                       i++; /* skip the following message */
+               } else /* writing */
+                       ret = i2c->fc->i2c_request(i2c, FC_WRITE, msgs[i].addr,
+                               msgs[i].buf[0], &msgs[i].buf[1],
+                               msgs[i].len - 1);
+               if (ret < 0) {
+                       err("i2c master_xfer failed");
                        break;
                }
-
-               ret = fc->i2c_request(fc, FC_WRITE, FC_I2C_PORT_DEMOD, msgs[i].addr, msgs[i].buf[0], &msgs[i].buf[1], msgs[i].len - 1);
        }
 
-       if (ret < 0)
-               err("i2c master_xfer failed");
-       else
-               ret = num;
-
-       mutex_unlock(&fc->i2c_mutex);
+       mutex_unlock(&i2c->fc->i2c_mutex);
 
+       if (ret == 0)
+               ret = num;
        return ret;
 }
 
@@ -189,28 +213,68 @@ int flexcop_i2c_init(struct flexcop_device *fc)
 
        mutex_init(&fc->i2c_mutex);
 
-       memset(&fc->i2c_adap, 0, sizeof(struct i2c_adapter));
-       strncpy(fc->i2c_adap.name, "B2C2 FlexCop device",
-               sizeof(fc->i2c_adap.name));
-
-       i2c_set_adapdata(&fc->i2c_adap,fc);
+       fc->fc_i2c_adap[0].fc = fc;
+       fc->fc_i2c_adap[1].fc = fc;
+       fc->fc_i2c_adap[2].fc = fc;
+
+       fc->fc_i2c_adap[0].port = FC_I2C_PORT_DEMOD;
+       fc->fc_i2c_adap[1].port = FC_I2C_PORT_EEPROM;
+       fc->fc_i2c_adap[2].port = FC_I2C_PORT_TUNER;
+
+       strncpy(fc->fc_i2c_adap[0].i2c_adap.name,
+               "B2C2 FlexCop I2C to demod", I2C_NAME_SIZE);
+       strncpy(fc->fc_i2c_adap[1].i2c_adap.name,
+               "B2C2 FlexCop I2C to eeprom", I2C_NAME_SIZE);
+       strncpy(fc->fc_i2c_adap[2].i2c_adap.name,
+               "B2C2 FlexCop I2C to tuner", I2C_NAME_SIZE);
+
+       i2c_set_adapdata(&fc->fc_i2c_adap[0].i2c_adap, &fc->fc_i2c_adap[0]);
+       i2c_set_adapdata(&fc->fc_i2c_adap[1].i2c_adap, &fc->fc_i2c_adap[1]);
+       i2c_set_adapdata(&fc->fc_i2c_adap[2].i2c_adap, &fc->fc_i2c_adap[2]);
+
+       fc->fc_i2c_adap[0].i2c_adap.class =
+               fc->fc_i2c_adap[1].i2c_adap.class =
+               fc->fc_i2c_adap[2].i2c_adap.class = I2C_CLASS_TV_DIGITAL;
+       fc->fc_i2c_adap[0].i2c_adap.algo =
+               fc->fc_i2c_adap[1].i2c_adap.algo =
+               fc->fc_i2c_adap[2].i2c_adap.algo = &flexcop_algo;
+       fc->fc_i2c_adap[0].i2c_adap.algo_data =
+               fc->fc_i2c_adap[1].i2c_adap.algo_data =
+               fc->fc_i2c_adap[2].i2c_adap.algo_data = NULL;
+       fc->fc_i2c_adap[0].i2c_adap.dev.parent =
+               fc->fc_i2c_adap[1].i2c_adap.dev.parent =
+               fc->fc_i2c_adap[2].i2c_adap.dev.parent = fc->dev;
+
+       ret = i2c_add_adapter(&fc->fc_i2c_adap[0].i2c_adap);
+       if (ret < 0)
+               return ret;
 
-       fc->i2c_adap.class          = I2C_CLASS_TV_DIGITAL;
-       fc->i2c_adap.algo       = &flexcop_algo;
-       fc->i2c_adap.algo_data  = NULL;
-       fc->i2c_adap.dev.parent = fc->dev;
+       ret = i2c_add_adapter(&fc->fc_i2c_adap[1].i2c_adap);
+       if (ret < 0)
+               goto adap_1_failed;
 
-       if ((ret = i2c_add_adapter(&fc->i2c_adap)) < 0)
-               return ret;
+       ret = i2c_add_adapter(&fc->fc_i2c_adap[2].i2c_adap);
+       if (ret < 0)
+               goto adap_2_failed;
 
        fc->init_state |= FC_STATE_I2C_INIT;
        return 0;
+
+adap_2_failed:
+       i2c_del_adapter(&fc->fc_i2c_adap[1].i2c_adap);
+adap_1_failed:
+       i2c_del_adapter(&fc->fc_i2c_adap[0].i2c_adap);
+
+       return ret;
 }
 
 void flexcop_i2c_exit(struct flexcop_device *fc)
 {
-       if (fc->init_state & FC_STATE_I2C_INIT)
-               i2c_del_adapter(&fc->i2c_adap);
+       if (fc->init_state & FC_STATE_I2C_INIT) {
+               i2c_del_adapter(&fc->fc_i2c_adap[2].i2c_adap);
+               i2c_del_adapter(&fc->fc_i2c_adap[1].i2c_adap);
+               i2c_del_adapter(&fc->fc_i2c_adap[0].i2c_adap);
+       }
 
        fc->init_state &= ~FC_STATE_I2C_INIT;
 }
index 167583bf0621879b1f9deefd1c443646ccbd4771..93d20e56f909e17c243c8348e81e01047937e213 100644 (file)
@@ -52,6 +52,8 @@ static const char *flexcop_device_names[] = {
        "Sky2PC/SkyStar 2 DVB-S (old version)",
        "Cable2PC/CableStar 2 DVB-C",
        "Air2PC/AirStar 2 ATSC 3rd generation (HD5000)",
+       "Sky2PC/SkyStar 2 DVB-S rev 2.7a/u",
+       "Sky2PC/SkyStar 2 DVB-S rev 2.8",
 };
 
 static const char *flexcop_bus_names[] = {
index 01af4d237eb13b585ba6f8136494c07a3a17f27c..5b30dfc7846b2fbbe870efb38901e311c3bc2375 100644 (file)
@@ -32,7 +32,7 @@ MODULE_PARM_DESC(irq_chk_intv, "set the interval for IRQ watchdog (currently jus
 #define deb_irq(args...)   dprintk(0x08,args)
 #define deb_chk(args...)   dprintk(0x10,args)
 
-static int debug = 0;
+static int debug;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debug level (1=info,2=regs,4=TS,8=irqdma (|-able))." DEBSTATUS);
 
index 491f9bd6e1951be8d23463667da4fb5c72972b81..7599fccc1a5b80a438e9cbfd2c8d387c9b526f6c 100644 (file)
@@ -25,6 +25,8 @@ typedef enum {
        FC_SKY_OLD,
        FC_CABLE,
        FC_AIR_ATSC3,
+       FC_SKY_REV27,
+       FC_SKY_REV28,
 } flexcop_device_type_t;
 
 typedef enum {
index 01570ec80962ea7628596cb9fef36d615807b3e3..cda69528548ac9d0d9757f47786cbf732491a37f 100644 (file)
@@ -90,7 +90,7 @@ static void flexcop_sram_write(struct adapter *adapter, u32 bank, u32 addr, u8 *
                };
 
                if (retries == 0)
-                       printk("%s: SRAM timeout\n", __FUNCTION__);
+                       printk("%s: SRAM timeout\n", __func__);
 
                write_reg_dw(adapter, 0x700, command);
 
@@ -115,7 +115,7 @@ static void flex_sram_read(struct adapter *adapter, u32 bank, u32 addr, u8 *buf,
                };
 
                if (retries == 0)
-                       printk("%s: SRAM timeout\n", __FUNCTION__);
+                       printk("%s: SRAM timeout\n", __func__);
 
                write_reg_dw(adapter, 0x700, command);
 
@@ -127,7 +127,7 @@ static void flex_sram_read(struct adapter *adapter, u32 bank, u32 addr, u8 *buf,
                };
 
                if (retries == 0)
-                       printk("%s: SRAM timeout\n", __FUNCTION__);
+                       printk("%s: SRAM timeout\n", __func__);
 
                value = read_reg_dw(adapter, 0x700) >> 0x10;
 
@@ -240,13 +240,13 @@ static void sram_init(struct adapter *adapter)
 
                adapter->dw_sram_type = tmp & 0x30000;
 
-               ddprintk("%s: dw_sram_type = %x\n", __FUNCTION__, adapter->dw_sram_type);
+               ddprintk("%s: dw_sram_type = %x\n", __func__, adapter->dw_sram_type);
 
        } else {
 
                adapter->dw_sram_type = 0x10000;
 
-               ddprintk("%s: dw_sram_type = %x\n", __FUNCTION__, adapter->dw_sram_type);
+               ddprintk("%s: dw_sram_type = %x\n", __func__, adapter->dw_sram_type);
        }
 
        /* return value is never used? */
@@ -257,7 +257,7 @@ static int sram_test_location(struct adapter *adapter, u32 mask, u32 addr)
 {
        u8 tmp1, tmp2;
 
-       dprintk("%s: mask = %x, addr = %x\n", __FUNCTION__, mask, addr);
+       dprintk("%s: mask = %x, addr = %x\n", __func__, mask, addr);
 
        sram_set_size(adapter, mask);
        sram_init(adapter);
@@ -275,7 +275,7 @@ static int sram_test_location(struct adapter *adapter, u32 mask, u32 addr)
        sram_read(adapter, addr, &tmp2, 1);
        sram_read(adapter, addr, &tmp2, 1);
 
-       dprintk("%s: wrote 0xa5, read 0x%2x\n", __FUNCTION__, tmp2);
+       dprintk("%s: wrote 0xa5, read 0x%2x\n", __func__, tmp2);
 
        if (tmp2 != 0xa5)
                return 0;
@@ -293,7 +293,7 @@ static int sram_test_location(struct adapter *adapter, u32 mask, u32 addr)
        sram_read(adapter, addr, &tmp2, 1);
        sram_read(adapter, addr, &tmp2, 1);
 
-       dprintk("%s: wrote 0x5a, read 0x%2x\n", __FUNCTION__, tmp2);
+       dprintk("%s: wrote 0x5a, read 0x%2x\n", __func__, tmp2);
 
        if (tmp2 != 0x5a)
                return 0;
@@ -340,7 +340,7 @@ static int flexcop_sram_detect(struct flexcop_device *fc)
 
        tmp3 = read_reg_dw(adapter, 0x71c);
 
-       dprintk("%s: tmp3 = %x\n", __FUNCTION__, tmp3);
+       dprintk("%s: tmp3 = %x\n", __func__, tmp3);
 
        write_reg_dw(adapter, 0x71c, tmp2);
 
@@ -351,7 +351,7 @@ static int flexcop_sram_detect(struct flexcop_device *fc)
                sram_init(adapter);
                write_reg_dw(adapter, 0x208, tmp);
 
-               dprintk("%s: sram size = 32K\n", __FUNCTION__);
+               dprintk("%s: sram size = 32K\n", __func__);
 
                return 32;
        }
@@ -361,7 +361,7 @@ static int flexcop_sram_detect(struct flexcop_device *fc)
                sram_init(adapter);
                write_reg_dw(adapter, 0x208, tmp);
 
-               dprintk("%s: sram size = 128K\n", __FUNCTION__);
+               dprintk("%s: sram size = 128K\n", __func__);
 
                return 128;
        }
@@ -371,7 +371,7 @@ static int flexcop_sram_detect(struct flexcop_device *fc)
                sram_init(adapter);
                write_reg_dw(adapter, 0x208, tmp);
 
-               dprintk("%s: sram size = 64K\n", __FUNCTION__);
+               dprintk("%s: sram size = 64K\n", __func__);
 
                return 64;
        }
@@ -381,7 +381,7 @@ static int flexcop_sram_detect(struct flexcop_device *fc)
                sram_init(adapter);
                write_reg_dw(adapter, 0x208, tmp);
 
-               dprintk("%s: sram size = 32K\n", __FUNCTION__);
+               dprintk("%s: sram size = 32K\n", __func__);
 
                return 32;
        }
@@ -390,7 +390,7 @@ static int flexcop_sram_detect(struct flexcop_device *fc)
        sram_init(adapter);
        write_reg_dw(adapter, 0x208, tmp);
 
-       dprintk("%s: SRAM detection failed. Set to 32K \n", __FUNCTION__);
+       dprintk("%s: SRAM detection failed. Set to 32K \n", __func__);
 
        return 0;
 }
index 87fb75f0d1cf0b88eb6e16706d8dfe3ffc3b7ebc..449fb5c3d0b1ed31f078ff9b8eb2c244ae4c10bf 100644 (file)
@@ -211,10 +211,11 @@ static int flexcop_usb_utility_req(struct flexcop_usb *fc_usb, int set,
 #endif
 
 /* usb i2c stuff */
-static int flexcop_usb_i2c_req(struct flexcop_usb *fc_usb,
+static int flexcop_usb_i2c_req(struct flexcop_i2c_adapter *i2c,
                flexcop_usb_request_t req, flexcop_usb_i2c_function_t func,
-               flexcop_i2c_port_t port, u8 chipaddr, u8 addr, u8 *buf, u8 buflen)
+               u8 chipaddr, u8 addr, u8 *buf, u8 buflen)
 {
+       struct flexcop_usb *fc_usb = i2c->fc->bus_specific;
        u16 wValue, wIndex;
        int nWaitTime,pipe,len;
 //     u8 dwRequestType;
@@ -242,7 +243,7 @@ static int flexcop_usb_i2c_req(struct flexcop_usb *fc_usb,
                        deb_info("unsupported function for i2c_req %x\n",func);
                        return -EINVAL;
        }
-       wValue = (func << 8 ) | (port << 4);
+       wValue = (func << 8) | (i2c->port << 4);
        wIndex = (chipaddr << 8 ) | addr;
 
        deb_i2c("i2c %2d: %02x %02x %02x %02x %02x %02x\n",func,request_type,req,
@@ -274,13 +275,15 @@ static int flexcop_usb_write_ibi_reg(struct flexcop_device *fc, flexcop_ibi_regi
        return flexcop_usb_readwrite_dw(fc,reg, &val.raw, 0);
 }
 
-static int flexcop_usb_i2c_request(struct flexcop_device *fc, flexcop_access_op_t op,
-               flexcop_i2c_port_t port, u8 chipaddr, u8 addr, u8 *buf, u16 len)
+static int flexcop_usb_i2c_request(struct flexcop_i2c_adapter *i2c,
+       flexcop_access_op_t op, u8 chipaddr, u8 addr, u8 *buf, u16 len)
 {
        if (op == FC_READ)
-               return flexcop_usb_i2c_req(fc->bus_specific,B2C2_USB_I2C_REQUEST,USB_FUNC_I2C_READ,port,chipaddr,addr,buf,len);
+               return flexcop_usb_i2c_req(i2c, B2C2_USB_I2C_REQUEST,
+                       USB_FUNC_I2C_READ, chipaddr, addr, buf, len);
        else
-               return flexcop_usb_i2c_req(fc->bus_specific,B2C2_USB_I2C_REQUEST,USB_FUNC_I2C_WRITE,port,chipaddr,addr,buf,len);
+               return flexcop_usb_i2c_req(i2c, B2C2_USB_I2C_REQUEST,
+                       USB_FUNC_I2C_WRITE, chipaddr, addr, buf, len);
 }
 
 static void flexcop_usb_process_frame(struct flexcop_usb *fc_usb, u8 *buffer, int buffer_length)
index 2ddafd071c9776ddf02946f6ce018f86504e1fa0..5f79c8dc383651aa9349e3445f854d24947aab9a 100644 (file)
@@ -49,6 +49,8 @@ module_param_named(debug, b2c2_flexcop_debug,  int, 0644);
 MODULE_PARM_DESC(debug, "set debug level (1=info,2=tuner,4=i2c,8=ts,16=sram,32=reg (|-able))." DEBSTATUS);
 #undef DEBSTATUS
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 /* global zero for ibi values */
 flexcop_ibi_value ibi_zero;
 
@@ -66,8 +68,10 @@ static int flexcop_dvb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
 
 static int flexcop_dvb_init(struct flexcop_device *fc)
 {
-       int ret;
-       if ((ret = dvb_register_adapter(&fc->dvb_adapter,"FlexCop Digital TV device",fc->owner,fc->dev)) < 0) {
+       int ret = dvb_register_adapter(&fc->dvb_adapter,
+                                      "FlexCop Digital TV device", fc->owner,
+                                      fc->dev, adapter_nr);
+       if (ret < 0) {
                err("error registering DVB adapter");
                return ret;
        }
@@ -257,6 +261,12 @@ int flexcop_device_initialize(struct flexcop_device *fc)
        if ((ret = flexcop_dvb_init(fc)))
                goto error;
 
+       /* i2c has to be done before doing EEProm stuff -
+        * because the EEProm is accessed via i2c */
+       ret = flexcop_i2c_init(fc);
+       if (ret)
+               goto error;
+
        /* do the MAC address reading after initializing the dvb_adapter */
        if (fc->get_mac_addr(fc, 0) == 0) {
                u8 *b = fc->dvb_adapter.proposed_mac;
@@ -266,10 +276,6 @@ int flexcop_device_initialize(struct flexcop_device *fc)
        } else
                warn("reading of MAC address failed.\n");
 
-
-       if ((ret = flexcop_i2c_init(fc)))
-               goto error;
-
        if ((ret = flexcop_frontend_init(fc)))
                goto error;
 
index ea666174e98874a8d9bb5a3de78aac660e03bf4f..902c762e0b7fb8867bc1d62ea65f2e2a4ee5e9a3 100644 (file)
@@ -7,8 +7,8 @@ config DVB_BT8XX
        select DVB_CX24110 if !DVB_FE_CUSTOMISE
        select DVB_OR51211 if !DVB_FE_CUSTOMISE
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
-       select DVB_PLL if !DVB_FE_CUSTOMISE
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
+       select TUNER_SIMPLE if !DVB_FE_CUSTOMISE
        select FW_LOADER
        help
          Support for PCI cards based on the Bt8xx PCI bridge. Examples are
index 84cf70504d17855ff8821aa0d6e6700c5ecded76..9d3e68b5d6ebc22e9b8fb4adfdbf42aa50784d20 100644 (file)
@@ -1,3 +1,6 @@
 obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o dst_ca.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/video/bt8xx -Idrivers/media/dvb/frontends
+EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
+EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+EXTRA_CFLAGS += -Idrivers/media/video/bt8xx
+EXTRA_CFLAGS += -Idrivers/media/video
index 307ff35bdf13a6226e6413c104ae7279d176f50d..75711bde23ad3675fe82f89bf6f4edf68d7db644 100644 (file)
@@ -1290,7 +1290,7 @@ static int dst_get_signal(struct dst_state *state)
 {
        int retval;
        u8 get_signal[] = { 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfb };
-       //dprintk("%s: Getting Signal strength and other parameters\n", __FUNCTION__);
+       //dprintk("%s: Getting Signal strength and other parameters\n", __func__);
        if ((state->diseq_flags & ATTEMPT_TUNE) == 0) {
                state->decode_lock = state->decode_strength = state->decode_snr = 0;
                return 0;
index 50bc32a8bd5533921a9af2923cf618728a18db8b..0258451423ad876b53e3e2a9b94044cf1b7025c9 100644 (file)
 #define dprintk(x, y, z, format, arg...) do {                                          \
        if (z) {                                                                        \
                if      ((x > DST_CA_ERROR) && (x > y))                                 \
-                       printk(KERN_ERR "%s: " format "\n", __FUNCTION__ , ##arg);      \
+                       printk(KERN_ERR "%s: " format "\n", __func__ , ##arg);  \
                else if ((x > DST_CA_NOTICE) && (x > y))                                \
-                       printk(KERN_NOTICE "%s: " format "\n", __FUNCTION__ , ##arg);   \
+                       printk(KERN_NOTICE "%s: " format "\n", __func__ , ##arg);       \
                else if ((x > DST_CA_INFO) && (x > y))                                  \
-                       printk(KERN_INFO "%s: " format "\n", __FUNCTION__ , ##arg);     \
+                       printk(KERN_INFO "%s: " format "\n", __func__ , ##arg); \
                else if ((x > DST_CA_DEBUG) && (x > y))                                 \
-                       printk(KERN_DEBUG "%s: " format "\n", __FUNCTION__ , ##arg);    \
+                       printk(KERN_DEBUG "%s: " format "\n", __func__ , ##arg);        \
        } else {                                                                        \
                if (x > y)                                                              \
                        printk(format, ## arg);                                         \
@@ -162,7 +162,7 @@ static int ca_get_app_info(struct dst_state *state)
        dprintk(verbose, DST_CA_INFO, 1, " ================================ CI Module Application Info ======================================");
        dprintk(verbose, DST_CA_INFO, 1, " Application Type=[%d], Application Vendor=[%d], Vendor Code=[%d]\n%s: Application info=[%s]",
                state->messages[7], (state->messages[8] << 8) | state->messages[9],
-               (state->messages[10] << 8) | state->messages[11], __FUNCTION__, (char *)(&state->messages[12]));
+               (state->messages[10] << 8) | state->messages[11], __func__, (char *)(&state->messages[12]));
        dprintk(verbose, DST_CA_INFO, 1, " ==================================================================================================");
 
        // Transform dst message to correct application_info message
index dedd30a8356bbaad2f78ef936a8352413f4acf41..6afbfbbef0ce304885826365df8a40735c9a5ee7 100644 (file)
@@ -40,10 +40,12 @@ static int debug;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 #define dprintk( args... ) \
-       do \
+       do \
                if (debug) printk(KERN_DEBUG args); \
-       while (0)
+       while (0)
 
 #define IF_FREQUENCYx6 217    /* 6 * 36.16666666667MHz */
 
@@ -609,8 +611,9 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
                lgdt330x_reset(card);
                card->fe = dvb_attach(lgdt330x_attach, &tdvs_tua6034_config, card->i2c_adapter);
                if (card->fe != NULL) {
-                       dvb_attach(dvb_pll_attach, card->fe, 0x61,
-                                  card->i2c_adapter, DVB_PLL_LG_TDVS_H06XF);
+                       dvb_attach(simple_tuner_attach, card->fe,
+                                  card->i2c_adapter, 0x61,
+                                  TUNER_LG_TDVS_H06XF);
                        dprintk ("dvb_bt8xx: lgdt330x detected\n");
                }
                break;
@@ -670,7 +673,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
                state->dst_ca = NULL;
                /*      DST is not a frontend, attaching the ASIC       */
                if (dvb_attach(dst_attach, state, &card->dvb_adapter) == NULL) {
-                       printk("%s: Could not find a Twinhan DST.\n", __FUNCTION__);
+                       printk("%s: Could not find a Twinhan DST.\n", __func__);
                        break;
                }
                /*      Attach other DST peripherals if any             */
@@ -692,8 +695,9 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
        case BTTV_BOARD_PC_HDTV:
                card->fe = dvb_attach(or51211_attach, &or51211_config, card->i2c_adapter);
                if (card->fe != NULL)
-                       dvb_attach(dvb_pll_attach, card->fe, 0x61,
-                                  card->i2c_adapter, DVB_PLL_FCV1236D);
+                       dvb_attach(simple_tuner_attach, card->fe,
+                                  card->i2c_adapter, 0x61,
+                                  TUNER_PHILIPS_FCV1236D);
                break;
        }
 
@@ -715,7 +719,10 @@ static int __devinit dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
 {
        int result;
 
-       if ((result = dvb_register_adapter(&card->dvb_adapter, card->card_name, THIS_MODULE, &card->bt->dev->dev)) < 0) {
+       result = dvb_register_adapter(&card->dvb_adapter, card->card_name,
+                                     THIS_MODULE, &card->bt->dev->dev,
+                                     adapter_nr);
+       if (result < 0) {
                printk("dvb_bt8xx: dvb_register_adapter failed (errno = %d)\n", result);
                return result;
        }
index 436880e68672fe752859135dbff42790fefd93f3..4499ed2ac0ed7339384663dc1b2a5f8f77d82224 100644 (file)
@@ -38,7 +38,7 @@
 #include "or51211.h"
 #include "lgdt330x.h"
 #include "zl10353.h"
-#include "dvb-pll.h"
+#include "tuner-simple.h"
 
 struct dvb_bt8xx_card {
        struct mutex lock;
index db08b0a8888afc5763e935a53e712844f8a217aa..f5010e8671b8476109b44df80e90a47079305302 100644 (file)
@@ -58,11 +58,13 @@ static int debug;
 module_param_named(debug, debug, int, 0644);
 MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 #define dprintk(level, args...)                                                \
 do {                                                                   \
        if ((debug & level)) {                                          \
                printk("%s: %s(): ", KBUILD_MODNAME,                    \
-                      __FUNCTION__);                                   \
+                      __func__);                                       \
                printk(args); }                                         \
 } while (0)
 
@@ -938,7 +940,10 @@ static int cinergyt2_probe (struct usb_interface *intf,
                return -ENOMEM;
        }
 
-       if ((err = dvb_register_adapter(&cinergyt2->adapter, DRIVER_NAME, THIS_MODULE, &cinergyt2->udev->dev)) < 0) {
+       err = dvb_register_adapter(&cinergyt2->adapter, DRIVER_NAME,
+                                  THIS_MODULE, &cinergyt2->udev->dev,
+                                  adapter_nr);
+       if (err < 0) {
                kfree(cinergyt2);
                return err;
        }
index 0c1d87c5227ab0bf3e903d95e3cc92ce982b6d98..b0d347daae47a889ba54f89b938ecd8dd3ee46a5 100644 (file)
@@ -80,6 +80,8 @@ enum dmx_success {
 #define        TS_PAYLOAD_ONLY 2   /* in case TS_PACKET is set, only send the TS
                               payload (<=184 bytes per packet) to callback */
 #define TS_DECODER      4   /* send stream to built-in decoder (if present) */
+#define TS_DEMUX        8   /* in case TS_PACKET is set, send the TS to
+                              the demux device, not to the dvr device */
 
 /* PES type for filters which write to built-in decoder */
 /* these should be kept identical to the types in dmx.h */
index f94bc31e3b3334d020b7e5dc95759f25a3e70ca8..df5bef6a2517821c013c1aedbcae843ff7b278fa 100644 (file)
@@ -126,7 +126,7 @@ static int dvb_dvr_open(struct inode *inode, struct file *file)
        struct dmxdev *dmxdev = dvbdev->priv;
        struct dmx_frontend *front;
 
-       dprintk("function : %s\n", __FUNCTION__);
+       dprintk("function : %s\n", __func__);
 
        if (mutex_lock_interruptible(&dmxdev->mutex))
                return -ERESTARTSYS;
@@ -259,6 +259,39 @@ static ssize_t dvb_dvr_read(struct file *file, char __user *buf, size_t count,
        return ret;
 }
 
+static int dvb_dvr_set_buffer_size(struct dmxdev *dmxdev,
+                                     unsigned long size)
+{
+       struct dvb_ringbuffer *buf = &dmxdev->dvr_buffer;
+       void *newmem;
+       void *oldmem;
+
+       dprintk("function : %s\n", __func__);
+
+       if (buf->size == size)
+               return 0;
+       if (!size)
+               return -EINVAL;
+
+       newmem = vmalloc(size);
+       if (!newmem)
+               return -ENOMEM;
+
+       oldmem = buf->data;
+
+       spin_lock_irq(&dmxdev->lock);
+       buf->data = newmem;
+       buf->size = size;
+
+       /* reset and not flush in case the buffer shrinks */
+       dvb_ringbuffer_reset(buf);
+       spin_unlock_irq(&dmxdev->lock);
+
+       vfree(oldmem);
+
+       return 0;
+}
+
 static inline void dvb_dmxdev_filter_state_set(struct dmxdev_filter
                                               *dmxdevfilter, int state)
 {
@@ -271,28 +304,32 @@ static int dvb_dmxdev_set_buffer_size(struct dmxdev_filter *dmxdevfilter,
                                      unsigned long size)
 {
        struct dvb_ringbuffer *buf = &dmxdevfilter->buffer;
-       void *mem;
+       void *newmem;
+       void *oldmem;
 
        if (buf->size == size)
                return 0;
+       if (!size)
+               return -EINVAL;
        if (dmxdevfilter->state >= DMXDEV_STATE_GO)
                return -EBUSY;
+
+       newmem = vmalloc(size);
+       if (!newmem)
+               return -ENOMEM;
+
+       oldmem = buf->data;
+
        spin_lock_irq(&dmxdevfilter->dev->lock);
-       mem = buf->data;
-       buf->data = NULL;
+       buf->data = newmem;
        buf->size = size;
-       dvb_ringbuffer_flush(buf);
+
+       /* reset and not flush in case the buffer shrinks */
+       dvb_ringbuffer_reset(buf);
        spin_unlock_irq(&dmxdevfilter->dev->lock);
-       vfree(mem);
 
-       if (buf->size) {
-               mem = vmalloc(dmxdevfilter->buffer.size);
-               if (!mem)
-                       return -ENOMEM;
-               spin_lock_irq(&dmxdevfilter->dev->lock);
-               buf->data = mem;
-               spin_unlock_irq(&dmxdevfilter->dev->lock);
-       }
+       vfree(oldmem);
+
        return 0;
 }
 
@@ -374,7 +411,8 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len,
                return 0;
        }
 
-       if (dmxdevfilter->params.pes.output == DMX_OUT_TAP)
+       if (dmxdevfilter->params.pes.output == DMX_OUT_TAP
+           || dmxdevfilter->params.pes.output == DMX_OUT_TSDEMUX_TAP)
                buffer = &dmxdevfilter->buffer;
        else
                buffer = &dmxdevfilter->dev->dvr_buffer;
@@ -550,7 +588,7 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter)
                                                                   dvb_dmxdev_section_callback);
                        if (ret < 0) {
                                printk("DVB (%s): could not alloc feed\n",
-                                      __FUNCTION__);
+                                      __func__);
                                return ret;
                        }
 
@@ -558,7 +596,7 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter)
                                              (para->flags & DMX_CHECK_CRC) ? 1 : 0);
                        if (ret < 0) {
                                printk("DVB (%s): could not set feed\n",
-                                      __FUNCTION__);
+                                      __func__);
                                dvb_dmxdev_feed_restart(filter);
                                return ret;
                        }
@@ -620,9 +658,10 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter)
 
                if (otype == DMX_OUT_TS_TAP)
                        ts_type |= TS_PACKET;
-
-               if (otype == DMX_OUT_TAP)
-                       ts_type |= TS_PAYLOAD_ONLY | TS_PACKET;
+               else if (otype == DMX_OUT_TSDEMUX_TAP)
+                       ts_type |= TS_PACKET | TS_DEMUX;
+               else if (otype == DMX_OUT_TAP)
+                       ts_type |= TS_PACKET | TS_DEMUX | TS_PAYLOAD_ONLY;
 
                ret = dmxdev->demux->allocate_ts_feed(dmxdev->demux,
                                                      tsfeed,
@@ -732,7 +771,7 @@ static int dvb_dmxdev_filter_set(struct dmxdev *dmxdev,
                                 struct dmxdev_filter *dmxdevfilter,
                                 struct dmx_sct_filter_params *params)
 {
-       dprintk("function : %s\n", __FUNCTION__);
+       dprintk("function : %s\n", __func__);
 
        dvb_dmxdev_filter_stop(dmxdevfilter);
 
@@ -1007,6 +1046,7 @@ static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file,
 {
        struct dvb_device *dvbdev = file->private_data;
        struct dmxdev *dmxdev = dvbdev->priv;
+       unsigned long arg = (unsigned long)parg;
        int ret;
 
        if (mutex_lock_interruptible(&dmxdev->mutex))
@@ -1014,8 +1054,7 @@ static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file,
 
        switch (cmd) {
        case DMX_SET_BUFFER_SIZE:
-               // FIXME: implement
-               ret = 0;
+               ret = dvb_dvr_set_buffer_size(dmxdev, arg);
                break;
 
        default:
@@ -1038,7 +1077,7 @@ static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait)
        struct dmxdev *dmxdev = dvbdev->priv;
        unsigned int mask = 0;
 
-       dprintk("function : %s\n", __FUNCTION__);
+       dprintk("function : %s\n", __func__);
 
        poll_wait(file, &dmxdev->dvr_buffer.queue, wait);
 
index 89437fdab8befcd393578c57f8c44d9434787612..8cbdb0ec67e2e4d2cc8f8119a7bfeaddd0c8f9ab 100644 (file)
@@ -250,7 +250,7 @@ static int dvb_ca_en50221_wait_if_status(struct dvb_ca_private *ca, int slot,
        unsigned long timeout;
        unsigned long start;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        /* loop until timeout elapsed */
        start = jiffies;
@@ -263,7 +263,7 @@ static int dvb_ca_en50221_wait_if_status(struct dvb_ca_private *ca, int slot,
 
                /* if we got the flags, it was successful! */
                if (res & waitfor) {
-                       dprintk("%s succeeded timeout:%lu\n", __FUNCTION__, jiffies - start);
+                       dprintk("%s succeeded timeout:%lu\n", __func__, jiffies - start);
                        return 0;
                }
 
@@ -276,7 +276,7 @@ static int dvb_ca_en50221_wait_if_status(struct dvb_ca_private *ca, int slot,
                msleep(1);
        }
 
-       dprintk("%s failed timeout:%lu\n", __FUNCTION__, jiffies - start);
+       dprintk("%s failed timeout:%lu\n", __func__, jiffies - start);
 
        /* if we get here, we've timed out */
        return -ETIMEDOUT;
@@ -297,7 +297,7 @@ static int dvb_ca_en50221_link_init(struct dvb_ca_private *ca, int slot)
        int buf_size;
        u8 buf[2];
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        /* we'll be determining these during this function */
        ca->slot_info[slot].da_irq_supported = 0;
@@ -549,7 +549,7 @@ static int dvb_ca_en50221_set_configoption(struct dvb_ca_private *ca, int slot)
 {
        int configoption;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        /* set the config option */
        ca->pub->write_attribute_mem(ca->pub, slot,
@@ -587,7 +587,7 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, u8 * eb
        u8 buf[HOST_LINK_BUF_SIZE];
        int i;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        /* check if we have space for a link buf in the rx_buffer */
        if (ebuf == NULL) {
@@ -708,7 +708,7 @@ static int dvb_ca_en50221_write_data(struct dvb_ca_private *ca, int slot, u8 * b
        int status;
        int i;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
 
        // sanity check
@@ -785,7 +785,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_camchange_irq);
  */
 static int dvb_ca_en50221_slot_shutdown(struct dvb_ca_private *ca, int slot)
 {
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        ca->pub->slot_shutdown(ca->pub, slot);
        ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_NONE;
@@ -892,7 +892,7 @@ void dvb_ca_en50221_frda_irq(struct dvb_ca_en50221 *pubca, int slot)
 static void dvb_ca_en50221_thread_wakeup(struct dvb_ca_private *ca)
 {
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        ca->wakeup = 1;
        mb();
@@ -964,7 +964,7 @@ static int dvb_ca_en50221_thread(void *data)
        int pktcount;
        void *rxbuf;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        /* choose the correct initial delay */
        dvb_ca_en50221_thread_update_delay(ca);
@@ -1172,7 +1172,7 @@ static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file,
        int err = 0;
        int slot;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        switch (cmd) {
        case CA_RESET:
@@ -1266,7 +1266,7 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file,
        unsigned long timeout;
        int written;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        /* Incoming packet has a 2 byte header. hdr[0] = slot_id, hdr[1] = connection_id */
        if (count < 2)
@@ -1401,7 +1401,7 @@ static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user * buf,
        int pktlen;
        int dispose = 0;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        /* Outgoing packet has a 2 byte header. hdr[0] = slot_id, hdr[1] = connection_id */
        if (count < 2)
@@ -1490,7 +1490,7 @@ static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file)
        int err;
        int i;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        if (!try_module_get(ca->pub->owner))
                return -EIO;
@@ -1534,7 +1534,7 @@ static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file)
        struct dvb_ca_private *ca = dvbdev->priv;
        int err;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        /* mark the CA device as closed */
        ca->open = 0;
@@ -1564,7 +1564,7 @@ static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table * wait)
        int slot;
        int result = 0;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        if (dvb_ca_en50221_io_read_condition(ca, &result, &slot) == 1) {
                mask |= POLLIN;
@@ -1626,7 +1626,7 @@ int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter,
        struct dvb_ca_private *ca = NULL;
        int i;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        if (slot_count < 1)
                return -EINVAL;
@@ -1704,7 +1704,7 @@ void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca)
        struct dvb_ca_private *ca = pubca->private;
        int i;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        /* shutdown the thread if there was one */
        kthread_stop(ca->thread);
index 7959020f9317d2ee5f1f0824370ab730542f09c3..934e15fffc565f4660dfc5954a49d1346748d315 100644 (file)
@@ -368,7 +368,7 @@ static inline void dvb_dmx_swfilter_packet_type(struct dvb_demux_feed *feed,
 #define DVR_FEED(f)                                                    \
        (((f)->type == DMX_TYPE_TS) &&                                  \
        ((f)->feed.ts.is_filtering) &&                                  \
-       (((f)->ts_type & (TS_PACKET|TS_PAYLOAD_ONLY)) == TS_PACKET))
+       (((f)->ts_type & (TS_PACKET | TS_DEMUX)) == TS_PACKET))
 
 static void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf)
 {
@@ -553,7 +553,7 @@ static void dvb_demux_feed_add(struct dvb_demux_feed *feed)
        spin_lock_irq(&feed->demux->lock);
        if (dvb_demux_feed_find(feed)) {
                printk(KERN_ERR "%s: feed already in list (type=%x state=%x pid=%x)\n",
-                      __FUNCTION__, feed->type, feed->state, feed->pid);
+                      __func__, feed->type, feed->state, feed->pid);
                goto out;
        }
 
@@ -567,7 +567,7 @@ static void dvb_demux_feed_del(struct dvb_demux_feed *feed)
        spin_lock_irq(&feed->demux->lock);
        if (!(dvb_demux_feed_find(feed))) {
                printk(KERN_ERR "%s: feed not in list (type=%x state=%x pid=%x)\n",
-                      __FUNCTION__, feed->type, feed->state, feed->pid);
+                      __func__, feed->type, feed->state, feed->pid);
                goto out;
        }
 
index 925cfa6221ad09d73e2831a6cadb2435a3747290..2dddd08c5445383cfe1b94352c94bda403147130 100644 (file)
@@ -135,7 +135,7 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status)
        struct dvb_frontend_event *e;
        int wp;
 
-       dprintk ("%s\n", __FUNCTION__);
+       dprintk ("%s\n", __func__);
 
        if (mutex_lock_interruptible (&events->mtx))
                return;
@@ -171,7 +171,7 @@ static int dvb_frontend_get_event(struct dvb_frontend *fe,
        struct dvb_frontend_private *fepriv = fe->frontend_priv;
        struct dvb_fe_events *events = &fepriv->events;
 
-       dprintk ("%s\n", __FUNCTION__);
+       dprintk ("%s\n", __func__);
 
        if (events->overflow) {
                events->overflow = 0;
@@ -237,7 +237,7 @@ static void dvb_frontend_swzigzag_update_delay(struct dvb_frontend_private *fepr
 {
        int q2;
 
-       dprintk ("%s\n", __FUNCTION__);
+       dprintk ("%s\n", __func__);
 
        if (locked)
                (fepriv->quality) = (fepriv->quality * 220 + 36*256) / 256;
@@ -329,7 +329,7 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra
 
        dprintk("%s: drift:%i inversion:%i auto_step:%i "
                "auto_sub_step:%i started_auto_step:%i\n",
-               __FUNCTION__, fepriv->lnb_drift, fepriv->inversion,
+               __func__, fepriv->lnb_drift, fepriv->inversion,
                fepriv->auto_step, fepriv->auto_sub_step, fepriv->started_auto_step);
 
        /* set the frontend itself */
@@ -511,7 +511,7 @@ static int dvb_frontend_thread(void *data)
        fe_status_t s;
        struct dvb_frontend_parameters *params;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        fepriv->check_wrapped = 0;
        fepriv->quality = 0;
@@ -597,7 +597,7 @@ static void dvb_frontend_stop(struct dvb_frontend *fe)
 {
        struct dvb_frontend_private *fepriv = fe->frontend_priv;
 
-       dprintk ("%s\n", __FUNCTION__);
+       dprintk ("%s\n", __func__);
 
        fepriv->exit = 1;
        mb();
@@ -665,7 +665,7 @@ static int dvb_frontend_start(struct dvb_frontend *fe)
        struct dvb_frontend_private *fepriv = fe->frontend_priv;
        struct task_struct *fe_thread;
 
-       dprintk ("%s\n", __FUNCTION__);
+       dprintk ("%s\n", __func__);
 
        if (fepriv->thread) {
                if (!fepriv->exit)
@@ -763,7 +763,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
        struct dvb_frontend_private *fepriv = fe->frontend_priv;
        int err = -EOPNOTSUPP;
 
-       dprintk ("%s\n", __FUNCTION__);
+       dprintk ("%s\n", __func__);
 
        if (fepriv->exit)
                return -ENODEV;
@@ -895,7 +895,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
                        int i;
                        u8 last = 1;
                        if (dvb_frontend_debug)
-                               printk("%s switch command: 0x%04lx\n", __FUNCTION__, cmd);
+                               printk("%s switch command: 0x%04lx\n", __func__, cmd);
                        do_gettimeofday(&nexttime);
                        if (dvb_frontend_debug)
                                memcpy(&tv[0], &nexttime, sizeof(struct timeval));
@@ -919,7 +919,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
                        }
                        if (dvb_frontend_debug) {
                                printk("%s(%d): switch delay (should be 32k followed by all 8k\n",
-                                       __FUNCTION__, fe->dvb->num);
+                                       __func__, fe->dvb->num);
                                for (i = 1; i < 10; i++)
                                        printk("%d: %d\n", i, timeval_usec_diff(tv[i-1] , tv[i]));
                        }
@@ -1037,7 +1037,7 @@ static unsigned int dvb_frontend_poll(struct file *file, struct poll_table_struc
        struct dvb_frontend *fe = dvbdev->priv;
        struct dvb_frontend_private *fepriv = fe->frontend_priv;
 
-       dprintk ("%s\n", __FUNCTION__);
+       dprintk ("%s\n", __func__);
 
        poll_wait (file, &fepriv->events.wait_queue, wait);
 
@@ -1054,7 +1054,7 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
        struct dvb_frontend_private *fepriv = fe->frontend_priv;
        int ret;
 
-       dprintk ("%s\n", __FUNCTION__);
+       dprintk ("%s\n", __func__);
 
        if (dvbdev->users == -1 && fe->ops.ts_bus_ctrl) {
                if ((ret = fe->ops.ts_bus_ctrl(fe, 1)) < 0)
@@ -1095,7 +1095,7 @@ static int dvb_frontend_release(struct inode *inode, struct file *file)
        struct dvb_frontend_private *fepriv = fe->frontend_priv;
        int ret;
 
-       dprintk ("%s\n", __FUNCTION__);
+       dprintk ("%s\n", __func__);
 
        if ((file->f_flags & O_ACCMODE) != O_RDONLY)
                fepriv->release_jiffies = jiffies;
@@ -1135,7 +1135,7 @@ int dvb_register_frontend(struct dvb_adapter* dvb,
                .kernel_ioctl = dvb_frontend_ioctl
        };
 
-       dprintk ("%s\n", __FUNCTION__);
+       dprintk ("%s\n", __func__);
 
        if (mutex_lock_interruptible(&frontend_mutex))
                return -ERESTARTSYS;
@@ -1169,7 +1169,7 @@ EXPORT_SYMBOL(dvb_register_frontend);
 int dvb_unregister_frontend(struct dvb_frontend* fe)
 {
        struct dvb_frontend_private *fepriv = fe->frontend_priv;
-       dprintk ("%s\n", __FUNCTION__);
+       dprintk ("%s\n", __func__);
 
        mutex_lock(&frontend_mutex);
        dvb_frontend_stop (fe);
index 4c8b62e2c035246095e5fc6e750a3127e7a188b3..56d871cfd7fc23bf6406fca9f3f0482830c6b881 100644 (file)
@@ -354,7 +354,7 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
 #ifdef ULE_DEBUG
        /* The code inside ULE_DEBUG keeps a history of the last 100 TS cells processed. */
        static unsigned char ule_hist[100*TS_SZ];
-       static unsigned char *ule_where = ule_hist, ule_dump = 0;
+       static unsigned char *ule_where = ule_hist, ule_dump;
 #endif
 
        /* For all TS cells in current buffer.
@@ -965,17 +965,17 @@ static int dvb_net_feed_start(struct net_device *dev)
        struct dmx_demux *demux = priv->demux;
        unsigned char *mac = (unsigned char *) dev->dev_addr;
 
-       dprintk("%s: rx_mode %i\n", __FUNCTION__, priv->rx_mode);
+       dprintk("%s: rx_mode %i\n", __func__, priv->rx_mode);
        mutex_lock(&priv->mutex);
        if (priv->tsfeed || priv->secfeed || priv->secfilter || priv->multi_secfilter[0])
-               printk("%s: BUG %d\n", __FUNCTION__, __LINE__);
+               printk("%s: BUG %d\n", __func__, __LINE__);
 
        priv->secfeed=NULL;
        priv->secfilter=NULL;
        priv->tsfeed = NULL;
 
        if (priv->feedtype == DVB_NET_FEEDTYPE_MPE) {
-               dprintk("%s: alloc secfeed\n", __FUNCTION__);
+               dprintk("%s: alloc secfeed\n", __func__);
                ret=demux->allocate_section_feed(demux, &priv->secfeed,
                                         dvb_net_sec_callback);
                if (ret<0) {
@@ -993,38 +993,38 @@ static int dvb_net_feed_start(struct net_device *dev)
                }
 
                if (priv->rx_mode != RX_MODE_PROMISC) {
-                       dprintk("%s: set secfilter\n", __FUNCTION__);
+                       dprintk("%s: set secfilter\n", __func__);
                        dvb_net_filter_sec_set(dev, &priv->secfilter, mac, mask_normal);
                }
 
                switch (priv->rx_mode) {
                case RX_MODE_MULTI:
                        for (i = 0; i < priv->multi_num; i++) {
-                               dprintk("%s: set multi_secfilter[%d]\n", __FUNCTION__, i);
+                               dprintk("%s: set multi_secfilter[%d]\n", __func__, i);
                                dvb_net_filter_sec_set(dev, &priv->multi_secfilter[i],
                                                       priv->multi_macs[i], mask_normal);
                        }
                        break;
                case RX_MODE_ALL_MULTI:
                        priv->multi_num=1;
-                       dprintk("%s: set multi_secfilter[0]\n", __FUNCTION__);
+                       dprintk("%s: set multi_secfilter[0]\n", __func__);
                        dvb_net_filter_sec_set(dev, &priv->multi_secfilter[0],
                                               mac_allmulti, mask_allmulti);
                        break;
                case RX_MODE_PROMISC:
                        priv->multi_num=0;
-                       dprintk("%s: set secfilter\n", __FUNCTION__);
+                       dprintk("%s: set secfilter\n", __func__);
                        dvb_net_filter_sec_set(dev, &priv->secfilter, mac, mask_promisc);
                        break;
                }
 
-               dprintk("%s: start filtering\n", __FUNCTION__);
+               dprintk("%s: start filtering\n", __func__);
                priv->secfeed->start_filtering(priv->secfeed);
        } else if (priv->feedtype == DVB_NET_FEEDTYPE_ULE) {
                struct timespec timeout = { 0, 10000000 }; // 10 msec
 
                /* we have payloads encapsulated in TS */
-               dprintk("%s: alloc tsfeed\n", __FUNCTION__);
+               dprintk("%s: alloc tsfeed\n", __func__);
                ret = demux->allocate_ts_feed(demux, &priv->tsfeed, dvb_net_ts_callback);
                if (ret < 0) {
                        printk("%s: could not allocate ts feed\n", dev->name);
@@ -1048,7 +1048,7 @@ static int dvb_net_feed_start(struct net_device *dev)
                        goto error;
                }
 
-               dprintk("%s: start filtering\n", __FUNCTION__);
+               dprintk("%s: start filtering\n", __func__);
                priv->tsfeed->start_filtering(priv->tsfeed);
        } else
                ret = -EINVAL;
@@ -1063,17 +1063,17 @@ static int dvb_net_feed_stop(struct net_device *dev)
        struct dvb_net_priv *priv = dev->priv;
        int i, ret = 0;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
        mutex_lock(&priv->mutex);
        if (priv->feedtype == DVB_NET_FEEDTYPE_MPE) {
                if (priv->secfeed) {
                        if (priv->secfeed->is_filtering) {
-                               dprintk("%s: stop secfeed\n", __FUNCTION__);
+                               dprintk("%s: stop secfeed\n", __func__);
                                priv->secfeed->stop_filtering(priv->secfeed);
                        }
 
                        if (priv->secfilter) {
-                               dprintk("%s: release secfilter\n", __FUNCTION__);
+                               dprintk("%s: release secfilter\n", __func__);
                                priv->secfeed->release_filter(priv->secfeed,
                                                              priv->secfilter);
                                priv->secfilter=NULL;
@@ -1082,7 +1082,7 @@ static int dvb_net_feed_stop(struct net_device *dev)
                        for (i=0; i<priv->multi_num; i++) {
                                if (priv->multi_secfilter[i]) {
                                        dprintk("%s: release multi_filter[%d]\n",
-                                               __FUNCTION__, i);
+                                               __func__, i);
                                        priv->secfeed->release_filter(priv->secfeed,
                                                                      priv->multi_secfilter[i]);
                                        priv->multi_secfilter[i] = NULL;
@@ -1096,7 +1096,7 @@ static int dvb_net_feed_stop(struct net_device *dev)
        } else if (priv->feedtype == DVB_NET_FEEDTYPE_ULE) {
                if (priv->tsfeed) {
                        if (priv->tsfeed->is_filtering) {
-                               dprintk("%s: stop tsfeed\n", __FUNCTION__);
+                               dprintk("%s: stop tsfeed\n", __func__);
                                priv->tsfeed->stop_filtering(priv->tsfeed);
                        }
                        priv->demux->release_ts_feed(priv->demux, priv->tsfeed);
index ac9d93cf83c6c898d48a6dd17622ce40e6d42094..872985b7912d3db12036abd78380a012012033e1 100644 (file)
@@ -90,7 +90,11 @@ void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf)
        rbuf->error = 0;
 }
 
-
+void dvb_ringbuffer_reset(struct dvb_ringbuffer *rbuf)
+{
+       rbuf->pread = rbuf->pwrite = 0;
+       rbuf->error = 0;
+}
 
 void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf)
 {
index d97714e757362b6ee62204de6444b68337faaede..890826262966c16c709815d83e1e08ac68c08058 100644 (file)
@@ -69,6 +69,7 @@ struct dvb_ringbuffer {
 **     to lock read or write operations.
 **     Two or more readers must be locked against each other.
 **     Flushing the buffer counts as a read operation.
+**     Resetting the buffer counts as a read and write operation.
 **     Two or more writers must be locked against each other.
 */
 
@@ -85,6 +86,13 @@ extern ssize_t dvb_ringbuffer_free(struct dvb_ringbuffer *rbuf);
 extern ssize_t dvb_ringbuffer_avail(struct dvb_ringbuffer *rbuf);
 
 
+/*
+** Reset the read and write pointers to zero and flush the buffer
+** This counts as a read and write operation
+*/
+extern void dvb_ringbuffer_reset(struct dvb_ringbuffer *rbuf);
+
+
 /* read routines & macros */
 /* ---------------------- */
 /* flush buffer */
index 18738faecbbc51adc7f9311c066779cafdee0b88..8b56d929f7fd52c63f1fbda3165bcce33d0aa11d 100644 (file)
@@ -49,7 +49,6 @@ static const char * const dnames[] = {
        "net", "osd"
 };
 
-#define DVB_MAX_ADAPTERS       8
 #define DVB_MAX_IDS            4
 #define nums2minor(num,type,id)        ((num << 6) | (id << 4) | type)
 #define MAX_DVB_MINORS         (DVB_MAX_ADAPTERS*64)
@@ -97,7 +96,7 @@ static int dvb_device_open(struct inode *inode, struct file *file)
 }
 
 
-static struct file_operations dvb_device_fops =
+static const struct file_operations dvb_device_fops =
 {
        .owner =        THIS_MODULE,
        .open =         dvb_device_open,
@@ -196,7 +195,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
        if ((id = dvbdev_get_free_id (adap, type)) < 0){
                mutex_unlock(&dvbdev_register_lock);
                *pdvbdev = NULL;
-               printk(KERN_ERR "%s: couldn't find free device id\n", __FUNCTION__);
+               printk(KERN_ERR "%s: couldn't find free device id\n", __func__);
                return -ENFILE;
        }
 
@@ -235,7 +234,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
                               "dvb%d.%s%d", adap->num, dnames[type], id);
        if (IS_ERR(clsdev)) {
                printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n",
-                      __FUNCTION__, adap->num, dnames[type], id, PTR_ERR(clsdev));
+                      __func__, adap->num, dnames[type], id, PTR_ERR(clsdev));
                return PTR_ERR(clsdev);
        }
 
@@ -262,18 +261,25 @@ void dvb_unregister_device(struct dvb_device *dvbdev)
 }
 EXPORT_SYMBOL(dvb_unregister_device);
 
+static int dvbdev_check_free_adapter_num(int num)
+{
+       struct list_head *entry;
+       list_for_each(entry, &dvb_adapter_list) {
+               struct dvb_adapter *adap;
+               adap = list_entry(entry, struct dvb_adapter, list_head);
+               if (adap->num == num)
+                       return 0;
+       }
+       return 1;
+}
 
 static int dvbdev_get_free_adapter_num (void)
 {
        int num = 0;
 
        while (num < DVB_MAX_ADAPTERS) {
-               struct dvb_adapter *adap;
-               list_for_each_entry(adap, &dvb_adapter_list, list_head)
-                       if (adap->num == num)
-                               goto skip;
-               return num;
-skip:
+               if (dvbdev_check_free_adapter_num(num))
+                       return num;
                num++;
        }
 
@@ -281,13 +287,28 @@ skip:
 }
 
 
-int dvb_register_adapter(struct dvb_adapter *adap, const char *name, struct module *module, struct device *device)
+int dvb_register_adapter(struct dvb_adapter *adap, const char *name,
+                        struct module *module, struct device *device,
+                        short *adapter_nums)
 {
-       int num;
+       int i, num;
 
        mutex_lock(&dvbdev_register_lock);
 
-       if ((num = dvbdev_get_free_adapter_num ()) < 0) {
+       for (i = 0; i < DVB_MAX_ADAPTERS; ++i) {
+               num = adapter_nums[i];
+               if (num >= 0  &&  num < DVB_MAX_ADAPTERS) {
+               /* use the one the driver asked for */
+                       if (dvbdev_check_free_adapter_num(num))
+                               break;
+               } else {
+                       num = dvbdev_get_free_adapter_num();
+                       break;
+               }
+               num = -1;
+       }
+
+       if (num < 0) {
                mutex_unlock(&dvbdev_register_lock);
                return -ENFILE;
        }
index 6dff10ebf47052a1f92872e7a95541f56e845646..5f9a737c6de194065d3e5f7e4de06e0407d8c322 100644 (file)
 
 #define DVB_MAJOR 212
 
+#define DVB_MAX_ADAPTERS 8
+
+#define DVB_UNSET (-1)
+
 #define DVB_DEVICE_VIDEO      0
 #define DVB_DEVICE_AUDIO      1
 #define DVB_DEVICE_SEC        2
 #define DVB_DEVICE_NET        7
 #define DVB_DEVICE_OSD        8
 
+#define DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr) \
+       static short adapter_nr[] = \
+               {[0 ... (DVB_MAX_ADAPTERS - 1)] = DVB_UNSET }; \
+       module_param_array(adapter_nr, short, NULL, 0444); \
+       MODULE_PARM_DESC(adapter_nr, "DVB adapter numbers")
 
 struct dvb_adapter {
        int num;
@@ -78,7 +87,9 @@ struct dvb_device {
 };
 
 
-extern int dvb_register_adapter (struct dvb_adapter *adap, const char *name, struct module *module, struct device *device);
+extern int dvb_register_adapter(struct dvb_adapter *adap, const char *name,
+                               struct module *module, struct device *device,
+                               short *adapter_nums);
 extern int dvb_unregister_adapter (struct dvb_adapter *adap);
 
 extern int dvb_register_device (struct dvb_adapter *adap,
index d73934dd4c573790790c9cd885db3ef7063f02f7..3c8493d2026dd329a9e20c1c6faaf2d9581b94b3 100644 (file)
@@ -105,6 +105,7 @@ config DVB_USB_CXUSB
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
        select DVB_MT352 if !DVB_FE_CUSTOMISE
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
+       select TUNER_SIMPLE if !DVB_FE_CUSTOMISE
        help
          Say Y here to support the Conexant USB2.0 hybrid reference design.
          Currently, only DVB and ATSC modes are supported, analog mode
index a6c5f19f680d6dd38452a0f5356885bfa082994b..dc8c8784caa8a8c46e36886acdcbff6e8f3eeb1e 100644 (file)
@@ -18,6 +18,9 @@
 static int debug;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debugging level (rc=1 (or-able))." DVB_USB_DEBUG_STATUS);
+
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 #define deb_rc(args...)   dprintk(debug,0x01,args)
 
 static int a800_power_ctrl(struct dvb_usb_device *d, int onoff)
@@ -94,7 +97,8 @@ static struct dvb_usb_device_properties a800_properties;
 static int a800_probe(struct usb_interface *intf,
                const struct usb_device_id *id)
 {
-       return dvb_usb_device_init(intf,&a800_properties,THIS_MODULE,NULL);
+       return dvb_usb_device_init(intf, &a800_properties,
+                                  THIS_MODULE, NULL, adapter_nr);
 }
 
 /* do not change the order of the ID table */
index e7f76f515b4f6bbe293832596daf20c78dc0d0b4..cfe71feefcad27a8e64598316a366bda99ae8985 100644 (file)
@@ -39,6 +39,8 @@ int dvb_usb_af9005_dump_eeprom = 0;
 module_param_named(dump_eeprom, dvb_usb_af9005_dump_eeprom, int, 0);
 MODULE_PARM_DESC(dump_eeprom, "dump contents of the eeprom.");
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 /* remote control decoder */
 int (*rc_decode) (struct dvb_usb_device * d, u8 * data, int len, u32 * event,
                  int *state);
@@ -1020,7 +1022,8 @@ static struct dvb_usb_device_properties af9005_properties;
 static int af9005_usb_probe(struct usb_interface *intf,
                            const struct usb_device_id *id)
 {
-       return dvb_usb_device_init(intf, &af9005_properties, THIS_MODULE, NULL);
+       return dvb_usb_device_init(intf, &af9005_properties,
+                                  THIS_MODULE, NULL, adapter_nr);
 }
 
 static struct usb_device_id af9005_usb_table[] = {
index f3ff8131469607422e2599b88492521bac9e3f78..2ccb90fa60c85917cd9604443cb13e5169e61f5f 100644 (file)
@@ -19,6 +19,8 @@ static int dvb_usb_au6610_debug;
 module_param_named(debug, dvb_usb_au6610_debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS);
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 static int au6610_usb_msg(struct dvb_usb_device *d, u8 operation, u8 addr,
                          u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen)
 {
@@ -163,7 +165,9 @@ static int au6610_probe(struct usb_interface *intf,
        if (intf->num_altsetting < AU6610_ALTSETTING_COUNT)
                return -ENODEV;
 
-       if ((ret = dvb_usb_device_init(intf, &au6610_properties, THIS_MODULE, &d)) == 0) {
+       ret = dvb_usb_device_init(intf, &au6610_properties, THIS_MODULE, &d,
+                                 adapter_nr);
+       if (ret == 0) {
                alt = usb_altnum_to_altsetting(intf, AU6610_ALTSETTING);
 
                if (alt == NULL) {
index c58365005ac1cb32e0f7739918f6e3b3f8a37a97..720fcd1c3c1d75caad387932f9bc56329c42ff47 100644 (file)
@@ -23,6 +23,8 @@
  *
  * see Documentation/dvb/README.dvb-usb for more information
  */
+#include <media/tuner.h>
+
 #include "cxusb.h"
 
 #include "cx22702.h"
 #include "mt352_priv.h"
 #include "zl10353.h"
 #include "tuner-xc2028.h"
-#include "tuner-xc2028-types.h"
+#include "tuner-simple.h"
 
 /* debug */
 static int dvb_usb_cxusb_debug;
 module_param_named(debug, dvb_usb_cxusb_debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS);
+
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 #define deb_info(args...)   dprintk(dvb_usb_cxusb_debug,0x01,args)
 #define deb_i2c(args...)    if (d->udev->descriptor.idVendor == USB_VID_MEDION) \
                                dprintk(dvb_usb_cxusb_debug,0x01,args)
@@ -450,8 +455,9 @@ static struct mt352_config cxusb_mt352_xc3028_config = {
 /* Callbacks for DVB USB */
 static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap)
 {
-       dvb_attach(dvb_pll_attach, adap->fe, 0x61, &adap->dev->i2c_adap,
-                  DVB_PLL_FMD1216ME);
+       dvb_attach(simple_tuner_attach, adap->fe,
+                  &adap->dev->i2c_adap, 0x61,
+                  TUNER_PHILIPS_FMD1216ME_MK3);
        return 0;
 }
 
@@ -477,8 +483,8 @@ static int cxusb_dtt7579_tuner_attach(struct dvb_usb_adapter *adap)
 
 static int cxusb_lgh064f_tuner_attach(struct dvb_usb_adapter *adap)
 {
-       dvb_attach(dvb_pll_attach, adap->fe, 0x61, &adap->dev->i2c_adap,
-                  DVB_PLL_LG_TDVS_H06XF);
+       dvb_attach(simple_tuner_attach, adap->fe,
+                  &adap->dev->i2c_adap, 0x61, TUNER_LG_TDVS_H06XF);
        return 0;
 }
 
@@ -488,14 +494,14 @@ static int dvico_bluebird_xc2028_callback(void *ptr, int command, int arg)
 
        switch (command) {
        case XC2028_TUNER_RESET:
-               deb_info("%s: XC2028_TUNER_RESET %d\n", __FUNCTION__, arg);
+               deb_info("%s: XC2028_TUNER_RESET %d\n", __func__, arg);
                cxusb_bluebird_gpio_pulse(d, 0x01, 1);
                break;
        case XC2028_RESET_CLK:
-               deb_info("%s: XC2028_RESET_CLK %d\n", __FUNCTION__, arg);
+               deb_info("%s: XC2028_RESET_CLK %d\n", __func__, arg);
                break;
        default:
-               deb_info("%s: unknown command %d, arg %d\n", __FUNCTION__,
+               deb_info("%s: unknown command %d, arg %d\n", __func__,
                         command, arg);
                return -EINVAL;
        }
@@ -509,13 +515,12 @@ static int cxusb_dvico_xc3028_tuner_attach(struct dvb_usb_adapter *adap)
        struct xc2028_config      cfg = {
                .i2c_adap  = &adap->dev->i2c_adap,
                .i2c_addr  = 0x61,
-               .video_dev = adap->dev,
                .callback  = dvico_bluebird_xc2028_callback,
        };
        static struct xc2028_ctrl ctl = {
                .fname       = "xc3028-dvico-au-01.fw",
                .max_len     = 64,
-               .scode_table = ZARLINK456,
+               .scode_table = XC3028_FE_ZARLINK456,
        };
 
        fe = dvb_attach(xc2028_attach, adap->fe, &cfg);
@@ -720,16 +725,24 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_prope
 static int cxusb_probe(struct usb_interface *intf,
                       const struct usb_device_id *id)
 {
-       if (dvb_usb_device_init(intf,&cxusb_medion_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&cxusb_bluebird_lgh064f_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&cxusb_bluebird_dee1601_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&cxusb_bluebird_lgz201_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&cxusb_bluebird_dtt7579_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&cxusb_bluebird_dualdig4_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&cxusb_bluebird_nano2_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&cxusb_bluebird_nano2_needsfirmware_properties,THIS_MODULE,NULL) == 0) {
+       if (0 == dvb_usb_device_init(intf, &cxusb_medion_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &cxusb_bluebird_lgh064f_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &cxusb_bluebird_dee1601_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &cxusb_bluebird_lgz201_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &cxusb_bluebird_dtt7579_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &cxusb_bluebird_dualdig4_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &cxusb_bluebird_nano2_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf,
+                               &cxusb_bluebird_nano2_needsfirmware_properties,
+                                    THIS_MODULE, NULL, adapter_nr))
                return 0;
-       }
 
        return -EINVAL;
 }
index 4a903ea958965d5bc7cbadbd96f2282e89dedf34..66d4dc6ba46fe8a78a9d597f3d45bdb6e6c5cf01 100644 (file)
@@ -37,6 +37,7 @@ struct dib0700_state {
        u8 channel_state;
        u16 mt2060_if1[2];
        u8 rc_toggle;
+       u8 rc_counter;
        u8 is_dib7000pc;
 };
 
@@ -44,12 +45,15 @@ extern int dib0700_set_gpio(struct dvb_usb_device *, enum dib07x0_gpios gpio, u8
 extern int dib0700_ctrl_clock(struct dvb_usb_device *d, u32 clk_MHz, u8 clock_out_gp3);
 extern int dib0700_ctrl_rd(struct dvb_usb_device *d, u8 *tx, u8 txlen, u8 *rx, u8 rxlen);
 extern int dib0700_download_firmware(struct usb_device *udev, const struct firmware *fw);
+extern int dib0700_rc_setup(struct dvb_usb_device *d);
 extern int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff);
 extern struct i2c_algorithm dib0700_i2c_algo;
 extern int dib0700_identify_state(struct usb_device *udev, struct dvb_usb_device_properties *props,
                        struct dvb_usb_device_description **desc, int *cold);
 
 extern int dib0700_device_count;
+extern int dvb_usb_dib0700_ir_proto;
 extern struct dvb_usb_device_properties dib0700_devices[];
 extern struct usb_device_id dib0700_usb_id_table[];
+
 #endif
index c9857d5c69829e68bbc9e82af68026ebc4d4288c..595a04696c87af2590588bf87013a44b8e44aa7c 100644 (file)
@@ -13,10 +13,12 @@ int dvb_usb_dib0700_debug;
 module_param_named(debug,dvb_usb_dib0700_debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debugging level (1=info,2=fw,4=fwdata,8=data (or-able))." DVB_USB_DEBUG_STATUS);
 
-static int dvb_usb_dib0700_ir_proto = 1;
+int dvb_usb_dib0700_ir_proto = 1;
 module_param(dvb_usb_dib0700_ir_proto, int, 0644);
 MODULE_PARM_DESC(dvb_usb_dib0700_ir_proto, "set ir protocol (0=NEC, 1=RC5 (default), 2=RC6).");
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 /* expecting rx buffer: request data[0] data[1] ... data[2] */
 static int dib0700_ctrl_wr(struct dvb_usb_device *d, u8 *tx, u8 txlen)
 {
@@ -261,7 +263,7 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
        return dib0700_ctrl_wr(adap->dev, b, 4);
 }
 
-static int dib0700_rc_setup(struct dvb_usb_device *d)
+int dib0700_rc_setup(struct dvb_usb_device *d)
 {
        u8 rc_setup[3] = {REQUEST_SET_RC, dvb_usb_dib0700_ir_proto, 0};
        int i = dib0700_ctrl_wr(d, rc_setup, 3);
@@ -279,7 +281,8 @@ static int dib0700_probe(struct usb_interface *intf,
        struct dvb_usb_device *dev;
 
        for (i = 0; i < dib0700_device_count; i++)
-               if (dvb_usb_device_init(intf, &dib0700_devices[i], THIS_MODULE, &dev) == 0)
+               if (dvb_usb_device_init(intf, &dib0700_devices[i], THIS_MODULE,
+                                       &dev, adapter_nr) == 0)
                {
                        dib0700_rc_setup(dev);
                        return 0;
index e7093826e975896f31153621f08edf7aef219bf7..6477fc66cc2381da08ff3637673e04042388470b 100644 (file)
@@ -13,6 +13,7 @@
 #include "dib7000p.h"
 #include "mt2060.h"
 #include "mt2266.h"
+#include "tuner-xc2028.h"
 #include "dib0070.h"
 
 static int force_lna_activation;
@@ -297,10 +298,156 @@ static int stk7700d_tuner_attach(struct dvb_usb_adapter *adap)
                &stk7700d_mt2266_config[adap->id]) == NULL ? -ENODEV : 0;;
 }
 
+/* STK7700-PH: Digital/Analog Hybrid Tuner, e.h. Cinergy HT USB HE */
+struct dibx000_agc_config xc3028_agc_config = {
+       BAND_VHF | BAND_UHF,       /* band_caps */
+
+       /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=0,
+        * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
+        * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */
+       (0 << 15) | (0 << 14) | (0 << 11) | (0 << 10) | (0 << 9) | (0 << 8) |
+       (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0), /* setup */
+
+       712,    /* inv_gain */
+       21,     /* time_stabiliz */
+
+       0,      /* alpha_level */
+       118,    /* thlock */
+
+       0,      /* wbd_inv */
+       2867,   /* wbd_ref */
+       0,      /* wbd_sel */
+       2,      /* wbd_alpha */
+
+       0,      /* agc1_max */
+       0,      /* agc1_min */
+       39718,  /* agc2_max */
+       9930,   /* agc2_min */
+       0,      /* agc1_pt1 */
+       0,      /* agc1_pt2 */
+       0,      /* agc1_pt3 */
+       0,      /* agc1_slope1 */
+       0,      /* agc1_slope2 */
+       0,      /* agc2_pt1 */
+       128,    /* agc2_pt2 */
+       29,     /* agc2_slope1 */
+       29,     /* agc2_slope2 */
+
+       17,     /* alpha_mant */
+       27,     /* alpha_exp */
+       23,     /* beta_mant */
+       51,     /* beta_exp */
+
+       1,      /* perform_agc_softsplit */
+};
+
+/* PLL Configuration for COFDM BW_MHz = 8.00 with external clock = 30.00 */
+struct dibx000_bandwidth_config xc3028_bw_config = {
+       60000, 30000, /* internal, sampling */
+       1, 8, 3, 1, 0, /* pll_cfg: prediv, ratio, range, reset, bypass */
+       0, 0, 1, 1, 0, /* misc: refdiv, bypclk_div, IO_CLK_en_core, ADClkSrc,
+                         modulo */
+       (3 << 14) | (1 << 12) | (524 << 0), /* sad_cfg: refsel, sel, freq_15k */
+       (1 << 25) | 5816102, /* ifreq = 5.200000 MHz */
+       20452225, /* timf */
+       30000000, /* xtal_hz */
+};
+
+static struct dib7000p_config stk7700ph_dib7700_xc3028_config = {
+       .output_mpeg2_in_188_bytes = 1,
+       .tuner_is_baseband = 1,
+
+       .agc_config_count = 1,
+       .agc = &xc3028_agc_config,
+       .bw  = &xc3028_bw_config,
+
+       .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS,
+       .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES,
+       .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS,
+};
+
+static int stk7700ph_xc3028_callback(void *ptr, int command, int arg)
+{
+       struct dvb_usb_adapter *adap = ptr;
+
+       switch (command) {
+       case XC2028_TUNER_RESET:
+               /* Send the tuner in then out of reset */
+               dib7000p_set_gpio(adap->fe, 8, 0, 0); msleep(10);
+               dib7000p_set_gpio(adap->fe, 8, 0, 1);
+               break;
+       case XC2028_RESET_CLK:
+               break;
+       default:
+               err("%s: unknown command %d, arg %d\n", __func__,
+                       command, arg);
+               return -EINVAL;
+       }
+       return 0;
+}
+
+static struct xc2028_ctrl stk7700ph_xc3028_ctrl = {
+       .fname = XC2028_DEFAULT_FIRMWARE,
+       .max_len = 64,
+       .demod = XC3028_FE_DIBCOM52,
+};
+
+static struct xc2028_config stk7700ph_xc3028_config = {
+       .i2c_addr = 0x61,
+       .callback = stk7700ph_xc3028_callback,
+       .ctrl = &stk7700ph_xc3028_ctrl,
+};
+
+static int stk7700ph_frontend_attach(struct dvb_usb_adapter *adap)
+{
+       struct usb_device_descriptor *desc = &adap->dev->udev->descriptor;
+
+       if (desc->idVendor  == USB_VID_PINNACLE &&
+           desc->idProduct == USB_PID_PINNACLE_EXPRESSCARD_320CX)
+       dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0);
+       else
+       dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1);
+       msleep(20);
+       dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1);
+       dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1);
+       dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1);
+       dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0);
+       msleep(10);
+       dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1);
+       msleep(20);
+       dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
+       msleep(10);
+
+       dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18,
+               &stk7700ph_dib7700_xc3028_config);
+
+       adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80,
+               &stk7700ph_dib7700_xc3028_config);
+
+       return adap->fe == NULL ? -ENODEV : 0;
+}
+
+static int stk7700ph_tuner_attach(struct dvb_usb_adapter *adap)
+{
+       struct i2c_adapter *tun_i2c;
+
+       tun_i2c = dib7000p_get_i2c_master(adap->fe,
+               DIBX000_I2C_INTERFACE_TUNER, 1);
+
+       stk7700ph_xc3028_config.i2c_adap = tun_i2c;
+       stk7700ph_xc3028_config.video_dev = adap;
+
+       return dvb_attach(xc2028_attach, adap->fe, &stk7700ph_xc3028_config)
+               == NULL ? -ENODEV : 0;
+}
+
 #define DEFAULT_RC_INTERVAL 150
 
 static u8 rc_request[] = { REQUEST_POLL_RC, 0 };
 
+/* Number of keypresses to ignore before start repeating */
+#define RC_REPEAT_DELAY 2
+
 static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
 {
        u8 key[4];
@@ -314,18 +461,67 @@ static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
                err("RC Query Failed");
                return -1;
        }
+
+       /* losing half of KEY_0 events from Philipps rc5 remotes.. */
        if (key[0]==0 && key[1]==0 && key[2]==0 && key[3]==0) return 0;
-       if (key[3-1]!=st->rc_toggle) {
+
+       /* info("%d: %2X %2X %2X %2X",dvb_usb_dib0700_ir_proto,(int)key[3-2],(int)key[3-3],(int)key[3-1],(int)key[3]);  */
+
+       dib0700_rc_setup(d); /* reset ir sensor data to prevent false events */
+
+       switch (dvb_usb_dib0700_ir_proto) {
+       case 0: {
+               /* NEC protocol sends repeat code as 0 0 0 FF */
+               if ((key[3-2] == 0x00) && (key[3-3] == 0x00) &&
+                   (key[3] == 0xFF)) {
+                       st->rc_counter++;
+                       if (st->rc_counter > RC_REPEAT_DELAY) {
+                               *event = d->last_event;
+                               *state = REMOTE_KEY_PRESSED;
+                               st->rc_counter = RC_REPEAT_DELAY;
+                       }
+                       return 0;
+               }
                for (i=0;i<d->props.rc_key_map_size; i++) {
                        if (keymap[i].custom == key[3-2] && keymap[i].data == key[3-3]) {
+                               st->rc_counter = 0;
+                               *event = keymap[i].event;
+                               *state = REMOTE_KEY_PRESSED;
+                               d->last_event = keymap[i].event;
+                               return 0;
+                       }
+               }
+               break;
+       }
+       default: {
+               /* RC-5 protocol changes toggle bit on new keypress */
+               for (i = 0; i < d->props.rc_key_map_size; i++) {
+                       if (keymap[i].custom == key[3-2] && keymap[i].data == key[3-3]) {
+                               if (d->last_event == keymap[i].event &&
+                                       key[3-1] == st->rc_toggle) {
+                                       st->rc_counter++;
+                                       /* prevents unwanted double hits */
+                                       if (st->rc_counter > RC_REPEAT_DELAY) {
+                                               *event = d->last_event;
+                                               *state = REMOTE_KEY_PRESSED;
+                                               st->rc_counter = RC_REPEAT_DELAY;
+                                       }
+
+                                       return 0;
+                               }
+                               st->rc_counter = 0;
                                *event = keymap[i].event;
                                *state = REMOTE_KEY_PRESSED;
-                               st->rc_toggle=key[3-1];
+                               st->rc_toggle = key[3-1];
+                               d->last_event = keymap[i].event;
                                return 0;
                        }
                }
-               err("Unknown remote controller key : %2X %2X",(int)key[3-2],(int)key[3-3]);
+               break;
        }
+       }
+       err("Unknown remote controller key: %2X %2X %2X %2X", (int) key[3-2], (int) key[3-3], (int) key[3-1], (int) key[3]);
+       d->last_event = 0;
        return 0;
 }
 
@@ -794,6 +990,10 @@ static struct dib7000p_config dib7070p_dib7000p_config = {
 /* STK7070P */
 static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap)
 {
+       if (adap->dev->udev->descriptor.idVendor  == USB_VID_PINNACLE &&
+       adap->dev->udev->descriptor.idProduct == USB_PID_PINNACLE_PCTV72E)
+       dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0);
+       else
        dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1);
        msleep(10);
        dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1);
@@ -808,9 +1008,11 @@ static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap)
        msleep(10);
        dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
 
-       dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, &dib7070p_dib7000p_config);
+       dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18,
+               &dib7070p_dib7000p_config);
 
-       adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, &dib7070p_dib7000p_config);
+       adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80,
+               &dib7070p_dib7000p_config);
        return adap->fe == NULL ? -ENODEV : 0;
 }
 
@@ -878,34 +1080,43 @@ static int stk7070pd_frontend_attach1(struct dvb_usb_adapter *adap)
 /* DVB-USB and USB stuff follows */
 struct usb_device_id dib0700_usb_id_table[] = {
 /* 0 */        { USB_DEVICE(USB_VID_DIBCOM,    USB_PID_DIBCOM_STK7700P) },
-               { USB_DEVICE(USB_VID_DIBCOM,    USB_PID_DIBCOM_STK7700P_PC) },
-
-               { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_500) },
-               { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_500_2) },
-               { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_STICK) },
+       { USB_DEVICE(USB_VID_DIBCOM,    USB_PID_DIBCOM_STK7700P_PC) },
+       { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_500) },
+       { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_500_2) },
+       { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_STICK) },
 /* 5 */        { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR) },
-               { USB_DEVICE(USB_VID_COMPRO,    USB_PID_COMPRO_VIDEOMATE_U500) },
-               { USB_DEVICE(USB_VID_UNIWILL,   USB_PID_UNIWILL_STK7700P) },
-               { USB_DEVICE(USB_VID_LEADTEK,   USB_PID_WINFAST_DTV_DONGLE_STK7700P) },
-               { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_STICK_2) },
+       { USB_DEVICE(USB_VID_COMPRO,    USB_PID_COMPRO_VIDEOMATE_U500) },
+       { USB_DEVICE(USB_VID_UNIWILL,   USB_PID_UNIWILL_STK7700P) },
+       { USB_DEVICE(USB_VID_LEADTEK,   USB_PID_WINFAST_DTV_DONGLE_STK7700P) },
+       { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_STICK_2) },
 /* 10 */{ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR_2) },
-               { USB_DEVICE(USB_VID_PINNACLE,  USB_PID_PINNACLE_PCTV2000E) },
-               { USB_DEVICE(USB_VID_TERRATEC,  USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY) },
-               { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_TD_STICK) },
-               { USB_DEVICE(USB_VID_DIBCOM,    USB_PID_DIBCOM_STK7700D) },
+       { USB_DEVICE(USB_VID_PINNACLE,  USB_PID_PINNACLE_PCTV2000E) },
+       { USB_DEVICE(USB_VID_TERRATEC,
+                       USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY) },
+       { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_TD_STICK) },
+       { USB_DEVICE(USB_VID_DIBCOM,    USB_PID_DIBCOM_STK7700D) },
 /* 15 */{ USB_DEVICE(USB_VID_DIBCOM,    USB_PID_DIBCOM_STK7070P) },
-               { USB_DEVICE(USB_VID_PINNACLE,  USB_PID_PINNACLE_PCTV_DVB_T_FLASH) },
-               { USB_DEVICE(USB_VID_DIBCOM,    USB_PID_DIBCOM_STK7070PD) },
-               { USB_DEVICE(USB_VID_PINNACLE,  USB_PID_PINNACLE_PCTV_DUAL_DIVERSITY_DVB_T) },
-               { USB_DEVICE(USB_VID_COMPRO,    USB_PID_COMPRO_VIDEOMATE_U500_PC) },
+       { USB_DEVICE(USB_VID_PINNACLE,  USB_PID_PINNACLE_PCTV_DVB_T_FLASH) },
+       { USB_DEVICE(USB_VID_DIBCOM,    USB_PID_DIBCOM_STK7070PD) },
+       { USB_DEVICE(USB_VID_PINNACLE,
+                       USB_PID_PINNACLE_PCTV_DUAL_DIVERSITY_DVB_T) },
+       { USB_DEVICE(USB_VID_COMPRO,    USB_PID_COMPRO_VIDEOMATE_U500_PC) },
 /* 20 */{ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_EXPRESS) },
-               { USB_DEVICE(USB_VID_GIGABYTE,  USB_PID_GIGABYTE_U7000) },
-               { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ARTEC_T14BR) },
-               { USB_DEVICE(USB_VID_ASUS,      USB_PID_ASUS_U3000) },
-               { USB_DEVICE(USB_VID_ASUS,      USB_PID_ASUS_U3100) },
-/* 25 */       { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_STICK_3) },
-               { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_MYTV_T) },
-               { 0 }           /* Terminating entry */
+       { USB_DEVICE(USB_VID_GIGABYTE,  USB_PID_GIGABYTE_U7000) },
+       { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ARTEC_T14BR) },
+       { USB_DEVICE(USB_VID_ASUS,      USB_PID_ASUS_U3000) },
+       { USB_DEVICE(USB_VID_ASUS,      USB_PID_ASUS_U3100) },
+/* 25 */{ USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_STICK_3) },
+       { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_MYTV_T) },
+       { USB_DEVICE(USB_VID_TERRATEC,  USB_PID_TERRATEC_CINERGY_HT_USB_XE) },
+       { USB_DEVICE(USB_VID_PINNACLE,  USB_PID_PINNACLE_EXPRESSCARD_320CX) },
+       { USB_DEVICE(USB_VID_PINNACLE,  USB_PID_PINNACLE_PCTV72E) },
+/* 30 */{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV73E) },
+       { USB_DEVICE(USB_VID_YUAN,      USB_PID_YUAN_EC372S) },
+       { USB_DEVICE(USB_VID_TERRATEC,  USB_PID_TERRATEC_CINERGY_HT_EXPRESS) },
+       { USB_DEVICE(USB_VID_TERRATEC,  USB_PID_TERRATEC_CINERGY_T_XXS) },
+       { USB_DEVICE(USB_VID_LEADTEK,   USB_PID_WINFAST_DTV_DONGLE_STK7700P_2) },
+       { 0 }           /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table);
 
@@ -969,7 +1180,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
                                { NULL },
                        },
                        {   "Leadtek Winfast DTV Dongle (STK7700P based)",
-                               { &dib0700_usb_id_table[8], NULL },
+                               { &dib0700_usb_id_table[8], &dib0700_usb_id_table[34] },
                                { NULL },
                        },
                        {   "AVerMedia AVerTV DVB-T Express",
@@ -1069,12 +1280,16 @@ struct dvb_usb_device_properties dib0700_devices[] = {
                        },
                },
 
-               .num_device_descs = 1,
+               .num_device_descs = 2,
                .devices = {
                        {   "ASUS My Cinema U3000 Mini DVBT Tuner",
                                { &dib0700_usb_id_table[23], NULL },
                                { NULL },
                        },
+                       {   "Yuan EC372S",
+                               { &dib0700_usb_id_table[31], NULL },
+                               { NULL },
+                       }
                }
        }, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
 
@@ -1090,7 +1305,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
                        },
                },
 
-               .num_device_descs = 6,
+               .num_device_descs = 9,
                .devices = {
                        {   "DiBcom STK7070P reference design",
                                { &dib0700_usb_id_table[15], NULL },
@@ -1116,6 +1331,18 @@ struct dvb_usb_device_properties dib0700_devices[] = {
                                { &dib0700_usb_id_table[26], NULL },
                                { NULL },
                        },
+                       {   "Pinnacle PCTV 72e",
+                               { &dib0700_usb_id_table[29], NULL },
+                               { NULL },
+                       },
+                       {   "Pinnacle PCTV 73e",
+                               { &dib0700_usb_id_table[30], NULL },
+                               { NULL },
+                       },
+                       {   "Terratec Cinergy T USB XXS",
+                               { &dib0700_usb_id_table[33], NULL },
+                               { NULL },
+                       },
                },
 
                .rc_interval      = DEFAULT_RC_INTERVAL,
@@ -1155,6 +1382,40 @@ struct dvb_usb_device_properties dib0700_devices[] = {
                                { NULL },
                        }
                }
+       }, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
+
+               .num_adapters = 1,
+               .adapter = {
+                       {
+                               .frontend_attach  = stk7700ph_frontend_attach,
+                               .tuner_attach     = stk7700ph_tuner_attach,
+
+                               DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
+
+                               .size_of_priv = sizeof(struct
+                                               dib0700_adapter_state),
+                       },
+               },
+
+               .num_device_descs = 3,
+               .devices = {
+                       {   "Terratec Cinergy HT USB XE",
+                               { &dib0700_usb_id_table[27], NULL },
+                               { NULL },
+                       },
+                       {   "Pinnacle Expresscard 320cx",
+                               { &dib0700_usb_id_table[28], NULL },
+                               { NULL },
+                       },
+                       {   "Terratec Cinergy HT Express",
+                               { &dib0700_usb_id_table[32], NULL },
+                               { NULL },
+                       },
+               },
+               .rc_interval      = DEFAULT_RC_INTERVAL,
+               .rc_key_map       = dib0700_rc_keys,
+               .rc_key_map_size  = ARRAY_SIZE(dib0700_rc_keys),
+               .rc_query         = dib0700_rc_query
        },
 };
 
index 043cadae08594f62ed1dead95e77439e728a3a2d..eeef50bff4f9b39c41e984ffd52a76ccb2720ddf 100644 (file)
@@ -14,6 +14,8 @@
  */
 #include "dibusb.h"
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 static int dib3000mb_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
 {
        struct dvb_usb_adapter *adap = fe->dvb->priv;
@@ -107,10 +109,14 @@ static struct dvb_usb_device_properties artec_t1_usb2_properties;
 static int dibusb_probe(struct usb_interface *intf,
                const struct usb_device_id *id)
 {
-       if (dvb_usb_device_init(intf,&dibusb1_1_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&dibusb1_1_an2235_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&dibusb2_0b_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&artec_t1_usb2_properties,THIS_MODULE,NULL) == 0)
+       if (0 == dvb_usb_device_init(intf, &dibusb1_1_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &dibusb1_1_an2235_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &dibusb2_0b_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &artec_t1_usb2_properties,
+                                    THIS_MODULE, NULL, adapter_nr))
                return 0;
 
        return -EINVAL;
index e7ea3e753d6da2eb287af30cb9b245214352b20b..059cec95531826aa8128bc3bcdc6e57e371ee6e7 100644 (file)
  */
 #include "dibusb.h"
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 /* USB Driver stuff */
 static struct dvb_usb_device_properties dibusb_mc_properties;
 
 static int dibusb_mc_probe(struct usb_interface *intf,
                const struct usb_device_id *id)
 {
-       return dvb_usb_device_init(intf,&dibusb_mc_properties,THIS_MODULE,NULL);
+       return dvb_usb_device_init(intf, &dibusb_mc_properties, THIS_MODULE,
+                                  NULL, adapter_nr);
 }
 
 /* do not change the order of the ID table */
index 3acbda4aa27e1e550cb548e4f2972c050c8d4ada..b545cf3eab2e5c0a63ac1f48ca67fca3cf8eae21 100644 (file)
@@ -20,6 +20,9 @@
 static int dvb_usb_digitv_debug;
 module_param_named(debug,dvb_usb_digitv_debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS);
+
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 #define deb_rc(args...)   dprintk(dvb_usb_digitv_debug,0x01,args)
 
 static int digitv_ctrl_msg(struct dvb_usb_device *d,
@@ -256,8 +259,9 @@ static int digitv_probe(struct usb_interface *intf,
                const struct usb_device_id *id)
 {
        struct dvb_usb_device *d;
-       int ret;
-       if ((ret = dvb_usb_device_init(intf,&digitv_properties,THIS_MODULE,&d)) == 0) {
+       int ret = dvb_usb_device_init(intf, &digitv_properties, THIS_MODULE, &d,
+                                     adapter_nr);
+       if (ret == 0) {
                u8 b[4] = { 0 };
 
                if (d != NULL) { /* do that only when the firmware is loaded */
index d86cf9bee91c23fdd8ec0b528994b51b95cd6f7b..81a6cbf601603a6e8b2313921291350b131bd1ae 100644 (file)
@@ -18,6 +18,8 @@ int dvb_usb_dtt200u_debug;
 module_param_named(debug,dvb_usb_dtt200u_debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2 (or-able))." DVB_USB_DEBUG_STATUS);
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 static int dtt200u_power_ctrl(struct dvb_usb_device *d, int onoff)
 {
        u8 b = SET_INIT;
@@ -101,11 +103,16 @@ static struct dvb_usb_device_properties wt220u_miglia_properties;
 static int dtt200u_usb_probe(struct usb_interface *intf,
                const struct usb_device_id *id)
 {
-       if (dvb_usb_device_init(intf,&dtt200u_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&wt220u_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&wt220u_fc_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&wt220u_zl0353_properties,THIS_MODULE,NULL) == 0 ||
-               dvb_usb_device_init(intf,&wt220u_miglia_properties,THIS_MODULE,NULL) == 0)
+       if (0 == dvb_usb_device_init(intf, &dtt200u_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &wt220u_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &wt220u_fc_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &wt220u_zl0353_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &wt220u_miglia_properties,
+                                    THIS_MODULE, NULL, adapter_nr))
                return 0;
 
        return -ENODEV;
index 35ab68f6dcf6346e5748e775c95a722c478295e5..6b7b2a89242e797d9bbe0c959ddef57515a25a8f 100644 (file)
@@ -40,7 +40,8 @@ extern int dvb_usb_adapter_stream_exit(struct dvb_usb_adapter *adap);
 extern int dvb_usb_i2c_init(struct dvb_usb_device *);
 extern int dvb_usb_i2c_exit(struct dvb_usb_device *);
 
-extern int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap);
+extern int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap,
+                                   short *adapter_nums);
 extern int dvb_usb_adapter_dvb_exit(struct dvb_usb_adapter *adap);
 extern int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap);
 extern int dvb_usb_adapter_frontend_exit(struct dvb_usb_adapter *adap);
index 4561a672da924c70ab9ba121c056b4591b1f55e4..ce8cd0c5d83120b173ad5fa4950d1f43a8c0a585 100644 (file)
@@ -77,12 +77,13 @@ static int dvb_usb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
        return dvb_usb_ctrl_feed(dvbdmxfeed,0);
 }
 
-int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap)
+int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums)
 {
-       int ret;
+       int ret = dvb_register_adapter(&adap->dvb_adap, adap->dev->desc->name,
+                                      adap->dev->owner, &adap->dev->udev->dev,
+                                      adapter_nums);
 
-       if ((ret = dvb_register_adapter(&adap->dvb_adap, adap->dev->desc->name,
-                       adap->dev->owner, &adap->dev->udev->dev)) < 0) {
+       if (ret < 0) {
                deb_info("dvb_register_adapter failed: error %d", ret);
                goto err;
        }
index aa4844ef875e02798c6f761423a0f33d9aeffd79..34245d1b7dd92a151233de0e266466e1df4b06ae 100644 (file)
 #define USB_VID_MSI                            0x0db0
 #define USB_VID_OPERA1                         0x695c
 #define USB_VID_PINNACLE                       0x2304
+#define USB_VID_TECHNOTREND                    0x0b48
 #define USB_VID_TERRATEC                       0x0ccd
 #define USB_VID_VISIONPLUS                     0x13d3
 #define USB_VID_TWINHAN                                0x1822
 #define USB_VID_ULTIMA_ELECTRONIC              0x05d8
 #define USB_VID_UNIWILL                                0x1584
 #define USB_VID_WIDEVIEW                       0x14aa
-/* dom : pour gigabyte u7000 */
 #define USB_VID_GIGABYTE                       0x1044
+#define USB_VID_YUAN                           0x1164
 
 
 /* Product IDs */
 #define USB_PID_AVERMEDIA_EXPRESS                      0xb568
 #define USB_PID_AVERMEDIA_VOLAR                                0xa807
 #define USB_PID_AVERMEDIA_VOLAR_2                      0xb808
+#define USB_PID_TECHNOTREND_CONNECT_S2400               0x3006
 #define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY       0x005a
+#define USB_PID_TERRATEC_CINERGY_HT_USB_XE             0x0058
+#define USB_PID_TERRATEC_CINERGY_HT_EXPRESS            0x0060
+#define USB_PID_TERRATEC_CINERGY_T_XXS                 0x0078
+#define USB_PID_PINNACLE_EXPRESSCARD_320CX             0x022e
 #define USB_PID_PINNACLE_PCTV2000E                     0x022c
 #define USB_PID_PINNACLE_PCTV_DVB_T_FLASH              0x0228
 #define USB_PID_PINNACLE_PCTV_DUAL_DIVERSITY_DVB_T     0x0229
+#define USB_PID_PINNACLE_PCTV72E                       0x0236
+#define USB_PID_PINNACLE_PCTV73E                       0x0237
 #define USB_PID_PCTV_200E                              0x020e
 #define USB_PID_PCTV_400E                              0x020f
 #define USB_PID_PCTV_450E                              0x0222
 #define USB_PID_WINFAST_DTV_DONGLE_COLD                        0x6025
 #define USB_PID_WINFAST_DTV_DONGLE_WARM                        0x6026
 #define USB_PID_WINFAST_DTV_DONGLE_STK7700P            0x6f00
+#define USB_PID_WINFAST_DTV_DONGLE_STK7700P_2          0x6f01
 #define USB_PID_GENPIX_8PSK_REV_1_COLD                 0x0200
 #define USB_PID_GENPIX_8PSK_REV_1_WARM                 0x0201
 #define USB_PID_GENPIX_8PSK_REV_2                      0x0202
 #define USB_PID_OPERA1_WARM                            0x3829
 #define USB_PID_LIFEVIEW_TV_WALKER_TWIN_COLD           0x0514
 #define USB_PID_LIFEVIEW_TV_WALKER_TWIN_WARM           0x0513
-/* dom pour gigabyte u7000 */
 #define USB_PID_GIGABYTE_U7000                         0x7001
 #define USB_PID_ASUS_U3000                             0x171f
 #define USB_PID_ASUS_U3100                             0x173f
+#define USB_PID_YUAN_EC372S                            0x1edc
 
 #endif
index cdd717c3fe45ac79c099a49397d529cf0ffdda5c..e331db8c77b210125c72f4cb475e4c71c9ca8798 100644 (file)
@@ -26,7 +26,7 @@ static int dvb_usb_force_pid_filter_usage;
 module_param_named(force_pid_filter_usage, dvb_usb_force_pid_filter_usage, int, 0444);
 MODULE_PARM_DESC(force_pid_filter_usage, "force all dvb-usb-devices to use a PID filter, if any (default: 0).");
 
-static int dvb_usb_adapter_init(struct dvb_usb_device *d)
+static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs)
 {
        struct dvb_usb_adapter *adap;
        int ret,n;
@@ -72,7 +72,7 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d)
                }
 
                if ((ret = dvb_usb_adapter_stream_init(adap)) ||
-                       (ret = dvb_usb_adapter_dvb_init(adap)) ||
+                       (ret = dvb_usb_adapter_dvb_init(adap, adapter_nrs)) ||
                        (ret = dvb_usb_adapter_frontend_init(adap))) {
                        return ret;
                }
@@ -122,7 +122,7 @@ static int dvb_usb_exit(struct dvb_usb_device *d)
        return 0;
 }
 
-static int dvb_usb_init(struct dvb_usb_device *d)
+static int dvb_usb_init(struct dvb_usb_device *d, short *adapter_nums)
 {
        int ret = 0;
 
@@ -143,7 +143,7 @@ static int dvb_usb_init(struct dvb_usb_device *d)
        dvb_usb_device_power_ctrl(d, 1);
 
        if ((ret = dvb_usb_i2c_init(d)) ||
-               (ret = dvb_usb_adapter_init(d))) {
+               (ret = dvb_usb_adapter_init(d, adapter_nums))) {
                dvb_usb_exit(d);
                return ret;
        }
@@ -213,8 +213,10 @@ int dvb_usb_device_power_ctrl(struct dvb_usb_device *d, int onoff)
 /*
  * USB
  */
-int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_device_properties
-               *props, struct module *owner,struct dvb_usb_device **du)
+int dvb_usb_device_init(struct usb_interface *intf,
+                       struct dvb_usb_device_properties *props,
+                       struct module *owner, struct dvb_usb_device **du,
+                       short *adapter_nums)
 {
        struct usb_device *udev = interface_to_usbdev(intf);
        struct dvb_usb_device *d = NULL;
@@ -254,7 +256,7 @@ int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_device_proper
        if (du != NULL)
                *du = d;
 
-       ret = dvb_usb_init(d);
+       ret = dvb_usb_init(d, adapter_nums);
 
        if (ret == 0)
                info("%s successfully initialized and connected.",desc->name);
index d1b3c7b81fffebad0da13a96406903d276db1d01..b1de0f7e26e8dce984c41bf6388ed6d2e932bd5d 100644 (file)
@@ -372,7 +372,10 @@ struct dvb_usb_device {
        void *priv;
 };
 
-extern int dvb_usb_device_init(struct usb_interface *, struct dvb_usb_device_properties *, struct module *, struct dvb_usb_device **);
+extern int dvb_usb_device_init(struct usb_interface *,
+                              struct dvb_usb_device_properties *,
+                              struct module *, struct dvb_usb_device **,
+                              short *adapter_nums);
 extern void dvb_usb_device_exit(struct usb_interface *);
 
 /* the generic read/write method for device control */
index 6b99d9f4d5b35846892f023998d903aafdc8caa5..0a8ac64a4e33a6a345cd6eea538b7397a33c6536 100644 (file)
@@ -16,6 +16,8 @@ static int dvb_usb_gl861_debug;
 module_param_named(debug,dvb_usb_gl861_debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS);
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 static int gl861_i2c_msg(struct dvb_usb_device *d, u8 addr,
                         u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen)
 {
@@ -140,7 +142,9 @@ static int gl861_probe(struct usb_interface *intf,
        if (intf->num_altsetting < 2)
                return -ENODEV;
 
-       if ((ret = dvb_usb_device_init(intf, &gl861_properties, THIS_MODULE, &d)) == 0) {
+       ret = dvb_usb_device_init(intf, &gl861_properties, THIS_MODULE, &d,
+                                 adapter_nr);
+       if (ret == 0) {
                alt = usb_altnum_to_altsetting(intf, 0);
 
                if (alt == NULL) {
index e37142d9271a83aa0f1b3e3575e21dc3c5a8a6f3..262a858c30684e28e0798034e776ed9138f3f255 100644 (file)
@@ -152,7 +152,7 @@ static int gp8psk_fe_send_diseqc_msg (struct dvb_frontend* fe,
 {
        struct gp8psk_fe_state *st = fe->demodulator_priv;
 
-       deb_fe("%s\n",__FUNCTION__);
+       deb_fe("%s\n",__func__);
 
        if (gp8psk_usb_out_op(st->d,SEND_DISEQC_COMMAND, m->msg[0], 0,
                        m->msg, m->msg_len)) {
@@ -167,7 +167,7 @@ static int gp8psk_fe_send_diseqc_burst (struct dvb_frontend* fe,
        struct gp8psk_fe_state *st = fe->demodulator_priv;
        u8 cmd;
 
-       deb_fe("%s\n",__FUNCTION__);
+       deb_fe("%s\n",__func__);
 
        /* These commands are certainly wrong */
        cmd = (burst == SEC_MINI_A) ? 0x00 : 0x01;
index 83e8535014c6d092fc08f5c91e0963f31408dca2..9a942afaf0af8d1a3c16cf9e5681656d3c1eca72 100644 (file)
@@ -22,6 +22,8 @@ int dvb_usb_gp8psk_debug;
 module_param_named(debug,dvb_usb_gp8psk_debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2,rc=4 (or-able))." DVB_USB_DEBUG_STATUS);
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen)
 {
        int ret = 0,try = 0;
@@ -190,7 +192,8 @@ static int gp8psk_usb_probe(struct usb_interface *intf,
 {
        int ret;
        struct usb_device *udev = interface_to_usbdev(intf);
-       ret =  dvb_usb_device_init(intf,&gp8psk_properties,THIS_MODULE,NULL);
+       ret = dvb_usb_device_init(intf, &gp8psk_properties,
+                                 THIS_MODULE, NULL, adapter_nr);
        if (ret == 0) {
                info("found Genpix USB device pID = %x (hex)",
                        le16_to_cpu(udev->descriptor.idProduct));
index a956bc503a4c7aa6480e06c21a6900c6328cee60..a12e6f784fdae92aade0f2b08040f93948206155 100644 (file)
@@ -22,6 +22,8 @@ static int dvb_usb_m920x_debug;
 module_param_named(debug,dvb_usb_m920x_debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS);
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 static int m920x_set_filter(struct dvb_usb_device *d, int type, int idx, int pid);
 
 static inline int m920x_read(struct usb_device *udev, u8 request, u16 value,
@@ -477,7 +479,7 @@ static struct qt1010_config m920x_qt1010_config = {
 /* Callbacks for DVB USB */
 static int m920x_mt352_frontend_attach(struct dvb_usb_adapter *adap)
 {
-       deb("%s\n",__FUNCTION__);
+       deb("%s\n",__func__);
 
        if ((adap->fe = dvb_attach(mt352_attach,
                                   &m920x_mt352_config,
@@ -489,7 +491,7 @@ static int m920x_mt352_frontend_attach(struct dvb_usb_adapter *adap)
 
 static int m920x_tda10046_08_frontend_attach(struct dvb_usb_adapter *adap)
 {
-       deb("%s\n",__FUNCTION__);
+       deb("%s\n",__func__);
 
        if ((adap->fe = dvb_attach(tda10046_attach,
                                   &m920x_tda10046_08_config,
@@ -501,7 +503,7 @@ static int m920x_tda10046_08_frontend_attach(struct dvb_usb_adapter *adap)
 
 static int m920x_tda10046_0b_frontend_attach(struct dvb_usb_adapter *adap)
 {
-       deb("%s\n",__FUNCTION__);
+       deb("%s\n",__func__);
 
        if ((adap->fe = dvb_attach(tda10046_attach,
                                   &m920x_tda10046_0b_config,
@@ -513,7 +515,7 @@ static int m920x_tda10046_0b_frontend_attach(struct dvb_usb_adapter *adap)
 
 static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap)
 {
-       deb("%s\n",__FUNCTION__);
+       deb("%s\n",__func__);
 
        if (dvb_attach(qt1010_attach, adap->fe, &adap->dev->i2c_adap, &m920x_qt1010_config) == NULL)
                return -ENODEV;
@@ -523,7 +525,7 @@ static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap)
 
 static int m920x_tda8275_60_tuner_attach(struct dvb_usb_adapter *adap)
 {
-       deb("%s\n",__FUNCTION__);
+       deb("%s\n",__func__);
 
        if (dvb_attach(tda827x_attach, adap->fe, 0x60, &adap->dev->i2c_adap, NULL) == NULL)
                return -ENODEV;
@@ -533,7 +535,7 @@ static int m920x_tda8275_60_tuner_attach(struct dvb_usb_adapter *adap)
 
 static int m920x_tda8275_61_tuner_attach(struct dvb_usb_adapter *adap)
 {
-       deb("%s\n",__FUNCTION__);
+       deb("%s\n",__func__);
 
        if (dvb_attach(tda827x_attach, adap->fe, 0x61, &adap->dev->i2c_adap, NULL) == NULL)
                return -ENODEV;
@@ -618,27 +620,31 @@ static int m920x_probe(struct usb_interface *intf,
                 * multi-tuner device
                 */
 
-               if ((ret = dvb_usb_device_init(intf, &megasky_properties,
-                                              THIS_MODULE, &d)) == 0) {
+               ret = dvb_usb_device_init(intf, &megasky_properties,
+                                         THIS_MODULE, &d, adapter_nr);
+               if (ret == 0) {
                        rc_init_seq = megasky_rc_init;
                        goto found;
                }
 
-               if ((ret = dvb_usb_device_init(intf, &digivox_mini_ii_properties,
-                                              THIS_MODULE, &d)) == 0) {
+               ret = dvb_usb_device_init(intf, &digivox_mini_ii_properties,
+                                         THIS_MODULE, &d, adapter_nr);
+               if (ret == 0) {
                        /* No remote control, so no rc_init_seq */
                        goto found;
                }
 
                /* This configures both tuners on the TV Walker Twin */
-               if ((ret = dvb_usb_device_init(intf, &tvwalkertwin_properties,
-                                              THIS_MODULE, &d)) == 0) {
+               ret = dvb_usb_device_init(intf, &tvwalkertwin_properties,
+                                         THIS_MODULE, &d, adapter_nr);
+               if (ret == 0) {
                        rc_init_seq = tvwalkertwin_rc_init;
                        goto found;
                }
 
-               if ((ret = dvb_usb_device_init(intf, &dposh_properties,
-                                              THIS_MODULE, &d)) == 0) {
+               ret = dvb_usb_device_init(intf, &dposh_properties,
+                                         THIS_MODULE, &d, adapter_nr);
+               if (ret == 0) {
                        /* Remote controller not supported yet. */
                        goto found;
                }
index badc468170ea615aff5a0eaa2332cd6559db4f09..07fb843c7c2b22d35b4a977dd405e2b6d5e97ab7 100644 (file)
@@ -15,6 +15,8 @@ static int debug;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debugging level (1=rc,2=eeprom (|-able))." DVB_USB_DEBUG_STATUS);
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 #define deb_rc(args...) dprintk(debug,0x01,args)
 #define deb_ee(args...) dprintk(debug,0x02,args)
 
@@ -142,7 +144,8 @@ static struct dvb_usb_device_properties nova_t_properties;
 static int nova_t_probe(struct usb_interface *intf,
                const struct usb_device_id *id)
 {
-       return dvb_usb_device_init(intf,&nova_t_properties,THIS_MODULE,NULL);
+       return dvb_usb_device_init(intf, &nova_t_properties,
+                                  THIS_MODULE, NULL, adapter_nr);
 }
 
 /* do not change the order of the ID table */
index 302cc67407c397e17091bc729c078e9d63f54031..7e32d11f32b0fd6e4ddc41714d7dd3242bacc819 100644 (file)
@@ -46,6 +46,9 @@ MODULE_PARM_DESC(debug,
                 "set debugging level (1=info,xfer=2,pll=4,ts=8,err=16,rc=32,fw=64 (or-able))."
                 DVB_USB_DEBUG_STATUS);
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
+
 static int opera1_xilinx_rw(struct usb_device *dev, u8 request, u16 value,
                            u8 * data, u16 len, int flags)
 {
@@ -243,7 +246,7 @@ static struct stv0299_config opera1_stv0299_config = {
        .mclk = 88000000UL,
        .invert = 1,
        .skip_reinit = 0,
-       .lock_output = STV0229_LOCKOUTPUT_0,
+       .lock_output = STV0299_LOCKOUTPUT_0,
        .volt13_op0_op1 = STV0299_VOLT13_OP0,
        .inittab = opera1_inittab,
        .set_symbol_rate = opera1_stv0299_set_symbol_rate,
@@ -548,7 +551,8 @@ static int opera1_probe(struct usb_interface *intf,
                return -EINVAL;
        }
 
-       if (dvb_usb_device_init(intf, &opera1_properties, THIS_MODULE, NULL) != 0)
+       if (0 != dvb_usb_device_init(intf, &opera1_properties,
+                                    THIS_MODULE, NULL, adapter_nr))
                return -EINVAL;
        return 0;
 }
index 3b9da9c25c6e8d15dc48925b8cd399533453fc6e..20ca9d9ee99b23aedb60d3ecf3e892c5d9ae71a5 100644 (file)
@@ -37,6 +37,8 @@ static int dvb_usb_ttusb2_debug;
 module_param_named(debug,dvb_usb_ttusb2_debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debugging level (1=info (or-able))." DVB_USB_DEBUG_STATUS);
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 struct ttusb2_state {
        u8 id;
 };
@@ -145,6 +147,7 @@ static struct tda10086_config tda10086_config = {
        .demod_address = 0x0e,
        .invert = 0,
        .diseqc_tone = 1,
+       .xtal_freq = TDA10086_XTAL_16M,
 };
 
 static int ttusb2_frontend_attach(struct dvb_usb_adapter *adap)
@@ -176,17 +179,25 @@ static int ttusb2_tuner_attach(struct dvb_usb_adapter *adap)
 
 /* DVB USB Driver stuff */
 static struct dvb_usb_device_properties ttusb2_properties;
+static struct dvb_usb_device_properties ttusb2_properties_s2400;
 
 static int ttusb2_probe(struct usb_interface *intf,
                const struct usb_device_id *id)
 {
-       return dvb_usb_device_init(intf,&ttusb2_properties,THIS_MODULE,NULL);
+       if (0 == dvb_usb_device_init(intf, &ttusb2_properties,
+                                    THIS_MODULE, NULL, adapter_nr) ||
+           0 == dvb_usb_device_init(intf, &ttusb2_properties_s2400,
+                                    THIS_MODULE, NULL, adapter_nr))
+               return 0;
+       return -ENODEV;
 }
 
 static struct usb_device_id ttusb2_table [] = {
-               { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_400E) },
-               { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_450E) },
-               {}              /* Terminating entry */
+       { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_400E) },
+       { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_450E) },
+       { USB_DEVICE(USB_VID_TECHNOTREND,
+               USB_PID_TECHNOTREND_CONNECT_S2400) },
+       {}              /* Terminating entry */
 };
 MODULE_DEVICE_TABLE (usb, ttusb2_table);
 
@@ -242,6 +253,54 @@ static struct dvb_usb_device_properties ttusb2_properties = {
        }
 };
 
+static struct dvb_usb_device_properties ttusb2_properties_s2400 = {
+       .caps = DVB_USB_IS_AN_I2C_ADAPTER,
+
+       .usb_ctrl = CYPRESS_FX2,
+       .firmware = "dvb-usb-tt-s2400-01.fw",
+
+       .size_of_priv = sizeof(struct ttusb2_state),
+
+       .num_adapters = 1,
+       .adapter = {
+               {
+                       .streaming_ctrl   = NULL,
+
+                       .frontend_attach  = ttusb2_frontend_attach,
+                       .tuner_attach     = ttusb2_tuner_attach,
+
+                       /* parameter for the MPEG2-data transfer */
+                       .stream = {
+                               .type = USB_ISOC,
+                               .count = 5,
+                               .endpoint = 0x02,
+                               .u = {
+                                       .isoc = {
+                                               .framesperurb = 4,
+                                               .framesize = 940,
+                                               .interval = 1,
+                                       }
+                               }
+                       }
+               }
+       },
+
+       .power_ctrl       = ttusb2_power_ctrl,
+       .identify_state   = ttusb2_identify_state,
+
+       .i2c_algo         = &ttusb2_i2c_algo,
+
+       .generic_bulk_ctrl_endpoint = 0x01,
+
+       .num_device_descs = 1,
+       .devices = {
+               {   "Technotrend TT-connect S-2400",
+                       { &ttusb2_table[2], NULL },
+                       { NULL },
+               },
+       }
+};
+
 static struct usb_driver ttusb2_driver = {
        .name           = "dvb_usb_ttusb2",
        .probe          = ttusb2_probe,
index 0dcab3d4e2362bcfd5f1862a236aa56f4b94b920..9e7653bb3b660bc4c44985db551cf94e0f65ee5e 100644 (file)
@@ -13,6 +13,8 @@
 
 #include "mt352.h"
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 static int umt_mt352_demod_init(struct dvb_frontend *fe)
 {
        static u8 mt352_clock_config[] = { 0x89, 0xb8, 0x2d };
@@ -75,7 +77,8 @@ static struct dvb_usb_device_properties umt_properties;
 static int umt_probe(struct usb_interface *intf,
                const struct usb_device_id *id)
 {
-       if (dvb_usb_device_init(intf,&umt_properties,THIS_MODULE,NULL) == 0)
+       if (0 == dvb_usb_device_init(intf, &umt_properties,
+                                    THIS_MODULE, NULL, adapter_nr))
                return 0;
        return -EINVAL;
 }
index c3fdc7cd094e33f41c4e2c34f4ec7b565233d2e6..ccc7e445266450dc41efd1313396b53c762db46d 100644 (file)
@@