]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
media: move dvb kAPI headers to include/media
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 28 Dec 2017 18:03:51 +0000 (13:03 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 28 Dec 2017 18:16:01 +0000 (13:16 -0500)
Except for DVB, all media kAPI headers are at include/media.

Move the headers to it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
335 files changed:
Documentation/media/kapi/dtv-ca.rst
Documentation/media/kapi/dtv-common.rst
Documentation/media/kapi/dtv-demux.rst
Documentation/media/kapi/dtv-frontend.rst
Documentation/media/kapi/dtv-net.rst
drivers/media/common/b2c2/Makefile
drivers/media/common/b2c2/flexcop-common.h
drivers/media/common/siano/Makefile
drivers/media/common/siano/smsdvb-debugfs.c
drivers/media/common/siano/smsdvb-main.c
drivers/media/dvb-core/demux.h [deleted file]
drivers/media/dvb-core/dmxdev.c
drivers/media/dvb-core/dmxdev.h [deleted file]
drivers/media/dvb-core/dvb-usb-ids.h [deleted file]
drivers/media/dvb-core/dvb_ca_en50221.c
drivers/media/dvb-core/dvb_ca_en50221.h [deleted file]
drivers/media/dvb-core/dvb_demux.c
drivers/media/dvb-core/dvb_demux.h [deleted file]
drivers/media/dvb-core/dvb_frontend.c
drivers/media/dvb-core/dvb_frontend.h [deleted file]
drivers/media/dvb-core/dvb_math.c
drivers/media/dvb-core/dvb_math.h [deleted file]
drivers/media/dvb-core/dvb_net.c
drivers/media/dvb-core/dvb_net.h [deleted file]
drivers/media/dvb-core/dvb_ringbuffer.c
drivers/media/dvb-core/dvb_ringbuffer.h [deleted file]
drivers/media/dvb-core/dvb_vb2.c
drivers/media/dvb-core/dvb_vb2.h [deleted file]
drivers/media/dvb-core/dvbdev.c
drivers/media/dvb-core/dvbdev.h [deleted file]
drivers/media/dvb-frontends/Makefile
drivers/media/dvb-frontends/a8293.h
drivers/media/dvb-frontends/af9013_priv.h
drivers/media/dvb-frontends/af9033_priv.h
drivers/media/dvb-frontends/as102_fe.c
drivers/media/dvb-frontends/ascot2e.c
drivers/media/dvb-frontends/atbm8830.c
drivers/media/dvb-frontends/au8522_common.c
drivers/media/dvb-frontends/au8522_dig.c
drivers/media/dvb-frontends/au8522_priv.h
drivers/media/dvb-frontends/bcm3510.c
drivers/media/dvb-frontends/cx22700.c
drivers/media/dvb-frontends/cx22702.c
drivers/media/dvb-frontends/cx24110.c
drivers/media/dvb-frontends/cx24113.c
drivers/media/dvb-frontends/cx24116.c
drivers/media/dvb-frontends/cx24117.c
drivers/media/dvb-frontends/cx24120.c
drivers/media/dvb-frontends/cx24123.c
drivers/media/dvb-frontends/cxd2820r_priv.h
drivers/media/dvb-frontends/cxd2841er.c
drivers/media/dvb-frontends/dib0070.c
drivers/media/dvb-frontends/dib0090.c
drivers/media/dvb-frontends/dib3000mb.c
drivers/media/dvb-frontends/dib3000mc.c
drivers/media/dvb-frontends/dib7000m.c
drivers/media/dvb-frontends/dib7000p.c
drivers/media/dvb-frontends/dib8000.c
drivers/media/dvb-frontends/dib9000.c
drivers/media/dvb-frontends/drx39xyj/Makefile
drivers/media/dvb-frontends/drx39xyj/drx39xxj.h
drivers/media/dvb-frontends/drx39xyj/drxj.c
drivers/media/dvb-frontends/drxd_hard.c
drivers/media/dvb-frontends/drxk_hard.c
drivers/media/dvb-frontends/ds3000.c
drivers/media/dvb-frontends/dvb-pll.h
drivers/media/dvb-frontends/dvb_dummy_fe.c
drivers/media/dvb-frontends/dvb_dummy_fe.h
drivers/media/dvb-frontends/ec100.c
drivers/media/dvb-frontends/gp8psk-fe.c
drivers/media/dvb-frontends/helene.c
drivers/media/dvb-frontends/horus3a.c
drivers/media/dvb-frontends/isl6405.c
drivers/media/dvb-frontends/isl6421.c
drivers/media/dvb-frontends/isl6423.c
drivers/media/dvb-frontends/itd1000.c
drivers/media/dvb-frontends/ix2505v.h
drivers/media/dvb-frontends/l64781.c
drivers/media/dvb-frontends/lg2160.h
drivers/media/dvb-frontends/lgdt3305.c
drivers/media/dvb-frontends/lgdt3305.h
drivers/media/dvb-frontends/lgdt3306a.c
drivers/media/dvb-frontends/lgdt3306a.h
drivers/media/dvb-frontends/lgdt330x.c
drivers/media/dvb-frontends/lgs8gl5.c
drivers/media/dvb-frontends/lgs8gxx.c
drivers/media/dvb-frontends/lnbh25.c
drivers/media/dvb-frontends/lnbp21.c
drivers/media/dvb-frontends/lnbp22.c
drivers/media/dvb-frontends/m88ds3103_priv.h
drivers/media/dvb-frontends/m88rs2000.c
drivers/media/dvb-frontends/m88rs2000.h
drivers/media/dvb-frontends/mb86a16.c
drivers/media/dvb-frontends/mb86a16.h
drivers/media/dvb-frontends/mb86a20s.c
drivers/media/dvb-frontends/mn88472_priv.h
drivers/media/dvb-frontends/mn88473_priv.h
drivers/media/dvb-frontends/mt312.c
drivers/media/dvb-frontends/mt352.c
drivers/media/dvb-frontends/mxl5xx.c
drivers/media/dvb-frontends/mxl5xx.h
drivers/media/dvb-frontends/nxt200x.c
drivers/media/dvb-frontends/nxt6000.c
drivers/media/dvb-frontends/or51132.c
drivers/media/dvb-frontends/or51211.c
drivers/media/dvb-frontends/rtl2830_priv.h
drivers/media/dvb-frontends/rtl2832_priv.h
drivers/media/dvb-frontends/rtl2832_sdr.h
drivers/media/dvb-frontends/s5h1409.c
drivers/media/dvb-frontends/s5h1411.c
drivers/media/dvb-frontends/s5h1420.c
drivers/media/dvb-frontends/s5h1432.c
drivers/media/dvb-frontends/s921.c
drivers/media/dvb-frontends/si2165.c
drivers/media/dvb-frontends/si2168_priv.h
drivers/media/dvb-frontends/si21xx.c
drivers/media/dvb-frontends/si21xx.h
drivers/media/dvb-frontends/sp2.h
drivers/media/dvb-frontends/sp2_priv.h
drivers/media/dvb-frontends/sp8870.c
drivers/media/dvb-frontends/sp887x.c
drivers/media/dvb-frontends/stb0899_drv.c
drivers/media/dvb-frontends/stb0899_drv.h
drivers/media/dvb-frontends/stb0899_priv.h
drivers/media/dvb-frontends/stb6000.h
drivers/media/dvb-frontends/stb6100.c
drivers/media/dvb-frontends/stb6100.h
drivers/media/dvb-frontends/stb6100_cfg.h
drivers/media/dvb-frontends/stb6100_proc.h
drivers/media/dvb-frontends/stv0288.c
drivers/media/dvb-frontends/stv0288.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/stv0367.c
drivers/media/dvb-frontends/stv0367.h
drivers/media/dvb-frontends/stv0900.h
drivers/media/dvb-frontends/stv090x.c
drivers/media/dvb-frontends/stv090x_priv.h
drivers/media/dvb-frontends/stv0910.c
drivers/media/dvb-frontends/stv6110.h
drivers/media/dvb-frontends/stv6110x.c
drivers/media/dvb-frontends/stv6111.c
drivers/media/dvb-frontends/tc90522.c
drivers/media/dvb-frontends/tc90522.h
drivers/media/dvb-frontends/tda10021.c
drivers/media/dvb-frontends/tda10023.c
drivers/media/dvb-frontends/tda10048.c
drivers/media/dvb-frontends/tda1004x.c
drivers/media/dvb-frontends/tda10071_priv.h
drivers/media/dvb-frontends/tda10086.c
drivers/media/dvb-frontends/tda18271c2dd.c
drivers/media/dvb-frontends/tda665x.c
drivers/media/dvb-frontends/tda8083.c
drivers/media/dvb-frontends/tda8261.c
drivers/media/dvb-frontends/tda826x.h
drivers/media/dvb-frontends/ts2020.c
drivers/media/dvb-frontends/tua6100.h
drivers/media/dvb-frontends/ves1820.c
drivers/media/dvb-frontends/ves1x93.c
drivers/media/dvb-frontends/zd1301_demod.h
drivers/media/dvb-frontends/zl10036.h
drivers/media/dvb-frontends/zl10039.c
drivers/media/dvb-frontends/zl10353.c
drivers/media/firewire/Makefile
drivers/media/firewire/firedtv-avc.c
drivers/media/firewire/firedtv-ci.c
drivers/media/firewire/firedtv-dvb.c
drivers/media/firewire/firedtv-fe.c
drivers/media/firewire/firedtv-fw.c
drivers/media/firewire/firedtv.h
drivers/media/mmc/siano/Makefile
drivers/media/pci/b2c2/Makefile
drivers/media/pci/bt8xx/Makefile
drivers/media/pci/bt8xx/bt878.c
drivers/media/pci/bt8xx/dst.c
drivers/media/pci/bt8xx/dst_ca.c
drivers/media/pci/bt8xx/dvb-bt8xx.c
drivers/media/pci/bt8xx/dvb-bt8xx.h
drivers/media/pci/cx18/Makefile
drivers/media/pci/cx18/cx18-driver.h
drivers/media/pci/cx23885/Makefile
drivers/media/pci/cx23885/altera-ci.c
drivers/media/pci/cx23885/cimax2.c
drivers/media/pci/cx23885/cimax2.h
drivers/media/pci/cx23885/cx23885-dvb.c
drivers/media/pci/cx88/Makefile
drivers/media/pci/ddbridge/Makefile
drivers/media/pci/ddbridge/ddbridge.h
drivers/media/pci/dm1105/Makefile
drivers/media/pci/dm1105/dm1105.c
drivers/media/pci/ivtv/Makefile
drivers/media/pci/mantis/Makefile
drivers/media/pci/mantis/hopper_cards.c
drivers/media/pci/mantis/hopper_vp3028.c
drivers/media/pci/mantis/mantis_ca.c
drivers/media/pci/mantis/mantis_cards.c
drivers/media/pci/mantis/mantis_dma.c
drivers/media/pci/mantis/mantis_dvb.c
drivers/media/pci/mantis/mantis_evm.c
drivers/media/pci/mantis/mantis_hif.c
drivers/media/pci/mantis/mantis_i2c.c
drivers/media/pci/mantis/mantis_input.c
drivers/media/pci/mantis/mantis_ioc.c
drivers/media/pci/mantis/mantis_link.h
drivers/media/pci/mantis/mantis_pci.c
drivers/media/pci/mantis/mantis_pcmcia.c
drivers/media/pci/mantis/mantis_uart.c
drivers/media/pci/mantis/mantis_vp1033.c
drivers/media/pci/mantis/mantis_vp1034.c
drivers/media/pci/mantis/mantis_vp1034.h
drivers/media/pci/mantis/mantis_vp1041.c
drivers/media/pci/mantis/mantis_vp2033.c
drivers/media/pci/mantis/mantis_vp2040.c
drivers/media/pci/mantis/mantis_vp3028.h
drivers/media/pci/mantis/mantis_vp3030.c
drivers/media/pci/netup_unidvb/Makefile
drivers/media/pci/netup_unidvb/netup_unidvb.h
drivers/media/pci/ngene/Makefile
drivers/media/pci/ngene/ngene.h
drivers/media/pci/pluto2/Makefile
drivers/media/pci/pluto2/pluto2.c
drivers/media/pci/pt1/Makefile
drivers/media/pci/pt1/pt1.c
drivers/media/pci/pt1/va1j5jf8007s.c
drivers/media/pci/pt1/va1j5jf8007t.c
drivers/media/pci/pt3/Makefile
drivers/media/pci/pt3/pt3.c
drivers/media/pci/pt3/pt3.h
drivers/media/pci/saa7134/Makefile
drivers/media/pci/saa7134/saa7134-dvb.c
drivers/media/pci/saa7164/Makefile
drivers/media/pci/saa7164/saa7164.h
drivers/media/pci/smipcie/Makefile
drivers/media/pci/smipcie/smipcie.h
drivers/media/pci/ttpci/Makefile
drivers/media/pci/ttpci/av7110.c
drivers/media/pci/ttpci/av7110.h
drivers/media/pci/ttpci/budget-av.c
drivers/media/pci/ttpci/budget-ci.c
drivers/media/pci/ttpci/budget.h
drivers/media/pci/ttpci/dvb_filter.h
drivers/media/platform/sti/c8sectpfe/Makefile
drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c
drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.h
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
drivers/media/tuners/Makefile
drivers/media/tuners/e4000.h
drivers/media/tuners/fc0011.h
drivers/media/tuners/fc0012.h
drivers/media/tuners/fc0013.h
drivers/media/tuners/fc2580.h
drivers/media/tuners/it913x.h
drivers/media/tuners/m88rs6000t.h
drivers/media/tuners/max2165.c
drivers/media/tuners/mc44s803.c
drivers/media/tuners/mt2060.c
drivers/media/tuners/mt2063.h
drivers/media/tuners/mt20xx.h
drivers/media/tuners/mt2131.c
drivers/media/tuners/mt2266.c
drivers/media/tuners/mxl301rf.h
drivers/media/tuners/mxl5005s.c
drivers/media/tuners/mxl5005s.h
drivers/media/tuners/mxl5007t.h
drivers/media/tuners/qm1d1c0042.h
drivers/media/tuners/qt1010.h
drivers/media/tuners/r820t.h
drivers/media/tuners/si2157.h
drivers/media/tuners/tda18212.h
drivers/media/tuners/tda18218.h
drivers/media/tuners/tda18250.h
drivers/media/tuners/tda18271.h
drivers/media/tuners/tda827x.h
drivers/media/tuners/tda8290.h
drivers/media/tuners/tda9887.h
drivers/media/tuners/tea5761.h
drivers/media/tuners/tea5767.h
drivers/media/tuners/tua9001.h
drivers/media/tuners/tuner-simple.h
drivers/media/tuners/tuner-xc2028.c
drivers/media/tuners/tuner-xc2028.h
drivers/media/tuners/xc4000.c
drivers/media/tuners/xc5000.c
drivers/media/usb/as102/Makefile
drivers/media/usb/as102/as102_drv.c
drivers/media/usb/as102/as102_drv.h
drivers/media/usb/au0828/Makefile
drivers/media/usb/au0828/au0828.h
drivers/media/usb/b2c2/Makefile
drivers/media/usb/cx231xx/Makefile
drivers/media/usb/cx231xx/cx231xx-cards.c
drivers/media/usb/cx231xx/cx231xx-video.c
drivers/media/usb/dvb-usb-v2/Makefile
drivers/media/usb/dvb-usb-v2/anysee.h
drivers/media/usb/dvb-usb-v2/az6007.c
drivers/media/usb/dvb-usb-v2/dvb_usb.h
drivers/media/usb/dvb-usb-v2/mxl111sf-demod.h
drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.h
drivers/media/usb/dvb-usb/Makefile
drivers/media/usb/dvb-usb/az6027.c
drivers/media/usb/dvb-usb/dvb-usb.h
drivers/media/usb/dvb-usb/dw2102.c
drivers/media/usb/dvb-usb/pctv452e.c
drivers/media/usb/dvb-usb/ttusb2.c
drivers/media/usb/em28xx/Makefile
drivers/media/usb/em28xx/em28xx-dvb.c
drivers/media/usb/pvrusb2/Makefile
drivers/media/usb/pvrusb2/pvrusb2-dvb.c
drivers/media/usb/pvrusb2/pvrusb2-dvb.h
drivers/media/usb/siano/Makefile
drivers/media/usb/tm6000/Makefile
drivers/media/usb/tm6000/tm6000.h
drivers/media/usb/ttusb-budget/Makefile
drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
drivers/media/usb/ttusb-dec/Makefile
drivers/media/usb/ttusb-dec/ttusb_dec.c
drivers/media/usb/ttusb-dec/ttusbdecfe.c
drivers/media/v4l2-core/Makefile
drivers/staging/media/cxd2099/Makefile
drivers/staging/media/cxd2099/cxd2099.h
include/media/demux.h [new file with mode: 0644]
include/media/dmxdev.h [new file with mode: 0644]
include/media/dvb-usb-ids.h [new file with mode: 0644]
include/media/dvb_ca_en50221.h [new file with mode: 0644]
include/media/dvb_demux.h [new file with mode: 0644]
include/media/dvb_frontend.h [new file with mode: 0644]
include/media/dvb_math.h [new file with mode: 0644]
include/media/dvb_net.h [new file with mode: 0644]
include/media/dvb_ringbuffer.h [new file with mode: 0644]
include/media/dvb_vb2.h [new file with mode: 0644]
include/media/dvbdev.h [new file with mode: 0644]
include/media/videobuf-dvb.h
include/media/videobuf2-dvb.h

index a4dd700189b0851399321e4811f804592e78fe92..fded096b937cc85976ef1b96c046c84f9e19b258 100644 (file)
@@ -1,4 +1,4 @@
 Digital TV Conditional Access kABI
 ----------------------------------
 
-.. kernel-doc:: drivers/media/dvb-core/dvb_ca_en50221.h
+.. kernel-doc:: include/media/dvb_ca_en50221.h
index 40cf1033b5e1f934af49c2bb37cf67d40d09bcd9..c47843b6c81dd41f207eaeefe1a5067f4e35a04b 100644 (file)
@@ -7,7 +7,7 @@ Math functions
 Provide some commonly-used math functions, usually required in order to
 estimate signal strength and signal to noise measurements in dB.
 
-.. kernel-doc:: drivers/media/dvb-core/dvb_math.h
+.. kernel-doc:: include/media/dvb_math.h
 
 
 DVB devices
@@ -15,7 +15,7 @@ DVB devices
 
 Those functions are responsible for handling the DVB device nodes.
 
-.. kernel-doc:: drivers/media/dvb-core/dvbdev.h
+.. kernel-doc:: include/media/dvbdev.h
 
 Digital TV Ring buffer
 ~~~~~~~~~~~~~~~~~~~~~~
@@ -52,4 +52,4 @@ copy it from/to userspace.
      Resetting the buffer counts as a read and write operation.
      Two or more writers must be locked against each other.
 
-.. kernel-doc:: drivers/media/dvb-core/dvb_ringbuffer.h
+.. kernel-doc:: include/media/dvb_ringbuffer.h
index 7aa865a2b43f7cb25a62c46e554be5f75f34f118..24857133e4e8fdfb48b634afc67501308baf298a 100644 (file)
@@ -8,7 +8,7 @@ The Kernel Digital TV Demux kABI defines a driver-internal interface for
 registering low-level, hardware specific driver to a hardware independent
 demux layer. It is only of interest for Digital TV device driver writers.
 The header file for this kABI is named ``demux.h`` and located in
-``drivers/media/dvb-core``.
+``include/media``.
 
 The demux kABI should be implemented for each demux in the system. It is
 used to select the TS source of a demux and to manage the demux resources.
@@ -69,14 +69,14 @@ callbacks.
 Digital TV Demux device registration functions and data structures
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-.. kernel-doc:: drivers/media/dvb-core/dmxdev.h
+.. kernel-doc:: include/media/dmxdev.h
 
 High-level Digital TV demux interface
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-.. kernel-doc:: drivers/media/dvb-core/dvb_demux.h
+.. kernel-doc:: include/media/dvb_demux.h
 
 Driver-internal low-level hardware specific driver demux interface
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-.. kernel-doc:: drivers/media/dvb-core/demux.h
+.. kernel-doc:: include/media/demux.h
index f1a2fdaab5ba14f172996efa8fafb959ad29bb9c..472650cdb100ad285cfe0b2b6875ed7cc0cf51f3 100644 (file)
@@ -8,7 +8,7 @@ The Digital TV Frontend kABI defines a driver-internal interface for
 registering low-level, hardware specific driver to a hardware independent
 frontend layer. It is only of interest for Digital TV device driver writers.
 The header file for this API is named ``dvb_frontend.h`` and located in
-``drivers/media/dvb-core``.
+``include/media/``.
 
 Demodulator driver
 ^^^^^^^^^^^^^^^^^^
@@ -17,7 +17,7 @@ The demodulator driver is responsible to talk with the decoding part of the
 hardware. Such driver should implement :c:type:`dvb_frontend_ops`, with
 tells what type of digital TV standards are supported, and points to a
 series of functions that allow the DVB core to command the hardware via
-the code under ``drivers/media/dvb-core/dvb_frontend.c``.
+the code under ``include/media/dvb_frontend.c``.
 
 A typical example of such struct in a driver ``foo`` is::
 
@@ -118,7 +118,7 @@ Satellite TV reception is::
 
 .. |delta|   unicode:: U+00394
 
-The ``drivers/media/dvb-core/dvb_frontend.c`` has a kernel thread with is
+The ``include/media/dvb_frontend.c`` has a kernel thread with is
 responsible for tuning the device. It supports multiple algorithms to
 detect a channel, as defined at enum :c:func:`dvbfe_algo`.
 
@@ -440,4 +440,4 @@ monotonic stats at the right time.
 Digital TV Frontend functions and types
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-.. kernel-doc:: drivers/media/dvb-core/dvb_frontend.h
+.. kernel-doc:: include/media/dvb_frontend.h
index ced991b73d699d265619d891738da3b7a5f7c5d4..158c7cbd76003b5d911b609797f39584e8cb5fda 100644 (file)
@@ -1,4 +1,4 @@
 Digital TV Network kABI
 -----------------------
 
-.. kernel-doc:: drivers/media/dvb-core/dvb_net.h
+.. kernel-doc:: include/media/dvb_net.h
index 73df4a334eda753abb88f491c39081f15fa4b2a3..aa2dc2434ee5855b0b7fed13aba269695117f75a 100644 (file)
@@ -4,6 +4,5 @@ b2c2-flexcop-objs += flexcop-sram.o flexcop-eeprom.o flexcop-misc.o
 b2c2-flexcop-objs += flexcop-hw-filter.o
 obj-$(CONFIG_DVB_B2C2_FLEXCOP) += b2c2-flexcop.o
 
-ccflags-y += -Idrivers/media/dvb-core/
 ccflags-y += -Idrivers/media/dvb-frontends/
 ccflags-y += -Idrivers/media/tuners/
index b7e5e4c17acbb238d96fd5b22ddcaf2a65e877c1..f944c59cf4955dc2edb98fcd2b79c01f3e1f69a7 100644 (file)
 
 #include "flexcop-reg.h"
 
-#include "dmxdev.h"
-#include "dvb_demux.h"
-#include "dvb_net.h"
-#include "dvb_frontend.h"
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_net.h>
+#include <media/dvb_frontend.h>
 
 #define FC_MAX_FEED 256
 
index 88e2b7ffc5370660c54176f5e927d5130ad273c8..b33022e0be565738cf4239a119447cd06adc2e71 100644 (file)
@@ -11,7 +11,3 @@ endif
 ifeq ($(CONFIG_SMS_SIANO_DEBUGFS),y)
   smsdvb-objs += smsdvb-debugfs.o
 endif
-
-ccflags-y += -Idrivers/media/dvb-core
-ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
-
index e06aec0ed18e0f574b0f8c4b9756654816eab161..aa0e5b7a7154b6991072ece0a0f49fe77ebad728 100644 (file)
 #include <linux/spinlock.h>
 #include <linux/usb.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
 
 #include "smsdvb.h"
 
index 166428cbd3c88c7c3b2d5ea1a3d72a8d32a6e3b9..c0faad1ba4283f933b706515d4dbe521575c5332 100644 (file)
@@ -26,10 +26,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <linux/init.h>
 #include <asm/div64.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
 
 #include "sms-cards.h"
 
diff --git a/drivers/media/dvb-core/demux.h b/drivers/media/dvb-core/demux.h
deleted file mode 100644 (file)
index c4df6ce..0000000
+++ /dev/null
@@ -1,589 +0,0 @@
-/*
- * demux.h
- *
- * The Kernel Digital TV Demux kABI defines a driver-internal interface for
- * registering low-level, hardware specific driver to a hardware independent
- * demux layer.
- *
- * Copyright (c) 2002 Convergence GmbH
- *
- * based on code:
- * Copyright (c) 2000 Nokia Research Center
- *                    Tampere, FINLAND
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __DEMUX_H
-#define __DEMUX_H
-
-#include <linux/types.h>
-#include <linux/errno.h>
-#include <linux/list.h>
-#include <linux/time.h>
-#include <linux/dvb/dmx.h>
-
-/*
- * Common definitions
- */
-
-/*
- * DMX_MAX_FILTER_SIZE: Maximum length (in bytes) of a section/PES filter.
- */
-
-#ifndef DMX_MAX_FILTER_SIZE
-#define DMX_MAX_FILTER_SIZE 18
-#endif
-
-/*
- * DMX_MAX_SECFEED_SIZE: Maximum length (in bytes) of a private section feed
- * filter.
- */
-
-#ifndef DMX_MAX_SECTION_SIZE
-#define DMX_MAX_SECTION_SIZE 4096
-#endif
-#ifndef DMX_MAX_SECFEED_SIZE
-#define DMX_MAX_SECFEED_SIZE (DMX_MAX_SECTION_SIZE + 188)
-#endif
-
-/*
- * TS packet reception
- */
-
-/**
- * enum ts_filter_type - filter type bitmap for dmx_ts_feed.set\(\)
- *
- * @TS_PACKET:         Send TS packets (188 bytes) to callback (default).
- * @TS_PAYLOAD_ONLY:   In case TS_PACKET is set, only send the TS payload
- *                     (<=184 bytes per packet) to callback
- * @TS_DECODER:                Send stream to built-in decoder (if present).
- * @TS_DEMUX:          In case TS_PACKET is set, send the TS to the demux
- *                     device, not to the dvr device
- */
-enum ts_filter_type {
-       TS_PACKET = 1,
-       TS_PAYLOAD_ONLY = 2,
-       TS_DECODER = 4,
-       TS_DEMUX = 8,
-};
-
-/**
- * struct dmx_ts_feed - Structure that contains a TS feed filter
- *
- * @is_filtering:      Set to non-zero when filtering in progress
- * @parent:            pointer to struct dmx_demux
- * @priv:              pointer to private data of the API client
- * @set:               sets the TS filter
- * @start_filtering:   starts TS filtering
- * @stop_filtering:    stops TS filtering
- *
- * A TS feed is typically mapped to a hardware PID filter on the demux chip.
- * Using this API, the client can set the filtering properties to start/stop
- * filtering TS packets on a particular TS feed.
- */
-struct dmx_ts_feed {
-       int is_filtering;
-       struct dmx_demux *parent;
-       void *priv;
-       int (*set)(struct dmx_ts_feed *feed,
-                  u16 pid,
-                  int type,
-                  enum dmx_ts_pes pes_type,
-                  ktime_t timeout);
-       int (*start_filtering)(struct dmx_ts_feed *feed);
-       int (*stop_filtering)(struct dmx_ts_feed *feed);
-};
-
-/*
- * Section reception
- */
-
-/**
- * struct dmx_section_filter - Structure that describes a section filter
- *
- * @filter_value: Contains up to 16 bytes (128 bits) of the TS section header
- *               that will be matched by the section filter
- * @filter_mask:  Contains a 16 bytes (128 bits) filter mask with the bits
- *               specified by @filter_value that will be used on the filter
- *               match logic.
- * @filter_mode:  Contains a 16 bytes (128 bits) filter mode.
- * @parent:      Pointer to struct dmx_section_feed.
- * @priv:        Pointer to private data of the API client.
- *
- *
- * The @filter_mask controls which bits of @filter_value are compared with
- * the section headers/payload. On a binary value of 1 in filter_mask, the
- * corresponding bits are compared. The filter only accepts sections that are
- * equal to filter_value in all the tested bit positions.
- */
-struct dmx_section_filter {
-       u8 filter_value[DMX_MAX_FILTER_SIZE];
-       u8 filter_mask[DMX_MAX_FILTER_SIZE];
-       u8 filter_mode[DMX_MAX_FILTER_SIZE];
-       struct dmx_section_feed *parent; /* Back-pointer */
-       void *priv; /* Pointer to private data of the API client */
-};
-
-/**
- * struct dmx_section_feed - Structure that contains a section feed filter
- *
- * @is_filtering:      Set to non-zero when filtering in progress
- * @parent:            pointer to struct dmx_demux
- * @priv:              pointer to private data of the API client
- * @check_crc:         If non-zero, check the CRC values of filtered sections.
- * @set:               sets the section filter
- * @allocate_filter:   This function is used to allocate a section filter on
- *                     the demux. It should only be called when no filtering
- *                     is in progress on this section feed. If a filter cannot
- *                     be allocated, the function fails with -ENOSPC.
- * @release_filter:    This function releases all the resources of a
- *                     previously allocated section filter. The function
- *                     should not be called while filtering is in progress
- *                     on this section feed. After calling this function,
- *                     the caller should not try to dereference the filter
- *                     pointer.
- * @start_filtering:   starts section filtering
- * @stop_filtering:    stops section filtering
- *
- * A TS feed is typically mapped to a hardware PID filter on the demux chip.
- * Using this API, the client can set the filtering properties to start/stop
- * filtering TS packets on a particular TS feed.
- */
-struct dmx_section_feed {
-       int is_filtering;
-       struct dmx_demux *parent;
-       void *priv;
-
-       int check_crc;
-
-       /* private: Used internally at dvb_demux.c */
-       u32 crc_val;
-
-       u8 *secbuf;
-       u8 secbuf_base[DMX_MAX_SECFEED_SIZE];
-       u16 secbufp, seclen, tsfeedp;
-
-       /* public: */
-       int (*set)(struct dmx_section_feed *feed,
-                  u16 pid,
-                  int check_crc);
-       int (*allocate_filter)(struct dmx_section_feed *feed,
-                              struct dmx_section_filter **filter);
-       int (*release_filter)(struct dmx_section_feed *feed,
-                             struct dmx_section_filter *filter);
-       int (*start_filtering)(struct dmx_section_feed *feed);
-       int (*stop_filtering)(struct dmx_section_feed *feed);
-};
-
-/**
- * typedef dmx_ts_cb - DVB demux TS filter callback function prototype
- *
- * @buffer1:           Pointer to the start of the filtered TS packets.
- * @buffer1_length:    Length of the TS data in buffer1.
- * @buffer2:           Pointer to the tail of the filtered TS packets, or NULL.
- * @buffer2_length:    Length of the TS data in buffer2.
- * @source:            Indicates which TS feed is the source of the callback.
- *
- * This function callback prototype, provided by the client of the demux API,
- * is called from the demux code. The function is only called when filtering
- * on a TS feed has been enabled using the start_filtering\(\) function at
- * the &dmx_demux.
- * Any TS packets that match the filter settings are copied to a circular
- * buffer. The filtered TS packets are delivered to the client using this
- * callback function.
- * It is expected that the @buffer1 and @buffer2 callback parameters point to
- * addresses within the circular buffer, but other implementations are also
- * possible. Note that the called party should not try to free the memory
- * the @buffer1 and @buffer2 parameters point to.
- *
- * When this function is called, the @buffer1 parameter typically points to
- * the start of the first undelivered TS packet within a circular buffer.
- * The @buffer2 buffer parameter is normally NULL, except when the received
- * TS packets have crossed the last address of the circular buffer and
- * "wrapped" to the beginning of the buffer. In the latter case the @buffer1
- * parameter would contain an address within the circular buffer, while the
- * @buffer2 parameter would contain the first address of the circular buffer.
- * The number of bytes delivered with this function (i.e. @buffer1_length +
- * @buffer2_length) is usually equal to the value of callback_length parameter
- * given in the set() function, with one exception: if a timeout occurs before
- * receiving callback_length bytes of TS data, any undelivered packets are
- * immediately delivered to the client by calling this function. The timeout
- * duration is controlled by the set() function in the TS Feed API.
- *
- * If a TS packet is received with errors that could not be fixed by the
- * TS-level forward error correction (FEC), the Transport_error_indicator
- * flag of the TS packet header should be set. The TS packet should not be
- * discarded, as the error can possibly be corrected by a higher layer
- * protocol. If the called party is slow in processing the callback, it
- * is possible that the circular buffer eventually fills up. If this happens,
- * the demux driver should discard any TS packets received while the buffer
- * is full and return -EOVERFLOW.
- *
- * The type of data returned to the callback can be selected by the
- * &dmx_ts_feed.@set function. The type parameter decides if the raw
- * TS packet (TS_PACKET) or just the payload (TS_PACKET|TS_PAYLOAD_ONLY)
- * should be returned. If additionally the TS_DECODER bit is set the stream
- * will also be sent to the hardware MPEG decoder.
- *
- * Return:
- *
- * - 0, on success;
- *
- * - -EOVERFLOW, on buffer overflow.
- */
-typedef int (*dmx_ts_cb)(const u8 *buffer1,
-                        size_t buffer1_length,
-                        const u8 *buffer2,
-                        size_t buffer2_length,
-                        struct dmx_ts_feed *source);
-
-/**
- * typedef dmx_section_cb - DVB demux TS filter callback function prototype
- *
- * @buffer1:           Pointer to the start of the filtered section, e.g.
- *                     within the circular buffer of the demux driver.
- * @buffer1_len:       Length of the filtered section data in @buffer1,
- *                     including headers and CRC.
- * @buffer2:           Pointer to the tail of the filtered section data,
- *                     or NULL. Useful to handle the wrapping of a
- *                     circular buffer.
- * @buffer2_len:       Length of the filtered section data in @buffer2,
- *                     including headers and CRC.
- * @source:            Indicates which section feed is the source of the
- *                     callback.
- *
- * This function callback prototype, provided by the client of the demux API,
- * is called from the demux code. The function is only called when
- * filtering of sections has been enabled using the function
- * &dmx_ts_feed.@start_filtering. When the demux driver has received a
- * complete section that matches at least one section filter, the client
- * is notified via this callback function. Normally this function is called
- * for each received section; however, it is also possible to deliver
- * multiple sections with one callback, for example when the system load
- * is high. If an error occurs while receiving a section, this
- * function should be called with the corresponding error type set in the
- * success field, whether or not there is data to deliver. The Section Feed
- * implementation should maintain a circular buffer for received sections.
- * However, this is not necessary if the Section Feed API is implemented as
- * a client of the TS Feed API, because the TS Feed implementation then
- * buffers the received data. The size of the circular buffer can be
- * configured using the &dmx_ts_feed.@set function in the Section Feed API.
- * If there is no room in the circular buffer when a new section is received,
- * the section must be discarded. If this happens, the value of the success
- * parameter should be DMX_OVERRUN_ERROR on the next callback.
- */
-typedef int (*dmx_section_cb)(const u8 *buffer1,
-                             size_t buffer1_len,
-                             const u8 *buffer2,
-                             size_t buffer2_len,
-                             struct dmx_section_filter *source);
-
-/*
- * DVB Front-End
- */
-
-/**
- * enum dmx_frontend_source - Used to identify the type of frontend
- *
- * @DMX_MEMORY_FE:     The source of the demux is memory. It means that
- *                     the MPEG-TS to be filtered comes from userspace,
- *                     via write() syscall.
- *
- * @DMX_FRONTEND_0:    The source of the demux is a frontend connected
- *                     to the demux.
- */
-enum dmx_frontend_source {
-       DMX_MEMORY_FE,
-       DMX_FRONTEND_0,
-};
-
-/**
- * struct dmx_frontend - Structure that lists the frontends associated with
- *                      a demux
- *
- * @connectivity_list: List of front-ends that can be connected to a
- *                     particular demux;
- * @source:            Type of the frontend.
- *
- * FIXME: this structure should likely be replaced soon by some
- *     media-controller based logic.
- */
-struct dmx_frontend {
-       struct list_head connectivity_list;
-       enum dmx_frontend_source source;
-};
-
-/*
- * MPEG-2 TS Demux
- */
-
-/**
- * enum dmx_demux_caps - MPEG-2 TS Demux capabilities bitmap
- *
- * @DMX_TS_FILTERING:          set if TS filtering is supported;
- * @DMX_SECTION_FILTERING:     set if section filtering is supported;
- * @DMX_MEMORY_BASED_FILTERING:        set if write() available.
- *
- * Those flags are OR'ed in the &dmx_demux.capabilities field
- */
-enum dmx_demux_caps {
-       DMX_TS_FILTERING = 1,
-       DMX_SECTION_FILTERING = 4,
-       DMX_MEMORY_BASED_FILTERING = 8,
-};
-
-/*
- * Demux resource type identifier.
- */
-
-/**
- * DMX_FE_ENTRY - Casts elements in the list of registered
- *               front-ends from the generic type struct list_head
- *               to the type * struct dmx_frontend
- *
- * @list: list of struct dmx_frontend
- */
-#define DMX_FE_ENTRY(list) \
-       list_entry(list, struct dmx_frontend, connectivity_list)
-
-/**
- * struct dmx_demux - Structure that contains the demux capabilities and
- *                   callbacks.
- *
- * @capabilities: Bitfield of capability flags.
- *
- * @frontend: Front-end connected to the demux
- *
- * @priv: Pointer to private data of the API client
- *
- * @open: This function reserves the demux for use by the caller and, if
- *     necessary, initializes the demux. When the demux is no longer needed,
- *     the function @close should be called. It should be possible for
- *     multiple clients to access the demux at the same time. Thus, the
- *     function implementation should increment the demux usage count when
- *     @open is called and decrement it when @close is called.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     It returns:
- *     0 on success;
- *     -EUSERS, if maximum usage count was reached;
- *     -EINVAL, on bad parameter.
- *
- * @close: This function reserves the demux for use by the caller and, if
- *     necessary, initializes the demux. When the demux is no longer needed,
- *     the function @close should be called. It should be possible for
- *     multiple clients to access the demux at the same time. Thus, the
- *     function implementation should increment the demux usage count when
- *     @open is called and decrement it when @close is called.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     It returns:
- *     0 on success;
- *     -ENODEV, if demux was not in use (e. g. no users);
- *     -EINVAL, on bad parameter.
- *
- * @write: This function provides the demux driver with a memory buffer
- *     containing TS packets. Instead of receiving TS packets from the DVB
- *     front-end, the demux driver software will read packets from memory.
- *     Any clients of this demux with active TS, PES or Section filters will
- *     receive filtered data via the Demux callback API (see 0). The function
- *     returns when all the data in the buffer has been consumed by the demux.
- *     Demux hardware typically cannot read TS from memory. If this is the
- *     case, memory-based filtering has to be implemented entirely in software.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     The @buf function parameter contains a pointer to the TS data in
- *     kernel-space memory.
- *     The @count function parameter contains the length of the TS data.
- *     It returns:
- *     0 on success;
- *     -ERESTARTSYS, if mutex lock was interrupted;
- *     -EINTR, if a signal handling is pending;
- *     -ENODEV, if demux was removed;
- *     -EINVAL, on bad parameter.
- *
- * @allocate_ts_feed: Allocates a new TS feed, which is used to filter the TS
- *     packets carrying a certain PID. The TS feed normally corresponds to a
- *     hardware PID filter on the demux chip.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     The @feed function parameter contains a pointer to the TS feed API and
- *     instance data.
- *     The @callback function parameter contains a pointer to the callback
- *     function for passing received TS packet.
- *     It returns:
- *     0 on success;
- *     -ERESTARTSYS, if mutex lock was interrupted;
- *     -EBUSY, if no more TS feeds is available;
- *     -EINVAL, on bad parameter.
- *
- * @release_ts_feed: Releases the resources allocated with @allocate_ts_feed.
- *     Any filtering in progress on the TS feed should be stopped before
- *     calling this function.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     The @feed function parameter contains a pointer to the TS feed API and
- *     instance data.
- *     It returns:
- *     0 on success;
- *     -EINVAL on bad parameter.
- *
- * @allocate_section_feed: Allocates a new section feed, i.e. a demux resource
- *     for filtering and receiving sections. On platforms with hardware
- *     support for section filtering, a section feed is directly mapped to
- *     the demux HW. On other platforms, TS packets are first PID filtered in
- *     hardware and a hardware section filter then emulated in software. The
- *     caller obtains an API pointer of type dmx_section_feed_t as an out
- *     parameter. Using this API the caller can set filtering parameters and
- *     start receiving sections.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     The @feed function parameter contains a pointer to the TS feed API and
- *     instance data.
- *     The @callback function parameter contains a pointer to the callback
- *     function for passing received TS packet.
- *     It returns:
- *     0 on success;
- *     -EBUSY, if no more TS feeds is available;
- *     -EINVAL, on bad parameter.
- *
- * @release_section_feed: Releases the resources allocated with
- *     @allocate_section_feed, including allocated filters. Any filtering in
- *     progress on the section feed should be stopped before calling this
- *     function.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     The @feed function parameter contains a pointer to the TS feed API and
- *     instance data.
- *     It returns:
- *     0 on success;
- *     -EINVAL, on bad parameter.
- *
- * @add_frontend: Registers a connectivity between a demux and a front-end,
- *     i.e., indicates that the demux can be connected via a call to
- *     @connect_frontend to use the given front-end as a TS source. The
- *     client of this function has to allocate dynamic or static memory for
- *     the frontend structure and initialize its fields before calling this
- *     function. This function is normally called during the driver
- *     initialization. The caller must not free the memory of the frontend
- *     struct before successfully calling @remove_frontend.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     The @frontend function parameter contains a pointer to the front-end
- *     instance data.
- *     It returns:
- *     0 on success;
- *     -EINVAL, on bad parameter.
- *
- * @remove_frontend: Indicates that the given front-end, registered by a call
- *     to @add_frontend, can no longer be connected as a TS source by this
- *     demux. The function should be called when a front-end driver or a demux
- *     driver is removed from the system. If the front-end is in use, the
- *     function fails with the return value of -EBUSY. After successfully
- *     calling this function, the caller can free the memory of the frontend
- *     struct if it was dynamically allocated before the @add_frontend
- *     operation.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     The @frontend function parameter contains a pointer to the front-end
- *     instance data.
- *     It returns:
- *     0 on success;
- *     -ENODEV, if the front-end was not found,
- *     -EINVAL, on bad parameter.
- *
- * @get_frontends: Provides the APIs of the front-ends that have been
- *     registered for this demux. Any of the front-ends obtained with this
- *     call can be used as a parameter for @connect_frontend. The include
- *     file demux.h contains the macro DMX_FE_ENTRY() for converting an
- *     element of the generic type struct &list_head * to the type
- *     struct &dmx_frontend *. The caller must not free the memory of any of
- *     the elements obtained via this function call.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     It returns a struct list_head pointer to the list of front-end
- *     interfaces, or NULL in the case of an empty list.
- *
- * @connect_frontend: Connects the TS output of the front-end to the input of
- *     the demux. A demux can only be connected to a front-end registered to
- *     the demux with the function @add_frontend. It may or may not be
- *     possible to connect multiple demuxes to the same front-end, depending
- *     on the capabilities of the HW platform. When not used, the front-end
- *     should be released by calling @disconnect_frontend.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     The @frontend function parameter contains a pointer to the front-end
- *     instance data.
- *     It returns:
- *     0 on success;
- *     -EINVAL, on bad parameter.
- *
- * @disconnect_frontend: Disconnects the demux and a front-end previously
- *     connected by a @connect_frontend call.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     It returns:
- *     0 on success;
- *     -EINVAL on bad parameter.
- *
- * @get_pes_pids: Get the PIDs for DMX_PES_AUDIO0, DMX_PES_VIDEO0,
- *     DMX_PES_TELETEXT0, DMX_PES_SUBTITLE0 and DMX_PES_PCR0.
- *     The @demux function parameter contains a pointer to the demux API and
- *     instance data.
- *     The @pids function parameter contains an array with five u16 elements
- *     where the PIDs will be stored.
- *     It returns:
- *     0 on success;
- *     -EINVAL on bad parameter.
- */
-struct dmx_demux {
-       enum dmx_demux_caps capabilities;
-       struct dmx_frontend *frontend;
-       void *priv;
-       int (*open)(struct dmx_demux *demux);
-       int (*close)(struct dmx_demux *demux);
-       int (*write)(struct dmx_demux *demux, const char __user *buf,
-                    size_t count);
-       int (*allocate_ts_feed)(struct dmx_demux *demux,
-                               struct dmx_ts_feed **feed,
-                               dmx_ts_cb callback);
-       int (*release_ts_feed)(struct dmx_demux *demux,
-                              struct dmx_ts_feed *feed);
-       int (*allocate_section_feed)(struct dmx_demux *demux,
-                                    struct dmx_section_feed **feed,
-                                    dmx_section_cb callback);
-       int (*release_section_feed)(struct dmx_demux *demux,
-                                   struct dmx_section_feed *feed);
-       int (*add_frontend)(struct dmx_demux *demux,
-                           struct dmx_frontend *frontend);
-       int (*remove_frontend)(struct dmx_demux *demux,
-                              struct dmx_frontend *frontend);
-       struct list_head *(*get_frontends)(struct dmx_demux *demux);
-       int (*connect_frontend)(struct dmx_demux *demux,
-                               struct dmx_frontend *frontend);
-       int (*disconnect_frontend)(struct dmx_demux *demux);
-
-       int (*get_pes_pids)(struct dmx_demux *demux, u16 *pids);
-
-       /* private: */
-
-       /*
-        * Only used at av7110, to read some data from firmware.
-        * As this was never documented, we have no clue about what's
-        * there, and its usage on other drivers aren't encouraged.
-        */
-       int (*get_stc)(struct dmx_demux *demux, unsigned int num,
-                      u64 *stc, unsigned int *base);
-};
-
-#endif /* #ifndef __DEMUX_H */
index 1308c11f0e5b346475154935b0a7f84410211ccd..5eada88414d1dc8d94503cb583253627e0946d01 100644 (file)
@@ -27,8 +27,8 @@
 #include <linux/ioctl.h>
 #include <linux/wait.h>
 #include <linux/uaccess.h>
-#include "dmxdev.h"
-#include "dvb_vb2.h"
+#include <media/dmxdev.h>
+#include <media/dvb_vb2.h>
 
 static int debug;
 
diff --git a/drivers/media/dvb-core/dmxdev.h b/drivers/media/dvb-core/dmxdev.h
deleted file mode 100644 (file)
index a77064d..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * dmxdev.h
- *
- * Copyright (C) 2000 Ralph Metzler & Marcus Metzler
- *                    for convergence integrated media GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _DMXDEV_H_
-#define _DMXDEV_H_
-
-#include <linux/types.h>
-#include <linux/spinlock.h>
-#include <linux/kernel.h>
-#include <linux/time.h>
-#include <linux/timer.h>
-#include <linux/wait.h>
-#include <linux/fs.h>
-#include <linux/string.h>
-#include <linux/mutex.h>
-#include <linux/slab.h>
-
-#include <linux/dvb/dmx.h>
-
-#include "dvbdev.h"
-#include "demux.h"
-#include "dvb_ringbuffer.h"
-#include "dvb_vb2.h"
-
-/**
- * enum dmxdev_type - type of demux filter type.
- *
- * @DMXDEV_TYPE_NONE:  no filter set.
- * @DMXDEV_TYPE_SEC:   section filter.
- * @DMXDEV_TYPE_PES:   Program Elementary Stream (PES) filter.
- */
-enum dmxdev_type {
-       DMXDEV_TYPE_NONE,
-       DMXDEV_TYPE_SEC,
-       DMXDEV_TYPE_PES,
-};
-
-/**
- * enum dmxdev_state - state machine for the dmxdev.
- *
- * @DMXDEV_STATE_FREE:         indicates that the filter is freed.
- * @DMXDEV_STATE_ALLOCATED:    indicates that the filter was allocated
- *                             to be used.
- * @DMXDEV_STATE_SET:          indicates that the filter parameters are set.
- * @DMXDEV_STATE_GO:           indicates that the filter is running.
- * @DMXDEV_STATE_DONE:         indicates that a packet was already filtered
- *                             and the filter is now disabled.
- *                             Set only if %DMX_ONESHOT. See
- *                             &dmx_sct_filter_params.
- * @DMXDEV_STATE_TIMEDOUT:     Indicates a timeout condition.
- */
-enum dmxdev_state {
-       DMXDEV_STATE_FREE,
-       DMXDEV_STATE_ALLOCATED,
-       DMXDEV_STATE_SET,
-       DMXDEV_STATE_GO,
-       DMXDEV_STATE_DONE,
-       DMXDEV_STATE_TIMEDOUT
-};
-
-/**
- * struct dmxdev_feed - digital TV dmxdev feed
- *
- * @pid:       Program ID to be filtered
- * @ts:                pointer to &struct dmx_ts_feed
- * @next:      &struct list_head pointing to the next feed.
- */
-
-struct dmxdev_feed {
-       u16 pid;
-       struct dmx_ts_feed *ts;
-       struct list_head next;
-};
-
-/**
- * struct dmxdev_filter - digital TV dmxdev filter
- *
- * @filter:    a union describing a dmxdev filter.
- *             Currently used only for section filters.
- * @filter.sec: a &struct dmx_section_filter pointer.
- *             For section filter only.
- * @feed:      a union describing a dmxdev feed.
- *             Depending on the filter type, it can be either
- *             @feed.ts or @feed.sec.
- * @feed.ts:   a &struct list_head list.
- *             For TS and PES feeds.
- * @feed.sec:  a &struct dmx_section_feed pointer.
- *             For section feed only.
- * @params:    a union describing dmxdev filter parameters.
- *             Depending on the filter type, it can be either
- *             @params.sec or @params.pes.
- * @params.sec:        a &struct dmx_sct_filter_params embedded struct.
- *             For section filter only.
- * @params.pes:        a &struct dmx_pes_filter_params embedded struct.
- *             For PES filter only.
- * @type:      type of the dmxdev filter, as defined by &enum dmxdev_type.
- * @state:     state of the dmxdev filter, as defined by &enum dmxdev_state.
- * @dev:       pointer to &struct dmxdev.
- * @buffer:    an embedded &struct dvb_ringbuffer buffer.
- * @mutex:     protects the access to &struct dmxdev_filter.
- * @timer:     &struct timer_list embedded timer, used to check for
- *             feed timeouts.
- *             Only for section filter.
- * @todo:      index for the @secheader.
- *             Only for section filter.
- * @secheader: buffer cache to parse the section header.
- *             Only for section filter.
- */
-struct dmxdev_filter {
-       union {
-               struct dmx_section_filter *sec;
-       } filter;
-
-       union {
-               /* list of TS and PES feeds (struct dmxdev_feed) */
-               struct list_head ts;
-               struct dmx_section_feed *sec;
-       } feed;
-
-       union {
-               struct dmx_sct_filter_params sec;
-               struct dmx_pes_filter_params pes;
-       } params;
-
-       enum dmxdev_type type;
-       enum dmxdev_state state;
-       struct dmxdev *dev;
-       struct dvb_ringbuffer buffer;
-       struct dvb_vb2_ctx vb2_ctx;
-
-       struct mutex mutex;
-
-       /* only for sections */
-       struct timer_list timer;
-       int todo;
-       u8 secheader[3];
-};
-
-/**
- * struct dmxdev - Describes a digital TV demux device.
- *
- * @dvbdev:            pointer to &struct dvb_device associated with
- *                     the demux device node.
- * @dvr_dvbdev:                pointer to &struct dvb_device associated with
- *                     the dvr device node.
- * @filter:            pointer to &struct dmxdev_filter.
- * @demux:             pointer to &struct dmx_demux.
- * @filternum:         number of filters.
- * @capabilities:      demux capabilities as defined by &enum dmx_demux_caps.
- * @exit:              flag to indicate that the demux is being released.
- * @dvr_orig_fe:       pointer to &struct dmx_frontend.
- * @dvr_buffer:                embedded &struct dvb_ringbuffer for DVB output.
- * @mutex:             protects the usage of this structure.
- * @lock:              protects access to &dmxdev->filter->data.
- */
-struct dmxdev {
-       struct dvb_device *dvbdev;
-       struct dvb_device *dvr_dvbdev;
-
-       struct dmxdev_filter *filter;
-       struct dmx_demux *demux;
-
-       int filternum;
-       int capabilities;
-
-       unsigned int exit:1;
-#define DMXDEV_CAP_DUPLEX 1
-       struct dmx_frontend *dvr_orig_fe;
-
-       struct dvb_ringbuffer dvr_buffer;
-#define DVR_BUFFER_SIZE (10*188*1024)
-
-       struct dvb_vb2_ctx dvr_vb2_ctx;
-
-       struct mutex mutex;
-       spinlock_t lock;
-};
-
-/**
- * dvb_dmxdev_init - initializes a digital TV demux and registers both demux
- *     and DVR devices.
- *
- * @dmxdev: pointer to &struct dmxdev.
- * @adap: pointer to &struct dvb_adapter.
- */
-int dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *adap);
-
-/**
- * dvb_dmxdev_release - releases a digital TV demux and unregisters it.
- *
- * @dmxdev: pointer to &struct dmxdev.
- */
-void dvb_dmxdev_release(struct dmxdev *dmxdev);
-
-#endif /* _DMXDEV_H_ */
diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h
deleted file mode 100644 (file)
index 28e2be5..0000000
+++ /dev/null
@@ -1,424 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* dvb-usb-ids.h is part of the DVB USB library.
- *
- * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de) see
- * dvb-usb-init.c for copyright information.
- *
- * a header file containing define's for the USB device supported by the
- * various drivers.
- */
-#ifndef _DVB_USB_IDS_H_
-#define _DVB_USB_IDS_H_
-
-/* Vendor IDs */
-#define USB_VID_ADSTECH                                0x06e1
-#define USB_VID_AFATECH                                0x15a4
-#define USB_VID_ALCOR_MICRO                    0x058f
-#define USB_VID_ALINK                          0x05e3
-#define USB_VID_AMT                            0x1c73
-#define USB_VID_ANCHOR                         0x0547
-#define USB_VID_ANSONIC                                0x10b9
-#define USB_VID_ANUBIS_ELECTRONIC              0x10fd
-#define USB_VID_ASUS                           0x0b05
-#define USB_VID_AVERMEDIA                      0x07ca
-#define USB_VID_COMPRO                         0x185b
-#define USB_VID_COMPRO_UNK                     0x145f
-#define USB_VID_CONEXANT                       0x0572
-#define USB_VID_CYPRESS                                0x04b4
-#define USB_VID_DEXATEK                                0x1d19
-#define USB_VID_DIBCOM                         0x10b8
-#define USB_VID_DPOSH                          0x1498
-#define USB_VID_DVICO                          0x0fe9
-#define USB_VID_E3C                            0x18b4
-#define USB_VID_ELGATO                         0x0fd9
-#define USB_VID_EMPIA                          0xeb1a
-#define USB_VID_GENPIX                         0x09c0
-#define USB_VID_GRANDTEC                       0x5032
-#define USB_VID_GTEK                           0x1f4d
-#define USB_VID_HANFTEK                                0x15f4
-#define USB_VID_HAUPPAUGE                      0x2040
-#define USB_VID_HYPER_PALTEK                   0x1025
-#define USB_VID_INTEL                          0x8086
-#define USB_VID_ITETECH                                0x048d
-#define USB_VID_KWORLD                         0xeb2a
-#define USB_VID_KWORLD_2                       0x1b80
-#define USB_VID_KYE                            0x0458
-#define USB_VID_LEADTEK                                0x0413
-#define USB_VID_LITEON                         0x04ca
-#define USB_VID_MEDION                         0x1660
-#define USB_VID_MIGLIA                         0x18f3
-#define USB_VID_MSI                            0x0db0
-#define USB_VID_MSI_2                          0x1462
-#define USB_VID_OPERA1                         0x695c
-#define USB_VID_PINNACLE                       0x2304
-#define USB_VID_PCTV                           0x2013
-#define USB_VID_PIXELVIEW                      0x1554
-#define USB_VID_REALTEK                                0x0bda
-#define USB_VID_TECHNOTREND                    0x0b48
-#define USB_VID_TERRATEC                       0x0ccd
-#define USB_VID_TELESTAR                       0x10b9
-#define USB_VID_VISIONPLUS                     0x13d3
-#define USB_VID_SONY                           0x1415
-#define USB_PID_TEVII_S421                     0xd421
-#define USB_PID_TEVII_S480_1                   0xd481
-#define USB_PID_TEVII_S480_2                   0xd482
-#define USB_PID_TEVII_S630                     0xd630
-#define USB_PID_TEVII_S632                     0xd632
-#define USB_PID_TEVII_S650                     0xd650
-#define USB_PID_TEVII_S660                     0xd660
-#define USB_PID_TEVII_S662                     0xd662
-#define USB_VID_TWINHAN                                0x1822
-#define USB_VID_ULTIMA_ELECTRONIC              0x05d8
-#define USB_VID_UNIWILL                                0x1584
-#define USB_VID_WIDEVIEW                       0x14aa
-#define USB_VID_GIGABYTE                       0x1044
-#define USB_VID_YUAN                           0x1164
-#define USB_VID_XTENSIONS                      0x1ae7
-#define USB_VID_ZYDAS                          0x0ace
-#define USB_VID_HUMAX_COEX                     0x10b9
-#define USB_VID_774                            0x7a69
-#define USB_VID_EVOLUTEPC                      0x1e59
-#define USB_VID_AZUREWAVE                      0x13d3
-#define USB_VID_TECHNISAT                      0x14f7
-#define USB_VID_HAMA                           0x147f
-#define USB_VID_MICROSOFT                      0x045e
-
-/* Product IDs */
-#define USB_PID_ADSTECH_USB2_COLD                      0xa333
-#define USB_PID_ADSTECH_USB2_WARM                      0xa334
-#define USB_PID_AFATECH_AF9005                         0x9020
-#define USB_PID_AFATECH_AF9015_9015                    0x9015
-#define USB_PID_AFATECH_AF9015_9016                    0x9016
-#define USB_PID_AFATECH_AF9035_1000                    0x1000
-#define USB_PID_AFATECH_AF9035_1001                    0x1001
-#define USB_PID_AFATECH_AF9035_1002                    0x1002
-#define USB_PID_AFATECH_AF9035_1003                    0x1003
-#define USB_PID_AFATECH_AF9035_9035                    0x9035
-#define USB_PID_TREKSTOR_DVBT                          0x901b
-#define USB_PID_TREKSTOR_TERRES_2_0                    0xC803
-#define USB_VID_ALINK_DTU                              0xf170
-#define USB_PID_ANSONIC_DVBT_USB                       0x6000
-#define USB_PID_ANYSEE                                 0x861f
-#define USB_PID_AZUREWAVE_AD_TU700                     0x3237
-#define USB_PID_AZUREWAVE_6007                         0x0ccd
-#define USB_PID_AVERMEDIA_DVBT_USB_COLD                        0x0001
-#define USB_PID_AVERMEDIA_DVBT_USB_WARM                        0x0002
-#define USB_PID_AVERMEDIA_DVBT_USB2_COLD               0xa800
-#define USB_PID_AVERMEDIA_DVBT_USB2_WARM               0xa801
-#define USB_PID_COMPRO_DVBU2000_COLD                   0xd000
-#define USB_PID_COMPRO_DVBU2000_WARM                   0xd001
-#define USB_PID_COMPRO_DVBU2000_UNK_COLD               0x010c
-#define USB_PID_COMPRO_DVBU2000_UNK_WARM               0x010d
-#define USB_PID_COMPRO_VIDEOMATE_U500                  0x1e78
-#define USB_PID_COMPRO_VIDEOMATE_U500_PC               0x1e80
-#define USB_PID_CONCEPTRONIC_CTVDIGRCU                 0xe397
-#define USB_PID_CONEXANT_D680_DMB                      0x86d6
-#define USB_PID_CREATIX_CTX1921                                0x1921
-#define USB_PID_DELOCK_USB2_DVBT                       0xb803
-#define USB_PID_DIBCOM_HOOK_DEFAULT                    0x0064
-#define USB_PID_DIBCOM_HOOK_DEFAULT_REENUM             0x0065
-#define USB_PID_DIBCOM_MOD3000_COLD                    0x0bb8
-#define USB_PID_DIBCOM_MOD3000_WARM                    0x0bb9
-#define USB_PID_DIBCOM_MOD3001_COLD                    0x0bc6
-#define USB_PID_DIBCOM_MOD3001_WARM                    0x0bc7
-#define USB_PID_DIBCOM_STK7700P                                0x1e14
-#define USB_PID_DIBCOM_STK7700P_PC                     0x1e78
-#define USB_PID_DIBCOM_STK7700D                                0x1ef0
-#define USB_PID_DIBCOM_STK7700_U7000                   0x7001
-#define USB_PID_DIBCOM_STK7070P                                0x1ebc
-#define USB_PID_DIBCOM_STK7070PD                       0x1ebe
-#define USB_PID_DIBCOM_STK807XP                                0x1f90
-#define USB_PID_DIBCOM_STK807XPVR                      0x1f98
-#define USB_PID_DIBCOM_STK8096GP                        0x1fa0
-#define USB_PID_DIBCOM_STK8096PVR                       0x1faa
-#define USB_PID_DIBCOM_NIM8096MD                        0x1fa8
-#define USB_PID_DIBCOM_TFE8096P                                0x1f9C
-#define USB_PID_DIBCOM_ANCHOR_2135_COLD                        0x2131
-#define USB_PID_DIBCOM_STK7770P                                0x1e80
-#define USB_PID_DIBCOM_NIM7090                         0x1bb2
-#define USB_PID_DIBCOM_TFE7090PVR                      0x1bb4
-#define USB_PID_DIBCOM_TFE7790P                                0x1e6e
-#define USB_PID_DIBCOM_NIM9090M                                0x2383
-#define USB_PID_DIBCOM_NIM9090MD                       0x2384
-#define USB_PID_DPOSH_M9206_COLD                       0x9206
-#define USB_PID_DPOSH_M9206_WARM                       0xa090
-#define USB_PID_E3C_EC168                              0x1689
-#define USB_PID_E3C_EC168_2                            0xfffa
-#define USB_PID_E3C_EC168_3                            0xfffb
-#define USB_PID_E3C_EC168_4                            0x1001
-#define USB_PID_E3C_EC168_5                            0x1002
-#define USB_PID_FREECOM_DVBT                           0x0160
-#define USB_PID_FREECOM_DVBT_2                         0x0161
-#define USB_PID_UNIWILL_STK7700P                       0x6003
-#define USB_PID_GENIUS_TVGO_DVB_T03                    0x4012
-#define USB_PID_GRANDTEC_DVBT_USB_COLD                 0x0fa0
-#define USB_PID_GRANDTEC_DVBT_USB_WARM                 0x0fa1
-#define USB_PID_GOTVIEW_SAT_HD                         0x5456
-#define USB_PID_INTEL_CE9500                           0x9500
-#define USB_PID_ITETECH_IT9135                         0x9135
-#define USB_PID_ITETECH_IT9135_9005                    0x9005
-#define USB_PID_ITETECH_IT9135_9006                    0x9006
-#define USB_PID_ITETECH_IT9303                         0x9306
-#define USB_PID_KWORLD_399U                            0xe399
-#define USB_PID_KWORLD_399U_2                          0xe400
-#define USB_PID_KWORLD_395U                            0xe396
-#define USB_PID_KWORLD_395U_2                          0xe39b
-#define USB_PID_KWORLD_395U_3                          0xe395
-#define USB_PID_KWORLD_395U_4                          0xe39a
-#define USB_PID_KWORLD_MC810                           0xc810
-#define USB_PID_KWORLD_PC160_2T                                0xc160
-#define USB_PID_KWORLD_PC160_T                         0xc161
-#define USB_PID_KWORLD_UB383_T                         0xe383
-#define USB_PID_KWORLD_UB499_2T_T09                    0xe409
-#define USB_PID_KWORLD_VSTREAM_COLD                    0x17de
-#define USB_PID_KWORLD_VSTREAM_WARM                    0x17df
-#define USB_PID_PROF_1100                              0xb012
-#define USB_PID_TERRATEC_CINERGY_S                     0x0064
-#define USB_PID_TERRATEC_CINERGY_T_USB_XE              0x0055
-#define USB_PID_TERRATEC_CINERGY_T_USB_XE_REV2         0x0069
-#define USB_PID_TERRATEC_CINERGY_T_STICK               0x0093
-#define USB_PID_TERRATEC_CINERGY_T_STICK_RC            0x0097
-#define USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC       0x0099
-#define USB_PID_TERRATEC_CINERGY_T_STICK_BLACK_REV1    0x00a9
-#define USB_PID_TWINHAN_VP7041_COLD                    0x3201
-#define USB_PID_TWINHAN_VP7041_WARM                    0x3202
-#define USB_PID_TWINHAN_VP7020_COLD                    0x3203
-#define USB_PID_TWINHAN_VP7020_WARM                    0x3204
-#define USB_PID_TWINHAN_VP7045_COLD                    0x3205
-#define USB_PID_TWINHAN_VP7045_WARM                    0x3206
-#define USB_PID_TWINHAN_VP7021_COLD                    0x3207
-#define USB_PID_TWINHAN_VP7021_WARM                    0x3208
-#define USB_PID_TWINHAN_VP7049                         0x3219
-#define USB_PID_TINYTWIN                               0x3226
-#define USB_PID_TINYTWIN_2                             0xe402
-#define USB_PID_TINYTWIN_3                             0x9016
-#define USB_PID_DNTV_TINYUSB2_COLD                     0x3223
-#define USB_PID_DNTV_TINYUSB2_WARM                     0x3224
-#define USB_PID_ULTIMA_TVBOX_COLD                      0x8105
-#define USB_PID_ULTIMA_TVBOX_WARM                      0x8106
-#define USB_PID_ULTIMA_TVBOX_AN2235_COLD               0x8107
-#define USB_PID_ULTIMA_TVBOX_AN2235_WARM               0x8108
-#define USB_PID_ULTIMA_TVBOX_ANCHOR_COLD               0x2235
-#define USB_PID_ULTIMA_TVBOX_USB2_COLD                 0x8109
-#define USB_PID_ULTIMA_TVBOX_USB2_WARM                 0x810a
-#define USB_PID_ARTEC_T14_COLD                         0x810b
-#define USB_PID_ARTEC_T14_WARM                         0x810c
-#define USB_PID_ARTEC_T14BR                            0x810f
-#define USB_PID_ULTIMA_TVBOX_USB2_FX_COLD              0x8613
-#define USB_PID_ULTIMA_TVBOX_USB2_FX_WARM              0x1002
-#define USB_PID_UNK_HYPER_PALTEK_COLD                  0x005e
-#define USB_PID_UNK_HYPER_PALTEK_WARM                  0x005f
-#define USB_PID_HANFTEK_UMT_010_COLD                   0x0001
-#define USB_PID_HANFTEK_UMT_010_WARM                   0x0015
-#define USB_PID_DTT200U_COLD                           0x0201
-#define USB_PID_DTT200U_WARM                           0x0301
-#define USB_PID_WT220U_ZAP250_COLD                     0x0220
-#define USB_PID_WT220U_COLD                            0x0222
-#define USB_PID_WT220U_WARM                            0x0221
-#define USB_PID_WT220U_FC_COLD                         0x0225
-#define USB_PID_WT220U_FC_WARM                         0x0226
-#define USB_PID_WT220U_ZL0353_COLD                     0x022a
-#define USB_PID_WT220U_ZL0353_WARM                     0x022b
-#define USB_PID_WINTV_NOVA_T_USB2_COLD                 0x9300
-#define USB_PID_WINTV_NOVA_T_USB2_WARM                 0x9301
-#define USB_PID_HAUPPAUGE_NOVA_T_500                   0x9941
-#define USB_PID_HAUPPAUGE_NOVA_T_500_2                 0x9950
-#define USB_PID_HAUPPAUGE_NOVA_T_500_3                 0x8400
-#define USB_PID_HAUPPAUGE_NOVA_T_STICK                 0x7050
-#define USB_PID_HAUPPAUGE_NOVA_T_STICK_2               0x7060
-#define USB_PID_HAUPPAUGE_NOVA_T_STICK_3               0x7070
-#define USB_PID_HAUPPAUGE_MYTV_T                       0x7080
-#define USB_PID_HAUPPAUGE_NOVA_TD_STICK                        0x9580
-#define USB_PID_HAUPPAUGE_NOVA_TD_STICK_52009          0x5200
-#define USB_PID_HAUPPAUGE_TIGER_ATSC                   0xb200
-#define USB_PID_HAUPPAUGE_TIGER_ATSC_B210              0xb210
-#define USB_PID_AVERMEDIA_EXPRESS                      0xb568
-#define USB_PID_AVERMEDIA_VOLAR                                0xa807
-#define USB_PID_AVERMEDIA_VOLAR_2                      0xb808
-#define USB_PID_AVERMEDIA_VOLAR_A868R                  0xa868
-#define USB_PID_AVERMEDIA_MCE_USB_M038                 0x1228
-#define USB_PID_AVERMEDIA_HYBRID_ULTRA_USB_M039R       0x0039
-#define USB_PID_AVERMEDIA_HYBRID_ULTRA_USB_M039R_ATSC  0x1039
-#define USB_PID_AVERMEDIA_HYBRID_ULTRA_USB_M039R_DVBT  0x2039
-#define USB_PID_AVERMEDIA_VOLAR_X                      0xa815
-#define USB_PID_AVERMEDIA_VOLAR_X_2                    0x8150
-#define USB_PID_AVERMEDIA_A309                         0xa309
-#define USB_PID_AVERMEDIA_A310                         0xa310
-#define USB_PID_AVERMEDIA_A850                         0x850a
-#define USB_PID_AVERMEDIA_A850T                                0x850b
-#define USB_PID_AVERMEDIA_A805                         0xa805
-#define USB_PID_AVERMEDIA_A815M                                0x815a
-#define USB_PID_AVERMEDIA_A835                         0xa835
-#define USB_PID_AVERMEDIA_B835                         0xb835
-#define USB_PID_AVERMEDIA_A835B_1835                   0x1835
-#define USB_PID_AVERMEDIA_A835B_2835                   0x2835
-#define USB_PID_AVERMEDIA_A835B_3835                   0x3835
-#define USB_PID_AVERMEDIA_A835B_4835                   0x4835
-#define USB_PID_AVERMEDIA_1867                         0x1867
-#define USB_PID_AVERMEDIA_A867                         0xa867
-#define USB_PID_AVERMEDIA_H335                         0x0335
-#define USB_PID_AVERMEDIA_TD110                                0xa110
-#define USB_PID_AVERMEDIA_TWINSTAR                     0x0825
-#define USB_PID_TECHNOTREND_CONNECT_S2400               0x3006
-#define USB_PID_TECHNOTREND_CONNECT_S2400_8KEEPROM     0x3009
-#define USB_PID_TECHNOTREND_CONNECT_CT3650             0x300d
-#define USB_PID_TECHNOTREND_CONNECT_S2_4600             0x3011
-#define USB_PID_TECHNOTREND_CONNECT_CT2_4650_CI                0x3012
-#define USB_PID_TECHNOTREND_CONNECT_CT2_4650_CI_2      0x3015
-#define USB_PID_TECHNOTREND_TVSTICK_CT2_4400           0x3014
-#define USB_PID_TECHNOTREND_CONNECT_S2_4650_CI         0x3017
-#define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY       0x005a
-#define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2     0x0081
-#define USB_PID_TERRATEC_CINERGY_HT_USB_XE             0x0058
-#define USB_PID_TERRATEC_CINERGY_HT_EXPRESS            0x0060
-#define USB_PID_TERRATEC_CINERGY_T_EXPRESS             0x0062
-#define USB_PID_TERRATEC_CINERGY_T_XXS                 0x0078
-#define USB_PID_TERRATEC_CINERGY_T_XXS_2               0x00ab
-#define USB_PID_TERRATEC_CINERGY_S2_R1                 0x00a8
-#define USB_PID_TERRATEC_CINERGY_S2_R2                 0x00b0
-#define USB_PID_TERRATEC_CINERGY_S2_R3                 0x0102
-#define USB_PID_TERRATEC_CINERGY_S2_R4                 0x0105
-#define USB_PID_TERRATEC_H7                            0x10b4
-#define USB_PID_TERRATEC_H7_2                          0x10a3
-#define USB_PID_TERRATEC_H7_3                          0x10a5
-#define USB_PID_TERRATEC_T1                            0x10ae
-#define USB_PID_TERRATEC_T3                            0x10a0
-#define USB_PID_TERRATEC_T5                            0x10a1
-#define USB_PID_NOXON_DAB_STICK                                0x00b3
-#define USB_PID_NOXON_DAB_STICK_REV2                   0x00e0
-#define USB_PID_NOXON_DAB_STICK_REV3                   0x00b4
-#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_PCTV71E                       0x022b
-#define USB_PID_PINNACLE_PCTV72E                       0x0236
-#define USB_PID_PINNACLE_PCTV73E                       0x0237
-#define USB_PID_PINNACLE_PCTV310E                      0x3211
-#define USB_PID_PINNACLE_PCTV801E                      0x023a
-#define USB_PID_PINNACLE_PCTV801E_SE                   0x023b
-#define USB_PID_PINNACLE_PCTV340E                      0x023d
-#define USB_PID_PINNACLE_PCTV340E_SE                   0x023e
-#define USB_PID_PINNACLE_PCTV73A                       0x0243
-#define USB_PID_PINNACLE_PCTV73ESE                     0x0245
-#define USB_PID_PINNACLE_PCTV74E                       0x0246
-#define USB_PID_PINNACLE_PCTV282E                      0x0248
-#define USB_PID_PIXELVIEW_SBTVD                                0x5010
-#define USB_PID_PCTV_200E                              0x020e
-#define USB_PID_PCTV_400E                              0x020f
-#define USB_PID_PCTV_450E                              0x0222
-#define USB_PID_PCTV_452E                              0x021f
-#define USB_PID_PCTV_78E                               0x025a
-#define USB_PID_PCTV_79E                               0x0262
-#define USB_PID_REALTEK_RTL2831U                       0x2831
-#define USB_PID_REALTEK_RTL2832U                       0x2832
-#define USB_PID_TECHNOTREND_CONNECT_S2_3600            0x3007
-#define USB_PID_TECHNOTREND_CONNECT_S2_3650_CI         0x300a
-#define USB_PID_NEBULA_DIGITV                          0x0201
-#define USB_PID_DVICO_BLUEBIRD_LGDT                    0xd820
-#define USB_PID_DVICO_BLUEBIRD_LG064F_COLD             0xd500
-#define USB_PID_DVICO_BLUEBIRD_LG064F_WARM             0xd501
-#define USB_PID_DVICO_BLUEBIRD_LGZ201_COLD             0xdb00
-#define USB_PID_DVICO_BLUEBIRD_LGZ201_WARM             0xdb01
-#define USB_PID_DVICO_BLUEBIRD_TH7579_COLD             0xdb10
-#define USB_PID_DVICO_BLUEBIRD_TH7579_WARM             0xdb11
-#define USB_PID_DVICO_BLUEBIRD_DUAL_1_COLD             0xdb50
-#define USB_PID_DVICO_BLUEBIRD_DUAL_1_WARM             0xdb51
-#define USB_PID_DVICO_BLUEBIRD_DUAL_2_COLD             0xdb58
-#define USB_PID_DVICO_BLUEBIRD_DUAL_2_WARM             0xdb59
-#define USB_PID_DVICO_BLUEBIRD_DUAL_4                  0xdb78
-#define USB_PID_DVICO_BLUEBIRD_DUAL_4_REV_2            0xdb98
-#define USB_PID_DVICO_BLUEBIRD_DVB_T_NANO_2            0xdb70
-#define USB_PID_DVICO_BLUEBIRD_DVB_T_NANO_2_NFW_WARM   0xdb71
-#define USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_COLD                0xdb54
-#define USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_WARM                0xdb55
-#define USB_PID_MEDION_MD95700                         0x0932
-#define USB_PID_MSI_MEGASKY580                         0x5580
-#define USB_PID_MSI_MEGASKY580_55801                   0x5581
-#define USB_PID_KYE_DVB_T_COLD                         0x701e
-#define USB_PID_KYE_DVB_T_WARM                         0x701f
-#define USB_PID_LITEON_DVB_T_COLD                      0xf000
-#define USB_PID_LITEON_DVB_T_WARM                      0xf001
-#define USB_PID_DIGIVOX_MINI_SL_COLD                   0xe360
-#define USB_PID_DIGIVOX_MINI_SL_WARM                   0xe361
-#define USB_PID_GRANDTEC_DVBT_USB2_COLD                        0x0bc6
-#define USB_PID_GRANDTEC_DVBT_USB2_WARM                        0x0bc7
-#define USB_PID_WINFAST_DTV2000DS                      0x6a04
-#define USB_PID_WINFAST_DTV2000DS_PLUS                 0x6f12
-#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_H                   0x60f6
-#define USB_PID_WINFAST_DTV_DONGLE_STK7700P_2          0x6f01
-#define USB_PID_WINFAST_DTV_DONGLE_GOLD                        0x6029
-#define USB_PID_WINFAST_DTV_DONGLE_MINID               0x6f0f
-#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_GENPIX_SKYWALKER_1                     0x0203
-#define USB_PID_GENPIX_SKYWALKER_CW3K                  0x0204
-#define USB_PID_GENPIX_SKYWALKER_2                     0x0206
-#define USB_PID_SIGMATEK_DVB_110                       0x6610
-#define USB_PID_MSI_DIGI_VOX_MINI_II                   0x1513
-#define USB_PID_MSI_DIGIVOX_DUO                                0x8801
-#define USB_PID_OPERA1_COLD                            0x2830
-#define USB_PID_OPERA1_WARM                            0x3829
-#define USB_PID_LIFEVIEW_TV_WALKER_TWIN_COLD           0x0514
-#define USB_PID_LIFEVIEW_TV_WALKER_TWIN_WARM           0x0513
-#define USB_PID_GIGABYTE_U7000                         0x7001
-#define USB_PID_GIGABYTE_U8000                         0x7002
-#define USB_PID_ASUS_U3000                             0x171f
-#define USB_PID_ASUS_U3000H                            0x1736
-#define USB_PID_ASUS_U3100                             0x173f
-#define USB_PID_ASUS_U3100MINI_PLUS                    0x1779
-#define USB_PID_YUAN_EC372S                            0x1edc
-#define USB_PID_YUAN_STK7700PH                         0x1f08
-#define USB_PID_YUAN_PD378S                            0x2edc
-#define USB_PID_YUAN_MC770                             0x0871
-#define USB_PID_YUAN_STK7700D                          0x1efc
-#define USB_PID_YUAN_STK7700D_2                                0x1e8c
-#define USB_PID_DW2102                                 0x2102
-#define USB_PID_DW2104                                 0x2104
-#define USB_PID_DW3101                                 0x3101
-#define USB_PID_XTENSIONS_XD_380                       0x0381
-#define USB_PID_TELESTAR_STARSTICK_2                   0x8000
-#define USB_PID_MSI_DIGI_VOX_MINI_III                   0x8807
-#define USB_PID_SONY_PLAYTV                            0x0003
-#define USB_PID_MYGICA_D689                            0xd811
-#define USB_PID_MYGICA_T230                            0xc688
-#define USB_PID_MYGICA_T230C                           0xc689
-#define USB_PID_ELGATO_EYETV_DIVERSITY                 0x0011
-#define USB_PID_ELGATO_EYETV_DTT                       0x0021
-#define USB_PID_ELGATO_EYETV_DTT_2                     0x003f
-#define USB_PID_ELGATO_EYETV_DTT_Dlx                   0x0020
-#define USB_PID_ELGATO_EYETV_SAT                       0x002a
-#define USB_PID_ELGATO_EYETV_SAT_V2                    0x0025
-#define USB_PID_ELGATO_EYETV_SAT_V3                    0x0036
-#define USB_PID_DVB_T_USB_STICK_HIGH_SPEED_COLD                0x5000
-#define USB_PID_DVB_T_USB_STICK_HIGH_SPEED_WARM                0x5001
-#define USB_PID_FRIIO_WHITE                            0x0001
-#define USB_PID_TVWAY_PLUS                             0x0002
-#define USB_PID_SVEON_STV20                            0xe39d
-#define USB_PID_SVEON_STV20_RTL2832U                   0xd39d
-#define USB_PID_SVEON_STV21                            0xd3b0
-#define USB_PID_SVEON_STV22                            0xe401
-#define USB_PID_SVEON_STV22_IT9137                     0xe411
-#define USB_PID_AZUREWAVE_AZ6027                       0x3275
-#define USB_PID_TERRATEC_DVBS2CI_V1                    0x10a4
-#define USB_PID_TERRATEC_DVBS2CI_V2                    0x10ac
-#define USB_PID_TECHNISAT_USB2_HDCI_V1                 0x0001
-#define USB_PID_TECHNISAT_USB2_HDCI_V2                 0x0002
-#define USB_PID_TECHNISAT_USB2_CABLESTAR_HDCI          0x0003
-#define USB_PID_TECHNISAT_AIRSTAR_TELESTICK_2          0x0004
-#define USB_PID_TECHNISAT_USB2_DVB_S2                  0x0500
-#define USB_PID_CPYTO_REDI_PC50A                       0xa803
-#define USB_PID_CTVDIGDUAL_V2                          0xe410
-#define USB_PID_PCTV_2002E                              0x025c
-#define USB_PID_PCTV_2002E_SE                           0x025d
-#define USB_PID_SVEON_STV27                             0xd3af
-#define USB_PID_TURBOX_DTT_2000                         0xd3a4
-#define USB_PID_WINTV_SOLOHD                            0x0264
-#define USB_PID_EVOLVEO_XTRATV_STICK                   0xa115
-#define USB_PID_HAMA_DVBT_HYBRID                       0x2758
-#define USB_PID_XBOX_ONE_TUNER                          0x02d5
-#endif
index a3b2754e71247af038bbdd36b7dd585bd4ad10ab..77858046d34703b981f10ace7c009b08b4cc0494 100644 (file)
@@ -37,8 +37,8 @@
 #include <linux/sched/signal.h>
 #include <linux/kthread.h>
 
-#include "dvb_ca_en50221.h"
-#include "dvb_ringbuffer.h"
+#include <media/dvb_ca_en50221.h>
+#include <media/dvb_ringbuffer.h>
 
 static int dvb_ca_en50221_debug;
 
diff --git a/drivers/media/dvb-core/dvb_ca_en50221.h b/drivers/media/dvb-core/dvb_ca_en50221.h
deleted file mode 100644 (file)
index 367687d..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * dvb_ca.h: generic DVB functions for EN50221 CA interfaces
- *
- * Copyright (C) 2004 Andrew de Quincey
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- */
-
-#ifndef _DVB_CA_EN50221_H_
-#define _DVB_CA_EN50221_H_
-
-#include <linux/list.h>
-#include <linux/dvb/ca.h>
-
-#include "dvbdev.h"
-
-#define DVB_CA_EN50221_POLL_CAM_PRESENT        1
-#define DVB_CA_EN50221_POLL_CAM_CHANGED        2
-#define DVB_CA_EN50221_POLL_CAM_READY          4
-
-#define DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE      1
-#define DVB_CA_EN50221_FLAG_IRQ_FR             2
-#define DVB_CA_EN50221_FLAG_IRQ_DA             4
-
-#define DVB_CA_EN50221_CAMCHANGE_REMOVED               0
-#define DVB_CA_EN50221_CAMCHANGE_INSERTED              1
-
-/**
- * struct dvb_ca_en50221- Structure describing a CA interface
- *
- * @owner:             the module owning this structure
- * @read_attribute_mem:        function for reading attribute memory on the CAM
- * @write_attribute_mem: function for writing attribute memory on the CAM
- * @read_cam_control:  function for reading the control interface on the CAM
- * @write_cam_control: function for reading the control interface on the CAM
- * @read_data:         function for reading data (block mode)
- * @write_data:                function for writing data (block mode)
- * @slot_reset:                function to reset the CAM slot
- * @slot_shutdown:     function to shutdown a CAM slot
- * @slot_ts_enable:    function to enable the Transport Stream on a CAM slot
- * @poll_slot_status:  function to poll slot status. Only necessary if
- *                     DVB_CA_FLAG_EN50221_IRQ_CAMCHANGE is not set.
- * @data:              private data, used by caller.
- * @private:           Opaque data used by the dvb_ca core. Do not modify!
- *
- * NOTE: the read_*, write_* and poll_slot_status functions will be
- * called for different slots concurrently and need to use locks where
- * and if appropriate. There will be no concurrent access to one slot.
- */
-struct dvb_ca_en50221 {
-       struct module *owner;
-
-       int (*read_attribute_mem)(struct dvb_ca_en50221 *ca,
-                                 int slot, int address);
-       int (*write_attribute_mem)(struct dvb_ca_en50221 *ca,
-                                  int slot, int address, u8 value);
-
-       int (*read_cam_control)(struct dvb_ca_en50221 *ca,
-                               int slot, u8 address);
-       int (*write_cam_control)(struct dvb_ca_en50221 *ca,
-                                int slot, u8 address, u8 value);
-
-       int (*read_data)(struct dvb_ca_en50221 *ca,
-                        int slot, u8 *ebuf, int ecount);
-       int (*write_data)(struct dvb_ca_en50221 *ca,
-                         int slot, u8 *ebuf, int ecount);
-
-       int (*slot_reset)(struct dvb_ca_en50221 *ca, int slot);
-       int (*slot_shutdown)(struct dvb_ca_en50221 *ca, int slot);
-       int (*slot_ts_enable)(struct dvb_ca_en50221 *ca, int slot);
-
-       int (*poll_slot_status)(struct dvb_ca_en50221 *ca, int slot, int open);
-
-       void *data;
-
-       void *private;
-};
-
-/*
- * Functions for reporting IRQ events
- */
-
-/**
- * dvb_ca_en50221_camchange_irq - A CAMCHANGE IRQ has occurred.
- *
- * @pubca: CA instance.
- * @slot: Slot concerned.
- * @change_type: One of the DVB_CA_CAMCHANGE_* values
- */
-void dvb_ca_en50221_camchange_irq(struct dvb_ca_en50221 *pubca, int slot,
-                                 int change_type);
-
-/**
- * dvb_ca_en50221_camready_irq - A CAMREADY IRQ has occurred.
- *
- * @pubca: CA instance.
- * @slot: Slot concerned.
- */
-void dvb_ca_en50221_camready_irq(struct dvb_ca_en50221 *pubca, int slot);
-
-/**
- * dvb_ca_en50221_frda_irq - An FR or a DA IRQ has occurred.
- *
- * @ca: CA instance.
- * @slot: Slot concerned.
- */
-void dvb_ca_en50221_frda_irq(struct dvb_ca_en50221 *ca, int slot);
-
-/*
- * Initialisation/shutdown functions
- */
-
-/**
- * dvb_ca_en50221_init - Initialise a new DVB CA device.
- *
- * @dvb_adapter: DVB adapter to attach the new CA device to.
- * @ca: The dvb_ca instance.
- * @flags: Flags describing the CA device (DVB_CA_EN50221_FLAG_*).
- * @slot_count: Number of slots supported.
- *
- * @return 0 on success, nonzero on failure
- */
-int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter,
-                       struct dvb_ca_en50221 *ca, int flags,
-                              int slot_count);
-
-/**
- * dvb_ca_en50221_release - Release a DVB CA device.
- *
- * @ca: The associated dvb_ca instance.
- */
-void dvb_ca_en50221_release(struct dvb_ca_en50221 *ca);
-
-#endif
index acade7543b82d30c55ad6f8e4fcc7dd637a8699d..5047a1f8705024e08892034faf3a29d38f154c30 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/uaccess.h>
 #include <asm/div64.h>
 
-#include "dvb_demux.h"
+#include <media/dvb_demux.h>
 
 static int dvb_demux_tscheck;
 module_param(dvb_demux_tscheck, int, 0644);
diff --git a/drivers/media/dvb-core/dvb_demux.h b/drivers/media/dvb-core/dvb_demux.h
deleted file mode 100644 (file)
index c3bcdee..0000000
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * dvb_demux.h: DVB kernel demux API
- *
- * Copyright (C) 2000-2001 Marcus Metzler & Ralph Metzler
- *                         for convergence integrated media GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _DVB_DEMUX_H_
-#define _DVB_DEMUX_H_
-
-#include <linux/time.h>
-#include <linux/timer.h>
-#include <linux/spinlock.h>
-#include <linux/mutex.h>
-
-#include "demux.h"
-
-/**
- * enum dvb_dmx_filter_type - type of demux feed.
- *
- * @DMX_TYPE_TS:       feed is in TS mode.
- * @DMX_TYPE_SEC:      feed is in Section mode.
- */
-enum dvb_dmx_filter_type {
-       DMX_TYPE_TS,
-       DMX_TYPE_SEC,
-};
-
-/**
- * enum dvb_dmx_state - state machine for a demux filter.
- *
- * @DMX_STATE_FREE:            indicates that the filter is freed.
- * @DMX_STATE_ALLOCATED:       indicates that the filter was allocated
- *                             to be used.
- * @DMX_STATE_READY:           indicates that the filter is ready
- *                             to be used.
- * @DMX_STATE_GO:              indicates that the filter is running.
- */
-enum dvb_dmx_state {
-       DMX_STATE_FREE,
-       DMX_STATE_ALLOCATED,
-       DMX_STATE_READY,
-       DMX_STATE_GO,
-};
-
-#define DVB_DEMUX_MASK_MAX 18
-
-#define MAX_PID 0x1fff
-
-#define SPEED_PKTS_INTERVAL 50000
-
-/**
- * struct dvb_demux_filter - Describes a DVB demux section filter.
- *
- * @filter:            Section filter as defined by &struct dmx_section_filter.
- * @maskandmode:       logical ``and`` bit mask.
- * @maskandnotmode:    logical ``and not`` bit mask.
- * @doneq:             flag that indicates when a filter is ready.
- * @next:              pointer to the next section filter.
- * @feed:              &struct dvb_demux_feed pointer.
- * @index:             index of the used demux filter.
- * @state:             state of the filter as described by &enum dvb_dmx_state.
- * @type:              type of the filter as described
- *                     by &enum dvb_dmx_filter_type.
- */
-
-struct dvb_demux_filter {
-       struct dmx_section_filter filter;
-       u8 maskandmode[DMX_MAX_FILTER_SIZE];
-       u8 maskandnotmode[DMX_MAX_FILTER_SIZE];
-       bool doneq;
-
-       struct dvb_demux_filter *next;
-       struct dvb_demux_feed *feed;
-       int index;
-       enum dvb_dmx_state state;
-       enum dvb_dmx_filter_type type;
-
-       /* private: used only by av7110 */
-       u16 hw_handle;
-};
-
-/**
- * struct dvb_demux_feed - describes a DVB field
- *
- * @feed:      a union describing a digital TV feed.
- *             Depending on the feed type, it can be either
- *             @feed.ts or @feed.sec.
- * @feed.ts:   a &struct dmx_ts_feed pointer.
- *             For TS feed only.
- * @feed.sec:  a &struct dmx_section_feed pointer.
- *             For section feed only.
- * @cb:                a union describing digital TV callbacks.
- *             Depending on the feed type, it can be either
- *             @cb.ts or @cb.sec.
- * @cb.ts:     a dmx_ts_cb() calback function pointer.
- *             For TS feed only.
- * @cb.sec:    a dmx_section_cb() callback function pointer.
- *             For section feed only.
- * @demux:     pointer to &struct dvb_demux.
- * @priv:      private data that can optionally be used by a DVB driver.
- * @type:      type of the filter, as defined by &enum dvb_dmx_filter_type.
- * @state:     state of the filter as defined by &enum dvb_dmx_state.
- * @pid:       PID to be filtered.
- * @timeout:   feed timeout.
- * @filter:    pointer to &struct dvb_demux_filter.
- * @ts_type:   type of TS, as defined by &enum ts_filter_type.
- * @pes_type:  type of PES, as defined by &enum dmx_ts_pes.
- * @cc:                MPEG-TS packet continuity counter
- * @pusi_seen: if true, indicates that a discontinuity was detected.
- *             it is used to prevent feeding of garbage from previous section.
- * @peslen:    length of the PES (Packet Elementary Stream).
- * @list_head: head for the list of digital TV demux feeds.
- * @index:     a unique index for each feed. Can be used as hardware
- *             pid filter index.
- */
-struct dvb_demux_feed {
-       union {
-               struct dmx_ts_feed ts;
-               struct dmx_section_feed sec;
-       } feed;
-
-       union {
-               dmx_ts_cb ts;
-               dmx_section_cb sec;
-       } cb;
-
-       struct dvb_demux *demux;
-       void *priv;
-       enum dvb_dmx_filter_type type;
-       enum dvb_dmx_state state;
-       u16 pid;
-
-       ktime_t timeout;
-       struct dvb_demux_filter *filter;
-
-       enum ts_filter_type ts_type;
-       enum dmx_ts_pes pes_type;
-
-       int cc;
-       bool pusi_seen;
-
-       u16 peslen;
-
-       struct list_head list_head;
-       unsigned int index;
-};
-
-/**
- * struct dvb_demux - represents a digital TV demux
- * @dmx:               embedded &struct dmx_demux with demux capabilities
- *                     and callbacks.
- * @priv:              private data that can optionally be used by
- *                     a DVB driver.
- * @filternum:         maximum amount of DVB filters.
- * @feednum:           maximum amount of DVB feeds.
- * @start_feed:                callback routine to be called in order to start
- *                     a DVB feed.
- * @stop_feed:         callback routine to be called in order to stop
- *                     a DVB feed.
- * @write_to_decoder:  callback routine to be called if the feed is TS and
- *                     it is routed to an A/V decoder, when a new TS packet
- *                     is received.
- *                     Used only on av7110-av.c.
- * @check_crc32:       callback routine to check CRC. If not initialized,
- *                     dvb_demux will use an internal one.
- * @memcopy:           callback routine to memcopy received data.
- *                     If not initialized, dvb_demux will default to memcpy().
- * @users:             counter for the number of demux opened file descriptors.
- *                     Currently, it is limited to 10 users.
- * @filter:            pointer to &struct dvb_demux_filter.
- * @feed:              pointer to &struct dvb_demux_feed.
- * @frontend_list:     &struct list_head with frontends used by the demux.
- * @pesfilter:         array of &struct dvb_demux_feed with the PES types
- *                     that will be filtered.
- * @pids:              list of filtered program IDs.
- * @feed_list:         &struct list_head with feeds.
- * @tsbuf:             temporary buffer used internally to store TS packets.
- * @tsbufp:            temporary buffer index used internally.
- * @mutex:             pointer to &struct mutex used to protect feed set
- *                     logic.
- * @lock:              pointer to &spinlock_t, used to protect buffer handling.
- * @cnt_storage:       buffer used for TS/TEI continuity check.
- * @speed_last_time:   &ktime_t used for TS speed check.
- * @speed_pkts_cnt:    packets count used for TS speed check.
- */
-struct dvb_demux {
-       struct dmx_demux dmx;
-       void *priv;
-       int filternum;
-       int feednum;
-       int (*start_feed)(struct dvb_demux_feed *feed);
-       int (*stop_feed)(struct dvb_demux_feed *feed);
-       int (*write_to_decoder)(struct dvb_demux_feed *feed,
-                                const u8 *buf, size_t len);
-       u32 (*check_crc32)(struct dvb_demux_feed *feed,
-                           const u8 *buf, size_t len);
-       void (*memcopy)(struct dvb_demux_feed *feed, u8 *dst,
-                        const u8 *src, size_t len);
-
-       int users;
-#define MAX_DVB_DEMUX_USERS 10
-       struct dvb_demux_filter *filter;
-       struct dvb_demux_feed *feed;
-
-       struct list_head frontend_list;
-
-       struct dvb_demux_feed *pesfilter[DMX_PES_OTHER];
-       u16 pids[DMX_PES_OTHER];
-
-#define DMX_MAX_PID 0x2000
-       struct list_head feed_list;
-       u8 tsbuf[204];
-       int tsbufp;
-
-       struct mutex mutex;
-       spinlock_t lock;
-
-       uint8_t *cnt_storage; /* for TS continuity check */
-
-       ktime_t speed_last_time; /* for TS speed check */
-       uint32_t speed_pkts_cnt; /* for TS speed check */
-
-       /* private: used only on av7110 */
-       int playing;
-       int recording;
-};
-
-/**
- * dvb_dmx_init - initialize a digital TV demux struct.
- *
- * @demux: &struct dvb_demux to be initialized.
- *
- * Before being able to register a digital TV demux struct, drivers
- * should call this routine. On its typical usage, some fields should
- * be initialized at the driver before calling it.
- *
- * A typical usecase is::
- *
- *     dvb->demux.dmx.capabilities =
- *             DMX_TS_FILTERING | DMX_SECTION_FILTERING |
- *             DMX_MEMORY_BASED_FILTERING;
- *     dvb->demux.priv       = dvb;
- *     dvb->demux.filternum  = 256;
- *     dvb->demux.feednum    = 256;
- *     dvb->demux.start_feed = driver_start_feed;
- *     dvb->demux.stop_feed  = driver_stop_feed;
- *     ret = dvb_dmx_init(&dvb->demux);
- *     if (ret < 0)
- *             return ret;
- */
-int dvb_dmx_init(struct dvb_demux *demux);
-
-/**
- * dvb_dmx_release - releases a digital TV demux internal buffers.
- *
- * @demux: &struct dvb_demux to be released.
- *
- * The DVB core internally allocates data at @demux. This routine
- * releases those data. Please notice that the struct itelf is not
- * released, as it can be embedded on other structs.
- */
-void dvb_dmx_release(struct dvb_demux *demux);
-
-/**
- * dvb_dmx_swfilter_packets - use dvb software filter for a buffer with
- *     multiple MPEG-TS packets with 188 bytes each.
- *
- * @demux: pointer to &struct dvb_demux
- * @buf: buffer with data to be filtered
- * @count: number of MPEG-TS packets with size of 188.
- *
- * The routine will discard a DVB packet that don't start with 0x47.
- *
- * Use this routine if the DVB demux fills MPEG-TS buffers that are
- * already aligned.
- *
- * NOTE: The @buf size should have size equal to ``count * 188``.
- */
-void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf,
-                             size_t count);
-
-/**
- * dvb_dmx_swfilter -  use dvb software filter for a buffer with
- *     multiple MPEG-TS packets with 188 bytes each.
- *
- * @demux: pointer to &struct dvb_demux
- * @buf: buffer with data to be filtered
- * @count: number of MPEG-TS packets with size of 188.
- *
- * If a DVB packet doesn't start with 0x47, it will seek for the first
- * byte that starts with 0x47.
- *
- * Use this routine if the DVB demux fill buffers that may not start with
- * a packet start mark (0x47).
- *
- * NOTE: The @buf size should have size equal to ``count * 188``.
- */
-void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count);
-
-/**
- * dvb_dmx_swfilter_204 -  use dvb software filter for a buffer with
- *     multiple MPEG-TS packets with 204 bytes each.
- *
- * @demux: pointer to &struct dvb_demux
- * @buf: buffer with data to be filtered
- * @count: number of MPEG-TS packets with size of 204.
- *
- * If a DVB packet doesn't start with 0x47, it will seek for the first
- * byte that starts with 0x47.
- *
- * Use this routine if the DVB demux fill buffers that may not start with
- * a packet start mark (0x47).
- *
- * NOTE: The @buf size should have size equal to ``count * 204``.
- */
-void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf,
-                         size_t count);
-
-/**
- * dvb_dmx_swfilter_raw -  make the raw data available to userspace without
- *     filtering
- *
- * @demux: pointer to &struct dvb_demux
- * @buf: buffer with data
- * @count: number of packets to be passed. The actual size of each packet
- *     depends on the &dvb_demux->feed->cb.ts logic.
- *
- * Use it if the driver needs to deliver the raw payload to userspace without
- * passing through the kernel demux. That is meant to support some
- * delivery systems that aren't based on MPEG-TS.
- *
- * This function relies on &dvb_demux->feed->cb.ts to actually handle the
- * buffer.
- */
-void dvb_dmx_swfilter_raw(struct dvb_demux *demux, const u8 *buf,
-                         size_t count);
-
-#endif /* _DVB_DEMUX_H_ */
index 5547b9830bbc0118fb0691d53d43a0e74cd6052d..722b86a43497dd4eb75fe94270c78bad98d03686 100644 (file)
@@ -43,8 +43,8 @@
 #include <linux/compat.h>
 #include <asm/processor.h>
 
-#include "dvb_frontend.h"
-#include "dvbdev.h"
+#include <media/dvb_frontend.h>
+#include <media/dvbdev.h>
 #include <linux/dvb/version.h>
 
 static int dvb_frontend_debug;
diff --git a/drivers/media/dvb-core/dvb_frontend.h b/drivers/media/dvb-core/dvb_frontend.h
deleted file mode 100644 (file)
index 2bc25f1..0000000
+++ /dev/null
@@ -1,795 +0,0 @@
-/*
- * dvb_frontend.h
- *
- * The Digital TV Frontend kABI defines a driver-internal interface for
- * registering low-level, hardware specific driver to a hardware independent
- * frontend layer.
- *
- * Copyright (C) 2001 convergence integrated media GmbH
- * Copyright (C) 2004 convergence GmbH
- *
- * Written by Ralph Metzler
- * Overhauled by Holger Waechtler
- * Kernel I2C stuff by Michael Hunold <hunold@convergence.de>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
-
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- */
-
-#ifndef _DVB_FRONTEND_H_
-#define _DVB_FRONTEND_H_
-
-#include <linux/types.h>
-#include <linux/sched.h>
-#include <linux/ioctl.h>
-#include <linux/i2c.h>
-#include <linux/module.h>
-#include <linux/errno.h>
-#include <linux/delay.h>
-#include <linux/mutex.h>
-#include <linux/slab.h>
-
-#include <linux/dvb/frontend.h>
-
-#include "dvbdev.h"
-
-/*
- * Maximum number of Delivery systems per frontend. It
- * should be smaller or equal to 32
- */
-#define MAX_DELSYS     8
-
-/**
- * struct dvb_frontend_tune_settings - parameters to adjust frontend tuning
- *
- * @min_delay_ms:      minimum delay for tuning, in ms
- * @step_size:         step size between two consecutive frequencies
- * @max_drift:         maximum drift
- *
- * NOTE: step_size is in Hz, for terrestrial/cable or kHz for satellite
- */
-struct dvb_frontend_tune_settings {
-       int min_delay_ms;
-       int step_size;
-       int max_drift;
-};
-
-struct dvb_frontend;
-
-/**
- * struct dvb_tuner_info - Frontend name and min/max ranges/bandwidths
- *
- * @name:              name of the Frontend
- * @frequency_min:     minimal frequency supported
- * @frequency_max:     maximum frequency supported
- * @frequency_step:    frequency step
- * @bandwidth_min:     minimal frontend bandwidth supported
- * @bandwidth_max:     maximum frontend bandwidth supported
- * @bandwidth_step:    frontend bandwidth step
- *
- * NOTE: frequency parameters are in Hz, for terrestrial/cable or kHz for
- * satellite.
- */
-struct dvb_tuner_info {
-       char name[128];
-
-       u32 frequency_min;
-       u32 frequency_max;
-       u32 frequency_step;
-
-       u32 bandwidth_min;
-       u32 bandwidth_max;
-       u32 bandwidth_step;
-};
-
-/**
- * struct analog_parameters - Parameters to tune into an analog/radio channel
- *
- * @frequency: Frequency used by analog TV tuner (either in 62.5 kHz step,
- *             for TV, or 62.5 Hz for radio)
- * @mode:      Tuner mode, as defined on enum v4l2_tuner_type
- * @audmode:   Audio mode as defined for the rxsubchans field at videodev2.h,
- *             e. g. V4L2_TUNER_MODE_*
- * @std:       TV standard bitmap as defined at videodev2.h, e. g. V4L2_STD_*
- *
- * Hybrid tuners should be supported by both V4L2 and DVB APIs. This
- * struct contains the data that are used by the V4L2 side. To avoid
- * dependencies from V4L2 headers, all enums here are declared as integers.
- */
-struct analog_parameters {
-       unsigned int frequency;
-       unsigned int mode;
-       unsigned int audmode;
-       u64 std;
-};
-
-/**
- * enum dvbfe_algo - defines the algorithm used to tune into a channel
- *
- * @DVBFE_ALGO_HW: Hardware Algorithm -
- *     Devices that support this algorithm do everything in hardware
- *     and no software support is needed to handle them.
- *     Requesting these devices to LOCK is the only thing required,
- *     device is supposed to do everything in the hardware.
- *
- * @DVBFE_ALGO_SW: Software Algorithm -
- * These are dumb devices, that require software to do everything
- *
- * @DVBFE_ALGO_CUSTOM: Customizable Agorithm -
- *     Devices having this algorithm can be customized to have specific
- *     algorithms in the frontend driver, rather than simply doing a
- *     software zig-zag. In this case the zigzag maybe hardware assisted
- *     or it maybe completely done in hardware. In all cases, usage of
- *     this algorithm, in conjunction with the search and track
- *     callbacks, utilizes the driver specific algorithm.
- *
- * @DVBFE_ALGO_RECOVERY: Recovery Algorithm -
- *     These devices have AUTO recovery capabilities from LOCK failure
- */
-enum dvbfe_algo {
-       DVBFE_ALGO_HW                   = (1 <<  0),
-       DVBFE_ALGO_SW                   = (1 <<  1),
-       DVBFE_ALGO_CUSTOM               = (1 <<  2),
-       DVBFE_ALGO_RECOVERY             = (1 << 31)
-};
-
-/**
- * enum dvbfe_search - search callback possible return status
- *
- * @DVBFE_ALGO_SEARCH_SUCCESS:
- *     The frontend search algorithm completed and returned successfully
- *
- * @DVBFE_ALGO_SEARCH_ASLEEP:
- *     The frontend search algorithm is sleeping
- *
- * @DVBFE_ALGO_SEARCH_FAILED:
- *     The frontend search for a signal failed
- *
- * @DVBFE_ALGO_SEARCH_INVALID:
- *     The frontend search algorith was probably supplied with invalid
- *     parameters and the search is an invalid one
- *
- * @DVBFE_ALGO_SEARCH_ERROR:
- *     The frontend search algorithm failed due to some error
- *
- * @DVBFE_ALGO_SEARCH_AGAIN:
- *     The frontend search algorithm was requested to search again
- */
-enum dvbfe_search {
-       DVBFE_ALGO_SEARCH_SUCCESS       = (1 <<  0),
-       DVBFE_ALGO_SEARCH_ASLEEP        = (1 <<  1),
-       DVBFE_ALGO_SEARCH_FAILED        = (1 <<  2),
-       DVBFE_ALGO_SEARCH_INVALID       = (1 <<  3),
-       DVBFE_ALGO_SEARCH_AGAIN         = (1 <<  4),
-       DVBFE_ALGO_SEARCH_ERROR         = (1 << 31),
-};
-
-/**
- * struct dvb_tuner_ops - Tuner information and callbacks
- *
- * @info:              embedded &struct dvb_tuner_info with tuner properties
- * @release:           callback function called when frontend is detached.
- *                     drivers should free any allocated memory.
- * @init:              callback function used to initialize the tuner device.
- * @sleep:             callback function used to put the tuner to sleep.
- * @suspend:           callback function used to inform that the Kernel will
- *                     suspend.
- * @resume:            callback function used to inform that the Kernel is
- *                     resuming from suspend.
- * @set_params:                callback function used to inform the tuner to tune
- *                     into a digital TV channel. The properties to be used
- *                     are stored at &struct dvb_frontend.dtv_property_cache.
- *                     The tuner demod can change the parameters to reflect
- *                     the changes needed for the channel to be tuned, and
- *                     update statistics. This is the recommended way to set
- *                     the tuner parameters and should be used on newer
- *                     drivers.
- * @set_analog_params: callback function used to tune into an analog TV
- *                     channel on hybrid tuners. It passes @analog_parameters
- *                     to the driver.
- * @set_config:                callback function used to send some tuner-specific
- *                     parameters.
- * @get_frequency:     get the actual tuned frequency
- * @get_bandwidth:     get the bandwitdh used by the low pass filters
- * @get_if_frequency:  get the Intermediate Frequency, in Hz. For baseband,
- *                     should return 0.
- * @get_status:                returns the frontend lock status
- * @get_rf_strength:   returns the RF signal strength. Used mostly to support
- *                     analog TV and radio. Digital TV should report, instead,
- *                     via DVBv5 API (&struct dvb_frontend.dtv_property_cache).
- * @get_afc:           Used only by analog TV core. Reports the frequency
- *                     drift due to AFC.
- * @calc_regs:         callback function used to pass register data settings
- *                     for simple tuners.  Shouldn't be used on newer drivers.
- * @set_frequency:     Set a new frequency. Shouldn't be used on newer drivers.
- * @set_bandwidth:     Set a new frequency. Shouldn't be used on newer drivers.
- *
- * NOTE: frequencies used on @get_frequency and @set_frequency are in Hz for
- * terrestrial/cable or kHz for satellite.
- *
- */
-struct dvb_tuner_ops {
-
-       struct dvb_tuner_info info;
-
-       void (*release)(struct dvb_frontend *fe);
-       int (*init)(struct dvb_frontend *fe);
-       int (*sleep)(struct dvb_frontend *fe);
-       int (*suspend)(struct dvb_frontend *fe);
-       int (*resume)(struct dvb_frontend *fe);
-
-       /* This is the recomended way to set the tuner */
-       int (*set_params)(struct dvb_frontend *fe);
-       int (*set_analog_params)(struct dvb_frontend *fe, struct analog_parameters *p);
-
-       int (*set_config)(struct dvb_frontend *fe, void *priv_cfg);
-
-       int (*get_frequency)(struct dvb_frontend *fe, u32 *frequency);
-       int (*get_bandwidth)(struct dvb_frontend *fe, u32 *bandwidth);
-       int (*get_if_frequency)(struct dvb_frontend *fe, u32 *frequency);
-
-#define TUNER_STATUS_LOCKED 1
-#define TUNER_STATUS_STEREO 2
-       int (*get_status)(struct dvb_frontend *fe, u32 *status);
-       int (*get_rf_strength)(struct dvb_frontend *fe, u16 *strength);
-       int (*get_afc)(struct dvb_frontend *fe, s32 *afc);
-
-       /*
-        * This is support for demods like the mt352 - fills out the supplied
-        * buffer with what to write.
-        *
-        * Don't use on newer drivers.
-        */
-       int (*calc_regs)(struct dvb_frontend *fe, u8 *buf, int buf_len);
-
-       /*
-        * These are provided separately from set_params in order to
-        * facilitate silicon tuners which require sophisticated tuning loops,
-        * controlling each parameter separately.
-        *
-        * Don't use on newer drivers.
-        */
-       int (*set_frequency)(struct dvb_frontend *fe, u32 frequency);
-       int (*set_bandwidth)(struct dvb_frontend *fe, u32 bandwidth);
-};
-
-/**
- * struct analog_demod_info - Information struct for analog TV part of the demod
- *
- * @name:      Name of the analog TV demodulator
- */
-struct analog_demod_info {
-       char *name;
-};
-
-/**
- * struct analog_demod_ops  - Demodulation information and callbacks for
- *                           analog TV and radio
- *
- * @info:              pointer to struct analog_demod_info
- * @set_params:                callback function used to inform the demod to set the
- *                     demodulator parameters needed to decode an analog or
- *                     radio channel. The properties are passed via
- *                     &struct analog_params.
- * @has_signal:                returns 0xffff if has signal, or 0 if it doesn't.
- * @get_afc:           Used only by analog TV core. Reports the frequency
- *                     drift due to AFC.
- * @tuner_status:      callback function that returns tuner status bits, e. g.
- *                     %TUNER_STATUS_LOCKED and %TUNER_STATUS_STEREO.
- * @standby:           set the tuner to standby mode.
- * @release:           callback function called when frontend is detached.
- *                     drivers should free any allocated memory.
- * @i2c_gate_ctrl:     controls the I2C gate. Newer drivers should use I2C
- *                     mux support instead.
- * @set_config:                callback function used to send some tuner-specific
- *                     parameters.
- */
-struct analog_demod_ops {
-
-       struct analog_demod_info info;
-
-       void (*set_params)(struct dvb_frontend *fe,
-                          struct analog_parameters *params);
-       int  (*has_signal)(struct dvb_frontend *fe, u16 *signal);
-       int  (*get_afc)(struct dvb_frontend *fe, s32 *afc);
-       void (*tuner_status)(struct dvb_frontend *fe);
-       void (*standby)(struct dvb_frontend *fe);
-       void (*release)(struct dvb_frontend *fe);
-       int  (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable);
-
-       /** This is to allow setting tuner-specific configuration */
-       int (*set_config)(struct dvb_frontend *fe, void *priv_cfg);
-};
-
-struct dtv_frontend_properties;
-
-
-/**
- * struct dvb_frontend_ops - Demodulation information and callbacks for
- *                           ditialt TV
- *
- * @info:              embedded &struct dvb_tuner_info with tuner properties
- * @delsys:            Delivery systems supported by the frontend
- * @detach:            callback function called when frontend is detached.
- *                     drivers should clean up, but not yet free the &struct
- *                     dvb_frontend allocation.
- * @release:           callback function called when frontend is ready to be
- *                     freed.
- *                     drivers should free any allocated memory.
- * @release_sec:       callback function requesting that the Satelite Equipment
- *                     Control (SEC) driver to release and free any memory
- *                     allocated by the driver.
- * @init:              callback function used to initialize the tuner device.
- * @sleep:             callback function used to put the tuner to sleep.
- * @write:             callback function used by some demod legacy drivers to
- *                     allow other drivers to write data into their registers.
- *                     Should not be used on new drivers.
- * @tune:              callback function used by demod drivers that use
- *                     @DVBFE_ALGO_HW to tune into a frequency.
- * @get_frontend_algo: returns the desired hardware algorithm.
- * @set_frontend:      callback function used to inform the demod to set the
- *                     parameters for demodulating a digital TV channel.
- *                     The properties to be used are stored at &struct
- *                     dvb_frontend.dtv_property_cache. The demod can change
- *                     the parameters to reflect the changes needed for the
- *                     channel to be decoded, and update statistics.
- * @get_tune_settings: callback function
- * @get_frontend:      callback function used to inform the parameters
- *                     actuall in use. The properties to be used are stored at
- *                     &struct dvb_frontend.dtv_property_cache and update
- *                     statistics. Please notice that it should not return
- *                     an error code if the statistics are not available
- *                     because the demog is not locked.
- * @read_status:       returns the locking status of the frontend.
- * @read_ber:          legacy callback function to return the bit error rate.
- *                     Newer drivers should provide such info via DVBv5 API,
- *                     e. g. @set_frontend;/@get_frontend, implementing this
- *                     callback only if DVBv3 API compatibility is wanted.
- * @read_signal_strength: legacy callback function to return the signal
- *                     strength. Newer drivers should provide such info via
- *                     DVBv5 API, e. g. @set_frontend/@get_frontend,
- *                     implementing this callback only if DVBv3 API
- *                     compatibility is wanted.
- * @read_snr:          legacy callback function to return the Signal/Noise
- *                     rate. Newer drivers should provide such info via
- *                     DVBv5 API, e. g. @set_frontend/@get_frontend,
- *                     implementing this callback only if DVBv3 API
- *                     compatibility is wanted.
- * @read_ucblocks:     legacy callback function to return the Uncorrected Error
- *                     Blocks. Newer drivers should provide such info via
- *                     DVBv5 API, e. g. @set_frontend/@get_frontend,
- *                     implementing this callback only if DVBv3 API
- *                     compatibility is wanted.
- * @diseqc_reset_overload: callback function to implement the
- *                     FE_DISEQC_RESET_OVERLOAD() ioctl (only Satellite)
- * @diseqc_send_master_cmd: callback function to implement the
- *                     FE_DISEQC_SEND_MASTER_CMD() ioctl (only Satellite).
- * @diseqc_recv_slave_reply: callback function to implement the
- *                     FE_DISEQC_RECV_SLAVE_REPLY() ioctl (only Satellite)
- * @diseqc_send_burst: callback function to implement the
- *                     FE_DISEQC_SEND_BURST() ioctl (only Satellite).
- * @set_tone:          callback function to implement the
- *                     FE_SET_TONE() ioctl (only Satellite).
- * @set_voltage:       callback function to implement the
- *                     FE_SET_VOLTAGE() ioctl (only Satellite).
- * @enable_high_lnb_voltage: callback function to implement the
- *                     FE_ENABLE_HIGH_LNB_VOLTAGE() ioctl (only Satellite).
- * @dishnetwork_send_legacy_command: callback function to implement the
- *                     FE_DISHNETWORK_SEND_LEGACY_CMD() ioctl (only Satellite).
- *                     Drivers should not use this, except when the DVB
- *                     core emulation fails to provide proper support (e.g.
- *                     if @set_voltage takes more than 8ms to work), and
- *                     when backward compatibility with this legacy API is
- *                     required.
- * @i2c_gate_ctrl:     controls the I2C gate. Newer drivers should use I2C
- *                     mux support instead.
- * @ts_bus_ctrl:       callback function used to take control of the TS bus.
- * @set_lna:           callback function to power on/off/auto the LNA.
- * @search:            callback function used on some custom algo search algos.
- * @tuner_ops:         pointer to &struct dvb_tuner_ops
- * @analog_ops:                pointer to &struct analog_demod_ops
- */
-struct dvb_frontend_ops {
-       struct dvb_frontend_info info;
-
-       u8 delsys[MAX_DELSYS];
-
-       void (*detach)(struct dvb_frontend *fe);
-       void (*release)(struct dvb_frontend* fe);
-       void (*release_sec)(struct dvb_frontend* fe);
-
-       int (*init)(struct dvb_frontend* fe);
-       int (*sleep)(struct dvb_frontend* fe);
-
-       int (*write)(struct dvb_frontend* fe, const u8 buf[], int len);
-
-       /* if this is set, it overrides the default swzigzag */
-       int (*tune)(struct dvb_frontend* fe,
-                   bool re_tune,
-                   unsigned int mode_flags,
-                   unsigned int *delay,
-                   enum fe_status *status);
-
-       /* get frontend tuning algorithm from the module */
-       enum dvbfe_algo (*get_frontend_algo)(struct dvb_frontend *fe);
-
-       /* these two are only used for the swzigzag code */
-       int (*set_frontend)(struct dvb_frontend *fe);
-       int (*get_tune_settings)(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* settings);
-
-       int (*get_frontend)(struct dvb_frontend *fe,
-                           struct dtv_frontend_properties *props);
-
-       int (*read_status)(struct dvb_frontend *fe, enum fe_status *status);
-       int (*read_ber)(struct dvb_frontend* fe, u32* ber);
-       int (*read_signal_strength)(struct dvb_frontend* fe, u16* strength);
-       int (*read_snr)(struct dvb_frontend* fe, u16* snr);
-       int (*read_ucblocks)(struct dvb_frontend* fe, u32* ucblocks);
-
-       int (*diseqc_reset_overload)(struct dvb_frontend* fe);
-       int (*diseqc_send_master_cmd)(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd* cmd);
-       int (*diseqc_recv_slave_reply)(struct dvb_frontend* fe, struct dvb_diseqc_slave_reply* reply);
-       int (*diseqc_send_burst)(struct dvb_frontend *fe,
-                                enum fe_sec_mini_cmd minicmd);
-       int (*set_tone)(struct dvb_frontend *fe, enum fe_sec_tone_mode tone);
-       int (*set_voltage)(struct dvb_frontend *fe,
-                          enum fe_sec_voltage voltage);
-       int (*enable_high_lnb_voltage)(struct dvb_frontend* fe, long arg);
-       int (*dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd);
-       int (*i2c_gate_ctrl)(struct dvb_frontend* fe, int enable);
-       int (*ts_bus_ctrl)(struct dvb_frontend* fe, int acquire);
-       int (*set_lna)(struct dvb_frontend *);
-
-       /*
-        * These callbacks are for devices that implement their own
-        * tuning algorithms, rather than a simple swzigzag
-        */
-       enum dvbfe_search (*search)(struct dvb_frontend *fe);
-
-       struct dvb_tuner_ops tuner_ops;
-       struct analog_demod_ops analog_ops;
-};
-
-#ifdef __DVB_CORE__
-#define MAX_EVENT 8
-
-/* Used only internally at dvb_frontend.c */
-struct dvb_fe_events {
-       struct dvb_frontend_event events[MAX_EVENT];
-       int                       eventw;
-       int                       eventr;
-       int                       overflow;
-       wait_queue_head_t         wait_queue;
-       struct mutex              mtx;
-};
-#endif
-
-/**
- * struct dtv_frontend_properties - contains a list of properties that are
- *                                 specific to a digital TV standard.
- *
- * @frequency:         frequency in Hz for terrestrial/cable or in kHz for
- *                     Satellite
- * @modulation:                Frontend modulation type
- * @voltage:           SEC voltage (only Satellite)
- * @sectone:           SEC tone mode (only Satellite)
- * @inversion:         Spectral inversion
- * @fec_inner:         Forward error correction inner Code Rate
- * @transmission_mode: Transmission Mode
- * @bandwidth_hz:      Bandwidth, in Hz. A zero value means that userspace
- *                     wants to autodetect.
- * @guard_interval:    Guard Interval
- * @hierarchy:         Hierarchy
- * @symbol_rate:       Symbol Rate
- * @code_rate_HP:      high priority stream code rate
- * @code_rate_LP:      low priority stream code rate
- * @pilot:             Enable/disable/autodetect pilot tones
- * @rolloff:           Rolloff factor (alpha)
- * @delivery_system:   FE delivery system (e. g. digital TV standard)
- * @interleaving:      interleaving
- * @isdbt_partial_reception: ISDB-T partial reception (only ISDB standard)
- * @isdbt_sb_mode:     ISDB-T Sound Broadcast (SB) mode (only ISDB standard)
- * @isdbt_sb_subchannel:       ISDB-T SB subchannel (only ISDB standard)
- * @isdbt_sb_segment_idx:      ISDB-T SB segment index (only ISDB standard)
- * @isdbt_sb_segment_count:    ISDB-T SB segment count (only ISDB standard)
- * @isdbt_layer_enabled:       ISDB Layer enabled (only ISDB standard)
- * @layer:             ISDB per-layer data (only ISDB standard)
- * @layer.segment_count: Segment Count;
- * @layer.fec:         per layer code rate;
- * @layer.modulation:  per layer modulation;
- * @layer.interleaving:         per layer interleaving.
- * @stream_id:         If different than zero, enable substream filtering, if
- *                     hardware supports (DVB-S2 and DVB-T2).
- * @scrambling_sequence_index: Carries the index of the DVB-S2 physical layer
- *                             scrambling sequence.
- * @atscmh_fic_ver:    Version number of the FIC (Fast Information Channel)
- *                     signaling data (only ATSC-M/H)
- * @atscmh_parade_id:  Parade identification number (only ATSC-M/H)
- * @atscmh_nog:                Number of MH groups per MH subframe for a designated
- *                     parade (only ATSC-M/H)
- * @atscmh_tnog:       Total number of MH groups including all MH groups
- *                     belonging to all MH parades in one MH subframe
- *                     (only ATSC-M/H)
- * @atscmh_sgn:                Start group number (only ATSC-M/H)
- * @atscmh_prc:                Parade repetition cycle (only ATSC-M/H)
- * @atscmh_rs_frame_mode:      Reed Solomon (RS) frame mode (only ATSC-M/H)
- * @atscmh_rs_frame_ensemble:  RS frame ensemble (only ATSC-M/H)
- * @atscmh_rs_code_mode_pri:   RS code mode pri (only ATSC-M/H)
- * @atscmh_rs_code_mode_sec:   RS code mode sec (only ATSC-M/H)
- * @atscmh_sccc_block_mode:    Series Concatenated Convolutional Code (SCCC)
- *                             Block Mode (only ATSC-M/H)
- * @atscmh_sccc_code_mode_a:   SCCC code mode A (only ATSC-M/H)
- * @atscmh_sccc_code_mode_b:   SCCC code mode B (only ATSC-M/H)
- * @atscmh_sccc_code_mode_c:   SCCC code mode C (only ATSC-M/H)
- * @atscmh_sccc_code_mode_d:   SCCC code mode D (only ATSC-M/H)
- * @lna:               Power ON/OFF/AUTO the Linear Now-noise Amplifier (LNA)
- * @strength:          DVBv5 API statistics: Signal Strength
- * @cnr:               DVBv5 API statistics: Signal to Noise ratio of the
- *                     (main) carrier
- * @pre_bit_error:     DVBv5 API statistics: pre-Viterbi bit error count
- * @pre_bit_count:     DVBv5 API statistics: pre-Viterbi bit count
- * @post_bit_error:    DVBv5 API statistics: post-Viterbi bit error count
- * @post_bit_count:    DVBv5 API statistics: post-Viterbi bit count
- * @block_error:       DVBv5 API statistics: block error count
- * @block_count:       DVBv5 API statistics: block count
- *
- * NOTE: derivated statistics like Uncorrected Error blocks (UCE) are
- * calculated on userspace.
- *
- * Only a subset of the properties are needed for a given delivery system.
- * For more info, consult the media_api.html with the documentation of the
- * Userspace API.
- */
-struct dtv_frontend_properties {
-       u32                     frequency;
-       enum fe_modulation      modulation;
-
-       enum fe_sec_voltage     voltage;
-       enum fe_sec_tone_mode   sectone;
-       enum fe_spectral_inversion inversion;
-       enum fe_code_rate       fec_inner;
-       enum fe_transmit_mode   transmission_mode;
-       u32                     bandwidth_hz;   /* 0 = AUTO */
-       enum fe_guard_interval  guard_interval;
-       enum fe_hierarchy       hierarchy;
-       u32                     symbol_rate;
-       enum fe_code_rate       code_rate_HP;
-       enum fe_code_rate       code_rate_LP;
-
-       enum fe_pilot           pilot;
-       enum fe_rolloff         rolloff;
-
-       enum fe_delivery_system delivery_system;
-
-       enum fe_interleaving    interleaving;
-
-       /* ISDB-T specifics */
-       u8                      isdbt_partial_reception;
-       u8                      isdbt_sb_mode;
-       u8                      isdbt_sb_subchannel;
-       u32                     isdbt_sb_segment_idx;
-       u32                     isdbt_sb_segment_count;
-       u8                      isdbt_layer_enabled;
-       struct {
-           u8                  segment_count;
-           enum fe_code_rate   fec;
-           enum fe_modulation  modulation;
-           u8                  interleaving;
-       } layer[3];
-
-       /* Multistream specifics */
-       u32                     stream_id;
-
-       /* Physical Layer Scrambling specifics */
-       u32                     scrambling_sequence_index;
-
-       /* ATSC-MH specifics */
-       u8                      atscmh_fic_ver;
-       u8                      atscmh_parade_id;
-       u8                      atscmh_nog;
-       u8                      atscmh_tnog;
-       u8                      atscmh_sgn;
-       u8                      atscmh_prc;
-
-       u8                      atscmh_rs_frame_mode;
-       u8                      atscmh_rs_frame_ensemble;
-       u8                      atscmh_rs_code_mode_pri;
-       u8                      atscmh_rs_code_mode_sec;
-       u8                      atscmh_sccc_block_mode;
-       u8                      atscmh_sccc_code_mode_a;
-       u8                      atscmh_sccc_code_mode_b;
-       u8                      atscmh_sccc_code_mode_c;
-       u8                      atscmh_sccc_code_mode_d;
-
-       u32                     lna;
-
-       /* statistics data */
-       struct dtv_fe_stats     strength;
-       struct dtv_fe_stats     cnr;
-       struct dtv_fe_stats     pre_bit_error;
-       struct dtv_fe_stats     pre_bit_count;
-       struct dtv_fe_stats     post_bit_error;
-       struct dtv_fe_stats     post_bit_count;
-       struct dtv_fe_stats     block_error;
-       struct dtv_fe_stats     block_count;
-};
-
-#define DVB_FE_NO_EXIT  0
-#define DVB_FE_NORMAL_EXIT      1
-#define DVB_FE_DEVICE_REMOVED   2
-#define DVB_FE_DEVICE_RESUME    3
-
-/**
- * struct dvb_frontend - Frontend structure to be used on drivers.
- *
- * @refcount:          refcount to keep track of &struct dvb_frontend
- *                     references
- * @ops:               embedded &struct dvb_frontend_ops
- * @dvb:               pointer to &struct dvb_adapter
- * @demodulator_priv:  demod private data
- * @tuner_priv:                tuner private data
- * @frontend_priv:     frontend private data
- * @sec_priv:          SEC private data
- * @analog_demod_priv: Analog demod private data
- * @dtv_property_cache:        embedded &struct dtv_frontend_properties
- * @callback:          callback function used on some drivers to call
- *                     either the tuner or the demodulator.
- * @id:                        Frontend ID
- * @exit:              Used to inform the DVB core that the frontend
- *                     thread should exit (usually, means that the hardware
- *                     got disconnected.
- */
-
-struct dvb_frontend {
-       struct kref refcount;
-       struct dvb_frontend_ops ops;
-       struct dvb_adapter *dvb;
-       void *demodulator_priv;
-       void *tuner_priv;
-       void *frontend_priv;
-       void *sec_priv;
-       void *analog_demod_priv;
-       struct dtv_frontend_properties dtv_property_cache;
-#define DVB_FRONTEND_COMPONENT_TUNER 0
-#define DVB_FRONTEND_COMPONENT_DEMOD 1
-       int (*callback)(void *adapter_priv, int component, int cmd, int arg);
-       int id;
-       unsigned int exit;
-};
-
-/**
- * dvb_register_frontend() - Registers a DVB frontend at the adapter
- *
- * @dvb: pointer to &struct dvb_adapter
- * @fe: pointer to &struct dvb_frontend
- *
- * Allocate and initialize the private data needed by the frontend core to
- * manage the frontend and calls dvb_register_device() to register a new
- * frontend. It also cleans the property cache that stores the frontend
- * parameters and selects the first available delivery system.
- */
-int dvb_register_frontend(struct dvb_adapter *dvb,
-                                struct dvb_frontend *fe);
-
-/**
- * dvb_unregister_frontend() - Unregisters a DVB frontend
- *
- * @fe: pointer to &struct dvb_frontend
- *
- * Stops the frontend kthread, calls dvb_unregister_device() and frees the
- * private frontend data allocated by dvb_register_frontend().
- *
- * NOTE: This function doesn't frees the memory allocated by the demod,
- * by the SEC driver and by the tuner. In order to free it, an explicit call to
- * dvb_frontend_detach() is needed, after calling this function.
- */
-int dvb_unregister_frontend(struct dvb_frontend *fe);
-
-/**
- * dvb_frontend_detach() - Detaches and frees frontend specific data
- *
- * @fe: pointer to &struct dvb_frontend
- *
- * This function should be called after dvb_unregister_frontend(). It
- * calls the SEC, tuner and demod release functions:
- * &dvb_frontend_ops.release_sec, &dvb_frontend_ops.tuner_ops.release,
- * &dvb_frontend_ops.analog_ops.release and &dvb_frontend_ops.release.
- *
- * If the driver is compiled with %CONFIG_MEDIA_ATTACH, it also decreases
- * the module reference count, needed to allow userspace to remove the
- * previously used DVB frontend modules.
- */
-void dvb_frontend_detach(struct dvb_frontend *fe);
-
-/**
- * dvb_frontend_suspend() - Suspends a Digital TV frontend
- *
- * @fe: pointer to &struct dvb_frontend
- *
- * This function prepares a Digital TV frontend to suspend.
- *
- * In order to prepare the tuner to suspend, if
- * &dvb_frontend_ops.tuner_ops.suspend\(\) is available, it calls it. Otherwise,
- * it will call &dvb_frontend_ops.tuner_ops.sleep\(\), if available.
- *
- * It will also call &dvb_frontend_ops.sleep\(\) to put the demod to suspend.
- *
- * The drivers should also call dvb_frontend_suspend\(\) as part of their
- * handler for the &device_driver.suspend\(\).
- */
-int dvb_frontend_suspend(struct dvb_frontend *fe);
-
-/**
- * dvb_frontend_resume() - Resumes a Digital TV frontend
- *
- * @fe: pointer to &struct dvb_frontend
- *
- * This function resumes the usual operation of the tuner after resume.
- *
- * In order to resume the frontend, it calls the demod &dvb_frontend_ops.init\(\).
- *
- * If &dvb_frontend_ops.tuner_ops.resume\(\) is available, It, it calls it.
- * Otherwise,t will call &dvb_frontend_ops.tuner_ops.init\(\), if available.
- *
- * Once tuner and demods are resumed, it will enforce that the SEC voltage and
- * tone are restored to their previous values and wake up the frontend's
- * kthread in order to retune the frontend.
- *
- * The drivers should also call dvb_frontend_resume() as part of their
- * handler for the &device_driver.resume\(\).
- */
-int dvb_frontend_resume(struct dvb_frontend *fe);
-
-/**
- * dvb_frontend_reinitialise() - forces a reinitialisation at the frontend
- *
- * @fe: pointer to &struct dvb_frontend
- *
- * Calls &dvb_frontend_ops.init\(\) and &dvb_frontend_ops.tuner_ops.init\(\),
- * and resets SEC tone and voltage (for Satellite systems).
- *
- * NOTE: Currently, this function is used only by one driver (budget-av).
- * It seems to be due to address some special issue with that specific
- * frontend.
- */
-void dvb_frontend_reinitialise(struct dvb_frontend *fe);
-
-/**
- * dvb_frontend_sleep_until() - Sleep for the amount of time given by
- *                      add_usec parameter
- *
- * @waketime: pointer to &struct ktime_t
- * @add_usec: time to sleep, in microseconds
- *
- * This function is used to measure the time required for the
- * FE_DISHNETWORK_SEND_LEGACY_CMD() ioctl to work. It needs to be as precise
- * as possible, as it affects the detection of the dish tone command at the
- * satellite subsystem.
- *
- * Its used internally by the DVB frontend core, in order to emulate
- * FE_DISHNETWORK_SEND_LEGACY_CMD() using the &dvb_frontend_ops.set_voltage\(\)
- * callback.
- *
- * NOTE: it should not be used at the drivers, as the emulation for the
- * legacy callback is provided by the Kernel. The only situation where this
- * should be at the drivers is when there are some bugs at the hardware that
- * would prevent the core emulation to work. On such cases, the driver would
- * be writing a &dvb_frontend_ops.dishnetwork_send_legacy_command\(\) and
- * calling this function directly.
- */
-void dvb_frontend_sleep_until(ktime_t *waketime, u32 add_usec);
-
-#endif
index a2e1810dd83a7245c0d121fbb54ed99913a92418..dc90564d7f34bde20d5050278d6cd9ca0fbb253f 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <asm/bug.h>
-#include "dvb_math.h"
+#include <media/dvb_math.h>
 
 static const unsigned short logtable[256] = {
        0x0000, 0x0171, 0x02e0, 0x044e, 0x05ba, 0x0725, 0x088e, 0x09f7,
diff --git a/drivers/media/dvb-core/dvb_math.h b/drivers/media/dvb-core/dvb_math.h
deleted file mode 100644 (file)
index 8690ec4..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * dvb-math provides some complex fixed-point math
- * operations shared between the dvb related stuff
- *
- * Copyright (C) 2006 Christoph Pfister (christophpfister@gmail.com)
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- */
-
-#ifndef __DVB_MATH_H
-#define __DVB_MATH_H
-
-#include <linux/types.h>
-
-/**
- * intlog2 - computes log2 of a value; the result is shifted left by 24 bits
- *
- * @value: The value (must be != 0)
- *
- * to use rational values you can use the following method:
- *
- *   intlog2(value) = intlog2(value * 2^x) - x * 2^24
- *
- * Some usecase examples:
- *
- *     intlog2(8) will give 3 << 24 = 3 * 2^24
- *
- *     intlog2(9) will give 3 << 24 + ... = 3.16... * 2^24
- *
- *     intlog2(1.5) = intlog2(3) - 2^24 = 0.584... * 2^24
- *
- *
- * return: log2(value) * 2^24
- */
-extern unsigned int intlog2(u32 value);
-
-/**
- * intlog10 - computes log10 of a value; the result is shifted left by 24 bits
- *
- * @value: The value (must be != 0)
- *
- * to use rational values you can use the following method:
- *
- *   intlog10(value) = intlog10(value * 10^x) - x * 2^24
- *
- * An usecase example:
- *
- *     intlog10(1000) will give 3 << 24 = 3 * 2^24
- *
- *   due to the implementation intlog10(1000) might be not exactly 3 * 2^24
- *
- * look at intlog2 for similar examples
- *
- * return: log10(value) * 2^24
- */
-extern unsigned int intlog10(u32 value);
-
-#endif
index fc0834f20eab8d22188086114e1b8e969c7d4ca3..b6c7eec863b9232b5fb30d07b809a01298d85c22 100644 (file)
@@ -64,8 +64,8 @@
 #include <linux/mutex.h>
 #include <linux/sched.h>
 
-#include "dvb_demux.h"
-#include "dvb_net.h"
+#include <media/dvb_demux.h>
+#include <media/dvb_net.h>
 
 static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt )
 {
diff --git a/drivers/media/dvb-core/dvb_net.h b/drivers/media/dvb-core/dvb_net.h
deleted file mode 100644 (file)
index 1eae8ba..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * dvb_net.h
- *
- * Copyright (C) 2001 Ralph Metzler for convergence integrated media GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _DVB_NET_H_
-#define _DVB_NET_H_
-
-#include <linux/module.h>
-#include <linux/netdevice.h>
-#include <linux/inetdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
-
-#include "dvbdev.h"
-
-#define DVB_NET_DEVICES_MAX 10
-
-#ifdef CONFIG_DVB_NET
-
-/**
- * struct dvb_net - describes a DVB network interface
- *
- * @dvbdev:            pointer to &struct dvb_device.
- * @device:            array of pointers to &struct net_device.
- * @state:             array of integers to each net device. A value
- *                     different than zero means that the interface is
- *                     in usage.
- * @exit:              flag to indicate when the device is being removed.
- * @demux:             pointer to &struct dmx_demux.
- * @ioctl_mutex:       protect access to this struct.
- *
- * Currently, the core supports up to %DVB_NET_DEVICES_MAX (10) network
- * devices.
- */
-
-struct dvb_net {
-       struct dvb_device *dvbdev;
-       struct net_device *device[DVB_NET_DEVICES_MAX];
-       int state[DVB_NET_DEVICES_MAX];
-       unsigned int exit:1;
-       struct dmx_demux *demux;
-       struct mutex ioctl_mutex;
-};
-
-/**
- * dvb_net_init - nitializes a digital TV network device and registers it.
- *
- * @adap:      pointer to &struct dvb_adapter.
- * @dvbnet:    pointer to &struct dvb_net.
- * @dmxdemux:  pointer to &struct dmx_demux.
- */
-int dvb_net_init(struct dvb_adapter *adap, struct dvb_net *dvbnet,
-                 struct dmx_demux *dmxdemux);
-
-/**
- * dvb_net_release - releases a digital TV network device and unregisters it.
- *
- * @dvbnet:    pointer to &struct dvb_net.
- */
-void dvb_net_release(struct dvb_net *dvbnet);
-
-#else
-
-struct dvb_net {
-       struct dvb_device *dvbdev;
-};
-
-static inline void dvb_net_release(struct dvb_net *dvbnet)
-{
-}
-
-static inline int dvb_net_init(struct dvb_adapter *adap,
-                              struct dvb_net *dvbnet, struct dmx_demux *dmx)
-{
-       return 0;
-}
-
-#endif /* ifdef CONFIG_DVB_NET */
-
-#endif
index 53011629c9ad6c66ebfe1d7ca54e41af574cf5fd..4330b6fa4af244062743d088aa042cb12e54510c 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/string.h>
 #include <linux/uaccess.h>
 
-#include "dvb_ringbuffer.h"
+#include <media/dvb_ringbuffer.h>
 
 #define PKT_READY 0
 #define PKT_DISPOSED 1
diff --git a/drivers/media/dvb-core/dvb_ringbuffer.h b/drivers/media/dvb-core/dvb_ringbuffer.h
deleted file mode 100644 (file)
index 8ed6bcc..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- *
- * dvb_ringbuffer.h: ring buffer implementation for the dvb driver
- *
- * Copyright (C) 2003 Oliver Endriss
- * Copyright (C) 2004 Andrew de Quincey
- *
- * based on code originally found in av7110.c & dvb_ci.c:
- * Copyright (C) 1999-2003 Ralph Metzler & Marcus Metzler
- *                         for convergence integrated media GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- */
-
-#ifndef _DVB_RINGBUFFER_H_
-#define _DVB_RINGBUFFER_H_
-
-#include <linux/spinlock.h>
-#include <linux/wait.h>
-
-/**
- * struct dvb_ringbuffer - Describes a ring buffer used at DVB framework
- *
- * @data: Area were the ringbuffer data is written
- * @size: size of the ringbuffer
- * @pread: next position to read
- * @pwrite: next position to write
- * @error: used by ringbuffer clients to indicate that an error happened.
- * @queue: Wait queue used by ringbuffer clients to indicate when buffer
- *         was filled
- * @lock: Spinlock used to protect the ringbuffer
- */
-struct dvb_ringbuffer {
-       u8               *data;
-       ssize_t           size;
-       ssize_t           pread;
-       ssize_t           pwrite;
-       int               error;
-
-       wait_queue_head_t queue;
-       spinlock_t        lock;
-};
-
-#define DVB_RINGBUFFER_PKTHDRSIZE 3
-
-/**
- * dvb_ringbuffer_init - initialize ring buffer, lock and queue
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- * @data: pointer to the buffer where the data will be stored
- * @len: bytes from ring buffer into @buf
- */
-extern void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data,
-                               size_t len);
-
-/**
- * dvb_ringbuffer_empty - test whether buffer is empty
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- */
-extern int dvb_ringbuffer_empty(struct dvb_ringbuffer *rbuf);
-
-/**
- * dvb_ringbuffer_free - returns the number of free bytes in the buffer
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- *
- * Return: number of free bytes in the buffer
- */
-extern ssize_t dvb_ringbuffer_free(struct dvb_ringbuffer *rbuf);
-
-/**
- * dvb_ringbuffer_avail - returns the number of bytes waiting in the buffer
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- *
- * Return: number of bytes waiting in the buffer
- */
-extern ssize_t dvb_ringbuffer_avail(struct dvb_ringbuffer *rbuf);
-
-/**
- * dvb_ringbuffer_reset - resets the ringbuffer to initial state
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- *
- * Resets 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
- */
-
-/**
- * dvb_ringbuffer_flush - flush buffer
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- */
-extern void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf);
-
-/**
- * dvb_ringbuffer_flush_spinlock_wakeup- flush buffer protected by spinlock
- *      and wake-up waiting task(s)
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- */
-extern void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf);
-
-/**
- * DVB_RINGBUFFER_PEEK - peek at byte @offs in the buffer
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- * @offs: offset inside the ringbuffer
- */
-#define DVB_RINGBUFFER_PEEK(rbuf, offs)        \
-                       ((rbuf)->data[((rbuf)->pread + (offs)) % (rbuf)->size])
-
-/**
- * DVB_RINGBUFFER_SKIP - advance read ptr by @num bytes
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- * @num: number of bytes to advance
- */
-#define DVB_RINGBUFFER_SKIP(rbuf, num) {\
-                       (rbuf)->pread = ((rbuf)->pread + (num)) % (rbuf)->size;\
-}
-
-/**
- * dvb_ringbuffer_read_user - Reads a buffer into a user pointer
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- * @buf: pointer to the buffer where the data will be stored
- * @len: bytes from ring buffer into @buf
- *
- * This variant assumes that the buffer is a memory at the userspace. So,
- * it will internally call copy_to_user().
- *
- * Return: number of bytes transferred or -EFAULT
- */
-extern ssize_t dvb_ringbuffer_read_user(struct dvb_ringbuffer *rbuf,
-                                  u8 __user *buf, size_t len);
-
-/**
- * dvb_ringbuffer_read - Reads a buffer into a pointer
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- * @buf: pointer to the buffer where the data will be stored
- * @len: bytes from ring buffer into @buf
- *
- * This variant assumes that the buffer is a memory at the Kernel space
- *
- * Return: number of bytes transferred or -EFAULT
- */
-extern void dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf,
-                                  u8 *buf, size_t len);
-
-/*
- * write routines & macros
- */
-
-/**
- * DVB_RINGBUFFER_WRITE_BYTE - write single byte to ring buffer
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- * @byte: byte to write
- */
-#define DVB_RINGBUFFER_WRITE_BYTE(rbuf, byte)  \
-                       { (rbuf)->data[(rbuf)->pwrite] = (byte); \
-                       (rbuf)->pwrite = ((rbuf)->pwrite + 1) % (rbuf)->size; }
-
-/**
- * dvb_ringbuffer_write - Writes a buffer into the ringbuffer
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- * @buf: pointer to the buffer where the data will be read
- * @len: bytes from ring buffer into @buf
- *
- * This variant assumes that the buffer is a memory at the Kernel space
- *
- * return: number of bytes transferred or -EFAULT
- */
-extern ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf,
-                                   size_t len);
-
-/**
- * dvb_ringbuffer_write_user - Writes a buffer received via a user pointer
- *
- * @rbuf: pointer to struct dvb_ringbuffer
- * @buf: pointer to the buffer where the data will be read
- * @len: bytes from ring buffer into @buf
- *
- * This variant assumes that the buffer is a memory at the userspace. So,
- * it will internally call copy_from_user().
- *
- * Return: number of bytes transferred or -EFAULT
- */
-extern ssize_t dvb_ringbuffer_write_user(struct dvb_ringbuffer *rbuf,
-                                        const u8 __user *buf, size_t len);
-
-/**
- * dvb_ringbuffer_pkt_write - Write a packet into the ringbuffer.
- *
- * @rbuf: Ringbuffer to write to.
- * @buf: Buffer to write.
- * @len: Length of buffer (currently limited to 65535 bytes max).
- *
- * Return: Number of bytes written, or -EFAULT, -ENOMEM, -EVINAL.
- */
-extern ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8 *buf,
-                                       size_t len);
-
-/**
- * dvb_ringbuffer_pkt_read_user - Read from a packet in the ringbuffer.
- *
- * @rbuf: Ringbuffer concerned.
- * @idx: Packet index as returned by dvb_ringbuffer_pkt_next().
- * @offset: Offset into packet to read from.
- * @buf: Destination buffer for data.
- * @len: Size of destination buffer.
- *
- * Return: Number of bytes read, or -EFAULT.
- *
- * .. note::
- *
- *    unlike dvb_ringbuffer_read(), this does **NOT** update the read pointer
- *    in the ringbuffer. You must use dvb_ringbuffer_pkt_dispose() to mark a
- *    packet as no longer required.
- */
-extern ssize_t dvb_ringbuffer_pkt_read_user(struct dvb_ringbuffer *rbuf,
-                                           size_t idx,
-                                           int offset, u8 __user *buf,
-                                           size_t len);
-
-/**
- * dvb_ringbuffer_pkt_read - Read from a packet in the ringbuffer.
- * Note: unlike dvb_ringbuffer_read_user(), this DOES update the read pointer
- * in the ringbuffer.
- *
- * @rbuf: Ringbuffer concerned.
- * @idx: Packet index as returned by dvb_ringbuffer_pkt_next().
- * @offset: Offset into packet to read from.
- * @buf: Destination buffer for data.
- * @len: Size of destination buffer.
- *
- * Return: Number of bytes read, or -EFAULT.
- */
-extern ssize_t dvb_ringbuffer_pkt_read(struct dvb_ringbuffer *rbuf, size_t idx,
-                                      int offset, u8 *buf, size_t len);
-
-/**
- * dvb_ringbuffer_pkt_dispose - Dispose of a packet in the ring buffer.
- *
- * @rbuf: Ring buffer concerned.
- * @idx: Packet index as returned by dvb_ringbuffer_pkt_next().
- */
-extern void dvb_ringbuffer_pkt_dispose(struct dvb_ringbuffer *rbuf, size_t idx);
-
-/**
- * dvb_ringbuffer_pkt_next - Get the index of the next packet in a ringbuffer.
- *
- * @rbuf: Ringbuffer concerned.
- * @idx: Previous packet index, or -1 to return the first packet index.
- * @pktlen: On success, will be updated to contain the length of the packet
- *          in bytes.
- * returns Packet index (if >=0), or -1 if no packets available.
- */
-extern ssize_t dvb_ringbuffer_pkt_next(struct dvb_ringbuffer *rbuf,
-                                      size_t idx, size_t *pktlen);
-
-#endif /* _DVB_RINGBUFFER_H_ */
index 68c59a497925c1db1034adc30bfff6f68a9ed3de..61c6ca4e87d5fe6ca657bcf10a276ae8b783a40a 100644 (file)
@@ -16,8 +16,8 @@
 #include <linux/module.h>
 #include <linux/mm.h>
 
-#include "dvbdev.h"
-#include "dvb_vb2.h"
+#include <media/dvbdev.h>
+#include <media/dvb_vb2.h>
 
 #define DVB_V2_MAX_SIZE                (4096 * 188)
 
diff --git a/drivers/media/dvb-core/dvb_vb2.h b/drivers/media/dvb-core/dvb_vb2.h
deleted file mode 100644 (file)
index 7a52984..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * SPDX-License-Identifier: GPL-2.0
- *
- * dvb-vb2.h - DVB driver helper framework for streaming I/O
- *
- * Copyright (C) 2015 Samsung Electronics
- *
- * Author: jh1009.sung@samsung.com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation.
- */
-
-#ifndef _DVB_VB2_H
-#define _DVB_VB2_H
-
-#include <linux/mutex.h>
-#include <linux/poll.h>
-#include <linux/dvb/dmx.h>
-#include <media/videobuf2-core.h>
-#include <media/videobuf2-dma-contig.h>
-#include <media/videobuf2-vmalloc.h>
-
-enum dvb_buf_type {
-       DVB_BUF_TYPE_CAPTURE        = 1,
-       DVB_BUF_TYPE_OUTPUT         = 2,
-};
-
-#define DVB_VB2_STATE_NONE (0x0)
-#define DVB_VB2_STATE_INIT (0x1)
-#define DVB_VB2_STATE_REQBUFS (0x2)
-#define DVB_VB2_STATE_STREAMON (0x4)
-
-#define DVB_VB2_NAME_MAX (20)
-
-struct dvb_buffer {
-       struct vb2_buffer       vb;
-       struct list_head        list;
-};
-
-struct dvb_vb2_ctx {
-       struct vb2_queue        vb_q;
-       struct mutex            mutex;
-       spinlock_t              slock;
-       struct list_head        dvb_q;
-       struct dvb_buffer       *buf;
-       int     offset;
-       int     remain;
-       int     state;
-       int     buf_siz;
-       int     buf_cnt;
-       int     nonblocking;
-       char    name[DVB_VB2_NAME_MAX + 1];
-};
-
-int dvb_vb2_stream_on(struct dvb_vb2_ctx *ctx);
-int dvb_vb2_stream_off(struct dvb_vb2_ctx *ctx);
-#ifndef DVB_MMAP
-static inline int dvb_vb2_init(struct dvb_vb2_ctx *ctx,
-                              const char *name, int non_blocking)
-{
-       return 0;
-};
-static inline int dvb_vb2_release(struct dvb_vb2_ctx *ctx)
-{
-       return 0;
-};
-#define dvb_vb2_is_streaming(ctx) (0)
-#define dvb_vb2_fill_buffer(ctx, file, wait) (0)
-
-static inline unsigned int dvb_vb2_poll(struct dvb_vb2_ctx *ctx,
-                                       struct file *file,
-                                       poll_table *wait)
-{
-       return 0;
-}
-#else
-int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int non_blocking);
-int dvb_vb2_release(struct dvb_vb2_ctx *ctx);
-int dvb_vb2_is_streaming(struct dvb_vb2_ctx *ctx);
-int dvb_vb2_fill_buffer(struct dvb_vb2_ctx *ctx,
-                       const unsigned char *src, int len);
-unsigned int dvb_vb2_poll(struct dvb_vb2_ctx *ctx, struct file *file,
-                         poll_table *wait);
-#endif
-
-
-int dvb_vb2_reqbufs(struct dvb_vb2_ctx *ctx, struct dmx_requestbuffers *req);
-int dvb_vb2_querybuf(struct dvb_vb2_ctx *ctx, struct dmx_buffer *b);
-int dvb_vb2_expbuf(struct dvb_vb2_ctx *ctx, struct dmx_exportbuffer *exp);
-int dvb_vb2_qbuf(struct dvb_vb2_ctx *ctx, struct dmx_buffer *b);
-int dvb_vb2_dqbuf(struct dvb_vb2_ctx *ctx, struct dmx_buffer *b);
-int dvb_vb2_mmap(struct dvb_vb2_ctx *ctx, struct vm_area_struct *vma);
-
-#endif /* _DVB_VB2_H */
index 060c60ddfcc3970765fd80f679a7179e4a66773e..60e9c2ba26be6dca5700184655e5f4d778aa4491 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/fs.h>
 #include <linux/cdev.h>
 #include <linux/mutex.h>
-#include "dvbdev.h"
+#include <media/dvbdev.h>
 
 /* Due to enum tuner_pad_index */
 #include <media/tuner.h>
diff --git a/drivers/media/dvb-core/dvbdev.h b/drivers/media/dvb-core/dvbdev.h
deleted file mode 100644 (file)
index bbc1c20..0000000
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * dvbdev.h
- *
- * Copyright (C) 2000 Ralph Metzler & Marcus Metzler
- *                    for convergence integrated media GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Lesser Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _DVBDEV_H_
-#define _DVBDEV_H_
-
-#include <linux/types.h>
-#include <linux/poll.h>
-#include <linux/fs.h>
-#include <linux/list.h>
-#include <media/media-device.h>
-
-#define DVB_MAJOR 212
-
-#if defined(CONFIG_DVB_MAX_ADAPTERS) && CONFIG_DVB_MAX_ADAPTERS > 0
-  #define DVB_MAX_ADAPTERS CONFIG_DVB_MAX_ADAPTERS
-#else
-  #define DVB_MAX_ADAPTERS 16
-#endif
-
-#define DVB_UNSET (-1)
-
-/* List of DVB device types */
-
-/**
- * enum dvb_device_type - type of the Digital TV device
- *
- * @DVB_DEVICE_SEC:            Digital TV standalone Common Interface (CI)
- * @DVB_DEVICE_FRONTEND:       Digital TV frontend.
- * @DVB_DEVICE_DEMUX:          Digital TV demux.
- * @DVB_DEVICE_DVR:            Digital TV digital video record (DVR).
- * @DVB_DEVICE_CA:             Digital TV Conditional Access (CA).
- * @DVB_DEVICE_NET:            Digital TV network.
- *
- * @DVB_DEVICE_VIDEO:          Digital TV video decoder.
- *                             Deprecated. Used only on av7110-av.
- * @DVB_DEVICE_AUDIO:          Digital TV audio decoder.
- *                             Deprecated. Used only on av7110-av.
- * @DVB_DEVICE_OSD:            Digital TV On Screen Display (OSD).
- *                             Deprecated. Used only on av7110.
- */
-enum dvb_device_type {
-       DVB_DEVICE_SEC,
-       DVB_DEVICE_FRONTEND,
-       DVB_DEVICE_DEMUX,
-       DVB_DEVICE_DVR,
-       DVB_DEVICE_CA,
-       DVB_DEVICE_NET,
-
-       DVB_DEVICE_VIDEO,
-       DVB_DEVICE_AUDIO,
-       DVB_DEVICE_OSD,
-};
-
-#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_frontend;
-
-/**
- * struct dvb_adapter - represents a Digital TV adapter using Linux DVB API
- *
- * @num:               Number of the adapter
- * @list_head:         List with the DVB adapters
- * @device_list:       List with the DVB devices
- * @name:              Name of the adapter
- * @proposed_mac:      proposed MAC address for the adapter
- * @priv:              private data
- * @device:            pointer to struct device
- * @module:            pointer to struct module
- * @mfe_shared:                mfe shared: indicates mutually exclusive frontends
- *                     Thie usage of this flag is currently deprecated
- * @mfe_dvbdev:                Frontend device in use, in the case of MFE
- * @mfe_lock:          Lock to prevent using the other frontends when MFE is
- *                     used.
- * @mdev:              pointer to struct media_device, used when the media
- *                     controller is used.
- * @conn:              RF connector. Used only if the device has no separate
- *                     tuner.
- * @conn_pads:         pointer to struct media_pad associated with @conn;
- */
-struct dvb_adapter {
-       int num;
-       struct list_head list_head;
-       struct list_head device_list;
-       const char *name;
-       u8 proposed_mac [6];
-       void* priv;
-
-       struct device *device;
-
-       struct module *module;
-
-       int mfe_shared;                 /* indicates mutually exclusive frontends */
-       struct dvb_device *mfe_dvbdev;  /* frontend device in use */
-       struct mutex mfe_lock;          /* access lock for thread creation */
-
-#if defined(CONFIG_MEDIA_CONTROLLER_DVB)
-       struct media_device *mdev;
-       struct media_entity *conn;
-       struct media_pad *conn_pads;
-#endif
-};
-
-/**
- * struct dvb_device - represents a DVB device node
- *
- * @list_head: List head with all DVB devices
- * @fops:      pointer to struct file_operations
- * @adapter:   pointer to the adapter that holds this device node
- * @type:      type of the device, as defined by &enum dvb_device_type.
- * @minor:     devnode minor number. Major number is always DVB_MAJOR.
- * @id:                device ID number, inside the adapter
- * @readers:   Initialized by the caller. Each call to open() in Read Only mode
- *             decreases this counter by one.
- * @writers:   Initialized by the caller. Each call to open() in Read/Write
- *             mode decreases this counter by one.
- * @users:     Initialized by the caller. Each call to open() in any mode
- *             decreases this counter by one.
- * @wait_queue:        wait queue, used to wait for certain events inside one of
- *             the DVB API callers
- * @kernel_ioctl: callback function used to handle ioctl calls from userspace.
- * @name:      Name to be used for the device at the Media Controller
- * @entity:    pointer to struct media_entity associated with the device node
- * @pads:      pointer to struct media_pad associated with @entity;
- * @priv:      private data
- * @intf_devnode: Pointer to media_intf_devnode. Used by the dvbdev core to
- *             store the MC device node interface
- * @tsout_num_entities: Number of Transport Stream output entities
- * @tsout_entity: array with MC entities associated to each TS output node
- * @tsout_pads: array with the source pads for each @tsout_entity
- *
- * This structure is used by the DVB core (frontend, CA, net, demux) in
- * order to create the device nodes. Usually, driver should not initialize
- * this struct diretly.
- */
-struct dvb_device {
-       struct list_head list_head;
-       const struct file_operations *fops;
-       struct dvb_adapter *adapter;
-       enum dvb_device_type type;
-       int minor;
-       u32 id;
-
-       /* in theory, 'users' can vanish now,
-          but I don't want to change too much now... */
-       int readers;
-       int writers;
-       int users;
-
-       wait_queue_head_t         wait_queue;
-       /* don't really need those !? -- FIXME: use video_usercopy  */
-       int (*kernel_ioctl)(struct file *file, unsigned int cmd, void *arg);
-
-       /* Needed for media controller register/unregister */
-#if defined(CONFIG_MEDIA_CONTROLLER_DVB)
-       const char *name;
-
-       /* Allocated and filled inside dvbdev.c */
-       struct media_intf_devnode *intf_devnode;
-
-       unsigned tsout_num_entities;
-       struct media_entity *entity, *tsout_entity;
-       struct media_pad *pads, *tsout_pads;
-#endif
-
-       void *priv;
-};
-
-/**
- * dvb_register_adapter - Registers a new DVB adapter
- *
- * @adap:      pointer to struct dvb_adapter
- * @name:      Adapter's name
- * @module:    initialized with THIS_MODULE at the caller
- * @device:    pointer to struct device that corresponds to the device driver
- * @adapter_nums: Array with a list of the numbers for @dvb_register_adapter;
- *             to select among them. Typically, initialized with:
- *             DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nums)
- */
-int dvb_register_adapter(struct dvb_adapter *adap, const char *name,
-                        struct module *module, struct device *device,
-                        short *adapter_nums);
-
-/**
- * dvb_unregister_adapter - Unregisters a DVB adapter
- *
- * @adap:      pointer to struct dvb_adapter
- */
-int dvb_unregister_adapter(struct dvb_adapter *adap);
-
-/**
- * dvb_register_device - Registers a new DVB device
- *
- * @adap:      pointer to struct dvb_adapter
- * @pdvbdev:   pointer to the place where the new struct dvb_device will be
- *             stored
- * @template:  Template used to create &pdvbdev;
- * @priv:      private data
- * @type:      type of the device, as defined by &enum dvb_device_type.
- * @demux_sink_pads: Number of demux outputs, to be used to create the TS
- *             outputs via the Media Controller.
- */
-int dvb_register_device(struct dvb_adapter *adap,
-                       struct dvb_device **pdvbdev,
-                       const struct dvb_device *template,
-                       void *priv,
-                       enum dvb_device_type type,
-                       int demux_sink_pads);
-
-/**
- * dvb_remove_device - Remove a registered DVB device
- *
- * This does not free memory.  To do that, call dvb_free_device().
- *
- * @dvbdev:    pointer to struct dvb_device
- */
-void dvb_remove_device(struct dvb_device *dvbdev);
-
-/**
- * dvb_free_device - Free memory occupied by a DVB device.
- *
- * Call dvb_unregister_device() before calling this function.
- *
- * @dvbdev:    pointer to struct dvb_device
- */
-void dvb_free_device(struct dvb_device *dvbdev);
-
-/**
- * dvb_unregister_device - Unregisters a DVB device
- *
- * This is a combination of dvb_remove_device() and dvb_free_device().
- * Using this function is usually a mistake, and is often an indicator
- * for a use-after-free bug (when a userspace process keeps a file
- * handle to a detached device).
- *
- * @dvbdev:    pointer to struct dvb_device
- */
-void dvb_unregister_device(struct dvb_device *dvbdev);
-
-#ifdef CONFIG_MEDIA_CONTROLLER_DVB
-/**
- * dvb_create_media_graph - Creates media graph for the Digital TV part of the
- *                             device.
- *
- * @adap:                      pointer to &struct dvb_adapter
- * @create_rf_connector:       if true, it creates the RF connector too
- *
- * This function checks all DVB-related functions at the media controller
- * entities and creates the needed links for the media graph. It is
- * capable of working with multiple tuners or multiple frontends, but it
- * won't create links if the device has multiple tuners and multiple frontends
- * or if the device has multiple muxes. In such case, the caller driver should
- * manually create the remaining links.
- */
-__must_check int dvb_create_media_graph(struct dvb_adapter *adap,
-                                       bool create_rf_connector);
-
-/**
- * dvb_register_media_controller - registers a media controller at DVB adapter
- *
- * @adap:                      pointer to &struct dvb_adapter
- * @mdev:                      pointer to &struct media_device
- */
-static inline void dvb_register_media_controller(struct dvb_adapter *adap,
-                                                struct media_device *mdev)
-{
-       adap->mdev = mdev;
-}
-
-/**
- * dvb_get_media_controller - gets the associated media controller
- *
- * @adap:                      pointer to &struct dvb_adapter
- */
-static inline struct media_device
-*dvb_get_media_controller(struct dvb_adapter *adap)
-{
-       return adap->mdev;
-}
-#else
-static inline
-int dvb_create_media_graph(struct dvb_adapter *adap,
-                          bool create_rf_connector)
-{
-       return 0;
-};
-#define dvb_register_media_controller(a, b) {}
-#define dvb_get_media_controller(a) NULL
-#endif
-
-/**
- * dvb_generic_open - Digital TV open function, used by DVB devices
- *
- * @inode: pointer to &struct inode.
- * @file: pointer to &struct file.
- *
- * Checks if a DVB devnode is still valid, and if the permissions are
- * OK and increment negative use count.
- */
-int dvb_generic_open(struct inode *inode, struct file *file);
-
-/**
- * dvb_generic_close - Digital TV close function, used by DVB devices
- *
- * @inode: pointer to &struct inode.
- * @file: pointer to &struct file.
- *
- * Checks if a DVB devnode is still valid, and if the permissions are
- * OK and decrement negative use count.
- */
-int dvb_generic_release(struct inode *inode, struct file *file);
-
-/**
- * dvb_generic_ioctl - Digital TV close function, used by DVB devices
- *
- * @file: pointer to &struct file.
- * @cmd: Ioctl name.
- * @arg: Ioctl argument.
- *
- * Checks if a DVB devnode and struct dvbdev.kernel_ioctl is still valid.
- * If so, calls dvb_usercopy().
- */
-long dvb_generic_ioctl(struct file *file,
-                      unsigned int cmd, unsigned long arg);
-
-/**
- * dvb_usercopy - copies data from/to userspace memory when an ioctl is
- *      issued.
- *
- * @file: Pointer to struct &file.
- * @cmd: Ioctl name.
- * @arg: Ioctl argument.
- * @func: function that will actually handle the ioctl
- *
- * Ancillary function that uses ioctl direction and size to copy from
- * userspace. Then, it calls @func, and, if needed, data is copied back
- * to userspace.
- */
-int dvb_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
-                int (*func)(struct file *file, unsigned int cmd, void *arg));
-
-/** generic DVB attach function. */
-#ifdef CONFIG_MEDIA_ATTACH
-
-/**
- * dvb_attach - attaches a DVB frontend into the DVB core.
- *
- * @FUNCTION:  function on a frontend module to be called.
- * @ARGS...:   @FUNCTION arguments.
- *
- * This ancillary function loads a frontend module in runtime and runs
- * the @FUNCTION function there, with @ARGS.
- * As it increments symbol usage cont, at unregister, dvb_detach()
- * should be called.
- */
-#define dvb_attach(FUNCTION, ARGS...) ({ \
-       void *__r = NULL; \
-       typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
-       if (__a) { \
-               __r = (void *) __a(ARGS); \
-               if (__r == NULL) \
-                       symbol_put(FUNCTION); \
-       } else { \
-               printk(KERN_ERR "DVB: Unable to find symbol "#FUNCTION"()\n"); \
-       } \
-       __r; \
-})
-
-/**
- * dvb_detach - detaches a DVB frontend loaded via dvb_attach()
- *
- * @FUNC:      attach function
- *
- * Decrements usage count for a function previously called via dvb_attach().
- */
-
-#define dvb_detach(FUNC)       symbol_put_addr(FUNC)
-
-#else
-#define dvb_attach(FUNCTION, ARGS...) ({ \
-       FUNCTION(ARGS); \
-})
-
-#define dvb_detach(FUNC)       {}
-
-#endif
-
-#endif /* #ifndef _DVBDEV_H_ */
index d025eb37384250108ef18c1006cdf9db6ceb8fb2..4be59fed45365dac0183a64f5ed552d1e6a472cc 100644 (file)
@@ -3,7 +3,6 @@
 # Makefile for the kernel DVB frontend device drivers.
 #
 
-ccflags-y += -I$(srctree)/drivers/media/dvb-core/
 ccflags-y += -I$(srctree)/drivers/media/tuners/
 
 # FIXME: RTL2832 SDR driver uses power management directly from USB IF driver
index 7b90a03fcd0accaf4910db48603f3d10ade09dfb..bc6f74f10f320c3f3d18473e2d4270b8c7fb71ec 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef A8293_H
 #define A8293_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /*
  * I2C address
index 35ca5c9bcacdac620be3da9385f8fa2dd1d95d73..688fc3472cf6a4977886cc62d154bc41cd68fb3d 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef AF9013_PRIV_H
 #define AF9013_PRIV_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "af9013.h"
 #include <linux/firmware.h>
 #include <linux/math64.h>
index 8799cda1ae143a8405c96fc0f87f7197a124bb41..f269abf609f0467620b445f21b7538577b312b7b 100644 (file)
 #ifndef AF9033_PRIV_H
 #define AF9033_PRIV_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "af9033.h"
 #include <linux/math64.h>
 #include <linux/regmap.h>
 #include <linux/kernel.h>
-#include "dvb_math.h"
+#include <media/dvb_math.h>
 
 struct reg_val {
        u32 reg;
index b1c84ee914f07bc317823c356e7a28a5a9390586..9b2f2da1d9895ff9a406281aff647f75f1602abe 100644 (file)
@@ -14,7 +14,7 @@
  * GNU General Public License for more details.
  */
 
-#include <dvb_frontend.h>
+#include <media/dvb_frontend.h>
 
 #include "as102_fe.h"
 
index 79d5d89bc95e7d1aef2f64c951583a1732575ce3..9746c6dd7fb8df12741863fb02e0838cdfdc8fb4 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/dvb/frontend.h>
 #include <linux/types.h>
 #include "ascot2e.h"
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #define MAX_WRITE_REGSIZE 10
 
index 05850b32d6c6a81040dcb9aa215f470bd07b0ef1..7b0f3239dbba5ab70d387003f484ce0211411aa1 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #include <asm/div64.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "atbm8830.h"
 #include "atbm8830_priv.h"
index 6722838c37076f6499cf126f4b5c6772698ea2d7..56605de9923b6c2c8dd127b60b8fcecb763a25c2 100644 (file)
@@ -23,7 +23,7 @@
 */
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "au8522_priv.h"
 
 static int debug;
index 3f3635f5a06a551d759f13fa1e7c284b8e87466f..8f659bd1c79e788c8544ffb5042715ed9956038e 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/delay.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "au8522.h"
 #include "au8522_priv.h"
 
index f5a9438f6ce5da75ad7184f3f5b924ffdedc21c3..f02dac958db65337ae5c0dc6564b8d9d7b28d530 100644 (file)
@@ -32,7 +32,7 @@
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-mc.h>
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "au8522.h"
 #include "tuner-i2c.h"
 
index ba63ad170d3c3301e3d2ce7b13c2f20eb14908bb..05df133dc5be7a8692c56eea8e59c1ca9ff7b8aa 100644 (file)
@@ -40,7 +40,7 @@
 #include <linux/slab.h>
 #include <linux/mutex.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "bcm3510.h"
 #include "bcm3510_priv.h"
 
index 2b629e23ceeb5769dbf1ade6e051bd40b14fa70d..9ffd2c7ac74a94129d4a7319b5cc5c069ec6fbac 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/slab.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "cx22700.h"
 
 
index c0e54c59cccf623a21ed63184bfec819ed206854..e8b1e6b7e7e563a60e776b96f0fdcc27d10e5bf9 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "cx22702.h"
 
 struct cx22702_state {
index cf1bc99d1f3258bc42a59da55bd0cd5f85a7bbcd..2f3a1c2374894d8d6041e7809cc3eda6325bbfd2 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "cx24110.h"
 
 
index ee1f704f81f2d6e4288fcdd5d0a47f1cb24458ab..037db3e9d2ddbb2877dd06673c11041fddf4f18e 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "cx24113.h"
 
 static int debug;
index 8fb3f095e21cc8f38dd683e14218c1d57beacf54..0ef5f8614b580bdce10914f9aa7f07e8449bba52 100644 (file)
@@ -41,7 +41,7 @@
 #include <linux/init.h>
 #include <linux/firmware.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "cx24116.h"
 
 static int debug;
index d37cb7762bd6dc2fbd50dea573579a4f2960d10d..8935114b75f3b7a43dd6df17c01d48632de7a7d0 100644 (file)
@@ -32,7 +32,7 @@
 #include <linux/firmware.h>
 
 #include "tuner-i2c.h"
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "cx24117.h"
 
 
index 7f11dcc94d854c08bbe4bd5637790bf9517ab1da..810f68acd69bc0bd5019969af1166d48f961fad0 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/firmware.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "cx24120.h"
 
 #define CX24120_SEARCH_RANGE_KHZ 5000
index 1d59d1d3bd821230dd2829c0ec84b60663c84420..228ba1f4bf6332b93492642bb97353018c81b61e 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/init.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "cx24123.h"
 
 #define XTAL 10111000
index 0d096206ac66c2cf22cabc63805f218f90198d8f..61adde4b4b2fa878603e836cd0a846577854a6d3 100644 (file)
@@ -23,8 +23,8 @@
 #define CXD2820R_PRIV_H
 
 #include <linux/dvb/version.h>
-#include "dvb_frontend.h"
-#include "dvb_math.h"
+#include <media/dvb_frontend.h>
+#include <media/dvb_math.h>
 #include "cxd2820r.h"
 #include <linux/gpio.h>
 #include <linux/math64.h>
index 16763903d4ad1fc9891c15cc350231617724e1fa..85905d3503ffcc2c9940e9ba883c90f354b7c4a9 100644 (file)
@@ -31,8 +31,8 @@
 #include <linux/dynamic_debug.h>
 #include <linux/kernel.h>
 
-#include "dvb_math.h"
-#include "dvb_frontend.h"
+#include <media/dvb_math.h>
+#include <media/dvb_frontend.h>
 #include "cxd2841er.h"
 #include "cxd2841er_priv.h"
 
index d7614b8b8782c16caea5d810d6346f870ef533cd..932d235118e2c575010017a151a8235694c5a3c3 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/i2c.h>
 #include <linux/mutex.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "dib0070.h"
 #include "dibx000_common.h"
index d9d730dfe0b104af15cf812f806e4da84651815b..64f49c8eb1fbcb028f7445a75b2a9da333c68f30 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/i2c.h>
 #include <linux/mutex.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "dib0090.h"
 #include "dibx000_common.h"
index 068bec104e29c9ba291721a04a2cc88725e38baf..de3ce2786c7248a061a54ac38bc975b9e59d1bd9 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "dib3000.h"
 #include "dib3000mb_priv.h"
index 4d086a7248e9b2508905cd026038793dc7882241..7e5d474806a53326fc4f0006cc08b770b1cd6c37 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/slab.h>
 #include <linux/i2c.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "dib3000mc.h"
 
index 5ce9f93a65c3c3794145191b35153b9808af0fc7..6a1d357d0c7c8497acfb4f4fbcc57d4a4da9852e 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/i2c.h>
 #include <linux/mutex.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "dib7000m.h"
 
index 0fbaabe43682c59370c6f0e1a9822a42484fcdf8..90ace707a80d7eb9660e0d1d8bcfa78c38a94cc6 100644 (file)
@@ -16,8 +16,8 @@
 #include <linux/mutex.h>
 #include <asm/div64.h>
 
-#include "dvb_math.h"
-#include "dvb_frontend.h"
+#include <media/dvb_math.h>
+#include <media/dvb_frontend.h>
 
 #include "dib7000p.h"
 
index 5d9381509b0794aef043f6fae66c2ff7eb25f61c..e64014f338fbd5352207c8797487513c63ebc82b 100644 (file)
@@ -16,9 +16,9 @@
 #include <linux/mutex.h>
 #include <asm/div64.h>
 
-#include "dvb_math.h"
+#include <media/dvb_math.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "dib8000.h"
 
index 1b7a4331af058438b046a97dd145e1c45608a042..f9289f488de7db22a1806f44aedd0cc627e00edd 100644 (file)
@@ -14,8 +14,8 @@
 #include <linux/i2c.h>
 #include <linux/mutex.h>
 
-#include "dvb_math.h"
-#include "dvb_frontend.h"
+#include <media/dvb_math.h>
+#include <media/dvb_frontend.h>
 
 #include "dib9000.h"
 #include "dibx000_common.h"
index 672e077749554f1b9377e5fd53949e6f16d05f70..87f6eddcf657c0784002a77b551a53d3edfe8f40 100644 (file)
@@ -2,5 +2,4 @@ drx39xyj-objs := drxj.o
 
 obj-$(CONFIG_DVB_DRX39XYJ) += drx39xyj.o
 
-ccflags-y += -I$(srctree)/drivers/media/dvb-core/
 ccflags-y += -I$(srctree)/drivers/media/tuners/
index 11e1ddeeef0a0b6493b4337523f756dbffaeb3fb..c0c66ed65b6e131fa249dc09a39075e429870748 100644 (file)
@@ -19,7 +19,7 @@
 #define DRX39XXJ_H
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "drx_driver.h"
 
 struct drx39xxj_state {
index 2f928c4dac94eb8000ad62c1251392375ba07f27..1cc7c03cd032510ad3da878a0d23d6a66fc219ed 100644 (file)
@@ -61,7 +61,7 @@ INCLUDE FILES
 #include <linux/slab.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "drx39xxj.h"
 
 #include "drxj.h"
index 087350ec8712a7b8ff4546666fd7a9bca349e097..3b7d31a22d8250607d863d498cd84818cca55408 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/i2c.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "drxd.h"
 #include "drxd_firm.h"
 
index 19cc84c69b3bcb05aceb1ecb59ae92ba288db03d..5a26ad93be10c9df27a406855a17910a939346b0 100644 (file)
 #include <linux/hardirq.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "drxk.h"
 #include "drxk_hard.h"
-#include "dvb_math.h"
+#include <media/dvb_math.h>
 
 static int power_down_dvbt(struct drxk_state *state, bool set_power_mode);
 static int power_down_qam(struct drxk_state *state);
index bd4f8278c90660076235e44cdc1bd5ca8e8f48ec..2ff90e5eabce14ed046d5334e030d7c5fa7dc6fd 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/init.h>
 #include <linux/firmware.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "ts2020.h"
 #include "ds3000.h"
 
index 212e0730f1549014029dfa7028a27d6724a4fd14..ca885e71d2f073323f15bf44746edb18039ca203 100644 (file)
@@ -7,7 +7,7 @@
 #define __DVB_PLL_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #define DVB_PLL_UNDEFINED               0
 #define DVB_PLL_THOMSON_DTT7579         1
index 50b2b666ef6c2e7d8fac5142d22635b2cd801e17..6650d4f61ef2e76e6154901c01899faae65c4402 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "dvb_dummy_fe.h"
 
 
index 86dd7b9d1e57b849a7ec56b64912e222336d4596..7aacef4b7c80d50b9f37aedd4349e91a6bf9bf8a 100644 (file)
@@ -19,7 +19,7 @@
 #define DVB_DUMMY_FE_H
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #if IS_REACHABLE(CONFIG_DVB_DUMMY_FE)
 extern struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void);
index fa2a96d5f94ebc0a41dd163cbfe0586a693a9acb..c2575fdcc81132e8a288e4f0394ee379f0b64ba2 100644 (file)
@@ -15,7 +15,7 @@
  *
  */
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "ec100.h"
 
 struct ec100_state {
index efe015df7f1dfd55faaaeb8501a257237bc8f12b..a772ef8bfe1cd432d0efbfc2f4763f79bf8aa190 100644 (file)
@@ -16,7 +16,7 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include "gp8psk-fe.h"
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 static int debug;
 module_param(debug, int, 0644);
index 2ab8d83e55768310ed826f3e4e36d07042070633..a0d0b53c91d71e9743d7a655ccdc94dadfea9baa 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/dvb/frontend.h>
 #include <linux/types.h>
 #include "helene.h"
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #define MAX_WRITE_REGSIZE 20
 
index 5c8b405f2ddc50ebaaa8388213e8d2df29d946db..5e7e265a52e616c94fcb1ca2ff5f6029ea019541 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/dvb/frontend.h>
 #include <linux/types.h>
 #include "horus3a.h"
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #define MAX_WRITE_REGSIZE      5
 
index 2fc8d3c72c118ff2fdcd7e326cdfbb10c5e1487a..3bc78f8ffc00e36be87bdddb2fb141c14441d5fb 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "isl6405.h"
 
 struct isl6405 {
index 3f34878876723b81a9c7f5382a7801100b766206..ae8ec59b665cc8c58318ba4d98d1e449a8135f5c 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "isl6421.h"
 
 struct isl6421 {
index dca5bebfeeb58cbc19ab84317048c19f52c4e2aa..3dd2465d17cf61ba35aeeb56f1d1174fd5d1e038 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "isl6423.h"
 
 static unsigned int verbose;
index ce7c443d3eacda79dbfc086b6c5e96128ee4b2b1..04f7f6854f73c6e702bd58262f8adced703b46ce 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/i2c.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "itd1000.h"
 #include "itd1000_priv.h"
index 49ed93e754edbfea23d028ef041c863687c2ea3e..20b1eb3dda1ac11a2397749b88b0424cba6d6504 100644 (file)
@@ -17,7 +17,7 @@
 #define DVB_IX2505V_H
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /**
  * struct ix2505v_config - ix2505 attachment configuration
index e5a6c176666432d3e1c5c18a4c33233626f10e02..e056f36e6f0c4015801ed4966ae48f4318584ac3 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/slab.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "l64781.h"
 
 
index ba99125deac0f41176da3a61b01d34ab525e8dd2..df817aec29e2ae133fcdadb847b4e927738b49e4 100644 (file)
@@ -19,7 +19,7 @@
 #define _LG2160_H_
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 enum lg_chip_type {
        LG2160 = 0,
index 0af4d910476135a14be0e52532fbee8e3b8b9b45..735d73060265ad3fa2911907b9a8aa1b371ca64d 100644 (file)
@@ -20,7 +20,7 @@
 #include <asm/div64.h>
 #include <linux/dvb/frontend.h>
 #include <linux/slab.h>
-#include "dvb_math.h"
+#include <media/dvb_math.h>
 #include "lgdt3305.h"
 
 static int debug;
index 2fb60d91f7b4e81cbda38e5d5b37c017e319765c..a54daaee823a3a7b6689e2a30d0484c4fe5743cf 100644 (file)
@@ -19,7 +19,7 @@
 #define _LGDT3305_H_
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 
 enum lgdt3305_mpeg_mode {
index 724e9aac0f11abf7496153b2ffbb54c620228f93..6356815cf3e19a283804b3bade9bc82d7acfbe8e 100644 (file)
@@ -21,7 +21,7 @@
 #include <asm/div64.h>
 #include <linux/kernel.h>
 #include <linux/dvb/frontend.h>
-#include "dvb_math.h"
+#include <media/dvb_math.h>
 #include "lgdt3306a.h"
 #include <linux/i2c-mux.h>
 
index 6ce337ec5272138469cd2fd1de1713377873a265..8b53044f5bdb4027cd3e51c184b08f6606304b7f 100644 (file)
@@ -19,7 +19,7 @@
 #define _LGDT3306A_H_
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 
 enum lgdt3306a_mpeg_mode {
index 06f47dc8cd3d014c34b026a89f227a7b62224951..8ad03bd81af528a444cc8e925011a7cb41cfc3f7 100644 (file)
@@ -37,8 +37,8 @@
 #include <linux/slab.h>
 #include <asm/byteorder.h>
 
-#include "dvb_frontend.h"
-#include "dvb_math.h"
+#include <media/dvb_frontend.h>
+#include <media/dvb_math.h>
 #include "lgdt330x_priv.h"
 #include "lgdt330x.h"
 
index 970e42fdbc1b1bc9770bf196a663cd2be7eefcd4..f47e5a1af16d53c516fb524033915edb2bf14b6e 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/slab.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "lgs8gl5.h"
 
 
index e6bf60e1138cc8ce757e4d76d887bbf5b6f64497..84af8a12f26ae5ef5a1fdf9f0cfe72c39954726e 100644 (file)
@@ -22,7 +22,7 @@
 #include <asm/div64.h>
 #include <linux/firmware.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "lgs8gxx.h"
 #include "lgs8gxx_priv.h"
index cb486e879fdd3f50925dd8431a4d0a4de0e09d4d..0b388502c29807e661b3257e4769de429176e84b 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "lnbh25.h"
 
 /**
index 392d7be9377412bf83ad64a2c34ebcb4374e9c20..d9966a338a724a847dd0c2465d1d6f99331d6deb 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "lnbp21.h"
 #include "lnbh24.h"
 
index 39326a2ebab2746ef6df616f2b42e5d09375a80e..a62e82bf46f5b4e2722d17b13a896f2add6b4c6c 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "lnbp22.h"
 
 static int debug;
index 07f20c269c672b533677df3df0f05379d37ee88e..1ba0b79df311ba2e59f7efa1414852943fd226a2 100644 (file)
@@ -17,9 +17,9 @@
 #ifndef M88DS3103_PRIV_H
 #define M88DS3103_PRIV_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "m88ds3103.h"
-#include "dvb_math.h"
+#include <media/dvb_math.h>
 #include <linux/firmware.h>
 #include <linux/i2c-mux.h>
 #include <linux/regmap.h>
index e34dab41d104b03f13d06cb36fba8c52999256ea..496ce27fa63a1caa81e531f64053c1ffb156ab9a 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/types.h>
 
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "m88rs2000.h"
 
 struct m88rs2000_state {
index 1a313b0f5875db5e2b20a2cc6fa0856e54a754ca..b015872c4ff417f8ee2d2227705385117f19864e 100644 (file)
@@ -21,7 +21,7 @@
 #define M88RS2000_H
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct m88rs2000_config {
        /* Demodulator i2c address */
index 5d2bb76bc07aad1efa6b536f714546414a9b6ddd..2969ba6ed9e103890f7d2764c8e5f148b6492077 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/moduleparam.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "mb86a16.h"
 #include "mb86a16_priv.h"
 
index dbd5f43fa1280a66f29992d3834d084f312ff6e8..f13820bc7a216707078ded8eaa67c0e34a268641 100644 (file)
@@ -22,7 +22,7 @@
 #define __MB86A16_H
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 
 struct mb86a16_config {
index bdaf9d235fed0b245ef6fa828104dec41f1fd1ae..6ce1b8f46a39c540b31f39a5395474c86c411817 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/kernel.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "mb86a20s.h"
 
 #define NUM_LAYERS 3
index fb50f56ba30ba74466b8eecd811910cb69e54d1a..2ec126a42527188822ecc7ca3752d49c9a6b00b3 100644 (file)
@@ -17,8 +17,8 @@
 #ifndef MN88472_PRIV_H
 #define MN88472_PRIV_H
 
-#include "dvb_frontend.h"
-#include "dvb_math.h"
+#include <media/dvb_frontend.h>
+#include <media/dvb_math.h>
 #include "mn88472.h"
 #include <linux/firmware.h>
 #include <linux/regmap.h>
index 5fc463d147c8c07316e507a44d8d391042fa7d65..d89a863202636ccbd9424f67c4908346196ebcfa 100644 (file)
@@ -17,8 +17,8 @@
 #ifndef MN88473_PRIV_H
 #define MN88473_PRIV_H
 
-#include "dvb_frontend.h"
-#include "dvb_math.h"
+#include <media/dvb_frontend.h>
+#include <media/dvb_math.h>
 #include "mn88473.h"
 #include <linux/math64.h>
 #include <linux/firmware.h>
index 0b23cbc021b81a23bee56c777ec5a3d1df558c98..e2a3fc521620e1e05e2481f4e13d5d326a143048 100644 (file)
@@ -32,7 +32,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "mt312_priv.h"
 #include "mt312.h"
 
index d5fa96f0a6cdd06ae2aa7539329fa1732a3bc00c..a440b76444d3372c8bf2d24a0b832704997bbb8c 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "mt352_priv.h"
 #include "mt352.h"
 
index 1ebc3830579ff087eeae3c90f8d4b4226942818b..e899821018a0b5431f23ac9833527043060742b7 100644 (file)
@@ -33,7 +33,7 @@
 #include <asm/div64.h>
 #include <asm/unaligned.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "mxl5xx.h"
 #include "mxl5xx_regs.h"
 #include "mxl5xx_defs.h"
index 532e081115370368dd84c93386e8bf1a90387b8a..ad4c218468006d20234e87f512f36a9c3c9d3fc1 100644 (file)
@@ -4,7 +4,7 @@
 #include <linux/types.h>
 #include <linux/i2c.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct mxl5xx_cfg {
        u8   adr;
index bf6e5cd572c55f831eb10fdaef0ad927a2688489..7aa74403648e3a8d6dc94ce18abeac37dee46239 100644 (file)
@@ -48,7 +48,7 @@
 #include <linux/slab.h>
 #include <linux/string.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "nxt200x.h"
 
 struct nxt200x_state {
index 1ce5ea28489bb6e555ecbfd44ceb59470450597d..109a635d166a867d81f2dc6551a5a76322ece0be 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "nxt6000_priv.h"
 #include "nxt6000.h"
 
index 5f2549c48eb04d0b3131e4e95e23fa7462acf3b3..b4c9aadcb5523c40c4ba3f41a2250239ba6c4edb 100644 (file)
@@ -38,8 +38,8 @@
 #include <linux/slab.h>
 #include <asm/byteorder.h>
 
-#include "dvb_math.h"
-#include "dvb_frontend.h"
+#include <media/dvb_math.h>
+#include <media/dvb_frontend.h>
 #include "or51132.h"
 
 static int debug;
index d14fa9736ae526c848e785887742db2dac847ab4..a1b7c301828ffe1f8c8d20ff628ea14d2e8ccef2 100644 (file)
@@ -36,8 +36,8 @@
 #include <linux/slab.h>
 #include <asm/byteorder.h>
 
-#include "dvb_math.h"
-#include "dvb_frontend.h"
+#include <media/dvb_math.h>
+#include <media/dvb_frontend.h>
 #include "or51211.h"
 
 static int debug;
index 8ec4721d79acc75317c6bdba20c145eb183d1888..72d3f3546ff20ffcb6183498086c5cd5ce4ee1db 100644 (file)
@@ -18,8 +18,8 @@
 #ifndef RTL2830_PRIV_H
 #define RTL2830_PRIV_H
 
-#include "dvb_frontend.h"
-#include "dvb_math.h"
+#include <media/dvb_frontend.h>
+#include <media/dvb_math.h>
 #include "rtl2830.h"
 #include <linux/i2c-mux.h>
 #include <linux/math64.h>
index 9a6d01a9c690045ee2518df492e0dbd11588e2bd..bd13d9ad9ab7ff3174171e40f894a5f0cb85a424 100644 (file)
@@ -26,8 +26,8 @@
 #include <linux/math64.h>
 #include <linux/bitops.h>
 
-#include "dvb_frontend.h"
-#include "dvb_math.h"
+#include <media/dvb_frontend.h>
+#include <media/dvb_math.h>
 #include "rtl2832.h"
 
 struct rtl2832_dev {
index 8f88c2fb86273606fac1db738b6ed63c3bd7ce87..d28735c1cb0cb4620f5b178a47de7cf650d1a3a6 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <linux/i2c.h>
 #include <media/v4l2-subdev.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /**
  * struct rtl2832_sdr_platform_data - Platform data for the rtl2832_sdr driver
index f370c6df0a8bd441ada7715238047b5a47ba3678..aced6a956ec5670aafeecd56046b29c3762ee361 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "s5h1409.h"
 
 struct s5h1409_state {
index dd09336a135bcaf22f68f3bf07be730381c56af4..c4b1e9725f3ea61e4d22cb3473bae09410ed0859 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "s5h1411.h"
 
 struct s5h1411_state {
index fd427a29c0013d7bc2f0d42f232a564c43400e7e..8b2222530227062706d814641cf6efba464c1663 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/i2c.h>
 
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "s5h1420.h"
 #include "s5h1420_priv.h"
 
index 4de50fe0c638db2a0fb9fb9f6af6b097e53953e7..740a60df04555a876c7491d0d8a7b84a1f90bb6e 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "s5h1432.h"
 
 struct s5h1432_state {
index 274544a3ae0e0ff76aca948572023b8c1b46e533..2d75ede77aca4673a76f5c8e0855f2bedb5e76ea 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/kernel.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "s921.h"
 
 static int debug = 1;
index 2ad6409dd6b1cc964a1a44e3c47fca4158c05994..2dd336f95cbf39fc0070411fb95dceecbcedc052 100644 (file)
@@ -27,8 +27,8 @@
 #include <linux/firmware.h>
 #include <linux/regmap.h>
 
-#include "dvb_frontend.h"
-#include "dvb_math.h"
+#include <media/dvb_frontend.h>
+#include <media/dvb_math.h>
 #include "si2165_priv.h"
 #include "si2165.h"
 
index 737cf416fbb22b293d17cc2999fbf4559653ad20..3c8746a2003810ab0951a26ba518c58b1a7c373f 100644 (file)
@@ -18,7 +18,7 @@
 #define SI2168_PRIV_H
 
 #include "si2168.h"
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include <linux/firmware.h>
 #include <linux/i2c-mux.h>
 #include <linux/kernel.h>
index 4e8c3ac4303f74e927d840832df5caac7154d80c..9b32a1b3205e3de55ef4e287d0296eaf33017c76 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/jiffies.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "si21xx.h"
 
 #define        REVISION_REG                    0x00
index 43d480bb6ea2aa2d56758b88530d4846a899c51b..12fa1d57982014559cac63f7e71a6fe80743d7da 100644 (file)
@@ -3,7 +3,7 @@
 #define SI21XX_H
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct si21xx_config {
        /* the demodulator's i2c address */
index 3901cd74b3f7d8b5329bebec63373aa89e5b21f4..1bf60b80566f81574715ae1ad9c9614af9bedd0a 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef SP2_H
 #define SP2_H
 
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 
 /*
  * I2C address
index 37fef7bcd63f5e6817d82a1e0511705545d1c5c9..c9ee53073ec05937142a139bd83b005d29e2fa0b 100644 (file)
@@ -18,7 +18,7 @@
 #define SP2_PRIV_H
 
 #include "sp2.h"
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /* state struct */
 struct sp2 {
index 04454cb7846761d7a625aef1efacc335981bfaa7..9a726f3a4896a2c2403894a0d0ecb6a4b05706d1 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "sp8870.h"
 
 
index d2c402b52c6ef9c18b9f88340c489b9b850d0720..572a297811fe0ca38c44f0209145d67578ba7621 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "sp887x.h"
 
 
index db5dde3215f02039ecdd0180bfebe667d639ce71..2c5427c77db727906ba1f1bae517189c40745b16 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/string.h>
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "stb0899_drv.h"
 #include "stb0899_priv.h"
index 0a72131a57dbf3dfae36b285271b1cd6da9bae21..6c285aee7edf2a351a7bb697d7bbc99eec0aa7e8 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #define STB0899_TSMODE_SERIAL          1
 #define STB0899_CLKPOL_FALLING         2
index 82395b9128155a8fce91f1bc48cb6ee8c92d4cd0..86d140e4c5edcd10a63c6b274b39431e1a1582d8 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __STB0899_PRIV_H
 #define __STB0899_PRIV_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "stb0899_drv.h"
 
 #define FE_ERROR                               0
index e94a3d5facf67b60d21f4b1a685805ba4b770c7d..1adda72379ff7db2033bcb6b5ffa9950600154bf 100644 (file)
@@ -24,7 +24,7 @@
 #define __DVB_STB6000_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #if IS_REACHABLE(CONFIG_DVB_STB6000)
 /**
index 75509bec66e4cb066c655bce0a2449f2bae345bc..3a851f524b16ba35b70c109922614846349d8d7f 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/slab.h>
 #include <linux/string.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "stb6100.h"
 
 static unsigned int verbose;
index f7b468b6dc2634a188435464fec23275d35ba4e2..6cdae688a23e3b815dfeaf310f98645baef7c50b 100644 (file)
@@ -23,7 +23,7 @@
 #define __STB_6100_REG_H
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #define STB6100_LD                     0x00
 #define STB6100_LD_LOCK                        (1 << 0)
index 2ef67aa768b97ea1a054467ab0d889beca839389..203f9b36c0eb90e972d18cda2a75618fa4698dab 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 static int stb6100_get_frequency(struct dvb_frontend *fe, u32 *frequency)
 {
index 50ffa21e387116976874b20a2c7befe9f9472da6..fad877b2fc7dc9b4b6ac619787f85fd788fd4ecb 100644 (file)
@@ -18,7 +18,7 @@
 */
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 static int stb6100_get_freq(struct dvb_frontend *fe, u32 *frequency)
 {
index 67f91814b9f76e96946c8ccdde08871d13441be3..f947ed947aaed454a7ae055ee779a99de2961037 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/jiffies.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "stv0288.h"
 
 struct stv0288_state {
index 803acb917282334bf288818ff681fd76e4892acd..c10227aaa62cf91e6efbc30f3c52508887745083 100644 (file)
@@ -28,7 +28,7 @@
 #define STV0288_H
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct stv0288_config {
        /* the demodulator's i2c address */
index db94d4d109f9eb8c3da7bf9fdb6051e2190dd815..b823c04e24d3aca04eaddb8afebd9ecb8cb3dd97 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/jiffies.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "stv0297.h"
 
 struct stv0297_state {
index b30632a6733307872913361eb41ca542907689dc..8fa5ac700fc32ad215199b0fdc8fb52c964ce4d8 100644 (file)
@@ -22,7 +22,7 @@
 #define STV0297_H
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct stv0297_config
 {
index b1f3d675d316d289c3269e30340a67380d4c390c..633b90e6fe8610e4e17227957dac2b085d211132 100644 (file)
@@ -51,7 +51,7 @@
 #include <linux/jiffies.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "stv0299.h"
 
 struct stv0299_state {
index 0aca30a8ec257c3342b9c954ef9e91278abe7a1a..700c124a169926833d224f0611fe2ccba44ba813 100644 (file)
@@ -46,7 +46,7 @@
 #define STV0299_H
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #define STV0299_LOCKOUTPUT_0  0
 #define STV0299_LOCKOUTPUT_1  1
index 4fa119d83bc58470369a8f80fd9e7e9aafe064a2..5435c908e298ce027d16d453a43f4be7b535fe39 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/slab.h>
 #include <linux/i2c.h>
 
-#include "dvb_math.h"
+#include <media/dvb_math.h>
 
 #include "stv0367.h"
 #include "stv0367_defs.h"
index 8f7a31481744a9c053489a3ee0697944c1c0ea08..14a50ecef6dde057acb43829b4b8eb8d83e2b7dd 100644 (file)
@@ -23,7 +23,7 @@
 #define STV0367_H
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #define STV0367_ICSPEED_53125  53125000
 #define STV0367_ICSPEED_58000  58000000
index 1571a465e05c4f93593c1dc1635b8940d406eaeb..5dbe1e550fe5d545a0f3d3e3135008300de2d2ce 100644 (file)
@@ -23,7 +23,7 @@
 #define STV0900_H
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct stv0900_reg {
        u16 addr;
index e33fb656b7a5cdb027f012868143b04d6e8fe36b..20641bd2f9775b6aa688a554bdf61f65ce384c44 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/mutex.h>
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "stv6110x.h" /* for demodulator internal modes */
 
index 5b780c80d4967a6609a4610590c5fe00eb229456..37c9f93a8a6a3bacb9ab09729835ee9b26118559 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __STV090x_PRIV_H
 #define __STV090x_PRIV_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #define FE_ERROR                               0
 #define FE_NOTICE                              1
index a8c99f41478b1d262b85e16d627863b49750cd36..946e55c74afa3bc5cf8f233ff8cfadb2cefbc776 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/i2c.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "stv0910.h"
 #include "stv0910_regs.h"
 
index ab73124c0dec2a3eb51863af1eaec6d6318b907f..ecfc1faba15c7e2dde47913089131b3e4d516294 100644 (file)
@@ -22,7 +22,7 @@
 #define __DVB_STV6110_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /* registers */
 #define RSTV6110_CTRL1         0
index 7e8e01389c55fafdf7f6fb1eaa1bcf1909d9f54e..d4ac29ac9b4fb9d3895a08f99a034eb0ced360bc 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/slab.h>
 #include <linux/string.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "stv6110x_reg.h"
 #include "stv6110x.h"
index 789f7b61e628ae23d693686a0ff9223164b7ee10..9b715b6fe1520019beda3408a8e0efd9ca88e01a 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "stv6111.h"
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct stv {
        struct i2c_adapter *i2c;
index 4687e1546af22d193956f70be4e86b7d117d08e9..5572b39614d552b127680df246d6cb8ab5b08192 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/kernel.h>
 #include <linux/math64.h>
 #include <linux/dvb/frontend.h>
-#include "dvb_math.h"
+#include <media/dvb_math.h>
 #include "tc90522.h"
 
 #define TC90522_I2C_THRU_REG 0xfe
index b1cbddfa6ee6347c94a8a230ad3fb2a707ad3838..10e585f3249900ba7d5e892f66cd1e5f36412efb 100644 (file)
@@ -25,7 +25,7 @@
 #define TC90522_H
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /* I2C device types */
 #define TC90522_I2C_DEV_SAT "tc90522sat"
index 32ba8401e74308f86e7e83f69f32f865283d33c0..4f588ebde39d17d58e1867a9e91cbc07ffdd7322 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "tda1002x.h"
 
 
index 8028007c68eb7e2a21dc2249ccb2e6395d6adcb9..abe27029fe93208ffebde030a1608c3e91168508 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "tda1002x.h"
 
 #define REG0_INIT_VAL 0x23
index 143b39b5f6c9c2a47a1b710db075c5852f76bcaa..de82a2558e15255d43072e4bda5078e22c65fcb0 100644 (file)
@@ -27,8 +27,8 @@
 #include <linux/delay.h>
 #include <linux/math64.h>
 #include <asm/div64.h>
-#include "dvb_frontend.h"
-#include "dvb_math.h"
+#include <media/dvb_frontend.h>
+#include <media/dvb_math.h>
 #include "tda10048.h"
 
 #define TDA10048_DEFAULT_FIRMWARE "dvb-fe-tda10048-1.0.fw"
index e674508c349c7595f23b28cd9e63089620ed6d9c..58e3beff5adcb8a0658c3af8dbff62e190743123 100644 (file)
@@ -36,7 +36,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "tda1004x.h"
 
 static int debug;
index b9c3601802bab6f2c2f81bd458387dc9d24a4b03..67c46e8a7201e0a4a0e8ba34feb2fef8dc0cff34 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef TDA10071_PRIV
 #define TDA10071_PRIV
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "tda10071.h"
 #include <linux/firmware.h>
 #include <linux/regmap.h>
index b6d16c05904dca57c08b7e6c9dff06a87618e3d8..1a95c521e97f233b10024f1c4d1fcef9f70bf025 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "tda10086.h"
 
 #define SACLK 96000000
index 45cd5ba0cf8a1839ffed244e46479e753693cfd8..2e1d36ae943bd0de07efe583d929435c52105672 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/i2c.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "tda18271c2dd.h"
 
 /* Max transfer size done by I2C transfer functions */
index a63dec44295b8ee07375161b9b4b1fd6e397d1cb..3ef7140ed7f3d9a35e845b3f127465a915a1e1ea 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/module.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "tda665x.h"
 
 struct tda665x_state {
index aa3200d3c3520dea546bab3a0d51629353f9e30c..29b4f64c030c6f20ffbe5c0534cc36967cbbcc06 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/jiffies.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "tda8083.h"
 
 
index 4eb294f330bcffab7cfc6e81399e6d43d1512709..f72a54e7eb23c4d89f04c3c81c498c591deb6076 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/module.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "tda8261.h"
 
 struct tda8261_state {
index 6a7bed12e741b1935486d2348c92e3ebea2dcd44..0ef35ff3807f69de5a860e86217cf659d7f63864 100644 (file)
@@ -24,7 +24,7 @@
 #define __DVB_TDA826X_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /**
  * Attach a tda826x tuner to the supplied frontend structure.
index 931e5c98da8af911eecfa2e7e7daa1d0cd2e4b73..07f1726a57743adbbcbb052fd2d4ab757a07d91f 100644 (file)
@@ -19,7 +19,7 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "ts2020.h"
 #include <linux/regmap.h>
 #include <linux/math64.h>
index 6c098a894ea65ce6a7b34d74515f2aebe51359d7..a342bd9c7fbf2daa3b72b9fe53a3be3bd97a86ef 100644 (file)
@@ -28,7 +28,7 @@
 #define __DVB_TUA6100_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #if IS_REACHABLE(CONFIG_DVB_TUA6100)
 extern struct dvb_frontend *tua6100_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c);
index 178363704bd481520e84474fcfaaf7832c7daee8..1d897928991516ecb088aadcd57f869e33e2e306 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/slab.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "ves1820.h"
 
 
index d0ee52f66a8e1742f68085d1a09befd063e6ab3b..0c7b3286b04dd1f7c27789c0ea4496b91b4c950e 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "ves1x93.h"
 
 
index 6cd8f6f9c415632700101efecc131fdc59bc916a..63c13fa4a54b9bc5e66b649326bf8e1882446138 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <linux/platform_device.h>
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /**
  * struct zd1301_demod_platform_data - Platform data for the zd1301_demod driver
index ec90ca9277392bba1b8cec2d7b05cb4b32f6a84b..a1129ab74296076bf88461966fb500aa8244c883 100644 (file)
@@ -18,7 +18,7 @@
 #define DVB_ZL10036_H
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct zl10036_config {
        u8 tuner_address;
index 3208b866d1cb9c5cf50890ec4fd449b7deb1d97f..6293bd920fa613aae8f7f629688a71283ca299d2 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/slab.h>
 #include <linux/dvb/frontend.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "zl10039.h"
 
 static int debug;
index 1c689f7f4ab898ff20243b66203b5a45a9dc70b0..c9901f45deb70c5fbb9fed10b12c52c7535a49ef 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/slab.h>
 #include <asm/div64.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "zl10353_priv.h"
 #include "zl10353.h"
 
index 239481344d7ca858692d8493a1a1c1c4cef2f9b3..f96049f5fa90580aa8cdc346a95b0f59910dd91c 100644 (file)
@@ -2,5 +2,3 @@ obj-$(CONFIG_DVB_FIREDTV) += firedtv.o
 
 firedtv-y += firedtv-avc.o firedtv-ci.o firedtv-dvb.o firedtv-fe.o firedtv-fw.o
 firedtv-$(CONFIG_DVB_FIREDTV_INPUT)    += firedtv-rc.o
-
-ccflags-y += -Idrivers/media/dvb-core
index 5bde6c209cd76e748ce206ade52f2ed7839490f7..37db04f8104d536fa573c9c4c62390047ac82f68 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/wait.h>
 #include <linux/workqueue.h>
 
-#include <dvb_frontend.h>
+#include <media/dvb_frontend.h>
 
 #include "firedtv.h"
 
index edbb30fdd9d95e3d5285c892bce0111b0f315598..342c5c853dde1e04e814886760703a5c416cab08 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/fs.h>
 #include <linux/module.h>
 
-#include <dvbdev.h>
+#include <media/dvbdev.h>
 
 #include "firedtv.h"
 
index f710e17953e334dbf3de7c42fe57b5cbf16579f6..2f7ac79215cc506fcea92a46cdbd487d2fc6f49f 100644 (file)
 #include <linux/mutex.h>
 #include <linux/types.h>
 
-#include <dmxdev.h>
-#include <dvb_demux.h>
-#include <dvbdev.h>
-#include <dvb_frontend.h>
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvbdev.h>
+#include <media/dvb_frontend.h>
 
 #include "firedtv.h"
 
index 17acda6bcb6eef0763330e566b4c1c9a444ce5a1..86efeb10d2f2cb07d03eb0669c61a36bb936b462 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/string.h>
 #include <linux/types.h>
 
-#include <dvb_frontend.h>
+#include <media/dvb_frontend.h>
 
 #include "firedtv.h"
 
index 247f0e7cb5f7f6975857534a76f12aab2a53b005..92f4112d2e377a939fe39cdad2eda884f5a9d21f 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <asm/page.h>
 
-#include <dvb_demux.h>
+#include <media/dvb_demux.h>
 
 #include "firedtv.h"
 
index 345d1eda8c057be669afe273c8c4d65f22aa373f..876cdec8329be30cc7f981c661535a83e44b8fc6 100644 (file)
 #include <linux/wait.h>
 #include <linux/workqueue.h>
 
-#include <demux.h>
-#include <dmxdev.h>
-#include <dvb_demux.h>
-#include <dvb_frontend.h>
-#include <dvb_net.h>
-#include <dvbdev.h>
+#include <media/demux.h>
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
+#include <media/dvbdev.h>
 
 struct firedtv_tuner_status {
        unsigned active_system:8;
index 0e01f973db6b283cbff8ea9637ef8e00f6c798ea..5fc345645a8057a2a7c4c04613b63d138297326b 100644 (file)
@@ -1,6 +1,4 @@
 obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o
 
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/common/siano
-ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
 
index 35d6835ae43efc33ed4c8199ed77cb436e2bf587..b43b9167db5a32aee76ccceb858d5ef9a4c010cd 100644 (file)
@@ -6,5 +6,4 @@ endif
 b2c2-flexcop-pci-objs += flexcop-pci.o
 obj-$(CONFIG_DVB_B2C2_FLEXCOP_PCI) += b2c2-flexcop-pci.o
 
-ccflags-y += -Idrivers/media/dvb-core/
 ccflags-y += -Idrivers/media/common/b2c2/
index 009f1dc1521f0acc6832982d6382947ea19c11b6..ab0ea64d3910c74cf148399b0adfcfca026f99fc 100644 (file)
@@ -6,7 +6,6 @@ bttv-objs      :=      bttv-driver.o bttv-cards.o bttv-if.o \
 obj-$(CONFIG_VIDEO_BT848) += bttv.o
 obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o dst_ca.o
 
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
 ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/common
index d4bc78b4fcb5cbaa9c251c81a0619f17dd9d191e..f5f87e03f94bb5a5c35329c56fe84fd49be7ea27 100644 (file)
@@ -40,8 +40,8 @@
 #include <linux/vmalloc.h>
 #include <linux/init.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
 #include "bt878.h"
 #include "dst_priv.h"
 
index 7166d2279465c65d30eaee02d6725e46137cf1fe..4f0bba9e4c48f86253ce67f9fac3dc0ddb6ac45c 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
 #include <asm/div64.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "dst_priv.h"
 #include "dst_common.h"
 
index 530b3e9764cefc5bf199dddee54e63733a71250e..0a7623c0fc8ef2f55f62b8857b9669a350610542 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/mutex.h>
 #include <linux/string.h>
 #include <linux/dvb/ca.h>
-#include "dvbdev.h"
-#include "dvb_frontend.h"
+#include <media/dvbdev.h>
+#include <media/dvb_frontend.h>
 #include "dst_ca.h"
 #include "dst_common.h"
 
index ad617871ce9b003940b0e06a275fb2e31aed7ff9..f60d69ac515b43323c24d8f8257e79343ef45ca0 100644 (file)
 #include <linux/slab.h>
 #include <linux/i2c.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
 #include "dvb-bt8xx.h"
 #include "bt878.h"
 
index 0ec538e23b4e18a096e80d45eec8930a4b89761a..3184b3f3a85e8818e716e0a89440cae356ea3018 100644 (file)
@@ -23,8 +23,8 @@
 
 #include <linux/i2c.h>
 #include <linux/mutex.h>
-#include "dvbdev.h"
-#include "dvb_net.h"
+#include <media/dvbdev.h>
+#include <media/dvb_net.h>
 #include "bttv.h"
 #include "mt352.h"
 #include "sp887x.h"
index 98914a40f6ac84b8ae2ce5cdab3aa72d2fc8c84e..9c82c2df05e1da46289ad4656b977e9e3176415a 100644 (file)
@@ -9,6 +9,5 @@ cx18-alsa-objs := cx18-alsa-main.o cx18-alsa-pcm.o
 obj-$(CONFIG_VIDEO_CX18) += cx18.o
 obj-$(CONFIG_VIDEO_CX18_ALSA) += cx18-alsa.o
 
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
 ccflags-y += -Idrivers/media/tuners
index 7be2088c45fe6b47acf93e61c68e581c35e0b986..3492023a867590198b8b5de203508294d0fb2a5c 100644 (file)
 #include "cx23418.h"
 
 /* DVB */
-#include "demux.h"
-#include "dmxdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
-#include "dvbdev.h"
+#include <media/demux.h>
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
+#include <media/dvbdev.h>
 
 /* Videobuf / YUV support */
 #include <media/videobuf-core.h>
index b8bf7806124bad76421d0d58f68a257d7004a3b1..3f37dcadbaaf05c79516416b64029dda06080b86 100644 (file)
@@ -10,7 +10,6 @@ obj-$(CONFIG_MEDIA_ALTERA_CI) += altera-ci.o
 
 ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
 
 ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
index 5c94e312cba3da4fad6f89da444accd4ada7a4c8..70aec9bb7e959c243073a7487b9326323c0b732d 100644 (file)
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#include <dvb_demux.h>
-#include <dvb_frontend.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
 #include "altera-ci.h"
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 
 /* FPGA regs */
 #define NETUP_CI_INT_CTRL      0x00
index 5e8e134d81c2b6f48772c75fe9a98468e44e1f05..96f75f658b1b9496bc1c315e665fc1548f9c293a 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "cx23885.h"
 #include "cimax2.h"
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 
 /* Max transfer size done by I2C transfer functions */
 #define MAX_XFER_SIZE  64
index 565e958f6f8d2de35bfc15701961d387e8a8c68e..167ffe205b5de3910d91b07ad156d01a1fd289a2 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef CIMAX2_H
 #define CIMAX2_H
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 
 extern int netup_ci_read_attribute_mem(struct dvb_ca_en50221 *en50221,
                                                int slot, int addr);
index 67ad041381832a5b17213fa580a74ef19622861e..700422b538c02217b2d198dde74bf36a15bbea06 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <media/v4l2-common.h>
 
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 #include "s5h1409.h"
 #include "s5h1411.h"
 #include "mt2131.h"
index 86646eee4e6b532b8900836bdbce891685ce44e6..dea0e7ac32e83ca94c48d7d575c4c69a4db8146a 100644 (file)
@@ -13,5 +13,4 @@ obj-$(CONFIG_VIDEO_CX88_VP3054) += cx88-vp3054-i2c.o
 
 ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
index ec5238870fdb47694c3751aa21076237a7cbb819..f58fdec50eabc9fad5f9092bfc0bdfcfe477d3aa 100644 (file)
@@ -8,7 +8,6 @@ ddbridge-objs := ddbridge-main.o ddbridge-core.o ddbridge-ci.o \
 
 obj-$(CONFIG_DVB_DDBRIDGE) += ddbridge.o
 
-ccflags-y += -Idrivers/media/dvb-core/
 ccflags-y += -Idrivers/media/dvb-frontends/
 ccflags-y += -Idrivers/media/tuners/
 
index 70ac9e576c74936c00abe14c2e843d2f6de0d538..095457737bc16b954738cf081a5afa0b36a9c61b 100644 (file)
 #include <linux/device.h>
 #include <linux/io.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_ringbuffer.h"
-#include "dvb_ca_en50221.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_ringbuffer.h>
+#include <media/dvb_ca_en50221.h>
+#include <media/dvb_net.h>
 
 #define DDBRIDGE_VERSION "0.9.32-integrated"
 
index 327585143c83ee00cea2365d4118a65b20e48a85..d22c2547ee86dd61f8115dc82abb6a54abd0e804 100644 (file)
@@ -1,3 +1,3 @@
 obj-$(CONFIG_DVB_DM1105) += dm1105.o
 
-ccflags-y += -Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends
+ccflags-y += -Idrivers/media/dvb-frontends
index 7c3900dec3686811501f22648cb047e8611ef2e5..c9db108751a73117c4f7033c31c4cbddc7cf3bbe 100644 (file)
 #include <linux/slab.h>
 #include <media/rc-core.h>
 
-#include "demux.h"
-#include "dmxdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
-#include "dvbdev.h"
+#include <media/demux.h>
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
+#include <media/dvbdev.h>
 #include "dvb-pll.h"
 
 #include "stv0299.h"
index 48f8a23f9a0f7ddf847471bd889fae699fdd602e..08987a5d55fc1991ad6ff4d2e25ee81cc1a777d1 100644 (file)
@@ -12,6 +12,5 @@ obj-$(CONFIG_VIDEO_FB_IVTV) += ivtvfb.o
 
 ccflags-y += -I$(srctree)/drivers/media/i2c
 ccflags-y += -I$(srctree)/drivers/media/tuners
-ccflags-y += -I$(srctree)/drivers/media/dvb-core
 ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
 
index a684dc2ec79e057b2a2c17d7fc70b98dd8c94337..b5ef39692cb0ed6bf57c9134690b94cbea58eb70 100644 (file)
@@ -26,4 +26,4 @@ obj-$(CONFIG_MANTIS_CORE)     += mantis_core.o
 obj-$(CONFIG_DVB_MANTIS)       += mantis.o
 obj-$(CONFIG_DVB_HOPPER)       += hopper.o
 
-ccflags-y += -Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/
+ccflags-y += -Idrivers/media/dvb-frontends/
index ed855e3df5586d6993ced0f485ba6962772cc44a..89759cb80ecb53f88a6f7a87f29b658c2a82f3e7 100644 (file)
 #include <asm/irq.h>
 #include <linux/interrupt.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 #include "hopper_vp3028.h"
index 1032db6bb789548633cf9c62cac0d8b7307fe1a7..d58ae0097feae1c67ff72b5694a246599183541b 100644 (file)
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "zl10353.h"
 #include "mantis_common.h"
index 60c6c2f24066bf96b6be5be45e0810fa466814bb..4f0ba457c7e5ae5b32989075c45d6c1f7563565c 100644 (file)
 #include <linux/interrupt.h>
 #include <asm/io.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 #include "mantis_link.h"
index 4ce8a90d69dcd54ace659944400bd3a81e635826..7eb75cb7d75aec93f278252face98ace1ddd6d6f 100644 (file)
 #include <linux/interrupt.h>
 #include <media/rc-map.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 
index 2ce310b0a02289c45eff97875e2b53b791f753f4..84406a428330aa0ecc2384a76dc51b8701616e67 100644 (file)
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 #include "mantis_reg.h"
index 0db4de3a228522089de86ec2a5ce7314fde64b37..54dbaa700fa38060639761894d3aa5f378aa35f4 100644 (file)
 #include <linux/pci.h>
 #include <linux/i2c.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 #include "mantis_dma.h"
index 909ff54868a3b183623b250849c166c70fdcbcf2..443ac5ab49023a477c6adf587d8720f16440bf73 100644 (file)
 #include <linux/interrupt.h>
 #include <asm/io.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 #include "mantis_link.h"
index 10c68df7e16f56cebaf1c305baac92de45d3c3a1..bf61f8c5a59f0054a37d01d5d0a130f8c3a849e6 100644 (file)
 #include <linux/interrupt.h>
 #include <asm/io.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 
index 496c10dfc4dfebe678b275793cbce374688316d7..6528a2180119f691b95028d50cae77256241bf23 100644 (file)
 #include <linux/pci.h>
 #include <linux/i2c.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 #include "mantis_reg.h"
index 7519dcc934dde151c22be993711e829e2851e1a4..5b472e9b9542318aa1cdf46de6dd7d78c7e325bd 100644 (file)
 #include <media/rc-core.h>
 #include <linux/pci.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 #include "mantis_input.h"
index 24fcdc63d6d55ae8cd853f886ee96247ebe08746..f45c2340a493b3cb9ae7ac69bb0c7b98dce2a74b 100644 (file)
 #include <linux/interrupt.h>
 #include <asm/io.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 #include "mantis_reg.h"
index 2a814774a00149c35df2a89e43f87df6ebdfe23b..c6698976fc2fa86e9621d2397b8b8dabe6109632 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <linux/mutex.h>
 #include <linux/workqueue.h>
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 
 enum mantis_sbuf_status {
        MANTIS_SBUF_DATA_AVAIL          = 1,
index 9e89e045213a52e57e8a4b389ad0f9bc2dacfd5c..d590524b4171d3b70b97758674c8d3ba751afbbf 100644 (file)
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 #include "mantis_reg.h"
index b2dbc7b2e0f6f37dd98f261c5dd7f6cad69ae9a6..2a316b988c0752c2f956347cb1787413ac06a1d0 100644 (file)
 #include <linux/interrupt.h>
 #include <asm/io.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 #include "mantis_link.h" /* temporary due to physical layer stuff */
index f1c96aec8c7b2549212b1b8a3db35bdaf5395829..18f81c13599622ec6ace576259feb2075e2f7444 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/pci.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 #include "mantis_reg.h"
index 12a6adb2bd7e167cc575abc04588ca018a4b39b7..54d2ab409cc5396b60a5a194973e3ce5ef9a9566 100644 (file)
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "stv0299.h"
 #include "mantis_common.h"
index e4972ff823c2009de97ea3ae90c5b13b7f64e146..26672a49b86facd5ddffe486f5e089c208616cfa 100644 (file)
 #include <linux/interrupt.h>
 #include <asm/io.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mb86a16.h"
 #include "mantis_common.h"
index 764b1c66ea1b66ea99d140ce04bd223539c0d895..35af4e5dcc8c5a1041cc02fab084a02d2681a3e2 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef __MANTIS_VP1034_H
 #define __MANTIS_VP1034_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "mantis_common.h"
 
 
index 7082fcbc94a1001d6412b3b704673c807144f8c1..47e0c48c3abc3afeb184d59407d5272ee59b57d4 100644 (file)
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "mantis_common.h"
 #include "mantis_ioc.h"
index 8d48b5abe04a5eb42d3eb0586b85e6884751ca9f..d98e0a3edaab26de0ea0d0028b5e096e99e2a1d6 100644 (file)
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "tda1002x.h"
 #include "mantis_common.h"
index 8dd17d7c08819b83dedf4110571223daa12f1025..2c52f3d4e2bc9bb1ef0e70e2d3cee9985bf5adbf 100644 (file)
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "tda1002x.h"
 #include "mantis_common.h"
index b07be6adc522c8949246b76def5fe113ea1b89e6..34130d29e0aafc2612fc7432d663b3b5ee4fb340 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef __MANTIS_VP3028_H
 #define __MANTIS_VP3028_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "mantis_common.h"
 #include "zl10353.h"
 
index 5c1dd925bdd5000ed61dd59c6bcd24c76d5717c0..14f6e153000c3b0b30b01fce2f006abddbd44267 100644 (file)
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "zl10353.h"
 #include "tda665x.h"
index 07d3f1eb728bd3307409a2f0ee5b51da644e4ccc..944c3e1641579a94b78b7c634f0b4e52c230e793 100644 (file)
@@ -6,5 +6,4 @@ netup-unidvb-objs += netup_unidvb_spi.o
 
 obj-$(CONFIG_DVB_NETUP_UNIDVB) += netup-unidvb.o
 
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
index 39b08ecda1fc96e1c8e4c431b4bccc49a67670ec..3253ac324841dfb83209a32196ffa2859012b000 100644 (file)
@@ -24,7 +24,7 @@
 #include <media/v4l2-common.h>
 #include <media/v4l2-device.h>
 #include <media/videobuf2-dvb.h>
-#include <dvb_ca_en50221.h>
+#include <media/dvb_ca_en50221.h>
 
 #define NETUP_UNIDVB_NAME      "netup_unidvb"
 #define NETUP_UNIDVB_VERSION   "0.0.1"
index dbdf284970f8eb5002ba06383ebf25de819f8b2a..e4208f5ed2157ff216270335ab83f55f84676552 100644 (file)
@@ -7,7 +7,6 @@ ngene-objs := ngene-core.o ngene-i2c.o ngene-cards.o ngene-dvb.o
 
 obj-$(CONFIG_DVB_NGENE) += ngene.o
 
-ccflags-y += -Idrivers/media/dvb-core/
 ccflags-y += -Idrivers/media/dvb-frontends/
 ccflags-y += -Idrivers/media/tuners/
 
index 7c7cd217333d8af262e802081fb775ea4db2f7b4..02dbd18f92d09345df388ec01f1ea16bc7827ebc 100644 (file)
 
 #include <linux/dvb/frontend.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_ca_en50221.h"
-#include "dvb_frontend.h"
-#include "dvb_ringbuffer.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_ca_en50221.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_ringbuffer.h>
+#include <media/dvb_net.h>
 #include "cxd2099.h"
 
 #define DEVICE_NAME "ngene"
index 524bf841f42b80b07875f6a1864b321b3af8e44e..3c2aea1ac7528ca8225d3ae42b63d168bcf1b0bc 100644 (file)
@@ -1,3 +1,3 @@
 obj-$(CONFIG_DVB_PLUTO2) += pluto2.o
 
-ccflags-y += -Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/
+ccflags-y += -Idrivers/media/dvb-frontends/
index 39dcba2b620cc2eb63fa525c0aee8a6e166f69e4..ecdca0ba3e6630902790000f8d7b21481b74349d 100644 (file)
 #include <linux/dma-mapping.h>
 #include <linux/slab.h>
 
-#include "demux.h"
-#include "dmxdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
-#include "dvbdev.h"
+#include <media/demux.h>
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
+#include <media/dvbdev.h>
 #include "tda1004x.h"
 
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
index 98e391295afeb676e72c702c77cd18229a96f2c2..ab873ae088a033ef09eac5fc734c70d946fd2fb3 100644 (file)
@@ -2,4 +2,4 @@ earth-pt1-objs := pt1.o va1j5jf8007s.o va1j5jf8007t.o
 
 obj-$(CONFIG_DVB_PT1) += earth-pt1.o
 
-ccflags-y += -Idrivers/media/dvb-core -Idrivers/media/dvb-frontends
+ccflags-y += -Idrivers/media/dvb-frontends
index acc3afeb62246e7e9fb77d7c9d13e29e8328bcf4..ac16cf3b065bfcd132bc95b332e4296d2735f2ef 100644 (file)
 #include <linux/freezer.h>
 #include <linux/ratelimit.h>
 
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dmxdev.h"
-#include "dvb_net.h"
-#include "dvb_frontend.h"
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dmxdev.h>
+#include <media/dvb_net.h>
+#include <media/dvb_frontend.h>
 
 #include "va1j5jf8007t.h"
 #include "va1j5jf8007s.h"
index f75f69556be7e2fc98dfb2314c9378f152accd99..2cf776531dc643169c9edf2c9285ef60f2afcd14 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "va1j5jf8007s.h"
 
 enum va1j5jf8007s_tune_state {
index 63fda79a75c0498517c0088fa132283f05ffb9ec..d9788d153bb69f228d99eaec4261f1e60b2fdd5e 100644 (file)
@@ -21,8 +21,8 @@
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
-#include "dvb_math.h"
+#include <media/dvb_frontend.h>
+#include <media/dvb_math.h>
 #include "va1j5jf8007t.h"
 
 enum va1j5jf8007t_tune_state {
index aded8752ac2bf76a3dea1a9c77411de5ac5cb3f2..8698d5dfaf5259ae1c8f47061ea20bffc9ed36b9 100644 (file)
@@ -4,6 +4,5 @@ earth-pt3-objs += pt3.o pt3_i2c.o pt3_dma.o
 
 obj-$(CONFIG_DVB_PT3) += earth-pt3.o
 
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
 ccflags-y += -Idrivers/media/tuners
index 34044a45fecc2e06e0c648509a759bb8f91d0adc..da74828805bcceb20e0a7ae698aaf795650d43a8 100644 (file)
 #include <linux/string.h>
 #include <linux/sched/signal.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
 
 #include "pt3.h"
 
index 1b3f2ad25db37b4356ee0132c004628471f0c7ed..fbe8d9b847b043ef24c6b5cddfd5712a28f83c0a 100644 (file)
@@ -20,9 +20,9 @@
 #include <linux/atomic.h>
 #include <linux/types.h>
 
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dmxdev.h"
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dmxdev.h>
 
 #include "tc90522.h"
 #include "mxl301rf.h"
index dbaadddf432031d04d5bcfad18f2eadcefc367da..959f2766b09334c10a55968ac5bd3cf7c3504a8e 100644 (file)
@@ -14,6 +14,5 @@ obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o
 
 ccflags-y += -I$(srctree)/drivers/media/i2c
 ccflags-y += -I$(srctree)/drivers/media/tuners
-ccflags-y += -I$(srctree)/drivers/media/dvb-core
 ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
 ccflags-y += -I$(srctree)/drivers/media/usb/go7007
index 731dee0a66e7410f0d185df7b827a68bed4bc662..b55f9a1d9a63e1da973c9545e3fd847a8da13ae2 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <media/v4l2-common.h>
 #include "dvb-pll.h"
-#include <dvb_frontend.h>
+#include <media/dvb_frontend.h>
 
 #include "mt352.h"
 #include "mt352_priv.h" /* FIXME */
index 3896bcdb99d27f2c83253e6765836ac5a3bcb0de..54840d659a5d31eb58649b698bbf46b7418130bd 100644 (file)
@@ -7,7 +7,6 @@ obj-$(CONFIG_VIDEO_SAA7164) += saa7164.o
 
 ccflags-y += -I$(srctree)/drivers/media/i2c
 ccflags-y += -I$(srctree)/drivers/media/tuners
-ccflags-y += -I$(srctree)/drivers/media/dvb-core
 ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
 
 ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
index 81b3f0e1999370d527422d6890b49d1d387547b4..f3358f43195f9df0ac0bf093ebf0221d4a7a8394 100644 (file)
 
 #include <media/tuner.h>
 #include <media/tveeprom.h>
-#include <dvb_demux.h>
-#include <dvb_frontend.h>
-#include <dvb_net.h>
-#include <dvbdev.h>
-#include <dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
+#include <media/dvbdev.h>
+#include <media/dmxdev.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-ioctl.h>
 #include <media/v4l2-device.h>
index 6006aac3c41facc4496da200815c4bdf55e2931f..214ebfe12cf740ff8c2316ae52af107f716f13ab 100644 (file)
@@ -5,6 +5,5 @@ smipcie-objs    := smipcie-main.o smipcie-ir.o
 obj-$(CONFIG_DVB_SMIPCIE) += smipcie.o
 
 ccflags-y += -Idrivers/media/tuners
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
 
index c8368c78ddd513ef7ec6b1c644edf96657cad049..a6c5b1bd7edb69b62b66a4670ae77b3d30734fd7 100644 (file)
 #include <linux/slab.h>
 #include <media/rc-core.h>
 
-#include "demux.h"
-#include "dmxdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
-#include "dvbdev.h"
+#include <media/demux.h>
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
+#include <media/dvbdev.h>
 
 /* -------- Register Base -------- */
 #define    MSI_CONTROL_REG_BASE                 0x0800
index 0b805339c123b89e6899aa4263aef0199f0c88e4..58ca12732aad4f96e6a472ef081c3aa1051628bf 100644 (file)
@@ -18,5 +18,5 @@ obj-$(CONFIG_DVB_BUDGET_CI) += budget-ci.o
 obj-$(CONFIG_DVB_BUDGET_PATCH) += budget-patch.o
 obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o
 
-ccflags-y += -Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/
+ccflags-y += -Idrivers/media/dvb-frontends/
 ccflags-y += -Idrivers/media/tuners
index 6d415bdeef1877e274cf4f803370afa2d4779732..dc8e577b2f748a4d287dacaf817beed1096e903e 100644 (file)
@@ -53,7 +53,7 @@
 
 #include <linux/dvb/frontend.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "ttpci-eeprom.h"
 #include "av7110.h"
index cbb150d6cbb115e21980d4fb114f81e89e6e942e..9bfbb147171729b1880cbf75e4929f28bb1ce9fd 100644 (file)
 #include <linux/dvb/net.h>
 #include <linux/mutex.h>
 
-#include "dvbdev.h"
-#include "demux.h"
-#include "dvb_demux.h"
-#include "dmxdev.h"
+#include <media/dvbdev.h>
+#include <media/demux.h>
+#include <media/dvb_demux.h>
+#include <media/dmxdev.h>
 #include "dvb_filter.h"
-#include "dvb_net.h"
-#include "dvb_ringbuffer.h"
-#include "dvb_frontend.h"
+#include <media/dvb_net.h>
+#include <media/dvb_ringbuffer.h>
+#include <media/dvb_frontend.h>
 #include "ves1820.h"
 #include "ves1x93.h"
 #include "stv0299.h"
index ac83fff9fe0b6dc9f384f5ba3f85f8406ad20f1e..6b0e09ca01dcfb6e7d5ffb2f70645ac7315689fb 100644 (file)
@@ -51,7 +51,7 @@
 #include <linux/input.h>
 #include <linux/spinlock.h>
 
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 
 #define DEBICICAM              0x02420000
 
index 57af11804fd63b212a7080fbcd59456a3c5e07e3..f67ed118f273076c3df88bd33cf5e9436a8d49cc 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "budget.h"
 
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 #include "stv0299.h"
 #include "stv0297.h"
 #include "tda1004x.h"
index fae83866b199b518a072463a47ebeecb091bb2ec..a7463daf39f15f01a0bb868a831e61c670990f06 100644 (file)
@@ -3,13 +3,13 @@
 #ifndef __BUDGET_DVB__
 #define __BUDGET_DVB__
 
-#include "dvb_frontend.h"
-#include "dvbdev.h"
-#include "demux.h"
-#include "dvb_demux.h"
-#include "dmxdev.h"
+#include <media/dvb_frontend.h>
+#include <media/dvbdev.h>
+#include <media/demux.h>
+#include <media/dvb_demux.h>
+#include <media/dmxdev.h>
 #include "dvb_filter.h"
-#include "dvb_net.h"
+#include <media/dvb_net.h>
 
 #include <linux/module.h>
 #include <linux/mutex.h>
index 3d410d02a987f297524a2b7a1d72cc985831eae4..67a3c6333bca3ad713a449dbcb28baf1cf5fb26e 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <linux/slab.h>
 
-#include "demux.h"
+#include <media/demux.h>
 
 typedef int (dvb_filter_pes2ts_cb_t) (void *, unsigned char *);
 
index b642b4fd504550eeced15592d73111198995cae5..927dd930c9439ac315ff7c0219e63aa7a4e8951d 100644 (file)
@@ -6,5 +6,5 @@ obj-$(CONFIG_DVB_C8SECTPFE) += c8sectpfe.o
 
 ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/common
-ccflags-y += -Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/ \
-               -Idrivers/media/tuners/
+ccflags-y += -Idrivers/media/dvb-frontends/
+ccflags-y += -Idrivers/media/tuners/
index c64909e5ab6467ec028f9040f54ca69207501d8b..5df67da25525cbfec8b5890fdd626f634408a6f0 100644 (file)
 #include <linux/time.h>
 #include <linux/wait.h>
 
-#include "dmxdev.h"
-#include "dvbdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvbdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #include "c8sectpfe-common.h"
 #include "c8sectpfe-core.h"
index 694f63832d3f483732469c0647c8d85d4a647315..5ab7ca448cf98c5bcd121399a1dd45c19b9ea760 100644 (file)
 #include <linux/gpio.h>
 #include <linux/version.h>
 
-#include "dmxdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 /* Maximum number of channels */
 #define C8SECTPFE_MAXADAPTER (4)
index 34a9cca6b7078295d7d19964743eab5e68671584..3c05b3dc49ec0878912074754d8d772e1a933101 100644 (file)
 #include "c8sectpfe-core.h"
 #include "c8sectpfe-common.h"
 #include "c8sectpfe-debugfs.h"
-#include "dmxdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 
 #define FIRMWARE_MEMDMA "pti_memdma_h407.elf"
 MODULE_FIRMWARE(FIRMWARE_MEMDMA);
index cb5f71b3bd780eec71ef1097727bf9918e36e9f7..0ff21f1c7eed2989ed4d2a441d19aecfaae18cb1 100644 (file)
@@ -44,5 +44,4 @@ obj-$(CONFIG_MEDIA_TUNER_QM1D1C0042) += qm1d1c0042.o
 obj-$(CONFIG_MEDIA_TUNER_M88RS6000T) += m88rs6000t.o
 obj-$(CONFIG_MEDIA_TUNER_TDA18250) += tda18250.o
 
-ccflags-y += -I$(srctree)/drivers/media/dvb-core
 ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
index aa9340c05b431ffe35c18186f5d9f97527144b2b..9a65208c5bc3807aa283d41785062e01cde6603b 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef E4000_H
 #define E4000_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /*
  * I2C address
index a36871c44c8cef8cc732a98e4aacc9b982b960d7..ebae37cc6f5f75af47814177f1f547321ecc9dab 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef LINUX_FC0011_H_
 #define LINUX_FC0011_H_
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 
 /** struct fc0011_config - fc0011 hardware config
index 64d07a2adb2ef4ec133a8dea56ea8f1f6714792f..29e84c434de1fb484a2bc2f852cb52018adebc25 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _FC0012_H_
 #define _FC0012_H_
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "fc001x-common.h"
 
 struct fc0012_config {
index 4431e7ceb43da3f3bd20cd57893d6d6523dd711a..2d039250c783c743f34ef320aed383f5e7aed9ba 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef _FC0013_H_
 #define _FC0013_H_
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "fc001x-common.h"
 
 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_FC0013)
index 862ea46995d75635cb7098e1ddd579ff38b83685..a04fba6b0b8a17694c45b0b46471bad35d3c6ea7 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef FC2580_H
 #define FC2580_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include <media/v4l2-subdev.h>
 #include <linux/i2c.h>
 
index 226f657228fbbd5a0f12166c1ffec6745d17d8c8..3cb219a4a64532c00e4a489723ca192f8f768d81 100644 (file)
@@ -19,7 +19,7 @@
 #ifndef IT913X_H
 #define IT913X_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /**
  * struct it913x_platform_data - Platform data for the it913x driver
index 264c13e2cd39007b7cfc6eb490ae2cb17aa14049..318b48c8f843ae58c63fa99741dcfff23f27703c 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _M88RS6000T_H_
 #define _M88RS6000T_H_
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct m88rs6000t_config {
        /*
index a86c081149154d29df8c7234d6de3b1ecd4149c0..20ceb72e530bb56ff00e84f7e0ecf31f169bedd8 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/i2c.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "max2165.h"
 #include "max2165_priv.h"
index 12f545ef12430824e402ca19b8db47d57e38432a..403c6b2aa53b60940ceee19142f25bf0beeee1c3 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/i2c.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "mc44s803.h"
 #include "mc44s803_priv.h"
index 4983eeb39f369c961cfdf86b69a870d98727e736..3d3c6815b6a7f565ea1baba3343923750ddcbd88 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/i2c.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "mt2060.h"
 #include "mt2060_priv.h"
index 0e3e3b0525bb12ae19a7638537ba11855236b64a..30d03cd76061449ee814f04073020482a776925b 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef __MT2063_H__
 #define __MT2063_H__
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct mt2063_config {
        u8 tuner_address;
index 9912362b415ea646ed43b8c32ed90bd4ae479d39..3cc41a57dca9eca7e02aa4aad3bb39b1a20c5822 100644 (file)
@@ -18,7 +18,7 @@
 #define __MT20XX_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_MT20XX)
 extern struct dvb_frontend *microtune_attach(struct dvb_frontend *fe,
index dd85d58fa8d05b75ccedffff9276e28d387eed09..659bf19dc4340cfbb3b55221ecc458fee6b065e8 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/i2c.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "mt2131.h"
 #include "mt2131_priv.h"
index 88edcc031e3c1613f3bf03648058cab3fa85a5fd..f4545b7f5da24c009eeddecadd5c0eaa91133777 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/i2c.h>
 #include <linux/slab.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "mt2266.h"
 
 #define I2C_ADDRESS 0x60
index 19e68405f00df069683401ee390dce2f337e6406..d32d4e8dc4488eabbfee59141fa8889ad1550c65 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef MXL301RF_H
 #define MXL301RF_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct mxl301rf_config {
        struct dvb_frontend *fe;
index 77a0fa1d1a2f5c3ac44f637c44e06e9791b5109e..57c6d90610722088325d3a1ae7c77ed5f93054b8 100644 (file)
@@ -63,7 +63,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "mxl5005s.h"
 
 static int debug;
index d842734f2dcd865b169ed38e00428ae1f68dc11c..9ac0811a162e5f3e4639bda8ff1e374194db771e 100644 (file)
@@ -24,7 +24,7 @@
 #define __MXL5005S_H
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct mxl5005s_config {
 
index 273f61aeb8be34f6062d81539dbfad259b2f78f9..f7f16b86fcaeeac9bf3c31329d914c324052fc38 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef __MXL5007T_H__
 #define __MXL5007T_H__
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /* ------------------------------------------------------------------------- */
 
index 4f5c18816c44f4941a0be23a35904616cb097795..8331f8baa094801f89bbe8eef8c3d146837e7f57 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef QM1D1C0042_H
 #define QM1D1C0042_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 
 struct qm1d1c0042_config {
index 276e59e8503261e9d0fdfa1e6bf83a517f3d89d9..24216c2a81545165269bccd95bb1349b21d16622 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef QT1010_H
 #define QT1010_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct qt1010_config {
        u8 i2c_address;
index fdcab91405de6690a6fbf0f73fa7af76cdbb2ee5..4f91dbb29c3a3b334b28e05e0fd1282f747ad4b1 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef R820T_H
 #define R820T_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 enum r820t_chip {
        CHIP_R820T,
index 76807f5b3cf804ff8f9aa6a1ee1f1c151c098db1..de597fa47db6475d29eb81adb04366831e991fe1 100644 (file)
@@ -18,7 +18,7 @@
 #define SI2157_H
 
 #include <media/media-device.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /*
  * I2C address
index 6391dafd0c9d02b48ba81df0e243f82ab61c4a75..9ed4367c21fc25580c7a38103a6c393a4ec0ceb9 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef TDA18212_H
 #define TDA18212_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct tda18212_config {
        u16 if_dvbt_6;
index 9c0e3fd7ed7f86eadcaf3cbf6a80439c276ef12f..0427c6f34c40cedfae6c237b7f7c9e5aae965469 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef TDA18218_H
 #define TDA18218_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct tda18218_config {
        u8 i2c_address;
index fb569060876f959b38d1a702943e80e90c5de834..961806a81f9fe49ea9bbe184dfb7dbff90573f1c 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <linux/kconfig.h>
 #include <media/media-device.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #define TDA18250_XTAL_FREQ_16MHZ 0
 #define TDA18250_XTAL_FREQ_24MHZ 1
index 0a846333ce57cd289c8bb7f62462c4c7949f7bed..7e07966c5ace93428a28be1647f6dc11ba91a629 100644 (file)
@@ -22,7 +22,7 @@
 #define __TDA18271_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 struct tda18271_std_map_item {
        u16 if_freq;
index abf2e2fe53507b6fcff3d3435e305df8b244a2e0..264e80bd7e24783fb16476c616aeae916729dc5e 100644 (file)
@@ -25,7 +25,7 @@
 #define __DVB_TDA827X_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "tda8290.h"
 
 struct tda827x_config
index 901b8cac7105e27eaa0e28a5ec6d6a35a1794999..5db79f16ad7d8a3a10841a87d203003b806abe40 100644 (file)
@@ -18,7 +18,7 @@
 #define __TDA8290_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "tda18271.h"
 
 enum tda8290_lna {
index 95070eca02ca179432d93cfe725e0e97c597ef69..2a143f8c6477c88a66c13e447bd44057dc70538f 100644 (file)
@@ -18,7 +18,7 @@
 #define __TDA9887_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /* ------------------------------------------------------------------------ */
 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_TDA9887)
index 2d624d9919e3a263806a4b8eb3425592e7a22074..4bcf835fc61396de173b9d7ecc6266d7e38bec6f 100644 (file)
@@ -18,7 +18,7 @@
 #define __TEA5761_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_TEA5761)
 extern int tea5761_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr);
index 4f6f6c92db78b6d76938a153f78a0d297478be5e..216a3192a35f4ae6cbf6e1a03f18aa9c3e00dfad 100644 (file)
@@ -18,7 +18,7 @@
 #define __TEA5767_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 enum tea5767_xtal {
        TEA5767_LOW_LO_32768    = 0,
index 7b0548181cdcab648a2f5cda00885473b8cd8bfa..4df2c16592fb8ee66fbec4d39d75c6c8d13570b3 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef TUA9001_H
 #define TUA9001_H
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /*
  * I2C address
index 6399b45b0590b80835b95fe350411d1a509332b4..fd71b3490dc88178061ff19e14b2f33c14c2d432 100644 (file)
@@ -18,7 +18,7 @@
 #define __TUNER_SIMPLE_H__
 
 #include <linux/i2c.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_SIMPLE)
 extern struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe,
index ae739f842c2de5fd5f4ca6148af1eff70c509e05..8cda36a0b20b856307505ea341e8ac0a8ba23e10 100644 (file)
@@ -20,7 +20,7 @@
 #include "tuner-xc2028-types.h"
 
 #include <linux/dvb/frontend.h>
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 /* Max transfer size done by I2C transfer functions */
 #define MAX_XFER_SIZE  80
index d8378f9960a553ebb4a332ee4716b4419edeff42..cd96288aff546aeb60b92afe0bdb6bf52591625b 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef __TUNER_XC2028_H__
 #define __TUNER_XC2028_H__
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #define XC2028_DEFAULT_FIRMWARE "xc3028-v27.fw"
 #define XC3028L_DEFAULT_FIRMWARE "xc3028L-v36.fw"
index 2113ce594f75e2f772acbfb2a3b05fa130c304ed..f0fa8da08afa781939502f0d4575ca31b081776e 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/mutex.h>
 #include <asm/unaligned.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "xc4000.h"
 #include "tuner-i2c.h"
index 98ba177dbc29b453326767f564f48b45d10c9dbb..f7a8d05d1758cc7063fb1fd87cd102fcacb96a98 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/dvb/frontend.h>
 #include <linux/i2c.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "xc5000.h"
 #include "tuner-i2c.h"
index 56bd2d00b9200587926718a93cb863550e447c1d..b0b319622edbfead811d0dfb114ae4698a294199 100644 (file)
@@ -4,5 +4,4 @@ dvb-as102-objs := as102_drv.o as102_fw.o as10x_cmd.o as10x_cmd_stream.o \
 
 obj-$(CONFIG_DVB_AS102) += dvb-as102.o
 
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
index 9dd7c7cb06b140d0d6355e01229155493bbbb29e..48b0c4e4dac1be3064cfb3ab191e18e590bba810 100644 (file)
@@ -27,7 +27,7 @@
 #include "as10x_cmd.h"
 #include "as102_fe.h"
 #include "as102_fw.h"
-#include "dvbdev.h"
+#include <media/dvbdev.h>
 
 int dual_tuner;
 module_param_named(dual_tuner, dual_tuner, int, 0644);
index 8def19d9ab921698af30fef7bf7ce5529e097c0b..c92a1e4f6a2041f242cce496611e25d3688719a4 100644 (file)
@@ -16,9 +16,9 @@
 #ifndef _AS102_DRV_H
 #define _AS102_DRV_H
 #include <linux/usb.h>
-#include <dvb_demux.h>
-#include <dvb_frontend.h>
-#include <dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dmxdev.h>
 #include "as10x_handle.h"
 #include "as10x_cmd.h"
 #include "as102_usb_drv.h"
index c06ef6601f2daefca07916a5a835ca787f477ad7..5691881c56c039f89c6c29f2f85860cf6553a4fc 100644 (file)
@@ -12,7 +12,6 @@ endif
 obj-$(CONFIG_VIDEO_AU0828) += au0828.o
 
 ccflags-y += -Idrivers/media/tuners
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
 
 ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
index f6f37e8ef51dae2b5dc455287588f611070c3463..9e3c1237a274ddf14f5a1e699a61bab4a36870b3 100644 (file)
 #include <media/media-device.h>
 
 /* DVB */
-#include "demux.h"
-#include "dmxdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
-#include "dvbdev.h"
+#include <media/demux.h>
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
+#include <media/dvbdev.h>
 
 #include "au0828-reg.h"
 #include "au0828-cards.h"
index 2778c19a45eb90d0fa640829044f72e94b02bfda..f3cef05f37b6a56bd2a1904ccf9d18fa12f19170 100644 (file)
@@ -1,5 +1,4 @@
 b2c2-flexcop-usb-objs := flexcop-usb.o
 obj-$(CONFIG_DVB_B2C2_FLEXCOP_USB) += b2c2-flexcop-usb.o
 
-ccflags-y += -Idrivers/media/dvb-core/
 ccflags-y += -Idrivers/media/common/b2c2/
index 19e8c35d6a7786bd8381fd463108144ae5d5f544..79cf46eb151ad51db8857f9564a1f3a53e6d57a1 100644 (file)
@@ -11,6 +11,5 @@ obj-$(CONFIG_VIDEO_CX231XX_DVB) += cx231xx-dvb.o
 
 ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
 ccflags-y += -Idrivers/media/usb/dvb-usb
index 99c8b1a47a0c4e6edc81bc0389d9dd8b2f0fdfb0..f9ec7fedcd5bcf5353ce5df17975562c83ba6a04 100644 (file)
@@ -31,7 +31,7 @@
 #include <media/v4l2-common.h>
 
 #include <media/drv-intf/cx25840.h>
-#include "dvb-usb-ids.h"
+#include <media/dvb-usb-ids.h>
 #include "xc5000.h"
 #include "tda18271.h"
 
index 936542cb059a7bb70772a8a312d0f8deb6734b30..0b6ac509fdb15574328eb3dc9f1c15c2b13baf82 100644 (file)
@@ -39,7 +39,7 @@
 #include <media/drv-intf/msp3400.h>
 #include <media/tuner.h>
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 
 #include "cx231xx-vbi.h"
 
index bed44601f3245b3c084beff545cdfcc8118ae6ae..58c0140e19de283bc770e0fedf8c379f56c83f2f 100644 (file)
@@ -44,7 +44,6 @@ obj-$(CONFIG_DVB_USB_DVBSKY) += dvb-usb-dvbsky.o
 dvb-usb-zd1301-objs := zd1301.o
 obj-$(CONFIG_DVB_USB_ZD1301) += zd1301.o
 
-ccflags-y += -I$(srctree)/drivers/media/dvb-core
 ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
 ccflags-y += -I$(srctree)/drivers/media/tuners
 ccflags-y += -I$(srctree)/drivers/media/common
index 393e2fce2aed04a880e5de81344fca359a2ebbde..2312c55619ca8380c6618c208c968c88f7ca369b 100644 (file)
@@ -32,7 +32,7 @@
 
 #define DVB_USB_LOG_PREFIX "anysee"
 #include "dvb_usb.h"
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 
 enum cmd {
        CMD_I2C_READ            = 0x33,
index 1414d59e85ba781d39d65f98fea76d785df0c904..746926364535d4b64b6446b756b92cd3e8ed5195 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "drxk.h"
 #include "mt2063.h"
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 #include "dvb_usb.h"
 #include "cypress_firmware.h"
 
index 0005bdb2207d270d523f9f4a313cc5177a3ce747..d2e80537b2f72e5e791e53a0396e221f61c75ce8 100644 (file)
 #include <media/rc-core.h>
 #include <media/media-device.h>
 
-#include "dvb_frontend.h"
-#include "dvb_demux.h"
-#include "dvb_net.h"
-#include "dmxdev.h"
-#include "dvb-usb-ids.h"
+#include <media/dvb_frontend.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_net.h>
+#include <media/dmxdev.h>
+#include <media/dvb-usb-ids.h>
 
 /*
  * device file: /dev/dvb/adapter[0-1]/frontend[0-2]
index 9cb4972ce7a3ef0dc6dc946b82827e26703dcaca..95888b8885c4cedbebe229b72c71a975b79bd307 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef __MXL111SF_DEMOD_H__
 #define __MXL111SF_DEMOD_H__
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "mxl111sf.h"
 
 struct mxl111sf_demod_config {
index 11ea07a7327180cc508a468ce196c74f9c0690c4..87c1b16421150a8a3619c5c67c06dc6b617af626 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef __MXL111SF_TUNER_H__
 #define __MXL111SF_TUNER_H__
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "mxl111sf.h"
 
 enum mxl_if_freq {
index 16de1e4f36a44457a724ee3ab69778a6c00937ee..9ad2618408eff4721021e66f0f56b0ad052e1b83 100644 (file)
@@ -80,7 +80,6 @@ obj-$(CONFIG_DVB_USB_AZ6027) += dvb-usb-az6027.o
 dvb-usb-technisat-usb2-objs := technisat-usb2.o
 obj-$(CONFIG_DVB_USB_TECHNISAT_USB2) += dvb-usb-technisat-usb2.o
 
-ccflags-y += -I$(srctree)/drivers/media/dvb-core
 ccflags-y += -I$(srctree)/drivers/media/dvb-frontends/
 # due to tuner-xc3028
 ccflags-y += -I$(srctree)/drivers/media/tuners
index 2e711362847e4afcc56f57e36c8ab9e2b910504a..96bbb53a4a91d2247ec111ba2ae10acc16480ce9 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "stb6100.h"
 #include "stb6100_cfg.h"
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 
 int dvb_usb_az6027_debug;
 module_param_named(debug, dvb_usb_az6027_debug, int, 0644);
index e71fc86b4fb2dd170a4e7e7ca115b8d8dcdd07b5..317ed6a82d194f309fe0ceea5bf1ec2468221f22 100644 (file)
 #include <linux/mutex.h>
 #include <media/rc-core.h>
 
-#include "dvb_frontend.h"
-#include "dvb_demux.h"
-#include "dvb_net.h"
-#include "dmxdev.h"
+#include <media/dvb_frontend.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_net.h>
+#include <media/dmxdev.h>
 
 #include "dvb-pll.h"
 
-#include "dvb-usb-ids.h"
+#include <media/dvb-usb-ids.h>
 
 /* debug */
 #ifdef CONFIG_DVB_USB_DEBUG
index b421329b21fae5a6b41af48b0e59377d70bc88d5..346946f35b1a5141dfe4c372747872cfb3d04fee 100644 (file)
@@ -13,7 +13,7 @@
  *
  * see Documentation/dvb/README.dvb-usb for more information
  */
-#include "dvb-usb-ids.h"
+#include <media/dvb-usb-ids.h>
 #include "dw2102.h"
 #include "si21xx.h"
 #include "stv0299.h"
index 3b7f8298b24dba5fb3b49198097cbcff46b43743..0af74383083d25ece0606a4826e5d9053b29d5ed 100644 (file)
@@ -26,7 +26,7 @@
 /* FE Power */
 #include "lnbp22.h"
 
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 #include "ttpci-eeprom.h"
 
 static int debug;
index e7020f245f53da9be87949fd5265915400d6eccd..12de89665d6053a834542c46f9ca1926eba926ab 100644 (file)
@@ -34,7 +34,7 @@
 #include "tda827x.h"
 #include "lnbp21.h"
 /* CA */
-#include "dvb_ca_en50221.h"
+#include <media/dvb_ca_en50221.h>
 
 /* debug */
 static int dvb_usb_ttusb2_debug;
index 86bfc35e2ed4066171cd35fd0b593d0f9bc7f9f5..c3d3570584e15782863ae504a689f1b59701d8ba 100644 (file)
@@ -13,5 +13,4 @@ obj-$(CONFIG_VIDEO_EM28XX_RC) += em28xx-rc.o
 
 ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
index c4abf516c4ffc22069636751e8873094656440f7..8a81c94a8a278ac0931690d562106105e666e128 100644 (file)
@@ -28,9 +28,9 @@
 #include <linux/usb.h>
 
 #include <media/v4l2-common.h>
-#include <dvb_demux.h>
-#include <dvb_net.h>
-#include <dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_net.h>
+#include <media/dmxdev.h>
 #include <media/tuner.h>
 #include "tuner-simple.h"
 #include <linux/gpio.h>
index 0d84064036b2a054855efdafa3224904fc1779af..552e4f12c496ec69d5ae0c4c032fc8c176856c66 100644 (file)
@@ -19,5 +19,4 @@ obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2.o
 
 ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
index 56c750535ee7e6f11ad455800a29d6be6ed28bdb..4b32b214116959a699121ab8a3c930346f313648 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/freezer.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
-#include "dvbdev.h"
+#include <media/dvbdev.h>
 #include "pvrusb2-debug.h"
 #include "pvrusb2-hdw-internal.h"
 #include "pvrusb2-hdw.h"
index b500c86d41789988298de459da7121f54155ea27..e7f71fb94a6ee211c8d9b5654c1a39a3a9a03590 100644 (file)
@@ -2,10 +2,10 @@
 #ifndef __PVRUSB2_DVB_H__
 #define __PVRUSB2_DVB_H__
 
-#include "dvb_frontend.h"
-#include "dvb_demux.h"
-#include "dvb_net.h"
-#include "dmxdev.h"
+#include <media/dvb_frontend.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_net.h>
+#include <media/dmxdev.h>
 #include "pvrusb2-context.h"
 
 #define PVR2_DVB_BUFFER_COUNT 32
index 758b6a090c5955c86d84d01e902b666fa86cf21b..7d48864e2782a7169c93c2b616c70498e8a82749 100644 (file)
@@ -1,6 +1,5 @@
 obj-$(CONFIG_SMS_USB_DRV) += smsusb.o
 
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/common/siano
 ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
 
index 05322a72e862db700d3252b3951671396f32fb6e..62f8528daef2e358e83ac31e368d54a8edb54bdd 100644 (file)
@@ -12,5 +12,4 @@ obj-$(CONFIG_VIDEO_TM6000_DVB) += tm6000-dvb.o
 
 ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
-ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
index 16d3c81e4eb9591f607c357e08b3cd1340fe6d3d..23a0ceb4bfea8e9a018709da100ad57459c9543a 100644 (file)
@@ -19,9 +19,9 @@
 #include <media/v4l2-fh.h>
 
 #include <linux/dvb/frontend.h>
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dmxdev.h"
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dmxdev.h>
 
 /* Inputs */
 enum tm6000_itype {
index f47bbf62dcde131c4e2c91d981732a70b4bfb59a..fe4372dddd0e8da75b0adf497824618a285daeff 100644 (file)
@@ -1,3 +1,3 @@
 obj-$(CONFIG_DVB_TTUSB_BUDGET) += dvb-ttusb-budget.o
 
-ccflags-y += -Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends
+ccflags-y += -Idrivers/media/dvb-frontends
index a142b9dc0feb2bb99be8cc728dc369710a5825a4..6cef56d0ecc9aeb6a067b624501a6f7c81742b9d 100644 (file)
 #include <linux/mutex.h>
 #include <linux/firmware.h>
 
-#include "dvb_frontend.h"
-#include "dmxdev.h"
-#include "dvb_demux.h"
-#include "dvb_net.h"
+#include <media/dvb_frontend.h>
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_net.h>
 #include "ves1820.h"
 #include "cx22700.h"
 #include "tda1004x.h"
index 5352740d2353c92eb0949000bddffb7a77a4d8c7..dde9168b5e5f5a5f7333a005d76537b0d70025aa 100644 (file)
@@ -1,3 +1 @@
 obj-$(CONFIG_DVB_TTUSB_DEC) += ttusb_dec.o ttusbdecfe.o
-
-ccflags-y += -Idrivers/media/dvb-core/
index cdefb5dfbbdcda39fbe1bbc840c5042836d3bc15..3d176883168d31b6b00ef018ef3101face542cca 100644 (file)
 
 #include <linux/mutex.h>
 
-#include "dmxdev.h"
-#include "dvb_demux.h"
-#include "dvb_frontend.h"
-#include "dvb_net.h"
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_frontend.h>
+#include <media/dvb_net.h>
 #include "ttusbdecfe.h"
 
 static int debug;
index 09693caa15e2c3633449f645bd91e6cab170f88f..6ea05d909024961be776bff0face6ecaf0ba4fce 100644 (file)
@@ -15,7 +15,7 @@
  *
  */
 
-#include "dvb_frontend.h"
+#include <media/dvb_frontend.h>
 #include "ttusbdecfe.h"
 
 
index 1618ce98467483c9df31a377a7422c10012eac45..80de2cb9c476a256634815155a4d033a428228af 100644 (file)
@@ -33,7 +33,6 @@ obj-$(CONFIG_VIDEOBUF_DMA_CONTIG) += videobuf-dma-contig.o
 obj-$(CONFIG_VIDEOBUF_VMALLOC) += videobuf-vmalloc.o
 obj-$(CONFIG_VIDEOBUF_DVB) += videobuf-dvb.o
 
-ccflags-y += -I$(srctree)/drivers/media/dvb-core
 ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
 ccflags-y += -I$(srctree)/drivers/media/tuners
 
index b2905e65057c78179b3e6f68367614c8e81bb4e6..30432c9aabc4a7a4966746944402fdc3564448dc 100644 (file)
@@ -1,5 +1,4 @@
 obj-$(CONFIG_DVB_CXD2099) += cxd2099.o
 
-ccflags-y += -Idrivers/media/dvb-core/
 ccflags-y += -Idrivers/media/dvb-frontends/
 ccflags-y += -Idrivers/media/tuners/
index aba803268e94de4c552eee69eee170d3901f8b2a..253e3155a6df8c67f82973c2c301c2cff75be9d0 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef _CXD2099_H_
 #define _CXD2099_H_
 
-#include <dvb_ca_en50221.h>
+#include <media/dvb_ca_en50221.h>
 
 struct cxd2099_cfg {
        u32 bitrate;
diff --git a/include/media/demux.h b/include/media/demux.h
new file mode 100644 (file)
index 0000000..c4df6ce
--- /dev/null
@@ -0,0 +1,589 @@
+/*
+ * demux.h
+ *
+ * The Kernel Digital TV Demux kABI defines a driver-internal interface for
+ * registering low-level, hardware specific driver to a hardware independent
+ * demux layer.
+ *
+ * Copyright (c) 2002 Convergence GmbH
+ *
+ * based on code:
+ * Copyright (c) 2000 Nokia Research Center
+ *                    Tampere, FINLAND
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __DEMUX_H
+#define __DEMUX_H
+
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/list.h>
+#include <linux/time.h>
+#include <linux/dvb/dmx.h>
+
+/*
+ * Common definitions
+ */
+
+/*
+ * DMX_MAX_FILTER_SIZE: Maximum length (in bytes) of a section/PES filter.
+ */
+
+#ifndef DMX_MAX_FILTER_SIZE
+#define DMX_MAX_FILTER_SIZE 18
+#endif
+
+/*
+ * DMX_MAX_SECFEED_SIZE: Maximum length (in bytes) of a private section feed
+ * filter.
+ */
+
+#ifndef DMX_MAX_SECTION_SIZE
+#define DMX_MAX_SECTION_SIZE 4096
+#endif
+#ifndef DMX_MAX_SECFEED_SIZE
+#define DMX_MAX_SECFEED_SIZE (DMX_MAX_SECTION_SIZE + 188)
+#endif
+
+/*
+ * TS packet reception
+ */
+
+/**
+ * enum ts_filter_type - filter type bitmap for dmx_ts_feed.set\(\)
+ *
+ * @TS_PACKET:         Send TS packets (188 bytes) to callback (default).
+ * @TS_PAYLOAD_ONLY:   In case TS_PACKET is set, only send the TS payload
+ *                     (<=184 bytes per packet) to callback
+ * @TS_DECODER:                Send stream to built-in decoder (if present).
+ * @TS_DEMUX:          In case TS_PACKET is set, send the TS to the demux
+ *                     device, not to the dvr device
+ */
+enum ts_filter_type {
+       TS_PACKET = 1,
+       TS_PAYLOAD_ONLY = 2,
+       TS_DECODER = 4,
+       TS_DEMUX = 8,
+};
+
+/**
+ * struct dmx_ts_feed - Structure that contains a TS feed filter
+ *
+ * @is_filtering:      Set to non-zero when filtering in progress
+ * @parent:            pointer to struct dmx_demux
+ * @priv:              pointer to private data of the API client
+ * @set:               sets the TS filter
+ * @start_filtering:   starts TS filtering
+ * @stop_filtering:    stops TS filtering
+ *
+ * A TS feed is typically mapped to a hardware PID filter on the demux chip.
+ * Using this API, the client can set the filtering properties to start/stop
+ * filtering TS packets on a particular TS feed.
+ */
+struct dmx_ts_feed {
+       int is_filtering;
+       struct dmx_demux *parent;
+       void *priv;
+       int (*set)(struct dmx_ts_feed *feed,
+                  u16 pid,
+                  int type,
+                  enum dmx_ts_pes pes_type,
+                  ktime_t timeout);
+       int (*start_filtering)(struct dmx_ts_feed *feed);
+       int (*stop_filtering)(struct dmx_ts_feed *feed);
+};
+
+/*
+ * Section reception
+ */
+
+/**
+ * struct dmx_section_filter - Structure that describes a section filter
+ *
+ * @filter_value: Contains up to 16 bytes (128 bits) of the TS section header
+ *               that will be matched by the section filter
+ * @filter_mask:  Contains a 16 bytes (128 bits) filter mask with the bits
+ *               specified by @filter_value that will be used on the filter
+ *               match logic.
+ * @filter_mode:  Contains a 16 bytes (128 bits) filter mode.
+ * @parent:      Pointer to struct dmx_section_feed.
+ * @priv:        Pointer to private data of the API client.
+ *
+ *
+ * The @filter_mask controls which bits of @filter_value are compared with
+ * the section headers/payload. On a binary value of 1 in filter_mask, the
+ * corresponding bits are compared. The filter only accepts sections that are
+ * equal to filter_value in all the tested bit positions.
+ */
+struct dmx_section_filter {
+       u8 filter_value[DMX_MAX_FILTER_SIZE];
+       u8 filter_mask[DMX_MAX_FILTER_SIZE];
+       u8 filter_mode[DMX_MAX_FILTER_SIZE];
+       struct dmx_section_feed *parent; /* Back-pointer */
+       void *priv; /* Pointer to private data of the API client */
+};
+
+/**
+ * struct dmx_section_feed - Structure that contains a section feed filter
+ *
+ * @is_filtering:      Set to non-zero when filtering in progress
+ * @parent:            pointer to struct dmx_demux
+ * @priv:              pointer to private data of the API client
+ * @check_crc:         If non-zero, check the CRC values of filtered sections.
+ * @set:               sets the section filter
+ * @allocate_filter:   This function is used to allocate a section filter on
+ *                     the demux. It should only be called when no filtering
+ *                     is in progress on this section feed. If a filter cannot
+ *                     be allocated, the function fails with -ENOSPC.
+ * @release_filter:    This function releases all the resources of a
+ *                     previously allocated section filter. The function
+ *                     should not be called while filtering is in progress
+ *                     on this section feed. After calling this function,
+ *                     the caller should not try to dereference the filter
+ *                     pointer.
+ * @start_filtering:   starts section filtering
+ * @stop_filtering:    stops section filtering
+ *
+ * A TS feed is typically mapped to a hardware PID filter on the demux chip.
+ * Using this API, the client can set the filtering properties to start/stop
+ * filtering TS packets on a particular TS feed.
+ */
+struct dmx_section_feed {
+       int is_filtering;
+       struct dmx_demux *parent;
+       void *priv;
+
+       int check_crc;
+
+       /* private: Used internally at dvb_demux.c */
+       u32 crc_val;
+
+       u8 *secbuf;
+       u8 secbuf_base[DMX_MAX_SECFEED_SIZE];
+       u16 secbufp, seclen, tsfeedp;
+
+       /* public: */
+       int (*set)(struct dmx_section_feed *feed,
+                  u16 pid,
+                  int check_crc);
+       int (*allocate_filter)(struct dmx_section_feed *feed,
+                              struct dmx_section_filter **filter);
+       int (*release_filter)(struct dmx_section_feed *feed,
+                             struct dmx_section_filter *filter);
+       int (*start_filtering)(struct dmx_section_feed *feed);
+       int (*stop_filtering)(struct dmx_section_feed *feed);
+};
+
+/**
+ * typedef dmx_ts_cb - DVB demux TS filter callback function prototype
+ *
+ * @buffer1:           Pointer to the start of the filtered TS packets.
+ * @buffer1_length:    Length of the TS data in buffer1.
+ * @buffer2:           Pointer to the tail of the filtered TS packets, or NULL.
+ * @buffer2_length:    Length of the TS data in buffer2.
+ * @source:            Indicates which TS feed is the source of the callback.
+ *
+ * This function callback prototype, provided by the client of the demux API,
+ * is called from the demux code. The function is only called when filtering
+ * on a TS feed has been enabled using the start_filtering\(\) function at
+ * the &dmx_demux.
+ * Any TS packets that match the filter settings are copied to a circular
+ * buffer. The filtered TS packets are delivered to the client using this
+ * callback function.
+ * It is expected that the @buffer1 and @buffer2 callback parameters point to
+ * addresses within the circular buffer, but other implementations are also
+ * possible. Note that the called party should not try to free the memory
+ * the @buffer1 and @buffer2 parameters point to.
+ *
+ * When this function is called, the @buffer1 parameter typically points to
+ * the start of the first undelivered TS packet within a circular buffer.
+ * The @buffer2 buffer parameter is normally NULL, except when the received
+ * TS packets have crossed the last address of the circular buffer and
+ * "wrapped" to the beginning of the buffer. In the latter case the @buffer1
+ * parameter would contain an address within the circular buffer, while the
+ * @buffer2 parameter would contain the first address of the circular buffer.
+ * The number of bytes delivered with this function (i.e. @buffer1_length +
+ * @buffer2_length) is usually equal to the value of callback_length parameter
+ * given in the set() function, with one exception: if a timeout occurs before
+ * receiving callback_length bytes of TS data, any undelivered packets are
+ * immediately delivered to the client by calling this function. The timeout
+ * duration is controlled by the set() function in the TS Feed API.
+ *
+ * If a TS packet is received with errors that could not be fixed by the
+ * TS-level forward error correction (FEC), the Transport_error_indicator
+ * flag of the TS packet header should be set. The TS packet should not be
+ * discarded, as the error can possibly be corrected by a higher layer
+ * protocol. If the called party is slow in processing the callback, it
+ * is possible that the circular buffer eventually fills up. If this happens,
+ * the demux driver should discard any TS packets received while the buffer
+ * is full and return -EOVERFLOW.
+ *
+ * The type of data returned to the callback can be selected by the
+ * &dmx_ts_feed.@set function. The type parameter decides if the raw
+ * TS packet (TS_PACKET) or just the payload (TS_PACKET|TS_PAYLOAD_ONLY)
+ * should be returned. If additionally the TS_DECODER bit is set the stream
+ * will also be sent to the hardware MPEG decoder.
+ *
+ * Return:
+ *
+ * - 0, on success;
+ *
+ * - -EOVERFLOW, on buffer overflow.
+ */
+typedef int (*dmx_ts_cb)(const u8 *buffer1,
+                        size_t buffer1_length,
+                        const u8 *buffer2,
+                        size_t buffer2_length,
+                        struct dmx_ts_feed *source);
+
+/**
+ * typedef dmx_section_cb - DVB demux TS filter callback function prototype
+ *
+ * @buffer1:           Pointer to the start of the filtered section, e.g.
+ *                     within the circular buffer of the demux driver.
+ * @buffer1_len:       Length of the filtered section data in @buffer1,
+ *                     including headers and CRC.
+ * @buffer2:           Pointer to the tail of the filtered section data,
+ *                     or NULL. Useful to handle the wrapping of a
+ *                     circular buffer.
+ * @buffer2_len:       Length of the filtered section data in @buffer2,
+ *                     including headers and CRC.
+ * @source:            Indicates which section feed is the source of the
+ *                     callback.
+ *
+ * This function callback prototype, provided by the client of the demux API,
+ * is called from the demux code. The function is only called when
+ * filtering of sections has been enabled using the function
+ * &dmx_ts_feed.@start_filtering. When the demux driver has received a
+ * complete section that matches at least one section filter, the client
+ * is notified via this callback function. Normally this function is called
+ * for each received section; however, it is also possible to deliver
+ * multiple sections with one callback, for example when the system load
+ * is high. If an error occurs while receiving a section, this
+ * function should be called with the corresponding error type set in the
+ * success field, whether or not there is data to deliver. The Section Feed
+ * implementation should maintain a circular buffer for received sections.
+ * However, this is not necessary if the Section Feed API is implemented as
+ * a client of the TS Feed API, because the TS Feed implementation then
+ * buffers the received data. The size of the circular buffer can be
+ * configured using the &dmx_ts_feed.@set function in the Section Feed API.
+ * If there is no room in the circular buffer when a new section is received,
+ * the section must be discarded. If this happens, the value of the success
+ * parameter should be DMX_OVERRUN_ERROR on the next callback.
+ */
+typedef int (*dmx_section_cb)(const u8 *buffer1,
+                             size_t buffer1_len,
+                             const u8 *buffer2,
+                             size_t buffer2_len,
+                             struct dmx_section_filter *source);
+
+/*
+ * DVB Front-End
+ */
+
+/**
+ * enum dmx_frontend_source - Used to identify the type of frontend
+ *
+ * @DMX_MEMORY_FE:     The source of the demux is memory. It means that
+ *                     the MPEG-TS to be filtered comes from userspace,
+ *                     via write() syscall.
+ *
+ * @DMX_FRONTEND_0:    The source of the demux is a frontend connected
+ *                     to the demux.
+ */
+enum dmx_frontend_source {
+       DMX_MEMORY_FE,
+       DMX_FRONTEND_0,
+};
+
+/**
+ * struct dmx_frontend - Structure that lists the frontends associated with
+ *                      a demux
+ *
+ * @connectivity_list: List of front-ends that can be connected to a
+ *                     particular demux;
+ * @source:            Type of the frontend.
+ *
+ * FIXME: this structure should likely be replaced soon by some
+ *     media-controller based logic.
+ */
+struct dmx_frontend {
+       struct list_head connectivity_list;
+       enum dmx_frontend_source source;
+};
+
+/*
+ * MPEG-2 TS Demux
+ */
+
+/**
+ * enum dmx_demux_caps - MPEG-2 TS Demux capabilities bitmap
+ *
+ * @DMX_TS_FILTERING:          set if TS filtering is supported;
+ * @DMX_SECTION_FILTERING:     set if section filtering is supported;
+ * @DMX_MEMORY_BASED_FILTERING:        set if write() available.
+ *
+ * Those flags are OR'ed in the &dmx_demux.capabilities field
+ */
+enum dmx_demux_caps {
+       DMX_TS_FILTERING = 1,
+       DMX_SECTION_FILTERING = 4,
+       DMX_MEMORY_BASED_FILTERING = 8,
+};
+
+/*
+ * Demux resource type identifier.
+ */
+
+/**
+ * DMX_FE_ENTRY - Casts elements in the list of registered
+ *               front-ends from the generic type struct list_head
+ *               to the type * struct dmx_frontend
+ *
+ * @list: list of struct dmx_frontend
+ */
+#define DMX_FE_ENTRY(list) \
+       list_entry(list, struct dmx_frontend, connectivity_list)
+
+/**
+ * struct dmx_demux - Structure that contains the demux capabilities and
+ *                   callbacks.
+ *
+ * @capabilities: Bitfield of capability flags.
+ *
+ * @frontend: Front-end connected to the demux
+ *
+ * @priv: Pointer to private data of the API client
+ *
+ * @open: This function reserves the demux for use by the caller and, if
+ *     necessary, initializes the demux. When the demux is no longer needed,
+ *     the function @close should be called. It should be possible for
+ *     multiple clients to access the demux at the same time. Thus, the
+ *     function implementation should increment the demux usage count when
+ *     @open is called and decrement it when @close is called.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     It returns:
+ *     0 on success;
+ *     -EUSERS, if maximum usage count was reached;
+ *     -EINVAL, on bad parameter.
+ *
+ * @close: This function reserves the demux for use by the caller and, if
+ *     necessary, initializes the demux. When the demux is no longer needed,
+ *     the function @close should be called. It should be possible for
+ *     multiple clients to access the demux at the same time. Thus, the
+ *     function implementation should increment the demux usage count when
+ *     @open is called and decrement it when @close is called.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     It returns:
+ *     0 on success;
+ *     -ENODEV, if demux was not in use (e. g. no users);
+ *     -EINVAL, on bad parameter.
+ *
+ * @write: This function provides the demux driver with a memory buffer
+ *     containing TS packets. Instead of receiving TS packets from the DVB
+ *     front-end, the demux driver software will read packets from memory.
+ *     Any clients of this demux with active TS, PES or Section filters will
+ *     receive filtered data via the Demux callback API (see 0). The function
+ *     returns when all the data in the buffer has been consumed by the demux.
+ *     Demux hardware typically cannot read TS from memory. If this is the
+ *     case, memory-based filtering has to be implemented entirely in software.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     The @buf function parameter contains a pointer to the TS data in
+ *     kernel-space memory.
+ *     The @count function parameter contains the length of the TS data.
+ *     It returns:
+ *     0 on success;
+ *     -ERESTARTSYS, if mutex lock was interrupted;
+ *     -EINTR, if a signal handling is pending;
+ *     -ENODEV, if demux was removed;
+ *     -EINVAL, on bad parameter.
+ *
+ * @allocate_ts_feed: Allocates a new TS feed, which is used to filter the TS
+ *     packets carrying a certain PID. The TS feed normally corresponds to a
+ *     hardware PID filter on the demux chip.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     The @feed function parameter contains a pointer to the TS feed API and
+ *     instance data.
+ *     The @callback function parameter contains a pointer to the callback
+ *     function for passing received TS packet.
+ *     It returns:
+ *     0 on success;
+ *     -ERESTARTSYS, if mutex lock was interrupted;
+ *     -EBUSY, if no more TS feeds is available;
+ *     -EINVAL, on bad parameter.
+ *
+ * @release_ts_feed: Releases the resources allocated with @allocate_ts_feed.
+ *     Any filtering in progress on the TS feed should be stopped before
+ *     calling this function.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     The @feed function parameter contains a pointer to the TS feed API and
+ *     instance data.
+ *     It returns:
+ *     0 on success;
+ *     -EINVAL on bad parameter.
+ *
+ * @allocate_section_feed: Allocates a new section feed, i.e. a demux resource
+ *     for filtering and receiving sections. On platforms with hardware
+ *     support for section filtering, a section feed is directly mapped to
+ *     the demux HW. On other platforms, TS packets are first PID filtered in
+ *     hardware and a hardware section filter then emulated in software. The
+ *     caller obtains an API pointer of type dmx_section_feed_t as an out
+ *     parameter. Using this API the caller can set filtering parameters and
+ *     start receiving sections.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     The @feed function parameter contains a pointer to the TS feed API and
+ *     instance data.
+ *     The @callback function parameter contains a pointer to the callback
+ *     function for passing received TS packet.
+ *     It returns:
+ *     0 on success;
+ *     -EBUSY, if no more TS feeds is available;
+ *     -EINVAL, on bad parameter.
+ *
+ * @release_section_feed: Releases the resources allocated with
+ *     @allocate_section_feed, including allocated filters. Any filtering in
+ *     progress on the section feed should be stopped before calling this
+ *     function.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     The @feed function parameter contains a pointer to the TS feed API and
+ *     instance data.
+ *     It returns:
+ *     0 on success;
+ *     -EINVAL, on bad parameter.
+ *
+ * @add_frontend: Registers a connectivity between a demux and a front-end,
+ *     i.e., indicates that the demux can be connected via a call to
+ *     @connect_frontend to use the given front-end as a TS source. The
+ *     client of this function has to allocate dynamic or static memory for
+ *     the frontend structure and initialize its fields before calling this
+ *     function. This function is normally called during the driver
+ *     initialization. The caller must not free the memory of the frontend
+ *     struct before successfully calling @remove_frontend.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     The @frontend function parameter contains a pointer to the front-end
+ *     instance data.
+ *     It returns:
+ *     0 on success;
+ *     -EINVAL, on bad parameter.
+ *
+ * @remove_frontend: Indicates that the given front-end, registered by a call
+ *     to @add_frontend, can no longer be connected as a TS source by this
+ *     demux. The function should be called when a front-end driver or a demux
+ *     driver is removed from the system. If the front-end is in use, the
+ *     function fails with the return value of -EBUSY. After successfully
+ *     calling this function, the caller can free the memory of the frontend
+ *     struct if it was dynamically allocated before the @add_frontend
+ *     operation.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     The @frontend function parameter contains a pointer to the front-end
+ *     instance data.
+ *     It returns:
+ *     0 on success;
+ *     -ENODEV, if the front-end was not found,
+ *     -EINVAL, on bad parameter.
+ *
+ * @get_frontends: Provides the APIs of the front-ends that have been
+ *     registered for this demux. Any of the front-ends obtained with this
+ *     call can be used as a parameter for @connect_frontend. The include
+ *     file demux.h contains the macro DMX_FE_ENTRY() for converting an
+ *     element of the generic type struct &list_head * to the type
+ *     struct &dmx_frontend *. The caller must not free the memory of any of
+ *     the elements obtained via this function call.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     It returns a struct list_head pointer to the list of front-end
+ *     interfaces, or NULL in the case of an empty list.
+ *
+ * @connect_frontend: Connects the TS output of the front-end to the input of
+ *     the demux. A demux can only be connected to a front-end registered to
+ *     the demux with the function @add_frontend. It may or may not be
+ *     possible to connect multiple demuxes to the same front-end, depending
+ *     on the capabilities of the HW platform. When not used, the front-end
+ *     should be released by calling @disconnect_frontend.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     The @frontend function parameter contains a pointer to the front-end
+ *     instance data.
+ *     It returns:
+ *     0 on success;
+ *     -EINVAL, on bad parameter.
+ *
+ * @disconnect_frontend: Disconnects the demux and a front-end previously
+ *     connected by a @connect_frontend call.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     It returns:
+ *     0 on success;
+ *     -EINVAL on bad parameter.
+ *
+ * @get_pes_pids: Get the PIDs for DMX_PES_AUDIO0, DMX_PES_VIDEO0,
+ *     DMX_PES_TELETEXT0, DMX_PES_SUBTITLE0 and DMX_PES_PCR0.
+ *     The @demux function parameter contains a pointer to the demux API and
+ *     instance data.
+ *     The @pids function parameter contains an array with five u16 elements
+ *     where the PIDs will be stored.
+ *     It returns:
+ *     0 on success;
+ *     -EINVAL on bad parameter.
+ */
+struct dmx_demux {
+       enum dmx_demux_caps capabilities;
+       struct dmx_frontend *frontend;
+       void *priv;
+       int (*open)(struct dmx_demux *demux);
+       int (*close)(struct dmx_demux *demux);
+       int (*write)(struct dmx_demux *demux, const char __user *buf,
+                    size_t count);
+       int (*allocate_ts_feed)(struct dmx_demux *demux,
+                               struct dmx_ts_feed **feed,
+                               dmx_ts_cb callback);
+       int (*release_ts_feed)(struct dmx_demux *demux,
+                              struct dmx_ts_feed *feed);
+       int (*allocate_section_feed)(struct dmx_demux *demux,
+                                    struct dmx_section_feed **feed,
+                                    dmx_section_cb callback);
+       int (*release_section_feed)(struct dmx_demux *demux,
+                                   struct dmx_section_feed *feed);
+       int (*add_frontend)(struct dmx_demux *demux,
+                           struct dmx_frontend *frontend);
+       int (*remove_frontend)(struct dmx_demux *demux,
+                              struct dmx_frontend *frontend);
+       struct list_head *(*get_frontends)(struct dmx_demux *demux);
+       int (*connect_frontend)(struct dmx_demux *demux,
+                               struct dmx_frontend *frontend);
+       int (*disconnect_frontend)(struct dmx_demux *demux);
+
+       int (*get_pes_pids)(struct dmx_demux *demux, u16 *pids);
+
+       /* private: */
+
+       /*
+        * Only used at av7110, to read some data from firmware.
+        * As this was never documented, we have no clue about what's
+        * there, and its usage on other drivers aren't encouraged.
+        */
+       int (*get_stc)(struct dmx_demux *demux, unsigned int num,
+                      u64 *stc, unsigned int *base);
+};
+
+#endif /* #ifndef __DEMUX_H */
diff --git a/include/media/dmxdev.h b/include/media/dmxdev.h
new file mode 100644 (file)
index 0000000..d5bef0d
--- /dev/null
@@ -0,0 +1,210 @@
+/*
+ * dmxdev.h
+ *
+ * Copyright (C) 2000 Ralph Metzler & Marcus Metzler
+ *                    for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _DMXDEV_H_
+#define _DMXDEV_H_
+
+#include <linux/types.h>
+#include <linux/spinlock.h>
+#include <linux/kernel.h>
+#include <linux/time.h>
+#include <linux/timer.h>
+#include <linux/wait.h>
+#include <linux/fs.h>
+#include <linux/string.h>
+#include <linux/mutex.h>
+#include <linux/slab.h>
+
+#include <linux/dvb/dmx.h>
+
+#include <media/dvbdev.h>
+#include <media/demux.h>
+#include <media/dvb_ringbuffer.h>
+#include <media/dvb_vb2.h>
+
+/**
+ * enum dmxdev_type - type of demux filter type.
+ *
+ * @DMXDEV_TYPE_NONE:  no filter set.
+ * @DMXDEV_TYPE_SEC:   section filter.
+ * @DMXDEV_TYPE_PES:   Program Elementary Stream (PES) filter.
+ */
+enum dmxdev_type {
+       DMXDEV_TYPE_NONE,
+       DMXDEV_TYPE_SEC,
+       DMXDEV_TYPE_PES,
+};
+
+/**
+ * enum dmxdev_state - state machine for the dmxdev.
+ *
+ * @DMXDEV_STATE_FREE:         indicates that the filter is freed.
+ * @DMXDEV_STATE_ALLOCATED:    indicates that the filter was allocated
+ *                             to be used.
+ * @DMXDEV_STATE_SET:          indicates that the filter parameters are set.
+ * @DMXDEV_STATE_GO:           indicates that the filter is running.
+ * @DMXDEV_STATE_DONE:         indicates that a packet was already filtered
+ *                             and the filter is now disabled.
+ *                             Set only if %DMX_ONESHOT. See
+ *                             &dmx_sct_filter_params.
+ * @DMXDEV_STATE_TIMEDOUT:     Indicates a timeout condition.
+ */
+enum dmxdev_state {
+       DMXDEV_STATE_FREE,
+       DMXDEV_STATE_ALLOCATED,
+       DMXDEV_STATE_SET,
+       DMXDEV_STATE_GO,
+       DMXDEV_STATE_DONE,
+       DMXDEV_STATE_TIMEDOUT
+};
+
+/**
+ * struct dmxdev_feed - digital TV dmxdev feed
+ *
+ * @pid:       Program ID to be filtered
+ * @ts:                pointer to &struct dmx_ts_feed
+ * @next:      &struct list_head pointing to the next feed.
+ */
+
+struct dmxdev_feed {
+       u16 pid;
+       struct dmx_ts_feed *ts;
+       struct list_head next;
+};
+
+/**
+ * struct dmxdev_filter - digital TV dmxdev filter
+ *
+ * @filter:    a union describing a dmxdev filter.
+ *             Currently used only for section filters.
+ * @filter.sec: a &struct dmx_section_filter pointer.
+ *             For section filter only.
+ * @feed:      a union describing a dmxdev feed.
+ *             Depending on the filter type, it can be either
+ *             @feed.ts or @feed.sec.
+ * @feed.ts:   a &struct list_head list.
+ *             For TS and PES feeds.
+ * @feed.sec:  a &struct dmx_section_feed pointer.
+ *             For section feed only.
+ * @params:    a union describing dmxdev filter parameters.
+ *             Depending on the filter type, it can be either
+ *             @params.sec or @params.pes.
+ * @params.sec:        a &struct dmx_sct_filter_params embedded struct.
+ *             For section filter only.
+ * @params.pes:        a &struct dmx_pes_filter_params embedded struct.
+ *             For PES filter only.
+ * @type:      type of the dmxdev filter, as defined by &enum dmxdev_type.
+ * @state:     state of the dmxdev filter, as defined by &enum dmxdev_state.
+ * @dev:       pointer to &struct dmxdev.
+ * @buffer:    an embedded &struct dvb_ringbuffer buffer.
+ * @mutex:     protects the access to &struct dmxdev_filter.
+ * @timer:     &struct timer_list embedded timer, used to check for
+ *             feed timeouts.
+ *             Only for section filter.
+ * @todo:      index for the @secheader.
+ *             Only for section filter.
+ * @secheader: buffer cache to parse the section header.
+ *             Only for section filter.
+ */
+struct dmxdev_filter {
+       union {
+               struct dmx_section_filter *sec;
+       } filter;
+
+       union {
+               /* list of TS and PES feeds (struct dmxdev_feed) */
+               struct list_head ts;
+               struct dmx_section_feed *sec;
+       } feed;
+
+       union {
+               struct dmx_sct_filter_params sec;
+               struct dmx_pes_filter_params pes;
+       } params;
+
+       enum dmxdev_type type;
+       enum dmxdev_state state;
+       struct dmxdev *dev;
+       struct dvb_ringbuffer buffer;
+       struct dvb_vb2_ctx vb2_ctx;
+
+       struct mutex mutex;
+
+       /* only for sections */
+       struct timer_list timer;
+       int todo;
+       u8 secheader[3];
+};
+
+/**
+ * struct dmxdev - Describes a digital TV demux device.
+ *
+ * @dvbdev:            pointer to &struct dvb_device associated with
+ *                     the demux device node.
+ * @dvr_dvbdev:                pointer to &struct dvb_device associated with
+ *                     the dvr device node.
+ * @filter:            pointer to &struct dmxdev_filter.
+ * @demux:             pointer to &struct dmx_demux.
+ * @filternum:         number of filters.
+ * @capabilities:      demux capabilities as defined by &enum dmx_demux_caps.
+ * @exit:              flag to indicate that the demux is being released.
+ * @dvr_orig_fe:       pointer to &struct dmx_frontend.
+ * @dvr_buffer:                embedded &struct dvb_ringbuffer for DVB output.
+ * @mutex:             protects the usage of this structure.
+ * @lock:              protects access to &dmxdev->filter->data.
+ */
+struct dmxdev {
+       struct dvb_device *dvbdev;
+       struct dvb_device *dvr_dvbdev;
+
+       struct dmxdev_filter *filter;
+       struct dmx_demux *demux;
+
+       int filternum;
+       int capabilities;
+
+       unsigned int exit:1;
+#define DMXDEV_CAP_DUPLEX 1
+       struct dmx_frontend *dvr_orig_fe;
+
+       struct dvb_ringbuffer dvr_buffer;
+#define DVR_BUFFER_SIZE (10*188*1024)
+
+       struct dvb_vb2_ctx dvr_vb2_ctx;
+
+       struct mutex mutex;
+       spinlock_t lock;
+};
+
+/**
+ * dvb_dmxdev_init - initializes a digital TV demux and registers both demux
+ *     and DVR devices.
+ *
+ * @dmxdev: pointer to &struct dmxdev.
+ * @adap: pointer to &struct dvb_adapter.
+ */
+int dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *adap);
+
+/**
+ * dvb_dmxdev_release - releases a digital TV demux and unregisters it.
+ *
+ * @dmxdev: pointer to &struct dmxdev.
+ */
+void dvb_dmxdev_release(struct dmxdev *dmxdev);
+
+#endif /* _DMXDEV_H_ */
diff --git a/include/media/dvb-usb-ids.h b/include/media/dvb-usb-ids.h
new file mode 100644 (file)
index 0000000..28e2be5
--- /dev/null
@@ -0,0 +1,424 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/* dvb-usb-ids.h is part of the DVB USB library.
+ *
+ * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de) see
+ * dvb-usb-init.c for copyright information.
+ *
+ * a header file containing define's for the USB device supported by the
+ * various drivers.
+ */
+#ifndef _DVB_USB_IDS_H_
+#define _DVB_USB_IDS_H_
+
+/* Vendor IDs */
+#define USB_VID_ADSTECH                                0x06e1
+#define USB_VID_AFATECH                                0x15a4
+#define USB_VID_ALCOR_MICRO                    0x058f
+#define USB_VID_ALINK                          0x05e3
+#define USB_VID_AMT                            0x1c73
+#define USB_VID_ANCHOR                         0x0547
+#define USB_VID_ANSONIC                                0x10b9
+#define USB_VID_ANUBIS_ELECTRONIC              0x10fd
+#define USB_VID_ASUS                           0x0b05
+#define USB_VID_AVERMEDIA                      0x07ca
+#define USB_VID_COMPRO                         0x185b
+#define USB_VID_COMPRO_UNK                     0x145f
+#define USB_VID_CONEXANT                       0x0572
+#define USB_VID_CYPRESS                                0x04b4
+#define USB_VID_DEXATEK                                0x1d19
+#define USB_VID_DIBCOM                         0x10b8
+#define USB_VID_DPOSH                          0x1498
+#define USB_VID_DVICO                          0x0fe9
+#define USB_VID_E3C                            0x18b4
+#define USB_VID_ELGATO                         0x0fd9
+#define USB_VID_EMPIA                          0xeb1a
+#define USB_VID_GENPIX                         0x09c0
+#define USB_VID_GRANDTEC                       0x5032
+#define USB_VID_GTEK                           0x1f4d
+#define USB_VID_HANFTEK                                0x15f4
+#define USB_VID_HAUPPAUGE                      0x2040
+#define USB_VID_HYPER_PALTEK                   0x1025
+#define USB_VID_INTEL                          0x8086
+#define USB_VID_ITETECH                                0x048d
+#define USB_VID_KWORLD                         0xeb2a
+#define USB_VID_KWORLD_2                       0x1b80
+#define USB_VID_KYE                            0x0458
+#define USB_VID_LEADTEK                                0x0413
+#define USB_VID_LITEON                         0x04ca
+#define USB_VID_MEDION                         0x1660
+#define USB_VID_MIGLIA                         0x18f3
+#define USB_VID_MSI                            0x0db0
+#define USB_VID_MSI_2                          0x1462
+#define USB_VID_OPERA1                         0x695c
+#define USB_VID_PINNACLE                       0x2304
+#define USB_VID_PCTV                           0x2013
+#define USB_VID_PIXELVIEW                      0x1554
+#define USB_VID_REALTEK                                0x0bda
+#define USB_VID_TECHNOTREND                    0x0b48
+#define USB_VID_TERRATEC                       0x0ccd
+#define USB_VID_TELESTAR                       0x10b9
+#define USB_VID_VISIONPLUS                     0x13d3
+#define USB_VID_SONY                           0x1415
+#define USB_PID_TEVII_S421                     0xd421
+#define USB_PID_TEVII_S480_1                   0xd481
+#define USB_PID_TEVII_S480_2                   0xd482
+#define USB_PID_TEVII_S630                     0xd630
+#define USB_PID_TEVII_S632                     0xd632
+#define USB_PID_TEVII_S650                     0xd650
+#define USB_PID_TEVII_S660                     0xd660
+#define USB_PID_TEVII_S662                     0xd662
+#define USB_VID_TWINHAN                                0x1822
+#define USB_VID_ULTIMA_ELECTRONIC              0x05d8
+#define USB_VID_UNIWILL                                0x1584
+#define USB_VID_WIDEVIEW                       0x14aa
+#define USB_VID_GIGABYTE                       0x1044
+#define USB_VID_YUAN                           0x1164
+#define USB_VID_XTENSIONS                      0x1ae7
+#define USB_VID_ZYDAS                          0x0ace
+#define USB_VID_HUMAX_COEX                     0x10b9
+#define USB_VID_774                            0x7a69
+#define USB_VID_EVOLUTEPC                      0x1e59
+#define USB_VID_AZUREWAVE                      0x13d3
+#define USB_VID_TECHNISAT                      0x14f7
+#define USB_VID_HAMA                           0x147f
+#define USB_VID_MICROSOFT                      0x045e
+
+/* Product IDs */
+#define USB_PID_ADSTECH_USB2_COLD                      0xa333
+#define USB_PID_ADSTECH_USB2_WARM                      0xa334
+#define USB_PID_AFATECH_AF9005                         0x9020
+#define USB_PID_AFATECH_AF9015_9015                    0x9015
+#define USB_PID_AFATECH_AF9015_9016                    0x9016
+#define USB_PID_AFATECH_AF9035_1000                    0x1000
+#define USB_PID_AFATECH_AF9035_1001                    0x1001
+#define USB_PID_AFATECH_AF9035_1002                    0x1002
+#define USB_PID_AFATECH_AF9035_1003                    0x1003
+#define USB_PID_AFATECH_AF9035_9035                    0x9035
+#define USB_PID_TREKSTOR_DVBT                          0x901b
+#define USB_PID_TREKSTOR_TERRES_2_0                    0xC803
+#define USB_VID_ALINK_DTU                              0xf170
+#define USB_PID_ANSONIC_DVBT_USB                       0x6000
+#define USB_PID_ANYSEE                                 0x861f
+#define USB_PID_AZUREWAVE_AD_TU700                     0x3237
+#define USB_PID_AZUREWAVE_6007                         0x0ccd
+#define USB_PID_AVERMEDIA_DVBT_USB_COLD                        0x0001
+#define USB_PID_AVERMEDIA_DVBT_USB_WARM                        0x0002
+#define USB_PID_AVERMEDIA_DVBT_USB2_COLD               0xa800
+#define USB_PID_AVERMEDIA_DVBT_USB2_WARM               0xa801
+#define USB_PID_COMPRO_DVBU2000_COLD                   0xd000
+#define USB_PID_COMPRO_DVBU2000_WARM                   0xd001
+#define USB_PID_COMPRO_DVBU2000_UNK_COLD               0x010c
+#define USB_PID_COMPRO_DVBU2000_UNK_WARM               0x010d
+#define USB_PID_COMPRO_VIDEOMATE_U500                  0x1e78
+#define USB_PID_COMPRO_VIDEOMATE_U500_PC               0x1e80
+#define USB_PID_CONCEPTRONIC_CTVDIGRCU                 0xe397
+#define USB_PID_CONEXANT_D680_DMB                      0x86d6
+#define USB_PID_CREATIX_CTX1921                                0x1921
+#define USB_PID_DELOCK_USB2_DVBT                       0xb803
+#define USB_PID_DIBCOM_HOOK_DEFAULT                    0x0064
+#define USB_PID_DIBCOM_HOOK_DEFAULT_REENUM             0x0065
+#define USB_PID_DIBCOM_MOD3000_COLD                    0x0bb8
+#define USB_PID_DIBCOM_MOD3000_WARM                    0x0bb9
+#define USB_PID_DIBCOM_MOD3001_COLD                    0x0bc6
+#define USB_PID_DIBCOM_MOD3001_WARM                    0x0bc7
+#define USB_PID_DIBCOM_STK7700P                                0x1e14
+#define USB_PID_DIBCOM_STK7700P_PC                     0x1e78
+#define USB_PID_DIBCOM_STK7700D                                0x1ef0
+#define USB_PID_DIBCOM_STK7700_U7000                   0x7001
+#define USB_PID_DIBCOM_STK7070P                                0x1ebc
+#define USB_PID_DIBCOM_STK7070PD                       0x1ebe
+#define USB_PID_DIBCOM_STK807XP                                0x1f90
+#define USB_PID_DIBCOM_STK807XPVR                      0x1f98
+#define USB_PID_DIBCOM_STK8096GP                        0x1fa0
+#define USB_PID_DIBCOM_STK8096PVR                       0x1faa
+#define USB_PID_DIBCOM_NIM8096MD                        0x1fa8
+#define USB_PID_DIBCOM_TFE8096P                                0x1f9C
+#define USB_PID_DIBCOM_ANCHOR_2135_COLD                        0x2131
+#define USB_PID_DIBCOM_STK7770P                                0x1e80
+#define USB_PID_DIBCOM_NIM7090                         0x1bb2
+#define USB_PID_DIBCOM_TFE7090PVR                      0x1bb4
+#define USB_PID_DIBCOM_TFE7790P                                0x1e6e
+#define USB_PID_DIBCOM_NIM9090M                                0x2383
+#define USB_PID_DIBCOM_NIM9090MD                       0x2384
+#define USB_PID_DPOSH_M9206_COLD                       0x9206
+#define USB_PID_DPOSH_M9206_WARM                       0xa090
+#define USB_PID_E3C_EC168                              0x1689
+#define USB_PID_E3C_EC168_2                            0xfffa
+#define USB_PID_E3C_EC168_3                            0xfffb
+#define USB_PID_E3C_EC168_4                            0x1001
+#define USB_PID_E3C_EC168_5                            0x1002
+#define USB_PID_FREECOM_DVBT                           0x0160
+#define USB_PID_FREECOM_DVBT_2                         0x0161
+#define USB_PID_UNIWILL_STK7700P                       0x6003
+#define USB_PID_GENIUS_TVGO_DVB_T03                    0x4012
+#define USB_PID_GRANDTEC_DVBT_USB_COLD                 0x0fa0
+#define USB_PID_GRANDTEC_DVBT_USB_WARM                 0x0fa1
+#define USB_PID_GOTVIEW_SAT_HD                         0x5456
+#define USB_PID_INTEL_CE9500                           0x9500
+#define USB_PID_ITETECH_IT9135                         0x9135
+#define USB_PID_ITETECH_IT9135_9005                    0x9005
+#define USB_PID_ITETECH_IT9135_9006                    0x9006
+#define USB_PID_ITETECH_IT9303                         0x9306
+#define USB_PID_KWORLD_399U                            0xe399
+#define USB_PID_KWORLD_399U_2                          0xe400
+#define USB_PID_KWORLD_395U                            0xe396
+#define USB_PID_KWORLD_395U_2                          0xe39b
+#define USB_PID_KWORLD_395U_3                          0xe395
+#define USB_PID_KWORLD_395U_4                          0xe39a
+#define USB_PID_KWORLD_MC810                           0xc810
+#define USB_PID_KWORLD_PC160_2T                                0xc160
+#define USB_PID_KWORLD_PC160_T                         0xc161
+#define USB_PID_KWORLD_UB383_T                         0xe383
+#define USB_PID_KWORLD_UB499_2T_T09                    0xe409
+#define USB_PID_KWORLD_VSTREAM_COLD                    0x17de
+#define USB_PID_KWORLD_VSTREAM_WARM                    0x17df
+#define USB_PID_PROF_1100                              0xb012
+#define USB_PID_TERRATEC_CINERGY_S                     0x0064
+#define USB_PID_TERRATEC_CINERGY_T_USB_XE              0x0055
+#define USB_PID_TERRATEC_CINERGY_T_USB_XE_REV2         0x0069
+#define USB_PID_TERRATEC_CINERGY_T_STICK               0x0093
+#define USB_PID_TERRATEC_CINERGY_T_STICK_RC            0x0097
+#define USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC       0x0099
+#define USB_PID_TERRATEC_CINERGY_T_STICK_BLACK_REV1    0x00a9
+#define USB_PID_TWINHAN_VP7041_COLD                    0x3201
+#define USB_PID_TWINHAN_VP7041_WARM                    0x3202
+#define USB_PID_TWINHAN_VP7020_COLD                    0x3203
+#define USB_PID_TWINHAN_VP7020_WARM                    0x3204
+#define USB_PID_TWINHAN_VP7045_COLD                    0x3205
+#define USB_PID_TWINHAN_VP7045_WARM                    0x3206
+#define USB_PID_TWINHAN_VP7021_COLD                    0x3207
+#define USB_PID_TWINHAN_VP7021_WARM                    0x3208
+#define USB_PID_TWINHAN_VP7049                         0x3219
+#define USB_PID_TINYTWIN                               0x3226
+#define USB_PID_TINYTWIN_2                             0xe402
+#define USB_PID_TINYTWIN_3                             0x9016
+#define USB_PID_DNTV_TINYUSB2_COLD                     0x3223
+#define USB_PID_DNTV_TINYUSB2_WARM                     0x3224
+#define USB_PID_ULTIMA_TVBOX_COLD                      0x8105
+#define USB_PID_ULTIMA_TVBOX_WARM                      0x8106
+#define USB_PID_ULTIMA_TVBOX_AN2235_COLD               0x8107
+#define USB_PID_ULTIMA_TVBOX_AN2235_WARM               0x8108
+#define USB_PID_ULTIMA_TVBOX_ANCHOR_COLD               0x2235
+#define USB_PID_ULTIMA_TVBOX_USB2_COLD                 0x8109
+#define USB_PID_ULTIMA_TVBOX_USB2_WARM                 0x810a
+#define USB_PID_ARTEC_T14_COLD                         0x810b
+#define USB_PID_ARTEC_T14_WARM                         0x810c
+#define USB_PID_ARTEC_T14BR                            0x810f
+#define USB_PID_ULTIMA_TVBOX_USB2_FX_COLD              0x8613
+#define USB_PID_ULTIMA_TVBOX_USB2_FX_WARM              0x1002
+#define USB_PID_UNK_HYPER_PALTEK_COLD                  0x005e
+#define USB_PID_UNK_HYPER_PALTEK_WARM                  0x005f
+#define USB_PID_HANFTEK_UMT_010_COLD                   0x0001
+#define USB_PID_HANFTEK_UMT_010_WARM                   0x0015
+#define USB_PID_DTT200U_COLD                           0x0201
+#define USB_PID_DTT200U_WARM                           0x0301
+#define USB_PID_WT220U_ZAP250_COLD                     0x0220
+#define USB_PID_WT220U_COLD                            0x0222
+#define USB_PID_WT220U_WARM                            0x0221
+#define USB_PID_WT220U_FC_COLD                         0x0225
+#define USB_PID_WT220U_FC_WARM                         0x0226
+#define USB_PID_WT220U_ZL0353_COLD                     0x022a
+#define USB_PID_WT220U_ZL0353_WARM                     0x022b
+#define USB_PID_WINTV_NOVA_T_USB2_COLD                 0x9300
+#define USB_PID_WINTV_NOVA_T_USB2_WARM                 0x9301
+#define USB_PID_HAUPPAUGE_NOVA_T_500                   0x9941
+#define USB_PID_HAUPPAUGE_NOVA_T_500_2                 0x9950
+#define USB_PID_HAUPPAUGE_NOVA_T_500_3                 0x8400
+#define USB_PID_HAUPPAUGE_NOVA_T_STICK                 0x7050
+#define USB_PID_HAUPPAUGE_NOVA_T_STICK_2               0x7060
+#define USB_PID_HAUPPAUGE_NOVA_T_STICK_3               0x7070
+#define USB_PID_HAUPPAUGE_MYTV_T                       0x7080
+#define USB_PID_HAUPPAUGE_NOVA_TD_STICK                        0x9580
+#define USB_PID_HAUPPAUGE_NOVA_TD_STICK_52009          0x5200
+#define USB_PID_HAUPPAUGE_TIGER_ATSC                   0xb200
+#define USB_PID_HAUPPAUGE_TIGER_ATSC_B210              0xb210
+#define USB_PID_AVERMEDIA_EXPRESS                      0xb568
+#define USB_PID_AVERMEDIA_VOLAR                                0xa807
+#define USB_PID_AVERMEDIA_VOLAR_2                      0xb808
+#define USB_PID_AVERMEDIA_VOLAR_A868R                  0xa868
+#define USB_PID_AVERMEDIA_MCE_USB_M038                 0x1228
+#define USB_PID_AVERMEDIA_HYBRID_ULTRA_USB_M039R       0x0039
+#define USB_PID_AVERMEDIA_HYBRID_ULTRA_USB_M039R_ATSC  0x1039
+#define USB_PID_AVERMEDIA_HYBRID_ULTRA_USB_M039R_DVBT  0x2039
+#define USB_PID_AVERMEDIA_VOLAR_X                      0xa815
+#define USB_PID_AVERMEDIA_VOLAR_X_2                    0x8150
+#define USB_PID_AVERMEDIA_A309                         0xa309
+#define USB_PID_AVERMEDIA_A310                         0xa310
+#define USB_PID_AVERMEDIA_A850                         0x850a
+#define USB_PID_AVERMEDIA_A850T                                0x850b
+#define USB_PID_AVERMEDIA_A805                         0xa805
+#define USB_PID_AVERMEDIA_A815M                                0x815a
+#define USB_PID_AVERMEDIA_A835                         0xa835
+#define USB_PID_AVERMEDIA_B835                         0xb835
+#define USB_PID_AVERMEDIA_A835B_1835                   0x1835
+#define USB_PID_AVERMEDIA_A835B_2835                   0x2835
+#define USB_PID_AVERMEDIA_A835B_3835                   0x3835
+#define USB_PID_AVERMEDIA_A835B_4835                   0x4835
+#define USB_PID_AVERMEDIA_1867                         0x1867
+#define USB_PID_AVERMEDIA_A867                         0xa867
+#define USB_PID_AVERMEDIA_H335                         0x0335
+#define USB_PID_AVERMEDIA_TD110                                0xa110
+#define USB_PID_AVERMEDIA_TWINSTAR                     0x0825
+#define USB_PID_TECHNOTREND_CONNECT_S2400               0x3006
+#define USB_PID_TECHNOTREND_CONNECT_S2400_8KEEPROM     0x3009
+#define USB_PID_TECHNOTREND_CONNECT_CT3650             0x300d
+#define USB_PID_TECHNOTREND_CONNECT_S2_4600             0x3011
+#define USB_PID_TECHNOTREND_CONNECT_CT2_4650_CI                0x3012
+#define USB_PID_TECHNOTREND_CONNECT_CT2_4650_CI_2      0x3015
+#define USB_PID_TECHNOTREND_TVSTICK_CT2_4400           0x3014
+#define USB_PID_TECHNOTREND_CONNECT_S2_4650_CI         0x3017
+#define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY       0x005a
+#define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2     0x0081
+#define USB_PID_TERRATEC_CINERGY_HT_USB_XE             0x0058
+#define USB_PID_TERRATEC_CINERGY_HT_EXPRESS            0x0060
+#define USB_PID_TERRATEC_CINERGY_T_EXPRESS             0x0062
+#define USB_PID_TERRATEC_CINERGY_T_XXS                 0x0078
+#define USB_PID_TERRATEC_CINERGY_T_XXS_2               0x00ab
+#define USB_PID_TERRATEC_CINERGY_S2_R1                 0x00a8
+#define USB_PID_TERRATEC_CINERGY_S2_R2                 0x00b0
+#define USB_PID_TERRATEC_CINERGY_S2_R3                 0x0102
+#define USB_PID_TERRATEC_CINERGY_S2_R4                 0x0105
+#define USB_PID_TERRATEC_H7                            0x10b4
+#define USB_PID_TERRATEC_H7_2                          0x10a3
+#define USB_PID_TERRATEC_H7_3                          0x10a5
+#define USB_PID_TERRATEC_T1                            0x10ae
+#define USB_PID_TERRATEC_T3                            0x10a0
+#define USB_PID_TERRATEC_T5                            0x10a1
+#define USB_PID_NOXON_DAB_STICK                                0x00b3
+#define USB_PID_NOXON_DAB_STICK_REV2                   0x00e0
+#define USB_PID_NOXON_DAB_STICK_REV3                   0x00b4
+#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_PCTV71E                       0x022b
+#define USB_PID_PINNACLE_PCTV72E                       0x0236
+#define USB_PID_PINNACLE_PCTV73E                       0x0237
+#define USB_PID_PINNACLE_PCTV310E                      0x3211
+#define USB_PID_PINNACLE_PCTV801E                      0x023a
+#define USB_PID_PINNACLE_PCTV801E_SE                   0x023b
+#define USB_PID_PINNACLE_PCTV340E                      0x023d
+#define USB_PID_PINNACLE_PCTV340E_SE                   0x023e
+#define USB_PID_PINNACLE_PCTV73A                       0x0243
+#define USB_PID_PINNACLE_PCTV73ESE                     0x0245
+#define USB_PID_PINNACLE_PCTV74E                       0x0246
+#define USB_PID_PINNACLE_PCTV282E                      0x0248
+#define USB_PID_PIXELVIEW_SBTVD                                0x5010
+#define USB_PID_PCTV_200E                              0x020e
+#define USB_PID_PCTV_400E                              0x020f
+#define USB_PID_PCTV_450E                              0x0222
+#define USB_PID_PCTV_452E                              0x021f
+#define USB_PID_PCTV_78E                               0x025a
+#define USB_PID_PCTV_79E                               0x0262
+#define USB_PID_REALTEK_RTL2831U                       0x2831
+#define USB_PID_REALTEK_RTL2832U                       0x2832
+#define USB_PID_TECHNOTREND_CONNECT_S2_3600            0x3007
+#define USB_PID_TECHNOTREND_CONNECT_S2_3650_CI         0x300a
+#define USB_PID_NEBULA_DIGITV                          0x0201
+#define USB_PID_DVICO_BLUEBIRD_LGDT                    0xd820
+#define USB_PID_DVICO_BLUEBIRD_LG064F_COLD             0xd500
+#define USB_PID_DVICO_BLUEBIRD_LG064F_WARM             0xd501
+#define USB_PID_DVICO_BLUEBIRD_LGZ201_COLD             0xdb00
+#define USB_PID_DVICO_BLUEBIRD_LGZ201_WARM             0xdb01
+#define USB_PID_DVICO_BLUEBIRD_TH7579_COLD             0xdb10
+#define USB_PID_DVICO_BLUEBIRD_TH7579_WARM             0xdb11
+#define USB_PID_DVICO_BLUEBIRD_DUAL_1_COLD             0xdb50
+#define USB_PID_DVICO_BLUEBIRD_DUAL_1_WARM             0xdb51
+#define USB_PID_DVICO_BLUEBIRD_DUAL_2_COLD             0xdb58
+#define USB_PID_DVICO_BLUEBIRD_DUAL_2_WARM             0xdb59
+#define USB_PID_DVICO_BLUEBIRD_DUAL_4                  0xdb78
+#define USB_PID_DVICO_BLUEBIRD_DUAL_4_REV_2            0xdb98
+#define USB_PID_DVICO_BLUEBIRD_DVB_T_NANO_2            0xdb70
+#define USB_PID_DVICO_BLUEBIRD_DVB_T_NANO_2_NFW_WARM   0xdb71
+#define USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_COLD                0xdb54
+#define USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_WARM                0xdb55
+#define USB_PID_MEDION_MD95700                         0x0932
+#define USB_PID_MSI_MEGASKY580                         0x5580
+#define USB_PID_MSI_MEGASKY580_55801                   0x5581
+#define USB_PID_KYE_DVB_T_COLD                         0x701e
+#define USB_PID_KYE_DVB_T_WARM                         0x701f
+#define USB_PID_LITEON_DVB_T_COLD                      0xf000
+#define USB_PID_LITEON_DVB_T_WARM                      0xf001
+#define USB_PID_DIGIVOX_MINI_SL_COLD                   0xe360
+#define USB_PID_DIGIVOX_MINI_SL_WARM                   0xe361
+#define USB_PID_GRANDTEC_DVBT_USB2_COLD                        0x0bc6
+#define USB_PID_GRANDTEC_DVBT_USB2_WARM                        0x0bc7
+#define USB_PID_WINFAST_DTV2000DS                      0x6a04
+#define USB_PID_WINFAST_DTV2000DS_PLUS                 0x6f12
+#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_H                   0x60f6
+#define USB_PID_WINFAST_DTV_DONGLE_STK7700P_2          0x6f01
+#define USB_PID_WINFAST_DTV_DONGLE_GOLD                        0x6029
+#define USB_PID_WINFAST_DTV_DONGLE_MINID               0x6f0f
+#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_GENPIX_SKYWALKER_1                     0x0203
+#define USB_PID_GENPIX_SKYWALKER_CW3K                  0x0204
+#define USB_PID_GENPIX_SKYWALKER_2                     0x0206
+#define USB_PID_SIGMATEK_DVB_110                       0x6610
+#define USB_PID_MSI_DIGI_VOX_MINI_II                   0x1513
+#define USB_PID_MSI_DIGIVOX_DUO                                0x8801
+#define USB_PID_OPERA1_COLD                            0x2830
+#define USB_PID_OPERA1_WARM                            0x3829
+#define USB_PID_LIFEVIEW_TV_WALKER_TWIN_COLD           0x0514
+#define USB_PID_LIFEVIEW_TV_WALKER_TWIN_WARM           0x0513
+#define USB_PID_GIGABYTE_U7000                         0x7001
+#define USB_PID_GIGABYTE_U8000                         0x7002
+#define USB_PID_ASUS_U3000                             0x171f
+#define USB_PID_ASUS_U3000H                            0x1736
+#define USB_PID_ASUS_U3100                             0x173f
+#define USB_PID_ASUS_U3100MINI_PLUS                    0x1779
+#define USB_PID_YUAN_EC372S                            0x1edc
+#define USB_PID_YUAN_STK7700PH                         0x1f08
+#define USB_PID_YUAN_PD378S                            0x2edc
+#define USB_PID_YUAN_MC770                             0x0871
+#define USB_PID_YUAN_STK7700D                          0x1efc
+#define USB_PID_YUAN_STK7700D_2                                0x1e8c
+#define USB_PID_DW2102                                 0x2102
+#define USB_PID_DW2104                                 0x2104
+#define USB_PID_DW3101                                 0x3101
+#define USB_PID_XTENSIONS_XD_380                       0x0381
+#define USB_PID_TELESTAR_STARSTICK_2                   0x8000
+#define USB_PID_MSI_DIGI_VOX_MINI_III                   0x8807
+#define USB_PID_SONY_PLAYTV                            0x0003
+#define USB_PID_MYGICA_D689                            0xd811
+#define USB_PID_MYGICA_T230                            0xc688
+#define USB_PID_MYGICA_T230C                           0xc689
+#define USB_PID_ELGATO_EYETV_DIVERSITY                 0x0011
+#define USB_PID_ELGATO_EYETV_DTT                       0x0021
+#define USB_PID_ELGATO_EYETV_DTT_2                     0x003f
+#define USB_PID_ELGATO_EYETV_DTT_Dlx                   0x0020
+#define USB_PID_ELGATO_EYETV_SAT                       0x002a
+#define USB_PID_ELGATO_EYETV_SAT_V2                    0x0025
+#define USB_PID_ELGATO_EYETV_SAT_V3                    0x0036
+#define USB_PID_DVB_T_USB_STICK_HIGH_SPEED_COLD                0x5000
+#define USB_PID_DVB_T_USB_STICK_HIGH_SPEED_WARM                0x5001
+#define USB_PID_FRIIO_WHITE                            0x0001
+#define USB_PID_TVWAY_PLUS                             0x0002
+#define USB_PID_SVEON_STV20                            0xe39d
+#define USB_PID_SVEON_STV20_RTL2832U                   0xd39d
+#define USB_PID_SVEON_STV21                            0xd3b0
+#define USB_PID_SVEON_STV22                            0xe401
+#define USB_PID_SVEON_STV22_IT9137                     0xe411
+#define USB_PID_AZUREWAVE_AZ6027                       0x3275
+#define USB_PID_TERRATEC_DVBS2CI_V1                    0x10a4
+#define USB_PID_TERRATEC_DVBS2CI_V2                    0x10ac
+#define USB_PID_TECHNISAT_USB2_HDCI_V1                 0x0001
+#define USB_PID_TECHNISAT_USB2_HDCI_V2                 0x0002
+#define USB_PID_TECHNISAT_USB2_CABLESTAR_HDCI          0x0003
+#define USB_PID_TECHNISAT_AIRSTAR_TELESTICK_2          0x0004
+#define USB_PID_TECHNISAT_USB2_DVB_S2                  0x0500
+#define USB_PID_CPYTO_REDI_PC50A                       0xa803
+#define USB_PID_CTVDIGDUAL_V2                          0xe410
+#define USB_PID_PCTV_2002E                              0x025c
+#define USB_PID_PCTV_2002E_SE                           0x025d
+#define USB_PID_SVEON_STV27                             0xd3af
+#define USB_PID_TURBOX_DTT_2000                         0xd3a4
+#define USB_PID_WINTV_SOLOHD                            0x0264
+#define USB_PID_EVOLVEO_XTRATV_STICK                   0xa115
+#define USB_PID_HAMA_DVBT_HYBRID                       0x2758
+#define USB_PID_XBOX_ONE_TUNER                          0x02d5
+#endif
diff --git a/include/media/dvb_ca_en50221.h b/include/media/dvb_ca_en50221.h
new file mode 100644 (file)
index 0000000..a1c014b
--- /dev/null
@@ -0,0 +1,142 @@
+/*
+ * dvb_ca.h: generic DVB functions for EN50221 CA interfaces
+ *
+ * Copyright (C) 2004 Andrew de Quincey
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _DVB_CA_EN50221_H_
+#define _DVB_CA_EN50221_H_
+
+#include <linux/list.h>
+#include <linux/dvb/ca.h>
+
+#include <media/dvbdev.h>
+
+#define DVB_CA_EN50221_POLL_CAM_PRESENT        1
+#define DVB_CA_EN50221_POLL_CAM_CHANGED        2
+#define DVB_CA_EN50221_POLL_CAM_READY          4
+
+#define DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE      1
+#define DVB_CA_EN50221_FLAG_IRQ_FR             2
+#define DVB_CA_EN50221_FLAG_IRQ_DA             4
+
+#define DVB_CA_EN50221_CAMCHANGE_REMOVED               0
+#define DVB_CA_EN50221_CAMCHANGE_INSERTED              1
+
+/**
+ * struct dvb_ca_en50221- Structure describing a CA interface
+ *
+ * @owner:             the module owning this structure
+ * @read_attribute_mem:        function for reading attribute memory on the CAM
+ * @write_attribute_mem: function for writing attribute memory on the CAM
+ * @read_cam_control:  function for reading the control interface on the CAM
+ * @write_cam_control: function for reading the control interface on the CAM
+ * @read_data:         function for reading data (block mode)
+ * @write_data:                function for writing data (block mode)
+ * @slot_reset:                function to reset the CAM slot
+ * @slot_shutdown:     function to shutdown a CAM slot
+ * @slot_ts_enable:    function to enable the Transport Stream on a CAM slot
+ * @poll_slot_status:  function to poll slot status. Only necessary if
+ *                     DVB_CA_FLAG_EN50221_IRQ_CAMCHANGE is not set.
+ * @data:              private data, used by caller.
+ * @private:           Opaque data used by the dvb_ca core. Do not modify!
+ *
+ * NOTE: the read_*, write_* and poll_slot_status functions will be
+ * called for different slots concurrently and need to use locks where
+ * and if appropriate. There will be no concurrent access to one slot.
+ */
+struct dvb_ca_en50221 {
+       struct module *owner;
+
+       int (*read_attribute_mem)(struct dvb_ca_en50221 *ca,
+                                 int slot, int address);
+       int (*write_attribute_mem)(struct dvb_ca_en50221 *ca,
+                                  int slot, int address, u8 value);
+
+       int (*read_cam_control)(struct dvb_ca_en50221 *ca,
+                               int slot, u8 address);
+       int (*write_cam_control)(struct dvb_ca_en50221 *ca,
+                                int slot, u8 address, u8 value);
+
+       int (*read_data)(struct dvb_ca_en50221 *ca,
+                        int slot, u8 *ebuf, int ecount);
+       int (*write_data)(struct dvb_ca_en50221 *ca,
+                         int slot, u8 *ebuf, int ecount);
+
+       int (*slot_reset)(struct dvb_ca_en50221 *ca, int slot);
+       int (*slot_shutdown)(struct dvb_ca_en50221 *ca, int slot);
+       int (*slot_ts_enable)(struct dvb_ca_en50221 *ca, int slot);
+
+       int (*poll_slot_status)(struct dvb_ca_en50221 *ca, int slot, int open);
+
+       void *data;
+
+       void *private;
+};
+
+/*
+ * Functions for reporting IRQ events
+ */
+
+/**
+ * dvb_ca_en50221_camchange_irq - A CAMCHANGE IRQ has occurred.
+ *
+ * @pubca: CA instance.
+ * @slot: Slot concerned.
+ * @change_type: One of the DVB_CA_CAMCHANGE_* values
+ */
+void dvb_ca_en50221_camchange_irq(struct dvb_ca_en50221 *pubca, int slot,
+                                 int change_type);
+
+/**
+ * dvb_ca_en50221_camready_irq - A CAMREADY IRQ has occurred.
+ *
+ * @pubca: CA instance.
+ * @slot: Slot concerned.
+ */
+void dvb_ca_en50221_camready_irq(struct dvb_ca_en50221 *pubca, int slot);
+
+/**
+ * dvb_ca_en50221_frda_irq - An FR or a DA IRQ has occurred.
+ *
+ * @ca: CA instance.
+ * @slot: Slot concerned.
+ */
+void dvb_ca_en50221_frda_irq(struct dvb_ca_en50221 *ca, int slot);
+
+/*
+ * Initialisation/shutdown functions
+ */
+
+/**
+ * dvb_ca_en50221_init - Initialise a new DVB CA device.
+ *
+ * @dvb_adapter: DVB adapter to attach the new CA device to.
+ * @ca: The dvb_ca instance.
+ * @flags: Flags describing the CA device (DVB_CA_EN50221_FLAG_*).
+ * @slot_count: Number of slots supported.
+ *
+ * @return 0 on success, nonzero on failure
+ */
+int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter,
+                       struct dvb_ca_en50221 *ca, int flags,
+                              int slot_count);
+
+/**
+ * dvb_ca_en50221_release - Release a DVB CA device.
+ *
+ * @ca: The associated dvb_ca instance.
+ */
+void dvb_ca_en50221_release(struct dvb_ca_en50221 *ca);
+
+#endif
diff --git a/include/media/dvb_demux.h b/include/media/dvb_demux.h
new file mode 100644 (file)
index 0000000..b070920
--- /dev/null
@@ -0,0 +1,350 @@
+/*
+ * dvb_demux.h: DVB kernel demux API
+ *
+ * Copyright (C) 2000-2001 Marcus Metzler & Ralph Metzler
+ *                         for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _DVB_DEMUX_H_
+#define _DVB_DEMUX_H_
+
+#include <linux/time.h>
+#include <linux/timer.h>
+#include <linux/spinlock.h>
+#include <linux/mutex.h>
+
+#include <media/demux.h>
+
+/**
+ * enum dvb_dmx_filter_type - type of demux feed.
+ *
+ * @DMX_TYPE_TS:       feed is in TS mode.
+ * @DMX_TYPE_SEC:      feed is in Section mode.
+ */
+enum dvb_dmx_filter_type {
+       DMX_TYPE_TS,
+       DMX_TYPE_SEC,
+};
+
+/**
+ * enum dvb_dmx_state - state machine for a demux filter.
+ *
+ * @DMX_STATE_FREE:            indicates that the filter is freed.
+ * @DMX_STATE_ALLOCATED:       indicates that the filter was allocated
+ *                             to be used.
+ * @DMX_STATE_READY:           indicates that the filter is ready
+ *                             to be used.
+ * @DMX_STATE_GO:              indicates that the filter is running.
+ */
+enum dvb_dmx_state {
+       DMX_STATE_FREE,
+       DMX_STATE_ALLOCATED,
+       DMX_STATE_READY,
+       DMX_STATE_GO,
+};
+
+#define DVB_DEMUX_MASK_MAX 18
+
+#define MAX_PID 0x1fff
+
+#define SPEED_PKTS_INTERVAL 50000
+
+/**
+ * struct dvb_demux_filter - Describes a DVB demux section filter.
+ *
+ * @filter:            Section filter as defined by &struct dmx_section_filter.
+ * @maskandmode:       logical ``and`` bit mask.
+ * @maskandnotmode:    logical ``and not`` bit mask.
+ * @doneq:             flag that indicates when a filter is ready.
+ * @next:              pointer to the next section filter.
+ * @feed:              &struct dvb_demux_feed pointer.
+ * @index:             index of the used demux filter.
+ * @state:             state of the filter as described by &enum dvb_dmx_state.
+ * @type:              type of the filter as described
+ *                     by &enum dvb_dmx_filter_type.
+ */
+
+struct dvb_demux_filter {
+       struct dmx_section_filter filter;
+       u8 maskandmode[DMX_MAX_FILTER_SIZE];
+       u8 maskandnotmode[DMX_MAX_FILTER_SIZE];
+       bool doneq;
+
+       struct dvb_demux_filter *next;
+       struct dvb_demux_feed *feed;
+       int index;
+       enum dvb_dmx_state state;
+       enum dvb_dmx_filter_type type;
+
+       /* private: used only by av7110 */
+       u16 hw_handle;
+};
+
+/**
+ * struct dvb_demux_feed - describes a DVB field
+ *
+ * @feed:      a union describing a digital TV feed.
+ *             Depending on the feed type, it can be either
+ *             @feed.ts or @feed.sec.
+ * @feed.ts:   a &struct dmx_ts_feed pointer.
+ *             For TS feed only.
+ * @feed.sec:  a &struct dmx_section_feed pointer.
+ *             For section feed only.
+ * @cb:                a union describing digital TV callbacks.
+ *             Depending on the feed type, it can be either
+ *             @cb.ts or @cb.sec.
+ * @cb.ts:     a dmx_ts_cb() calback function pointer.
+ *             For TS feed only.
+ * @cb.sec:    a dmx_section_cb() callback function pointer.
+ *             For section feed only.
+ * @demux:     pointer to &struct dvb_demux.
+ * @priv:      private data that can optionally be used by a DVB driver.
+ * @type:      type of the filter, as defined by &enum dvb_dmx_filter_type.
+ * @state:     state of the filter as defined by &enum dvb_dmx_state.
+ * @pid:       PID to be filtered.
+ * @timeout:   feed timeout.
+ * @filter:    pointer to &struct dvb_demux_filter.
+ * @ts_type:   type of TS, as defined by &enum ts_filter_type.
+ * @pes_type:  type of PES, as defined by &enum dmx_ts_pes.
+ * @cc:                MPEG-TS packet continuity counter
+ * @pusi_seen: if true, indicates that a discontinuity was detected.
+ *             it is used to prevent feeding of garbage from previous section.
+ * @peslen:    length of the PES (Packet Elementary Stream).
+ * @list_head: head for the list of digital TV demux feeds.
+ * @index:     a unique index for each feed. Can be used as hardware
+ *             pid filter index.
+ */
+struct dvb_demux_feed {
+       union {
+               struct dmx_ts_feed ts;
+               struct dmx_section_feed sec;
+       } feed;
+
+       union {
+               dmx_ts_cb ts;
+               dmx_section_cb sec;
+       } cb;
+
+       struct dvb_demux *demux;
+       void *priv;
+       enum dvb_dmx_filter_type type;
+       enum dvb_dmx_state state;
+       u16 pid;
+
+       ktime_t timeout;
+       struct dvb_demux_filter *filter;
+
+       enum ts_filter_type ts_type;
+       enum dmx_ts_pes pes_type;
+
+       int cc;
+       bool pusi_seen;
+
+       u16 peslen;
+
+       struct list_head list_head;
+       unsigned int index;
+};
+
+/**
+ * struct dvb_demux - represents a digital TV demux
+ * @dmx:               embedded &struct dmx_demux with demux capabilities
+ *                     and callbacks.
+ * @priv:              private data that can optionally be used by
+ *                     a DVB driver.
+ * @filternum:         maximum amount of DVB filters.
+ * @feednum:           maximum amount of DVB feeds.
+ * @start_feed:                callback routine to be called in order to start
+ *                     a DVB feed.
+ * @stop_feed:         callback routine to be called in order to stop
+ *                     a DVB feed.
+ * @write_to_decoder:  callback routine to be called if the feed is TS and
+ *                     it is routed to an A/V decoder, when a new TS packet
+ *                     is received.
+ *                     Used only on av7110-av.c.
+ * @check_crc32:       callback routine to check CRC. If not initialized,
+ *                     dvb_demux will use an internal one.
+ * @memcopy:           callback routine to memcopy received data.
+ *                     If not initialized, dvb_demux will default to memcpy().
+ * @users:             counter for the number of demux opened file descriptors.
+ *                     Currently, it is limited to 10 users.
+ * @filter:            pointer to &struct dvb_demux_filter.
+ * @feed:              pointer to &struct dvb_demux_feed.
+ * @frontend_list:     &struct list_head with frontends used by the demux.
+ * @pesfilter:         array of &struct dvb_demux_feed with the PES types
+ *                     that will be filtered.
+ * @pids:              list of filtered program IDs.
+ * @feed_list:         &struct list_head with feeds.
+ * @tsbuf:             temporary buffer used internally to store TS packets.
+ * @tsbufp:            temporary buffer index used internally.
+ * @mutex:             pointer to &struct mutex used to protect feed set
+ *                     logic.
+ * @lock:              pointer to &spinlock_t, used to protect buffer handling.
+ * @cnt_storage:       buffer used for TS/TEI continuity check.
+ * @speed_last_time:   &ktime_t used for TS speed check.
+ * @speed_pkts_cnt:    packets count used for TS speed check.
+ */
+struct dvb_demux {
+       struct dmx_demux dmx;
+       void *priv;
+       int filternum;
+       int feednum;
+       int (*start_feed)(struct dvb_demux_feed *feed);
+       int (*stop_feed)(struct dvb_demux_feed *feed);
+       int (*write_to_decoder)(struct dvb_demux_feed *feed,
+                                const u8 *buf, size_t len);
+       u32 (*check_crc32)(struct dvb_demux_feed *feed,
+                           const u8 *buf, size_t len);
+       void (*memcopy)(struct dvb_demux_feed *feed, u8 *dst,
+                        const u8 *src, size_t len);
+
+       int users;
+#define MAX_DVB_DEMUX_USERS 10
+       struct dvb_demux_filter *filter;
+       struct dvb_demux_feed *feed;
+
+       struct list_head frontend_list;
+
+       struct dvb_demux_feed *pesfilter[DMX_PES_OTHER];
+       u16 pids[DMX_PES_OTHER];
+
+#define DMX_MAX_PID 0x2000
+       struct list_head feed_list;
+       u8 tsbuf[204];
+       int tsbufp;
+
+       struct mutex mutex;
+       spinlock_t lock;
+
+       uint8_t *cnt_storage; /* for TS continuity check */
+
+       ktime_t speed_last_time; /* for TS speed check */
+       uint32_t speed_pkts_cnt; /* for TS speed check */
+
+       /* private: used only on av7110 */
+       int playing;
+       int recording;
+};
+
+/**
+ * dvb_dmx_init - initialize a digital TV demux struct.
+ *
+ * @demux: &struct dvb_demux to be initialized.
+ *
+ * Before being able to register a digital TV demux struct, drivers
+ * should call this routine. On its typical usage, some fields should
+ * be initialized at the driver before calling it.
+ *
+ * A typical usecase is::
+ *
+ *     dvb->demux.dmx.capabilities =
+ *             DMX_TS_FILTERING | DMX_SECTION_FILTERING |
+ *             DMX_MEMORY_BASED_FILTERING;
+ *     dvb->demux.priv       = dvb;
+ *     dvb->demux.filternum  = 256;
+ *     dvb->demux.feednum    = 256;
+ *     dvb->demux.start_feed = driver_start_feed;
+ *     dvb->demux.stop_feed  = driver_stop_feed;
+ *     ret = dvb_dmx_init(&dvb->demux);
+ *     if (ret < 0)
+ *             return ret;
+ */
+int dvb_dmx_init(struct dvb_demux *demux);
+
+/**
+ * dvb_dmx_release - releases a digital TV demux internal buffers.
+ *
+ * @demux: &struct dvb_demux to be released.
+ *
+ * The DVB core internally allocates data at @demux. This routine
+ * releases those data. Please notice that the struct itelf is not
+ * released, as it can be embedded on other structs.
+ */
+void dvb_dmx_release(struct dvb_demux *demux);
+
+/**
+ * dvb_dmx_swfilter_packets - use dvb software filter for a buffer with
+ *     multiple MPEG-TS packets with 188 bytes each.
+ *
+ * @demux: pointer to &struct dvb_demux
+ * @buf: buffer with data to be filtered
+ * @count: number of MPEG-TS packets with size of 188.
+ *
+ * The routine will discard a DVB packet that don't start with 0x47.
+ *
+ * Use this routine if the DVB demux fills MPEG-TS buffers that are
+ * already aligned.
+ *
+ * NOTE: The @buf size should have size equal to ``count * 188``.
+ */
+void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf,
+                             size_t count);
+
+/**
+ * dvb_dmx_swfilter -  use dvb software filter for a buffer with
+ *     multiple MPEG-TS packets with 188 bytes each.
+ *
+ * @demux: pointer to &struct dvb_demux
+ * @buf: buffer with data to be filtered
+ * @count: number of MPEG-TS packets with size of 188.
+ *
+ * If a DVB packet doesn't start with 0x47, it will seek for the first
+ * byte that starts with 0x47.
+ *
+ * Use this routine if the DVB demux fill buffers that may not start with
+ * a packet start mark (0x47).
+ *
+ * NOTE: The @buf size should have size equal to ``count * 188``.
+ */
+void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count);
+
+/**
+ * dvb_dmx_swfilter_204 -  use dvb software filter for a buffer with
+ *     multiple MPEG-TS packets with 204 bytes each.
+ *
+ * @demux: pointer to &struct dvb_demux
+ * @buf: buffer with data to be filtered
+ * @count: number of MPEG-TS packets with size of 204.
+ *
+ * If a DVB packet doesn't start with 0x47, it will seek for the first
+ * byte that starts with 0x47.
+ *
+ * Use this routine if the DVB demux fill buffers that may not start with
+ * a packet start mark (0x47).
+ *
+ * NOTE: The @buf size should have size equal to ``count * 204``.
+ */
+void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf,
+                         size_t count);
+
+/**
+ * dvb_dmx_swfilter_raw -  make the raw data available to userspace without
+ *     filtering
+ *
+ * @demux: pointer to &struct dvb_demux
+ * @buf: buffer with data
+ * @count: number of packets to be passed. The actual size of each packet
+ *     depends on the &dvb_demux->feed->cb.ts logic.
+ *
+ * Use it if the driver needs to deliver the raw payload to userspace without
+ * passing through the kernel demux. That is meant to support some
+ * delivery systems that aren't based on MPEG-TS.
+ *
+ * This function relies on &dvb_demux->feed->cb.ts to actually handle the
+ * buffer.
+ */
+void dvb_dmx_swfilter_raw(struct dvb_demux *demux, const u8 *buf,
+                         size_t count);
+
+#endif /* _DVB_DEMUX_H_ */
diff --git a/include/media/dvb_frontend.h b/include/media/dvb_frontend.h
new file mode 100644 (file)
index 0000000..0b40886
--- /dev/null
@@ -0,0 +1,795 @@
+/*
+ * dvb_frontend.h
+ *
+ * The Digital TV Frontend kABI defines a driver-internal interface for
+ * registering low-level, hardware specific driver to a hardware independent
+ * frontend layer.
+ *
+ * Copyright (C) 2001 convergence integrated media GmbH
+ * Copyright (C) 2004 convergence GmbH
+ *
+ * Written by Ralph Metzler
+ * Overhauled by Holger Waechtler
+ * Kernel I2C stuff by Michael Hunold <hunold@convergence.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ */
+
+#ifndef _DVB_FRONTEND_H_
+#define _DVB_FRONTEND_H_
+
+#include <linux/types.h>
+#include <linux/sched.h>
+#include <linux/ioctl.h>
+#include <linux/i2c.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+#include <linux/mutex.h>
+#include <linux/slab.h>
+
+#include <linux/dvb/frontend.h>
+
+#include <media/dvbdev.h>
+
+/*
+ * Maximum number of Delivery systems per frontend. It
+ * should be smaller or equal to 32
+ */
+#define MAX_DELSYS     8
+
+/**
+ * struct dvb_frontend_tune_settings - parameters to adjust frontend tuning
+ *
+ * @min_delay_ms:      minimum delay for tuning, in ms
+ * @step_size:         step size between two consecutive frequencies
+ * @max_drift:         maximum drift
+ *
+ * NOTE: step_size is in Hz, for terrestrial/cable or kHz for satellite
+ */
+struct dvb_frontend_tune_settings {
+       int min_delay_ms;
+       int step_size;
+       int max_drift;
+};
+
+struct dvb_frontend;
+
+/**
+ * struct dvb_tuner_info - Frontend name and min/max ranges/bandwidths
+ *
+ * @name:              name of the Frontend
+ * @frequency_min:     minimal frequency supported
+ * @frequency_max:     maximum frequency supported
+ * @frequency_step:    frequency step
+ * @bandwidth_min:     minimal frontend bandwidth supported
+ * @bandwidth_max:     maximum frontend bandwidth supported
+ * @bandwidth_step:    frontend bandwidth step
+ *
+ * NOTE: frequency parameters are in Hz, for terrestrial/cable or kHz for
+ * satellite.
+ */
+struct dvb_tuner_info {
+       char name[128];
+
+       u32 frequency_min;
+       u32 frequency_max;
+       u32 frequency_step;
+
+       u32 bandwidth_min;
+       u32 bandwidth_max;
+       u32 bandwidth_step;
+};
+
+/**
+ * struct analog_parameters - Parameters to tune into an analog/radio channel
+ *
+ * @frequency: Frequency used by analog TV tuner (either in 62.5 kHz step,
+ *             for TV, or 62.5 Hz for radio)
+ * @mode:      Tuner mode, as defined on enum v4l2_tuner_type
+ * @audmode:   Audio mode as defined for the rxsubchans field at videodev2.h,
+ *             e. g. V4L2_TUNER_MODE_*
+ * @std:       TV standard bitmap as defined at videodev2.h, e. g. V4L2_STD_*
+ *
+ * Hybrid tuners should be supported by both V4L2 and DVB APIs. This
+ * struct contains the data that are used by the V4L2 side. To avoid
+ * dependencies from V4L2 headers, all enums here are declared as integers.
+ */
+struct analog_parameters {
+       unsigned int frequency;
+       unsigned int mode;
+       unsigned int audmode;
+       u64 std;
+};
+
+/**
+ * enum dvbfe_algo - defines the algorithm used to tune into a channel
+ *
+ * @DVBFE_ALGO_HW: Hardware Algorithm -
+ *     Devices that support this algorithm do everything in hardware
+ *     and no software support is needed to handle them.
+ *     Requesting these devices to LOCK is the only thing required,
+ *     device is supposed to do everything in the hardware.
+ *
+ * @DVBFE_ALGO_SW: Software Algorithm -
+ * These are dumb devices, that require software to do everything
+ *
+ * @DVBFE_ALGO_CUSTOM: Customizable Agorithm -
+ *     Devices having this algorithm can be customized to have specific
+ *     algorithms in the frontend driver, rather than simply doing a
+ *     software zig-zag. In this case the zigzag maybe hardware assisted
+ *     or it maybe completely done in hardware. In all cases, usage of
+ *     this algorithm, in conjunction with the search and track
+ *     callbacks, utilizes the driver specific algorithm.
+ *
+ * @DVBFE_ALGO_RECOVERY: Recovery Algorithm -
+ *     These devices have AUTO recovery capabilities from LOCK failure
+ */
+enum dvbfe_algo {
+       DVBFE_ALGO_HW                   = (1 <<  0),
+       DVBFE_ALGO_SW                   = (1 <<  1),
+       DVBFE_ALGO_CUSTOM               = (1 <<  2),
+       DVBFE_ALGO_RECOVERY             = (1 << 31)
+};
+
+/**
+ * enum dvbfe_search - search callback possible return status
+ *
+ * @DVBFE_ALGO_SEARCH_SUCCESS:
+ *     The frontend search algorithm completed and returned successfully
+ *
+ * @DVBFE_ALGO_SEARCH_ASLEEP:
+ *     The frontend search algorithm is sleeping
+ *
+ * @DVBFE_ALGO_SEARCH_FAILED:
+ *     The frontend search for a signal failed
+ *
+ * @DVBFE_ALGO_SEARCH_INVALID:
+ *     The frontend search algorith was probably supplied with invalid
+ *     parameters and the search is an invalid one
+ *
+ * @DVBFE_ALGO_SEARCH_ERROR:
+ *     The frontend search algorithm failed due to some error
+ *
+ * @DVBFE_ALGO_SEARCH_AGAIN:
+ *     The frontend search algorithm was requested to search again
+ */
+enum dvbfe_search {
+       DVBFE_ALGO_SEARCH_SUCCESS       = (1 <<  0),
+       DVBFE_ALGO_SEARCH_ASLEEP        = (1 <<  1),
+       DVBFE_ALGO_SEARCH_FAILED        = (1 <<  2),
+       DVBFE_ALGO_SEARCH_INVALID       = (1 <<  3),
+       DVBFE_ALGO_SEARCH_AGAIN         = (1 <<  4),
+       DVBFE_ALGO_SEARCH_ERROR         = (1 << 31),
+};
+
+/**
+ * struct dvb_tuner_ops - Tuner information and callbacks
+ *
+ * @info:              embedded &struct dvb_tuner_info with tuner properties
+ * @release:           callback function called when frontend is detached.
+ *                     drivers should free any allocated memory.
+ * @init:              callback function used to initialize the tuner device.
+ * @sleep:             callback function used to put the tuner to sleep.
+ * @suspend:           callback function used to inform that the Kernel will
+ *                     suspend.
+ * @resume:            callback function used to inform that the Kernel is
+ *                     resuming from suspend.
+ * @set_params:                callback function used to inform the tuner to tune
+ *                     into a digital TV channel. The properties to be used
+ *                     are stored at &struct dvb_frontend.dtv_property_cache.
+ *                     The tuner demod can change the parameters to reflect
+ *                     the changes needed for the channel to be tuned, and
+ *                     update statistics. This is the recommended way to set
+ *                     the tuner parameters and should be used on newer
+ *                     drivers.
+ * @set_analog_params: callback function used to tune into an analog TV
+ *                     channel on hybrid tuners. It passes @analog_parameters
+ *                     to the driver.
+ * @set_config:                callback function used to send some tuner-specific
+ *                     parameters.
+ * @get_frequency:     get the actual tuned frequency
+ * @get_bandwidth:     get the bandwitdh used by the low pass filters
+ * @get_if_frequency:  get the Intermediate Frequency, in Hz. For baseband,
+ *                     should return 0.
+ * @get_status:                returns the frontend lock status
+ * @get_rf_strength:   returns the RF signal strength. Used mostly to support
+ *                     analog TV and radio. Digital TV should report, instead,
+ *                     via DVBv5 API (&struct dvb_frontend.dtv_property_cache).
+ * @get_afc:           Used only by analog TV core. Reports the frequency
+ *                     drift due to AFC.
+ * @calc_regs:         callback function used to pass register data settings
+ *                     for simple tuners.  Shouldn't be used on newer drivers.
+ * @set_frequency:     Set a new frequency. Shouldn't be used on newer drivers.
+ * @set_bandwidth:     Set a new frequency. Shouldn't be used on newer drivers.
+ *
+ * NOTE: frequencies used on @get_frequency and @set_frequency are in Hz for
+ * terrestrial/cable or kHz for satellite.
+ *
+ */
+struct dvb_tuner_ops {
+
+       struct dvb_tuner_info info;
+
+       void (*release)(struct dvb_frontend *fe);
+       int (*init)(struct dvb_frontend *fe);
+       int (*sleep)(struct dvb_frontend *fe);
+       int (*suspend)(struct dvb_frontend *fe);
+       int (*resume)(struct dvb_frontend *fe);
+
+       /* This is the recomended way to set the tuner */
+       int (*set_params)(struct dvb_frontend *fe);
+       int (*set_analog_params)(struct dvb_frontend *fe, struct analog_parameters *p);
+
+       int (*set_config)(struct dvb_frontend *fe, void *priv_cfg);
+
+       int (*get_frequency)(struct dvb_frontend *fe, u32 *frequency);
+       int (*get_bandwidth)(struct dvb_frontend *fe, u32 *bandwidth);
+       int (*get_if_frequency)(struct dvb_frontend *fe, u32 *frequency);
+
+#define TUNER_STATUS_LOCKED 1
+#define TUNER_STATUS_STEREO 2
+       int (*get_status)(struct dvb_frontend *fe, u32 *status);
+       int (*get_rf_strength)(struct dvb_frontend *fe, u16 *strength);
+       int (*get_afc)(struct dvb_frontend *fe, s32 *afc);
+
+       /*
+        * This is support for demods like the mt352 - fills out the supplied
+        * buffer with what to write.
+        *
+        * Don't use on newer drivers.
+        */
+       int (*calc_regs)(struct dvb_frontend *fe, u8 *buf, int buf_len);
+
+       /*
+        * These are provided separately from set_params in order to
+        * facilitate silicon tuners which require sophisticated tuning loops,
+        * controlling each parameter separately.
+        *
+        * Don't use on newer drivers.
+        */
+       int (*set_frequency)(struct dvb_frontend *fe, u32 frequency);
+       int (*set_bandwidth)(struct dvb_frontend *fe, u32 bandwidth);
+};
+
+/**
+ * struct analog_demod_info - Information struct for analog TV part of the demod
+ *
+ * @name:      Name of the analog TV demodulator
+ */
+struct analog_demod_info {
+       char *name;
+};
+
+/**
+ * struct analog_demod_ops  - Demodulation information and callbacks for
+ *                           analog TV and radio
+ *
+ * @info:              pointer to struct analog_demod_info
+ * @set_params:                callback function used to inform the demod to set the
+ *                     demodulator parameters needed to decode an analog or
+ *                     radio channel. The properties are passed via
+ *                     &struct analog_params.
+ * @has_signal:                returns 0xffff if has signal, or 0 if it doesn't.
+ * @get_afc:           Used only by analog TV core. Reports the frequency
+ *                     drift due to AFC.
+ * @tuner_status:      callback function that returns tuner status bits, e. g.
+ *                     %TUNER_STATUS_LOCKED and %TUNER_STATUS_STEREO.
+ * @standby:           set the tuner to standby mode.
+ * @release:           callback function called when frontend is detached.
+ *                     drivers should free any allocated memory.
+ * @i2c_gate_ctrl:     controls the I2C gate. Newer drivers should use I2C
+ *                     mux support instead.
+ * @set_config:                callback function used to send some tuner-specific
+ *                     parameters.
+ */
+struct analog_demod_ops {
+
+       struct analog_demod_info info;
+
+       void (*set_params)(struct dvb_frontend *fe,
+                          struct analog_parameters *params);
+       int  (*has_signal)(struct dvb_frontend *fe, u16 *signal);
+       int  (*get_afc)(struct dvb_frontend *fe, s32 *afc);
+       void (*tuner_status)(struct dvb_frontend *fe);
+       void (*standby)(struct dvb_frontend *fe);
+       void (*release)(struct dvb_frontend *fe);
+       int  (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable);
+
+       /** This is to allow setting tuner-specific configuration */
+       int (*set_config)(struct dvb_frontend *fe, void *priv_cfg);
+};
+
+struct dtv_frontend_properties;
+
+
+/**
+ * struct dvb_frontend_ops - Demodulation information and callbacks for
+ *                           ditialt TV
+ *
+ * @info:              embedded &struct dvb_tuner_info with tuner properties
+ * @delsys:            Delivery systems supported by the frontend
+ * @detach:            callback function called when frontend is detached.
+ *                     drivers should clean up, but not yet free the &struct
+ *                     dvb_frontend allocation.
+ * @release:           callback function called when frontend is ready to be
+ *                     freed.
+ *                     drivers should free any allocated memory.
+ * @release_sec:       callback function requesting that the Satelite Equipment
+ *                     Control (SEC) driver to release and free any memory
+ *                     allocated by the driver.
+ * @init:              callback function used to initialize the tuner device.
+ * @sleep:             callback function used to put the tuner to sleep.
+ * @write:             callback function used by some demod legacy drivers to
+ *                     allow other drivers to write data into their registers.
+ *                     Should not be used on new drivers.
+ * @tune:              callback function used by demod drivers that use
+ *                     @DVBFE_ALGO_HW to tune into a frequency.
+ * @get_frontend_algo: returns the desired hardware algorithm.
+ * @set_frontend:      callback function used to inform the demod to set the
+ *                     parameters for demodulating a digital TV channel.
+ *                     The properties to be used are stored at &struct
+ *                     dvb_frontend.dtv_property_cache. The demod can change
+ *                     the parameters to reflect the changes needed for the
+ *                     channel to be decoded, and update statistics.
+ * @get_tune_settings: callback function
+ * @get_frontend:      callback function used to inform the parameters
+ *                     actuall in use. The properties to be used are stored at
+ *                     &struct dvb_frontend.dtv_property_cache and update
+ *                     statistics. Please notice that it should not return
+ *                     an error code if the statistics are not available
+ *                     because the demog is not locked.
+ * @read_status:       returns the locking status of the frontend.
+ * @read_ber:          legacy callback function to return the bit error rate.
+ *                     Newer drivers should provide such info via DVBv5 API,
+ *                     e. g. @set_frontend;/@get_frontend, implementing this
+ *                     callback only if DVBv3 API compatibility is wanted.
+ * @read_signal_strength: legacy callback function to return the signal
+ *                     strength. Newer drivers should provide such info via
+ *                     DVBv5 API, e. g. @set_frontend/@get_frontend,
+ *                     implementing this callback only if DVBv3 API
+ *                     compatibility is wanted.
+ * @read_snr:          legacy callback function to return the Signal/Noise
+ *                     rate. Newer drivers should provide such info via
+ *                     DVBv5 API, e. g. @set_frontend/@get_frontend,
+ *                     implementing this callback only if DVBv3 API
+ *                     compatibility is wanted.
+ * @read_ucblocks:     legacy callback function to return the Uncorrected Error
+ *                     Blocks. Newer drivers should provide such info via
+ *                     DVBv5 API, e. g. @set_frontend/@get_frontend,
+ *                     implementing this callback only if DVBv3 API
+ *                     compatibility is wanted.
+ * @diseqc_reset_overload: callback function to implement the
+ *                     FE_DISEQC_RESET_OVERLOAD() ioctl (only Satellite)
+ * @diseqc_send_master_cmd: callback function to implement the
+ *                     FE_DISEQC_SEND_MASTER_CMD() ioctl (only Satellite).
+ * @diseqc_recv_slave_reply: callback function to implement the
+ *                     FE_DISEQC_RECV_SLAVE_REPLY() ioctl (only Satellite)
+ * @diseqc_send_burst: callback function to implement the
+ *                     FE_DISEQC_SEND_BURST() ioctl (only Satellite).
+ * @set_tone:          callback function to implement the
+ *                     FE_SET_TONE() ioctl (only Satellite).
+ * @set_voltage:       callback function to implement the
+ *                     FE_SET_VOLTAGE() ioctl (only Satellite).
+ * @enable_high_lnb_voltage: callback function to implement the
+ *                     FE_ENABLE_HIGH_LNB_VOLTAGE() ioctl (only Satellite).
+ * @dishnetwork_send_legacy_command: callback function to implement the
+ *                     FE_DISHNETWORK_SEND_LEGACY_CMD() ioctl (only Satellite).
+ *                     Drivers should not use this, except when the DVB
+ *                     core emulation fails to provide proper support (e.g.
+ *                     if @set_voltage takes more than 8ms to work), and
+ *                     when backward compatibility with this legacy API is
+ *                     required.
+ * @i2c_gate_ctrl:     controls the I2C gate. Newer drivers should use I2C
+ *                     mux support instead.
+ * @ts_bus_ctrl:       callback function used to take control of the TS bus.
+ * @set_lna:           callback function to power on/off/auto the LNA.
+ * @search:            callback function used on some custom algo search algos.
+ * @tuner_ops:         pointer to &struct dvb_tuner_ops
+ * @analog_ops:                pointer to &struct analog_demod_ops
+ */
+struct dvb_frontend_ops {
+       struct dvb_frontend_info info;
+
+       u8 delsys[MAX_DELSYS];
+
+       void (*detach)(struct dvb_frontend *fe);
+       void (*release)(struct dvb_frontend* fe);
+       void (*release_sec)(struct dvb_frontend* fe);
+
+       int (*init)(struct dvb_frontend* fe);
+       int (*sleep)(struct dvb_frontend* fe);
+
+       int (*write)(struct dvb_frontend* fe, const u8 buf[], int len);
+
+       /* if this is set, it overrides the default swzigzag */
+       int (*tune)(struct dvb_frontend* fe,
+                   bool re_tune,
+                   unsigned int mode_flags,
+                   unsigned int *delay,
+                   enum fe_status *status);
+
+       /* get frontend tuning algorithm from the module */
+       enum dvbfe_algo (*get_frontend_algo)(struct dvb_frontend *fe);
+
+       /* these two are only used for the swzigzag code */
+       int (*set_frontend)(struct dvb_frontend *fe);
+       int (*get_tune_settings)(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* settings);
+
+       int (*get_frontend)(struct dvb_frontend *fe,
+                           struct dtv_frontend_properties *props);
+
+       int (*read_status)(struct dvb_frontend *fe, enum fe_status *status);
+       int (*read_ber)(struct dvb_frontend* fe, u32* ber);
+       int (*read_signal_strength)(struct dvb_frontend* fe, u16* strength);
+       int (*read_snr)(struct dvb_frontend* fe, u16* snr);
+       int (*read_ucblocks)(struct dvb_frontend* fe, u32* ucblocks);
+
+       int (*diseqc_reset_overload)(struct dvb_frontend* fe);
+       int (*diseqc_send_master_cmd)(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd* cmd);
+       int (*diseqc_recv_slave_reply)(struct dvb_frontend* fe, struct dvb_diseqc_slave_reply* reply);
+       int (*diseqc_send_burst)(struct dvb_frontend *fe,
+                                enum fe_sec_mini_cmd minicmd);
+       int (*set_tone)(struct dvb_frontend *fe, enum fe_sec_tone_mode tone);
+       int (*set_voltage)(struct dvb_frontend *fe,
+                          enum fe_sec_voltage voltage);
+       int (*enable_high_lnb_voltage)(struct dvb_frontend* fe, long arg);
+       int (*dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd);
+       int (*i2c_gate_ctrl)(struct dvb_frontend* fe, int enable);
+       int (*ts_bus_ctrl)(struct dvb_frontend* fe, int acquire);
+       int (*set_lna)(struct dvb_frontend *);
+
+       /*
+        * These callbacks are for devices that implement their own
+        * tuning algorithms, rather than a simple swzigzag
+        */
+       enum dvbfe_search (*search)(struct dvb_frontend *fe);
+
+       struct dvb_tuner_ops tuner_ops;
+       struct analog_demod_ops analog_ops;
+};
+
+#ifdef __DVB_CORE__
+#define MAX_EVENT 8
+
+/* Used only internally at dvb_frontend.c */
+struct dvb_fe_events {
+       struct dvb_frontend_event events[MAX_EVENT];
+       int                       eventw;
+       int                       eventr;
+       int                       overflow;
+       wait_queue_head_t         wait_queue;
+       struct mutex              mtx;
+};
+#endif
+
+/**
+ * struct dtv_frontend_properties - contains a list of properties that are
+ *                                 specific to a digital TV standard.
+ *
+ * @frequency:         frequency in Hz for terrestrial/cable or in kHz for
+ *                     Satellite
+ * @modulation:                Frontend modulation type
+ * @voltage:           SEC voltage (only Satellite)
+ * @sectone:           SEC tone mode (only Satellite)
+ * @inversion:         Spectral inversion
+ * @fec_inner:         Forward error correction inner Code Rate
+ * @transmission_mode: Transmission Mode
+ * @bandwidth_hz:      Bandwidth, in Hz. A zero value means that userspace
+ *                     wants to autodetect.
+ * @guard_interval:    Guard Interval
+ * @hierarchy:         Hierarchy
+ * @symbol_rate:       Symbol Rate
+ * @code_rate_HP:      high priority stream code rate
+ * @code_rate_LP:      low priority stream code rate
+ * @pilot:             Enable/disable/autodetect pilot tones
+ * @rolloff:           Rolloff factor (alpha)
+ * @delivery_system:   FE delivery system (e. g. digital TV standard)
+ * @interleaving:      interleaving
+ * @isdbt_partial_reception: ISDB-T partial reception (only ISDB standard)
+ * @isdbt_sb_mode:     ISDB-T Sound Broadcast (SB) mode (only ISDB standard)
+ * @isdbt_sb_subchannel:       ISDB-T SB subchannel (only ISDB standard)
+ * @isdbt_sb_segment_idx:      ISDB-T SB segment index (only ISDB standard)
+ * @isdbt_sb_segment_count:    ISDB-T SB segment count (only ISDB standard)
+ * @isdbt_layer_enabled:       ISDB Layer enabled (only ISDB standard)
+ * @layer:             ISDB per-layer data (only ISDB standard)
+ * @layer.segment_count: Segment Count;
+ * @layer.fec:         per layer code rate;
+ * @layer.modulation:  per layer modulation;
+ * @layer.interleaving:         per layer interleaving.
+ * @stream_id:         If different than zero, enable substream filtering, if
+ *                     hardware supports (DVB-S2 and DVB-T2).
+ * @scrambling_sequence_index: Carries the index of the DVB-S2 physical layer
+ *                             scrambling sequence.
+ * @atscmh_fic_ver:    Version number of the FIC (Fast Information Channel)
+ *                     signaling data (only ATSC-M/H)
+ * @atscmh_parade_id:  Parade identification number (only ATSC-M/H)
+ * @atscmh_nog:                Number of MH groups per MH subframe for a designated
+ *                     parade (only ATSC-M/H)
+ * @atscmh_tnog:       Total number of MH groups including all MH groups
+ *                     belonging to all MH parades in one MH subframe
+ *                     (only ATSC-M/H)
+ * @atscmh_sgn:                Start group number (only ATSC-M/H)
+ * @atscmh_prc:                Parade repetition cycle (only ATSC-M/H)
+ * @atscmh_rs_frame_mode:      Reed Solomon (RS) frame mode (only ATSC-M/H)
+ * @atscmh_rs_frame_ensemble:  RS frame ensemble (only ATSC-M/H)
+ * @atscmh_rs_code_mode_pri:   RS code mode pri (only ATSC-M/H)
+ * @atscmh_rs_code_mode_sec:   RS code mode sec (only ATSC-M/H)
+ * @atscmh_sccc_block_mode:    Series Concatenated Convolutional Code (SCCC)
+ *                             Block Mode (only ATSC-M/H)
+ * @atscmh_sccc_code_mode_a:   SCCC code mode A (only ATSC-M/H)
+ * @atscmh_sccc_code_mode_b:   SCCC code mode B (only ATSC-M/H)
+ * @atscmh_sccc_code_mode_c:   SCCC code mode C (only ATSC-M/H)
+ * @atscmh_sccc_code_mode_d:   SCCC code mode D (only ATSC-M/H)
+ * @lna:               Power ON/OFF/AUTO the Linear Now-noise Amplifier (LNA)
+ * @strength:          DVBv5 API statistics: Signal Strength
+ * @cnr:               DVBv5 API statistics: Signal to Noise ratio of the
+ *                     (main) carrier
+ * @pre_bit_error:     DVBv5 API statistics: pre-Viterbi bit error count
+ * @pre_bit_count:     DVBv5 API statistics: pre-Viterbi bit count
+ * @post_bit_error:    DVBv5 API statistics: post-Viterbi bit error count
+ * @post_bit_count:    DVBv5 API statistics: post-Viterbi bit count
+ * @block_error:       DVBv5 API statistics: block error count
+ * @block_count:       DVBv5 API statistics: block count
+ *
+ * NOTE: derivated statistics like Uncorrected Error blocks (UCE) are
+ * calculated on userspace.
+ *
+ * Only a subset of the properties are needed for a given delivery system.
+ * For more info, consult the media_api.html with the documentation of the
+ * Userspace API.
+ */
+struct dtv_frontend_properties {
+       u32                     frequency;
+       enum fe_modulation      modulation;
+
+       enum fe_sec_voltage     voltage;
+       enum fe_sec_tone_mode   sectone;
+       enum fe_spectral_inversion inversion;
+       enum fe_code_rate       fec_inner;
+       enum fe_transmit_mode   transmission_mode;
+       u32                     bandwidth_hz;   /* 0 = AUTO */
+       enum fe_guard_interval  guard_interval;
+       enum fe_hierarchy       hierarchy;
+       u32                     symbol_rate;
+       enum fe_code_rate       code_rate_HP;
+       enum fe_code_rate       code_rate_LP;
+
+       enum fe_pilot           pilot;
+       enum fe_rolloff         rolloff;
+
+       enum fe_delivery_system delivery_system;
+
+       enum fe_interleaving    interleaving;
+
+       /* ISDB-T specifics */
+       u8                      isdbt_partial_reception;
+       u8                      isdbt_sb_mode;
+       u8                      isdbt_sb_subchannel;
+       u32                     isdbt_sb_segment_idx;
+       u32                     isdbt_sb_segment_count;
+       u8                      isdbt_layer_enabled;
+       struct {
+           u8                  segment_count;
+           enum fe_code_rate   fec;
+           enum fe_modulation  modulation;
+           u8                  interleaving;
+       } layer[3];
+
+       /* Multistream specifics */
+       u32                     stream_id;
+
+       /* Physical Layer Scrambling specifics */
+       u32                     scrambling_sequence_index;
+
+       /* ATSC-MH specifics */
+       u8                      atscmh_fic_ver;
+       u8                      atscmh_parade_id;
+       u8                      atscmh_nog;
+       u8                      atscmh_tnog;
+       u8                      atscmh_sgn;
+       u8                      atscmh_prc;
+
+       u8                      atscmh_rs_frame_mode;
+       u8                      atscmh_rs_frame_ensemble;
+       u8                      atscmh_rs_code_mode_pri;
+       u8                      atscmh_rs_code_mode_sec;
+       u8                      atscmh_sccc_block_mode;
+       u8                      atscmh_sccc_code_mode_a;
+       u8                      atscmh_sccc_code_mode_b;
+       u8                      atscmh_sccc_code_mode_c;
+       u8                      atscmh_sccc_code_mode_d;
+
+       u32                     lna;
+
+       /* statistics data */
+       struct dtv_fe_stats     strength;
+       struct dtv_fe_stats     cnr;
+       struct dtv_fe_stats     pre_bit_error;
+       struct dtv_fe_stats     pre_bit_count;
+       struct dtv_fe_stats     post_bit_error;
+       struct dtv_fe_stats     post_bit_count;
+       struct dtv_fe_stats     block_error;
+       struct dtv_fe_stats     block_count;
+};
+
+#define DVB_FE_NO_EXIT  0
+#define DVB_FE_NORMAL_EXIT      1
+#define DVB_FE_DEVICE_REMOVED   2
+#define DVB_FE_DEVICE_RESUME    3
+
+/**
+ * struct dvb_frontend - Frontend structure to be used on drivers.
+ *
+ * @refcount:          refcount to keep track of &struct dvb_frontend
+ *                     references
+ * @ops:               embedded &struct dvb_frontend_ops
+ * @dvb:               pointer to &struct dvb_adapter
+ * @demodulator_priv:  demod private data
+ * @tuner_priv:                tuner private data
+ * @frontend_priv:     frontend private data
+ * @sec_priv:          SEC private data
+ * @analog_demod_priv: Analog demod private data
+ * @dtv_property_cache:        embedded &struct dtv_frontend_properties
+ * @callback:          callback function used on some drivers to call
+ *                     either the tuner or the demodulator.
+ * @id:                        Frontend ID
+ * @exit:              Used to inform the DVB core that the frontend
+ *                     thread should exit (usually, means that the hardware
+ *                     got disconnected.
+ */
+
+struct dvb_frontend {
+       struct kref refcount;
+       struct dvb_frontend_ops ops;
+       struct dvb_adapter *dvb;
+       void *demodulator_priv;
+       void *tuner_priv;
+       void *frontend_priv;
+       void *sec_priv;
+       void *analog_demod_priv;
+       struct dtv_frontend_properties dtv_property_cache;
+#define DVB_FRONTEND_COMPONENT_TUNER 0
+#define DVB_FRONTEND_COMPONENT_DEMOD 1
+       int (*callback)(void *adapter_priv, int component, int cmd, int arg);
+       int id;
+       unsigned int exit;
+};
+
+/**
+ * dvb_register_frontend() - Registers a DVB frontend at the adapter
+ *
+ * @dvb: pointer to &struct dvb_adapter
+ * @fe: pointer to &struct dvb_frontend
+ *
+ * Allocate and initialize the private data needed by the frontend core to
+ * manage the frontend and calls dvb_register_device() to register a new
+ * frontend. It also cleans the property cache that stores the frontend
+ * parameters and selects the first available delivery system.
+ */
+int dvb_register_frontend(struct dvb_adapter *dvb,
+                                struct dvb_frontend *fe);
+
+/**
+ * dvb_unregister_frontend() - Unregisters a DVB frontend
+ *
+ * @fe: pointer to &struct dvb_frontend
+ *
+ * Stops the frontend kthread, calls dvb_unregister_device() and frees the
+ * private frontend data allocated by dvb_register_frontend().
+ *
+ * NOTE: This function doesn't frees the memory allocated by the demod,
+ * by the SEC driver and by the tuner. In order to free it, an explicit call to
+ * dvb_frontend_detach() is needed, after calling this function.
+ */
+int dvb_unregister_frontend(struct dvb_frontend *fe);
+
+/**
+ * dvb_frontend_detach() - Detaches and frees frontend specific data
+ *
+ * @fe: pointer to &struct dvb_frontend
+ *
+ * This function should be called after dvb_unregister_frontend(). It
+ * calls the SEC, tuner and demod release functions:
+ * &dvb_frontend_ops.release_sec, &dvb_frontend_ops.tuner_ops.release,
+ * &dvb_frontend_ops.analog_ops.release and &dvb_frontend_ops.release.
+ *
+ * If the driver is compiled with %CONFIG_MEDIA_ATTACH, it also decreases
+ * the module reference count, needed to allow userspace to remove the
+ * previously used DVB frontend modules.
+ */
+void dvb_frontend_detach(struct dvb_frontend *fe);
+
+/**
+ * dvb_frontend_suspend() - Suspends a Digital TV frontend
+ *
+ * @fe: pointer to &struct dvb_frontend
+ *
+ * This function prepares a Digital TV frontend to suspend.
+ *
+ * In order to prepare the tuner to suspend, if
+ * &dvb_frontend_ops.tuner_ops.suspend\(\) is available, it calls it. Otherwise,
+ * it will call &dvb_frontend_ops.tuner_ops.sleep\(\), if available.
+ *
+ * It will also call &dvb_frontend_ops.sleep\(\) to put the demod to suspend.
+ *
+ * The drivers should also call dvb_frontend_suspend\(\) as part of their
+ * handler for the &device_driver.suspend\(\).
+ */
+int dvb_frontend_suspend(struct dvb_frontend *fe);
+
+/**
+ * dvb_frontend_resume() - Resumes a Digital TV frontend
+ *
+ * @fe: pointer to &struct dvb_frontend
+ *
+ * This function resumes the usual operation of the tuner after resume.
+ *
+ * In order to resume the frontend, it calls the demod &dvb_frontend_ops.init\(\).
+ *
+ * If &dvb_frontend_ops.tuner_ops.resume\(\) is available, It, it calls it.
+ * Otherwise,t will call &dvb_frontend_ops.tuner_ops.init\(\), if available.
+ *
+ * Once tuner and demods are resumed, it will enforce that the SEC voltage and
+ * tone are restored to their previous values and wake up the frontend's
+ * kthread in order to retune the frontend.
+ *
+ * The drivers should also call dvb_frontend_resume() as part of their
+ * handler for the &device_driver.resume\(\).
+ */
+int dvb_frontend_resume(struct dvb_frontend *fe);
+
+/**
+ * dvb_frontend_reinitialise() - forces a reinitialisation at the frontend
+ *
+ * @fe: pointer to &struct dvb_frontend
+ *
+ * Calls &dvb_frontend_ops.init\(\) and &dvb_frontend_ops.tuner_ops.init\(\),
+ * and resets SEC tone and voltage (for Satellite systems).
+ *
+ * NOTE: Currently, this function is used only by one driver (budget-av).
+ * It seems to be due to address some special issue with that specific
+ * frontend.
+ */
+void dvb_frontend_reinitialise(struct dvb_frontend *fe);
+
+/**
+ * dvb_frontend_sleep_until() - Sleep for the amount of time given by
+ *                      add_usec parameter
+ *
+ * @waketime: pointer to &struct ktime_t
+ * @add_usec: time to sleep, in microseconds
+ *
+ * This function is used to measure the time required for the
+ * FE_DISHNETWORK_SEND_LEGACY_CMD() ioctl to work. It needs to be as precise
+ * as possible, as it affects the detection of the dish tone command at the
+ * satellite subsystem.
+ *
+ * Its used internally by the DVB frontend core, in order to emulate
+ * FE_DISHNETWORK_SEND_LEGACY_CMD() using the &dvb_frontend_ops.set_voltage\(\)
+ * callback.
+ *
+ * NOTE: it should not be used at the drivers, as the emulation for the
+ * legacy callback is provided by the Kernel. The only situation where this
+ * should be at the drivers is when there are some bugs at the hardware that
+ * would prevent the core emulation to work. On such cases, the driver would
+ * be writing a &dvb_frontend_ops.dishnetwork_send_legacy_command\(\) and
+ * calling this function directly.
+ */
+void dvb_frontend_sleep_until(ktime_t *waketime, u32 add_usec);
+
+#endif
diff --git a/include/media/dvb_math.h b/include/media/dvb_math.h
new file mode 100644 (file)
index 0000000..8690ec4
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * dvb-math provides some complex fixed-point math
+ * operations shared between the dvb related stuff
+ *
+ * Copyright (C) 2006 Christoph Pfister (christophpfister@gmail.com)
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ */
+
+#ifndef __DVB_MATH_H
+#define __DVB_MATH_H
+
+#include <linux/types.h>
+
+/**
+ * intlog2 - computes log2 of a value; the result is shifted left by 24 bits
+ *
+ * @value: The value (must be != 0)
+ *
+ * to use rational values you can use the following method:
+ *
+ *   intlog2(value) = intlog2(value * 2^x) - x * 2^24
+ *
+ * Some usecase examples:
+ *
+ *     intlog2(8) will give 3 << 24 = 3 * 2^24
+ *
+ *     intlog2(9) will give 3 << 24 + ... = 3.16... * 2^24
+ *
+ *     intlog2(1.5) = intlog2(3) - 2^24 = 0.584... * 2^24
+ *
+ *
+ * return: log2(value) * 2^24
+ */
+extern unsigned int intlog2(u32 value);
+
+/**
+ * intlog10 - computes log10 of a value; the result is shifted left by 24 bits
+ *
+ * @value: The value (must be != 0)
+ *
+ * to use rational values you can use the following method:
+ *
+ *   intlog10(value) = intlog10(value * 10^x) - x * 2^24
+ *
+ * An usecase example:
+ *
+ *     intlog10(1000) will give 3 << 24 = 3 * 2^24
+ *
+ *   due to the implementation intlog10(1000) might be not exactly 3 * 2^24
+ *
+ * look at intlog2 for similar examples
+ *
+ * return: log10(value) * 2^24
+ */
+extern unsigned int intlog10(u32 value);
+
+#endif
diff --git a/include/media/dvb_net.h b/include/media/dvb_net.h
new file mode 100644 (file)
index 0000000..5e31d37
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * dvb_net.h
+ *
+ * Copyright (C) 2001 Ralph Metzler for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _DVB_NET_H_
+#define _DVB_NET_H_
+
+#include <linux/module.h>
+#include <linux/netdevice.h>
+#include <linux/inetdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+
+#include <media/dvbdev.h>
+
+#define DVB_NET_DEVICES_MAX 10
+
+#ifdef CONFIG_DVB_NET
+
+/**
+ * struct dvb_net - describes a DVB network interface
+ *
+ * @dvbdev:            pointer to &struct dvb_device.
+ * @device:            array of pointers to &struct net_device.
+ * @state:             array of integers to each net device. A value
+ *                     different than zero means that the interface is
+ *                     in usage.
+ * @exit:              flag to indicate when the device is being removed.
+ * @demux:             pointer to &struct dmx_demux.
+ * @ioctl_mutex:       protect access to this struct.
+ *
+ * Currently, the core supports up to %DVB_NET_DEVICES_MAX (10) network
+ * devices.
+ */
+
+struct dvb_net {
+       struct dvb_device *dvbdev;
+       struct net_device *device[DVB_NET_DEVICES_MAX];
+       int state[DVB_NET_DEVICES_MAX];
+       unsigned int exit:1;
+       struct dmx_demux *demux;
+       struct mutex ioctl_mutex;
+};
+
+/**
+ * dvb_net_init - nitializes a digital TV network device and registers it.
+ *
+ * @adap:      pointer to &struct dvb_adapter.
+ * @dvbnet:    pointer to &struct dvb_net.
+ * @dmxdemux:  pointer to &struct dmx_demux.
+ */
+int dvb_net_init(struct dvb_adapter *adap, struct dvb_net *dvbnet,
+                 struct dmx_demux *dmxdemux);
+
+/**
+ * dvb_net_release - releases a digital TV network device and unregisters it.
+ *
+ * @dvbnet:    pointer to &struct dvb_net.
+ */
+void dvb_net_release(struct dvb_net *dvbnet);
+
+#else
+
+struct dvb_net {
+       struct dvb_device *dvbdev;
+};
+
+static inline void dvb_net_release(struct dvb_net *dvbnet)
+{
+}
+
+static inline int dvb_net_init(struct dvb_adapter *adap,
+                              struct dvb_net *dvbnet, struct dmx_demux *dmx)
+{
+       return 0;
+}
+
+#endif /* ifdef CONFIG_DVB_NET */
+
+#endif
diff --git a/include/media/dvb_ringbuffer.h b/include/media/dvb_ringbuffer.h
new file mode 100644 (file)
index 0000000..8ed6bcc
--- /dev/null
@@ -0,0 +1,280 @@
+/*
+ *
+ * dvb_ringbuffer.h: ring buffer implementation for the dvb driver
+ *
+ * Copyright (C) 2003 Oliver Endriss
+ * Copyright (C) 2004 Andrew de Quincey
+ *
+ * based on code originally found in av7110.c & dvb_ci.c:
+ * Copyright (C) 1999-2003 Ralph Metzler & Marcus Metzler
+ *                         for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ */
+
+#ifndef _DVB_RINGBUFFER_H_
+#define _DVB_RINGBUFFER_H_
+
+#include <linux/spinlock.h>
+#include <linux/wait.h>
+
+/**
+ * struct dvb_ringbuffer - Describes a ring buffer used at DVB framework
+ *
+ * @data: Area were the ringbuffer data is written
+ * @size: size of the ringbuffer
+ * @pread: next position to read
+ * @pwrite: next position to write
+ * @error: used by ringbuffer clients to indicate that an error happened.
+ * @queue: Wait queue used by ringbuffer clients to indicate when buffer
+ *         was filled
+ * @lock: Spinlock used to protect the ringbuffer
+ */
+struct dvb_ringbuffer {
+       u8               *data;
+       ssize_t           size;
+       ssize_t           pread;
+       ssize_t           pwrite;
+       int               error;
+
+       wait_queue_head_t queue;
+       spinlock_t        lock;
+};
+
+#define DVB_RINGBUFFER_PKTHDRSIZE 3
+
+/**
+ * dvb_ringbuffer_init - initialize ring buffer, lock and queue
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ * @data: pointer to the buffer where the data will be stored
+ * @len: bytes from ring buffer into @buf
+ */
+extern void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data,
+                               size_t len);
+
+/**
+ * dvb_ringbuffer_empty - test whether buffer is empty
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ */
+extern int dvb_ringbuffer_empty(struct dvb_ringbuffer *rbuf);
+
+/**
+ * dvb_ringbuffer_free - returns the number of free bytes in the buffer
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ *
+ * Return: number of free bytes in the buffer
+ */
+extern ssize_t dvb_ringbuffer_free(struct dvb_ringbuffer *rbuf);
+
+/**
+ * dvb_ringbuffer_avail - returns the number of bytes waiting in the buffer
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ *
+ * Return: number of bytes waiting in the buffer
+ */
+extern ssize_t dvb_ringbuffer_avail(struct dvb_ringbuffer *rbuf);
+
+/**
+ * dvb_ringbuffer_reset - resets the ringbuffer to initial state
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ *
+ * Resets 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
+ */
+
+/**
+ * dvb_ringbuffer_flush - flush buffer
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ */
+extern void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf);
+
+/**
+ * dvb_ringbuffer_flush_spinlock_wakeup- flush buffer protected by spinlock
+ *      and wake-up waiting task(s)
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ */
+extern void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf);
+
+/**
+ * DVB_RINGBUFFER_PEEK - peek at byte @offs in the buffer
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ * @offs: offset inside the ringbuffer
+ */
+#define DVB_RINGBUFFER_PEEK(rbuf, offs)        \
+                       ((rbuf)->data[((rbuf)->pread + (offs)) % (rbuf)->size])
+
+/**
+ * DVB_RINGBUFFER_SKIP - advance read ptr by @num bytes
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ * @num: number of bytes to advance
+ */
+#define DVB_RINGBUFFER_SKIP(rbuf, num) {\
+                       (rbuf)->pread = ((rbuf)->pread + (num)) % (rbuf)->size;\
+}
+
+/**
+ * dvb_ringbuffer_read_user - Reads a buffer into a user pointer
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ * @buf: pointer to the buffer where the data will be stored
+ * @len: bytes from ring buffer into @buf
+ *
+ * This variant assumes that the buffer is a memory at the userspace. So,
+ * it will internally call copy_to_user().
+ *
+ * Return: number of bytes transferred or -EFAULT
+ */
+extern ssize_t dvb_ringbuffer_read_user(struct dvb_ringbuffer *rbuf,
+                                  u8 __user *buf, size_t len);
+
+/**
+ * dvb_ringbuffer_read - Reads a buffer into a pointer
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ * @buf: pointer to the buffer where the data will be stored
+ * @len: bytes from ring buffer into @buf
+ *
+ * This variant assumes that the buffer is a memory at the Kernel space
+ *
+ * Return: number of bytes transferred or -EFAULT
+ */
+extern void dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf,
+                                  u8 *buf, size_t len);
+
+/*
+ * write routines & macros
+ */
+
+/**
+ * DVB_RINGBUFFER_WRITE_BYTE - write single byte to ring buffer
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ * @byte: byte to write
+ */
+#define DVB_RINGBUFFER_WRITE_BYTE(rbuf, byte)  \
+                       { (rbuf)->data[(rbuf)->pwrite] = (byte); \
+                       (rbuf)->pwrite = ((rbuf)->pwrite + 1) % (rbuf)->size; }
+
+/**
+ * dvb_ringbuffer_write - Writes a buffer into the ringbuffer
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ * @buf: pointer to the buffer where the data will be read
+ * @len: bytes from ring buffer into @buf
+ *
+ * This variant assumes that the buffer is a memory at the Kernel space
+ *
+ * return: number of bytes transferred or -EFAULT
+ */
+extern ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf,
+                                   size_t len);
+
+/**
+ * dvb_ringbuffer_write_user - Writes a buffer received via a user pointer
+ *
+ * @rbuf: pointer to struct dvb_ringbuffer
+ * @buf: pointer to the buffer where the data will be read
+ * @len: bytes from ring buffer into @buf
+ *
+ * This variant assumes that the buffer is a memory at the userspace. So,
+ * it will internally call copy_from_user().
+ *
+ * Return: number of bytes transferred or -EFAULT
+ */
+extern ssize_t dvb_ringbuffer_write_user(struct dvb_ringbuffer *rbuf,
+                                        const u8 __user *buf, size_t len);
+
+/**
+ * dvb_ringbuffer_pkt_write - Write a packet into the ringbuffer.
+ *
+ * @rbuf: Ringbuffer to write to.
+ * @buf: Buffer to write.
+ * @len: Length of buffer (currently limited to 65535 bytes max).
+ *
+ * Return: Number of bytes written, or -EFAULT, -ENOMEM, -EVINAL.
+ */
+extern ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8 *buf,
+                                       size_t len);
+
+/**
+ * dvb_ringbuffer_pkt_read_user - Read from a packet in the ringbuffer.
+ *
+ * @rbuf: Ringbuffer concerned.
+ * @idx: Packet index as returned by dvb_ringbuffer_pkt_next().
+ * @offset: Offset into packet to read from.
+ * @buf: Destination buffer for data.
+ * @len: Size of destination buffer.
+ *
+ * Return: Number of bytes read, or -EFAULT.
+ *
+ * .. note::
+ *
+ *    unlike dvb_ringbuffer_read(), this does **NOT** update the read pointer
+ *    in the ringbuffer. You must use dvb_ringbuffer_pkt_dispose() to mark a
+ *    packet as no longer required.
+ */
+extern ssize_t dvb_ringbuffer_pkt_read_user(struct dvb_ringbuffer *rbuf,
+                                           size_t idx,
+                                           int offset, u8 __user *buf,
+                                           size_t len);
+
+/**
+ * dvb_ringbuffer_pkt_read - Read from a packet in the ringbuffer.
+ * Note: unlike dvb_ringbuffer_read_user(), this DOES update the read pointer
+ * in the ringbuffer.
+ *
+ * @rbuf: Ringbuffer concerned.
+ * @idx: Packet index as returned by dvb_ringbuffer_pkt_next().
+ * @offset: Offset into packet to read from.
+ * @buf: Destination buffer for data.
+ * @len: Size of destination buffer.
+ *
+ * Return: Number of bytes read, or -EFAULT.
+ */
+extern ssize_t dvb_ringbuffer_pkt_read(struct dvb_ringbuffer *rbuf, size_t idx,
+                                      int offset, u8 *buf, size_t len);
+
+/**
+ * dvb_ringbuffer_pkt_dispose - Dispose of a packet in the ring buffer.
+ *
+ * @rbuf: Ring buffer concerned.
+ * @idx: Packet index as returned by dvb_ringbuffer_pkt_next().
+ */
+extern void dvb_ringbuffer_pkt_dispose(struct dvb_ringbuffer *rbuf, size_t idx);
+
+/**
+ * dvb_ringbuffer_pkt_next - Get the index of the next packet in a ringbuffer.
+ *
+ * @rbuf: Ringbuffer concerned.
+ * @idx: Previous packet index, or -1 to return the first packet index.
+ * @pktlen: On success, will be updated to contain the length of the packet
+ *          in bytes.
+ * returns Packet index (if >=0), or -1 if no packets available.
+ */
+extern ssize_t dvb_ringbuffer_pkt_next(struct dvb_ringbuffer *rbuf,
+                                      size_t idx, size_t *pktlen);
+
+#endif /* _DVB_RINGBUFFER_H_ */
diff --git a/include/media/dvb_vb2.h b/include/media/dvb_vb2.h
new file mode 100644 (file)
index 0000000..7a52984
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0
+ *
+ * dvb-vb2.h - DVB driver helper framework for streaming I/O
+ *
+ * Copyright (C) 2015 Samsung Electronics
+ *
+ * Author: jh1009.sung@samsung.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation.
+ */
+
+#ifndef _DVB_VB2_H
+#define _DVB_VB2_H
+
+#include <linux/mutex.h>
+#include <linux/poll.h>
+#include <linux/dvb/dmx.h>
+#include <media/videobuf2-core.h>
+#include <media/videobuf2-dma-contig.h>
+#include <media/videobuf2-vmalloc.h>
+
+enum dvb_buf_type {
+       DVB_BUF_TYPE_CAPTURE        = 1,
+       DVB_BUF_TYPE_OUTPUT         = 2,
+};
+
+#define DVB_VB2_STATE_NONE (0x0)
+#define DVB_VB2_STATE_INIT (0x1)
+#define DVB_VB2_STATE_REQBUFS (0x2)
+#define DVB_VB2_STATE_STREAMON (0x4)
+
+#define DVB_VB2_NAME_MAX (20)
+
+struct dvb_buffer {
+       struct vb2_buffer       vb;
+       struct list_head        list;
+};
+
+struct dvb_vb2_ctx {
+       struct vb2_queue        vb_q;
+       struct mutex            mutex;
+       spinlock_t              slock;
+       struct list_head        dvb_q;
+       struct dvb_buffer       *buf;
+       int     offset;
+       int     remain;
+       int     state;
+       int     buf_siz;
+       int     buf_cnt;
+       int     nonblocking;
+       char    name[DVB_VB2_NAME_MAX + 1];
+};
+
+int dvb_vb2_stream_on(struct dvb_vb2_ctx *ctx);
+int dvb_vb2_stream_off(struct dvb_vb2_ctx *ctx);
+#ifndef DVB_MMAP
+static inline int dvb_vb2_init(struct dvb_vb2_ctx *ctx,
+                              const char *name, int non_blocking)
+{
+       return 0;
+};
+static inline int dvb_vb2_release(struct dvb_vb2_ctx *ctx)
+{
+       return 0;
+};
+#define dvb_vb2_is_streaming(ctx) (0)
+#define dvb_vb2_fill_buffer(ctx, file, wait) (0)
+
+static inline unsigned int dvb_vb2_poll(struct dvb_vb2_ctx *ctx,
+                                       struct file *file,
+                                       poll_table *wait)
+{
+       return 0;
+}
+#else
+int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int non_blocking);
+int dvb_vb2_release(struct dvb_vb2_ctx *ctx);
+int dvb_vb2_is_streaming(struct dvb_vb2_ctx *ctx);
+int dvb_vb2_fill_buffer(struct dvb_vb2_ctx *ctx,
+                       const unsigned char *src, int len);
+unsigned int dvb_vb2_poll(struct dvb_vb2_ctx *ctx, struct file *file,
+                         poll_table *wait);
+#endif
+
+
+int dvb_vb2_reqbufs(struct dvb_vb2_ctx *ctx, struct dmx_requestbuffers *req);
+int dvb_vb2_querybuf(struct dvb_vb2_ctx *ctx, struct dmx_buffer *b);
+int dvb_vb2_expbuf(struct dvb_vb2_ctx *ctx, struct dmx_exportbuffer *exp);
+int dvb_vb2_qbuf(struct dvb_vb2_ctx *ctx, struct dmx_buffer *b);
+int dvb_vb2_dqbuf(struct dvb_vb2_ctx *ctx, struct dmx_buffer *b);
+int dvb_vb2_mmap(struct dvb_vb2_ctx *ctx, struct vm_area_struct *vma);
+
+#endif /* _DVB_VB2_H */
diff --git a/include/media/dvbdev.h b/include/media/dvbdev.h
new file mode 100644 (file)
index 0000000..bbc1c20
--- /dev/null
@@ -0,0 +1,407 @@
+/*
+ * dvbdev.h
+ *
+ * Copyright (C) 2000 Ralph Metzler & Marcus Metzler
+ *                    for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Lesser Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _DVBDEV_H_
+#define _DVBDEV_H_
+
+#include <linux/types.h>
+#include <linux/poll.h>
+#include <linux/fs.h>
+#include <linux/list.h>
+#include <media/media-device.h>
+
+#define DVB_MAJOR 212
+
+#if defined(CONFIG_DVB_MAX_ADAPTERS) && CONFIG_DVB_MAX_ADAPTERS > 0
+  #define DVB_MAX_ADAPTERS CONFIG_DVB_MAX_ADAPTERS
+#else
+  #define DVB_MAX_ADAPTERS 16
+#endif
+
+#define DVB_UNSET (-1)
+
+/* List of DVB device types */
+
+/**
+ * enum dvb_device_type - type of the Digital TV device
+ *
+ * @DVB_DEVICE_SEC:            Digital TV standalone Common Interface (CI)
+ * @DVB_DEVICE_FRONTEND:       Digital TV frontend.
+ * @DVB_DEVICE_DEMUX:          Digital TV demux.
+ * @DVB_DEVICE_DVR:            Digital TV digital video record (DVR).
+ * @DVB_DEVICE_CA:             Digital TV Conditional Access (CA).
+ * @DVB_DEVICE_NET:            Digital TV network.
+ *
+ * @DVB_DEVICE_VIDEO:          Digital TV video decoder.
+ *                             Deprecated. Used only on av7110-av.
+ * @DVB_DEVICE_AUDIO:          Digital TV audio decoder.
+ *                             Deprecated. Used only on av7110-av.
+ * @DVB_DEVICE_OSD:            Digital TV On Screen Display (OSD).
+ *                             Deprecated. Used only on av7110.
+ */
+enum dvb_device_type {
+       DVB_DEVICE_SEC,
+       DVB_DEVICE_FRONTEND,
+       DVB_DEVICE_DEMUX,
+       DVB_DEVICE_DVR,
+       DVB_DEVICE_CA,
+       DVB_DEVICE_NET,
+
+       DVB_DEVICE_VIDEO,
+       DVB_DEVICE_AUDIO,
+       DVB_DEVICE_OSD,
+};
+
+#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_frontend;
+
+/**
+ * struct dvb_adapter - represents a Digital TV adapter using Linux DVB API
+ *
+ * @num:               Number of the adapter
+ * @list_head:         List with the DVB adapters
+ * @device_list:       List with the DVB devices
+ * @name:              Name of the adapter
+ * @proposed_mac:      proposed MAC address for the adapter
+ * @priv:              private data
+ * @device:            pointer to struct device
+ * @module:            pointer to struct module
+ * @mfe_shared:                mfe shared: indicates mutually exclusive frontends
+ *                     Thie usage of this flag is currently deprecated
+ * @mfe_dvbdev:                Frontend device in use, in the case of MFE
+ * @mfe_lock:          Lock to prevent using the other frontends when MFE is
+ *                     used.
+ * @mdev:              pointer to struct media_device, used when the media
+ *                     controller is used.
+ * @conn:              RF connector. Used only if the device has no separate
+ *                     tuner.
+ * @conn_pads:         pointer to struct media_pad associated with @conn;
+ */
+struct dvb_adapter {
+       int num;
+       struct list_head list_head;
+       struct list_head device_list;
+       const char *name;
+       u8 proposed_mac [6];
+       void* priv;
+
+       struct device *device;
+
+       struct module *module;
+
+       int mfe_shared;                 /* indicates mutually exclusive frontends */
+       struct dvb_device *mfe_dvbdev;  /* frontend device in use */
+       struct mutex mfe_lock;          /* access lock for thread creation */
+
+#if defined(CONFIG_MEDIA_CONTROLLER_DVB)
+       struct media_device *mdev;
+       struct media_entity *conn;
+       struct media_pad *conn_pads;
+#endif
+};
+
+/**
+ * struct dvb_device - represents a DVB device node
+ *
+ * @list_head: List head with all DVB devices
+ * @fops:      pointer to struct file_operations
+ * @adapter:   pointer to the adapter that holds this device node
+ * @type:      type of the device, as defined by &enum dvb_device_type.
+ * @minor:     devnode minor number. Major number is always DVB_MAJOR.
+ * @id:                device ID number, inside the adapter
+ * @readers:   Initialized by the caller. Each call to open() in Read Only mode
+ *             decreases this counter by one.
+ * @writers:   Initialized by the caller. Each call to open() in Read/Write
+ *             mode decreases this counter by one.
+ * @users:     Initialized by the caller. Each call to open() in any mode
+ *             decreases this counter by one.
+ * @wait_queue:        wait queue, used to wait for certain events inside one of
+ *             the DVB API callers
+ * @kernel_ioctl: callback function used to handle ioctl calls from userspace.
+ * @name:      Name to be used for the device at the Media Controller
+ * @entity:    pointer to struct media_entity associated with the device node
+ * @pads:      pointer to struct media_pad associated with @entity;
+ * @priv:      private data
+ * @intf_devnode: Pointer to media_intf_devnode. Used by the dvbdev core to
+ *             store the MC device node interface
+ * @tsout_num_entities: Number of Transport Stream output entities
+ * @tsout_entity: array with MC entities associated to each TS output node
+ * @tsout_pads: array with the source pads for each @tsout_entity
+ *
+ * This structure is used by the DVB core (frontend, CA, net, demux) in
+ * order to create the device nodes. Usually, driver should not initialize
+ * this struct diretly.
+ */
+struct dvb_device {
+       struct list_head list_head;
+       const struct file_operations *fops;
+       struct dvb_adapter *adapter;
+       enum dvb_device_type type;
+       int minor;
+       u32 id;
+
+       /* in theory, 'users' can vanish now,
+          but I don't want to change too much now... */
+       int readers;
+       int writers;
+       int users;
+
+       wait_queue_head_t         wait_queue;
+       /* don't really need those !? -- FIXME: use video_usercopy  */
+       int (*kernel_ioctl)(struct file *file, unsigned int cmd, void *arg);
+
+       /* Needed for media controller register/unregister */
+#if defined(CONFIG_MEDIA_CONTROLLER_DVB)
+       const char *name;
+
+       /* Allocated and filled inside dvbdev.c */
+       struct media_intf_devnode *intf_devnode;
+
+       unsigned tsout_num_entities;
+       struct media_entity *entity, *tsout_entity;
+       struct media_pad *pads, *tsout_pads;
+#endif
+
+       void *priv;
+};
+
+/**
+ * dvb_register_adapter - Registers a new DVB adapter
+ *
+ * @adap:      pointer to struct dvb_adapter
+ * @name:      Adapter's name
+ * @module:    initialized with THIS_MODULE at the caller
+ * @device:    pointer to struct device that corresponds to the device driver
+ * @adapter_nums: Array with a list of the numbers for @dvb_register_adapter;
+ *             to select among them. Typically, initialized with:
+ *             DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nums)
+ */
+int dvb_register_adapter(struct dvb_adapter *adap, const char *name,
+                        struct module *module, struct device *device,
+                        short *adapter_nums);
+
+/**
+ * dvb_unregister_adapter - Unregisters a DVB adapter
+ *
+ * @adap:      pointer to struct dvb_adapter
+ */
+int dvb_unregister_adapter(struct dvb_adapter *adap);
+
+/**
+ * dvb_register_device - Registers a new DVB device
+ *
+ * @adap:      pointer to struct dvb_adapter
+ * @pdvbdev:   pointer to the place where the new struct dvb_device will be
+ *             stored
+ * @template:  Template used to create &pdvbdev;
+ * @priv:      private data
+ * @type:      type of the device, as defined by &enum dvb_device_type.
+ * @demux_sink_pads: Number of demux outputs, to be used to create the TS
+ *             outputs via the Media Controller.
+ */
+int dvb_register_device(struct dvb_adapter *adap,
+                       struct dvb_device **pdvbdev,
+                       const struct dvb_device *template,
+                       void *priv,
+                       enum dvb_device_type type,
+                       int demux_sink_pads);
+
+/**
+ * dvb_remove_device - Remove a registered DVB device
+ *
+ * This does not free memory.  To do that, call dvb_free_device().
+ *
+ * @dvbdev:    pointer to struct dvb_device
+ */
+void dvb_remove_device(struct dvb_device *dvbdev);
+
+/**
+ * dvb_free_device - Free memory occupied by a DVB device.
+ *
+ * Call dvb_unregister_device() before calling this function.
+ *
+ * @dvbdev:    pointer to struct dvb_device
+ */
+void dvb_free_device(struct dvb_device *dvbdev);
+
+/**
+ * dvb_unregister_device - Unregisters a DVB device
+ *
+ * This is a combination of dvb_remove_device() and dvb_free_device().
+ * Using this function is usually a mistake, and is often an indicator
+ * for a use-after-free bug (when a userspace process keeps a file
+ * handle to a detached device).
+ *
+ * @dvbdev:    pointer to struct dvb_device
+ */
+void dvb_unregister_device(struct dvb_device *dvbdev);
+
+#ifdef CONFIG_MEDIA_CONTROLLER_DVB
+/**
+ * dvb_create_media_graph - Creates media graph for the Digital TV part of the
+ *                             device.
+ *
+ * @adap:                      pointer to &struct dvb_adapter
+ * @create_rf_connector:       if true, it creates the RF connector too
+ *
+ * This function checks all DVB-related functions at the media controller
+ * entities and creates the needed links for the media graph. It is
+ * capable of working with multiple tuners or multiple frontends, but it
+ * won't create links if the device has multiple tuners and multiple frontends
+ * or if the device has multiple muxes. In such case, the caller driver should
+ * manually create the remaining links.
+ */
+__must_check int dvb_create_media_graph(struct dvb_adapter *adap,
+                                       bool create_rf_connector);
+
+/**
+ * dvb_register_media_controller - registers a media controller at DVB adapter
+ *
+ * @adap:                      pointer to &struct dvb_adapter
+ * @mdev:                      pointer to &struct media_device
+ */
+static inline void dvb_register_media_controller(struct dvb_adapter *adap,
+                                                struct media_device *mdev)
+{
+       adap->mdev = mdev;
+}
+
+/**
+ * dvb_get_media_controller - gets the associated media controller
+ *
+ * @adap:                      pointer to &struct dvb_adapter
+ */
+static inline struct media_device
+*dvb_get_media_controller(struct dvb_adapter *adap)
+{
+       return adap->mdev;
+}
+#else
+static inline
+int dvb_create_media_graph(struct dvb_adapter *adap,
+                          bool create_rf_connector)
+{
+       return 0;
+};
+#define dvb_register_media_controller(a, b) {}
+#define dvb_get_media_controller(a) NULL
+#endif
+
+/**
+ * dvb_generic_open - Digital TV open function, used by DVB devices
+ *
+ * @inode: pointer to &struct inode.
+ * @file: pointer to &struct file.
+ *
+ * Checks if a DVB devnode is still valid, and if the permissions are
+ * OK and increment negative use count.
+ */
+int dvb_generic_open(struct inode *inode, struct file *file);
+
+/**
+ * dvb_generic_close - Digital TV close function, used by DVB devices
+ *
+ * @inode: pointer to &struct inode.
+ * @file: pointer to &struct file.
+ *
+ * Checks if a DVB devnode is still valid, and if the permissions are
+ * OK and decrement negative use count.
+ */
+int dvb_generic_release(struct inode *inode, struct file *file);
+
+/**
+ * dvb_generic_ioctl - Digital TV close function, used by DVB devices
+ *
+ * @file: pointer to &struct file.
+ * @cmd: Ioctl name.
+ * @arg: Ioctl argument.
+ *
+ * Checks if a DVB devnode and struct dvbdev.kernel_ioctl is still valid.
+ * If so, calls dvb_usercopy().
+ */
+long dvb_generic_ioctl(struct file *file,
+                      unsigned int cmd, unsigned long arg);
+
+/**
+ * dvb_usercopy - copies data from/to userspace memory when an ioctl is
+ *      issued.
+ *
+ * @file: Pointer to struct &file.
+ * @cmd: Ioctl name.
+ * @arg: Ioctl argument.
+ * @func: function that will actually handle the ioctl
+ *
+ * Ancillary function that uses ioctl direction and size to copy from
+ * userspace. Then, it calls @func, and, if needed, data is copied back
+ * to userspace.
+ */
+int dvb_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
+                int (*func)(struct file *file, unsigned int cmd, void *arg));
+
+/** generic DVB attach function. */
+#ifdef CONFIG_MEDIA_ATTACH
+
+/**
+ * dvb_attach - attaches a DVB frontend into the DVB core.
+ *
+ * @FUNCTION:  function on a frontend module to be called.
+ * @ARGS...:   @FUNCTION arguments.
+ *
+ * This ancillary function loads a frontend module in runtime and runs
+ * the @FUNCTION function there, with @ARGS.
+ * As it increments symbol usage cont, at unregister, dvb_detach()
+ * should be called.
+ */
+#define dvb_attach(FUNCTION, ARGS...) ({ \
+       void *__r = NULL; \
+       typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
+       if (__a) { \
+               __r = (void *) __a(ARGS); \
+               if (__r == NULL) \
+                       symbol_put(FUNCTION); \
+       } else { \
+               printk(KERN_ERR "DVB: Unable to find symbol "#FUNCTION"()\n"); \
+       } \
+       __r; \
+})
+
+/**
+ * dvb_detach - detaches a DVB frontend loaded via dvb_attach()
+ *
+ * @FUNC:      attach function
+ *
+ * Decrements usage count for a function previously called via dvb_attach().
+ */
+
+#define dvb_detach(FUNC)       symbol_put_addr(FUNC)
+
+#else
+#define dvb_attach(FUNCTION, ARGS...) ({ \
+       FUNCTION(ARGS); \
+})
+
+#define dvb_detach(FUNC)       {}
+
+#endif
+
+#endif /* #ifndef _DVBDEV_H_ */
index a14ac7711c925adc93ae504f666e312622bf53ca..c9c81990a56cc12fa67c5b88dfcedefc524d5920 100644 (file)
@@ -1,9 +1,9 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-#include <dvbdev.h>
-#include <dmxdev.h>
-#include <dvb_demux.h>
-#include <dvb_net.h>
-#include <dvb_frontend.h>
+#include <media/dvbdev.h>
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_net.h>
+#include <media/dvb_frontend.h>
 
 #ifndef _VIDEOBUF_DVB_H_
 #define        _VIDEOBUF_DVB_H_
index 5a31faa24f1a7ac26e12826f9396fb1f3f6b3c3d..8605366ec87c8af8efe18bc78c201f75f6dd0dd8 100644 (file)
@@ -2,12 +2,11 @@
 #ifndef _VIDEOBUF2_DVB_H_
 #define        _VIDEOBUF2_DVB_H_
 
-#include <dvbdev.h>
-#include <dmxdev.h>
-#include <dvb_demux.h>
-#include <dvb_net.h>
-#include <dvb_frontend.h>
-
+#include <media/dvbdev.h>
+#include <media/dmxdev.h>
+#include <media/dvb_demux.h>
+#include <media/dvb_net.h>
+#include <media/dvb_frontend.h>
 #include <media/videobuf2-v4l2.h>
 
 /* We don't actually need to include media-device.h here */