Skip to content

Commit

Permalink
Merge tag 'media/v5.8-1' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - Media documentation is now split into admin-guide, driver-api and
   userspace-api books (a longstanding request from Jon);

 - The media Kconfig was reorganized, in order to make easier to select
   drivers and their dependencies;

 - The testing drivers now has a separate directory;

 - added a new driver for Rockchip Video Decoder IP;

 - The atomisp staging driver was resurrected. It is meant to work with
   4 generations of cameras on Atom-based laptops, tablets and cell
   phones. So, it seems worth investing time to cleanup this driver and
   making it in good shape.

 - Added some V4L2 core ancillary routines to help with h264 codecs;

 - Added an ov2740 image sensor driver;

 - The si2157 gained support for Analog TV, which, in turn, added
   support for some cx231xx and cx23885 boards to also support analog
   standards;

 - Added some V4L2 controls (V4L2_CID_CAMERA_ORIENTATION and
   V4L2_CID_CAMERA_SENSOR_ROTATION) to help identifying where the camera
   is located at the device;

 - VIDIOC_ENUM_FMT was extended to support MC-centric devices;

 - Lots of drivers improvements and cleanups.

* tag 'media/v5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (503 commits)
  media: Documentation: media: Refer to mbus format documentation from CSI-2 docs
  media: s5k5baf: Replace zero-length array with flexible-array
  media: i2c: imx219: Drop <linux/clk-provider.h> and <linux/clkdev.h>
  media: i2c: Add ov2740 image sensor driver
  media: ov8856: Implement sensor module revision identification
  media: ov8856: Add devicetree support
  media: dt-bindings: ov8856: Document YAML bindings
  media: dvb-usb: Add Cinergy S2 PCIe Dual Port support
  media: dvbdev: Fix tuner->demod media controller link
  media: dt-bindings: phy: phy-rockchip-dphy-rx0: move rockchip dphy rx0 bindings out of staging
  media: staging: dt-bindings: phy-rockchip-dphy-rx0: remove non-used reg property
  media: atomisp: unify the version for isp2401 a0 and b0 versions
  media: atomisp: update TODO with the current data
  media: atomisp: adjust some code at sh_css that could be broken
  media: atomisp: don't produce errs for ignored IRQs
  media: atomisp: print IRQ when debugging
  media: atomisp: isp_mmu: don't use kmem_cache
  media: atomisp: add a notice about possible leak resources
  media: atomisp: disable the dynamic and reserved pools
  media: atomisp: turn on camera before setting it
  ...
  • Loading branch information
torvalds committed Jun 4, 2020
2 parents ee01c4d + 938b29d commit a98f670
Show file tree
Hide file tree
Showing 1,698 changed files with 161,786 additions and 7,165 deletions.
2 changes: 1 addition & 1 deletion Documentation/ABI/testing/debugfs-cec-error-inj
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ when changes are made.

The following CEC error injection implementations exist:

- Documentation/media/uapi/cec/cec-pin-error-inj.rst
- Documentation/userspace-api/media/cec/cec-pin-error-inj.rst
10 changes: 5 additions & 5 deletions Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit;

# $2 sphinx builder e.g. "html"
# $3 name of the build subfolder / e.g. "media", used as:
# $3 name of the build subfolder / e.g. "userspace-api/media", used as:
# * dest folder relative to $(BUILDDIR) and
# * cache folder relative to $(BUILDDIR)/.doctrees
# $4 dest subfolder e.g. "man" for man pages at media/man
# $4 dest subfolder e.g. "man" for man pages at userspace-api/media/man
# $5 reST source folder relative to $(srctree)/$(src),
# e.g. "media" for the linux-tv book-set at ./Documentation/media
# e.g. "userspace-api/media" for the linux-tv book-set at ./Documentation/userspace-api/media

quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media $2 && \
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/userspace-api/media $2 && \
PYTHONDONTWRITEBYTECODE=1 \
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
$(PYTHON) $(srctree)/scripts/jobserver-exec \
Expand Down Expand Up @@ -124,7 +124,7 @@ refcheckdocs:

cleandocs:
$(Q)rm -rf $(BUILDDIR)
$(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media clean
$(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/userspace-api/media clean

dochelp:
@echo ' Linux kernel internal documentation in different formats from ReST:'
Expand Down
1 change: 1 addition & 0 deletions Documentation/admin-guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ configure specific aspects of kernel behavior to your liking.
lockup-watchdogs
LSM/index
md
media/index
mm/index
module-signing
mono
Expand Down
4 changes: 2 additions & 2 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
bttv.card= [HW,V4L] bttv (bt848 + bt878 based grabber cards)
bttv.radio= Most important insmod options are available as
kernel args too.
bttv.pll= See Documentation/media/v4l-drivers/bttv.rst
bttv.pll= See Documentation/admin-guide/media/bttv.rst
bttv.tuner=

bulk_remove=off [PPC] This parameter disables the use of the pSeries
Expand Down Expand Up @@ -2746,7 +2746,7 @@
See Documentation/admin-guide/pm/sleep-states.rst.

meye.*= [HW] Set MotionEye Camera parameters
See Documentation/media/v4l-drivers/meye.rst.
See Documentation/admin-guide/media/meye.rst.

mfgpt_irq= [IA-32] Specify the IRQ to use for the
Multi-Function General Purpose Timers on AMD Geode
Expand Down
94 changes: 94 additions & 0 deletions Documentation/admin-guide/media/avermedia.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
.. SPDX-License-Identifier: GPL-2.0
======================================
Avermedia DVB-T on BT878 Release Notes
======================================

February 14th 2006

.. note::

Several other Avermedia devices are supported. For a more
broader and updated content about that, please check:

https://linuxtv.org/wiki/index.php/AVerMedia

The Avermedia DVB-T
~~~~~~~~~~~~~~~~~~~

The Avermedia DVB-T is a budget PCI DVB card. It has 3 inputs:

* RF Tuner Input
* Composite Video Input (RCA Jack)
* SVIDEO Input (Mini-DIN)

The RF Tuner Input is the input to the tuner module of the
card. The Tuner is otherwise known as the "Frontend" . The
Frontend of the Avermedia DVB-T is a Microtune 7202D. A timely
post to the linux-dvb mailing list ascertained that the
Microtune 7202D is supported by the sp887x driver which is
found in the dvb-hw CVS module.

The DVB-T card is based around the BT878 chip which is a very
common multimedia bridge and often found on Analogue TV cards.
There is no on-board MPEG2 decoder, which means that all MPEG2
decoding must be done in software, or if you have one, on an
MPEG2 hardware decoding card or chipset.


Getting the card going
~~~~~~~~~~~~~~~~~~~~~~

At this stage, it has not been able to ascertain the
functionality of the remaining device nodes in respect of the
Avermedia DVBT. However, full functionality in respect of
tuning, receiving and supplying the MPEG2 data stream is
possible with the currently available versions of the driver.
It may be possible that additional functionality is available
from the card (i.e. viewing the additional analogue inputs
that the card presents), but this has not been tested yet. If
I get around to this, I'll update the document with whatever I
find.

To power up the card, load the following modules in the
following order:

* modprobe bttv (normally loaded automatically)
* modprobe dvb-bt8xx (or place dvb-bt8xx in /etc/modules)

Insertion of these modules into the running kernel will
activate the appropriate DVB device nodes. It is then possible
to start accessing the card with utilities such as scan, tzap,
dvbstream etc.

The frontend module sp887x.o, requires an external firmware.
Please use the command "get_dvb_firmware sp887x" to download
it. Then copy it to /usr/lib/hotplug/firmware or /lib/firmware/
(depending on configuration of firmware hotplug).

Known Limitations
~~~~~~~~~~~~~~~~~

At present I can say with confidence that the frontend tunes
via /dev/dvb/adapter{x}/frontend0 and supplies an MPEG2 stream
via /dev/dvb/adapter{x}/dvr0. I have not tested the
functionality of any other part of the card yet. I will do so
over time and update this document.

There are some limitations in the i2c layer due to a returned
error message inconsistency. Although this generates errors in
dmesg and the system logs, it does not appear to affect the
ability of the frontend to function correctly.

Further Update
~~~~~~~~~~~~~~

dvbstream and VideoLAN Client on windows works a treat with
DVB, in fact this is currently serving as my main way of
viewing DVB-T at the moment. Additionally, VLC is happily
decoding HDTV signals, although the PC is dropping the odd
frame here and there - I assume due to processing capability -
as all the decoding is being done under windows in software.

Many thanks to Nigel Pearson for the updates to this document
since the recent revision of the driver.
156 changes: 156 additions & 0 deletions Documentation/admin-guide/media/bt8xx.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
.. SPDX-License-Identifier: GPL-2.0
==================================
How to get the bt8xx cards working
==================================

Authors:
Richard Walker,
Jamie Honan,
Michael Hunold,
Manu Abraham,
Uwe Bugla,
Michael Krufky

General information
-------------------

This class of cards has a bt878a as the PCI interface, and require the bttv driver
for accessing the i2c bus and the gpio pins of the bt8xx chipset.

Please see :doc:`bttv-cardlist` for a complete list of Cards based on the
Conexant Bt8xx PCI bridge supported by the Linux Kernel.

In order to be able to compile the kernel, some config options should be
enabled::

./scripts/config -e PCI
./scripts/config -e INPUT
./scripts/config -m I2C
./scripts/config -m MEDIA_SUPPORT
./scripts/config -e MEDIA_PCI_SUPPORT
./scripts/config -e MEDIA_ANALOG_TV_SUPPORT
./scripts/config -e MEDIA_DIGITAL_TV_SUPPORT
./scripts/config -e MEDIA_RADIO_SUPPORT
./scripts/config -e RC_CORE
./scripts/config -m VIDEO_BT848
./scripts/config -m DVB_BT8XX

If you want to automatically support all possible variants of the Bt8xx
cards, you should also do::

./scripts/config -e MEDIA_SUBDRV_AUTOSELECT

.. note::

Please use the following options with care as deselection of drivers which
are in fact necessary may result in DVB devices that cannot be tuned due
to lack of driver support.

If your goal is to just support an specific board, you may, instead,
disable MEDIA_SUBDRV_AUTOSELECT and manually select the frontend drivers
required by your board. With that, you can save some RAM.

You can do that by calling make xconfig/qconfig/menuconfig and look at
the options on those menu options (only enabled if
``Autoselect ancillary drivers`` is disabled:

#) ``Device drivers`` => ``Multimedia support`` => ``Customize TV tuners``
#) ``Device drivers`` => ``Multimedia support`` => ``Customize DVB frontends``

Then, on each of the above menu, please select your card-specific
frontend and tuner modules.


Loading Modules
---------------

Regular case: If the bttv driver detects a bt8xx-based DVB card, all
frontend and backend modules will be loaded automatically.

Exceptions are:

- Old TV cards without EEPROMs, sharing a common PCI subsystem ID;
- Old TwinHan DST cards or clones with or without CA slot and not
containing an Eeprom.

In the following cases overriding the PCI type detection for bttv and
for dvb-bt8xx drivers by passing modprobe parameters may be necessary.

Running TwinHan and Clones
~~~~~~~~~~~~~~~~~~~~~~~~~~

As shown at :doc:`bttv-cardlist`, TwinHan and
clones use ``card=113`` modprobe parameter. So, in order to properly
detect it for devices without EEPROM, you should use::

$ modprobe bttv card=113
$ modprobe dst

Useful parameters for verbosity level and debugging the dst module::

verbose=0: messages are disabled
1: only error messages are displayed
2: notifications are displayed
3: other useful messages are displayed
4: debug setting
dst_addons=0: card is a free to air (FTA) card only
0x20: card has a conditional access slot for scrambled channels
dst_algo=0: (default) Software tuning algorithm
1: Hardware tuning algorithm


The autodetected values are determined by the cards' "response string".

In your logs see f. ex.: dst_get_device_id: Recognize [DSTMCI].

For bug reports please send in a complete log with verbose=4 activated.
Please also see :doc:`ci`.

Running multiple cards
~~~~~~~~~~~~~~~~~~~~~~

See :doc:`bttv-cardlist` for a complete list of
Card ID. Some examples:

=========================== ===
Brand name ID
=========================== ===
Pinnacle PCTV Sat 94
Nebula Electronics Digi TV 104
pcHDTV HD-2000 TV 112
Twinhan DST and clones 113
Avermedia AverTV DVB-T 77: 123
Avermedia AverTV DVB-T 761 124
DViCO FusionHDTV DVB-T Lite 128
DViCO FusionHDTV 5 Lite 135
=========================== ===

.. note::

When you have multiple cards, the order of the card ID should
match the order where they're detected by the system. Please notice
that removing/inserting other PCI cards may change the detection
order.

Example::

$ modprobe bttv card=113 card=135

In case of further problems please subscribe and send questions to
the mailing list: [email protected].

Probing the cards with broken PCI subsystem ID
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There are some TwinHan cards whose EEPROM has become corrupted for some
reason. The cards do not have a correct PCI subsystem ID.
Still, it is possible to force probing the cards with::

$ echo 109e 0878 $subvendor $subdevice > \
/sys/bus/pci/drivers/bt878/new_id

The two numbers there are::

109e: PCI_VENDOR_ID_BROOKTREE
0878: PCI_DEVICE_ID_BROOKTREE_878
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BTTV cards list

* - Card number
- Card name
- PCI IDs
- PCI subsystem IDs

* - 0
- *** UNKNOWN/GENERIC ***
Expand Down
Loading

0 comments on commit a98f670

Please sign in to comment.