Skip to content

Commit

Permalink
Merge tag 'media/v4.2-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:

 - Lots of improvements at the DVB API DocBook documentation.  Now, the
   frontend and the network APIs are fully in sync with the Kernel and
   looks more like the rest of the media documentation;

 - New frontend driver: cx24120

 - New driver for a PCI device: cobalt.  This driver is actually not
   sold in the market, but it is a good example of a multi-HDMI input
   device;

 - The dt3155 driver were promoted from staging;

 - The mantis driver got remote controller support;

 - New V4L2 driver for ST bdisp SoC chipsets;

 - Make sparse and smatch happier: several bugs were solved by fixing
   the issues reported by those static code analyzers.

 - Lots of new device additions, new features, improvements and cleanups
   at the existing drivers.

* tag 'media/v4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (553 commits)
  [media] lmedm04: fix the range for relative measurements
  [media] lmedm04: use u32 instead of u64 for relative stats
  [media] omap3isp: remove unused var
  [media] saa7134: fix page size on some archs
  [media] use CONFIG_PM_SLEEP for suspend/resume
  [media] tuner-i2c: be consistent with I2C declaration
  [media] si470x: cleanup define namespace
  [media] bdisp: prevent compiling on random arch
  [media] vb2: Don't WARN when v4l2_buffer.bytesused is 0 for multiplanar buffers
  [media] MAINTAINERS: Add entry for the Renesas VSP1 driver
  [media] videodev2.h: fix copy-and-paste error in V4L2_MAP_XFER_FUNC_DEFAULT
  [media] Revert "[media] vb2: Push mmap_sem down to memops"
  [media] mantis: cleanup a warning
  [media] bdisp-debug: don't try to divide by s64
  [media] cx88: don't declare restart_video_queue if not used
  [media] au0828: move dev->boards atribuition to happen earlier
  [media] lmedm04: implement dvb v5 statistics
  [media] bdisp: remove unused var
  [media] bdisp: remove needless check
  ts2020: fix compilation on i386
  ...
  • Loading branch information
torvalds committed Jun 26, 2015
2 parents 0db9723 + faebbd8 commit 5b4ca44
Show file tree
Hide file tree
Showing 571 changed files with 27,333 additions and 10,259 deletions.
1 change: 1 addition & 0 deletions Documentation/DocBook/media/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!*.svg
88 changes: 61 additions & 27 deletions Documentation/DocBook/media/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,37 +65,39 @@ IOCTLS = \
$(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/video.h) \
$(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/media.h) \
$(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/v4l2-subdev.h) \
VIDIOC_SUBDEV_G_FRAME_INTERVAL \
VIDIOC_SUBDEV_S_FRAME_INTERVAL \
VIDIOC_SUBDEV_ENUM_MBUS_CODE \
VIDIOC_SUBDEV_ENUM_FRAME_SIZE \
VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \
VIDIOC_SUBDEV_G_SELECTION \
VIDIOC_SUBDEV_S_SELECTION \

DEFINES = \
$(shell perl -ne 'print "$$1 " if /\#define\s+(DTV_[^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/frontend.h) \

TYPES = \
$(shell perl -ne 'print "$$1 " if /^typedef\s+[^\s]+\s+([^\s]+)\;/' $(srctree)/include/uapi/linux/videodev2.h) \
$(shell perl -ne 'print "$$1 " if /^}\s+([a-z0-9_]+_t)/' $(srctree)/include/uapi/linux/dvb/frontend.h)
$(shell perl -ne 'print "$$1 " if /^typedef\s+.*\s+(\S+)\;/' $(srctree)/include/uapi/linux/videodev2.h) \
$(shell perl -ne 'print "$$1 " if /^typedef\s+.*\s+(\S+)\;/' $(srctree)/include/uapi/linux/dvb/frontend.h)

ENUMS = \
$(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/videodev2.h) \
$(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/audio.h) \
$(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/ca.h) \
$(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/dmx.h) \
$(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/frontend.h) \
$(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/net.h) \
$(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/video.h) \
$(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/media.h) \
$(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-mediabus.h) \
$(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-subdev.h)
$(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' \
$(srctree)/include/uapi/linux/videodev2.h \
$(srctree)/include/uapi/linux/dvb/audio.h \
$(srctree)/include/uapi/linux/dvb/ca.h \
$(srctree)/include/uapi/linux/dvb/dmx.h \
$(srctree)/include/uapi/linux/dvb/frontend.h \
$(srctree)/include/uapi/linux/dvb/net.h \
$(srctree)/include/uapi/linux/dvb/video.h \
$(srctree)/include/uapi/linux/media.h \
$(srctree)/include/uapi/linux/v4l2-mediabus.h \
$(srctree)/include/uapi/linux/v4l2-subdev.h)

ENUM_DEFS = \
$(shell perl -e 'open IN,"cat @ARGV| cpp -fpreprocessed |"; while (<IN>) { if ($$enum) {print "$$1\n" if (/\s*([A-Z]\S+)\b/); } $$enum = 0 if ($$enum && /^\}/); $$enum = 1 if(/^\s*enum\s/); }; close IN;' \
$(srctree)/include/uapi/linux/dvb/dmx.h \
$(srctree)/include/uapi/linux/dvb/frontend.h)

STRUCTS = \
$(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/videodev2.h) \
$(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s\{]+)\s*/)' $(srctree)/include/uapi/linux/dvb/audio.h) \
$(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/ca.h) \
$(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/dmx.h) \
$(shell perl -ne 'print "$$1 " if (!/dtv\_cmds\_h/ && /^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/frontend.h) \
$(shell perl -ne 'print "$$1 " if (/^struct\s+([A-Z][^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/net.h) \
$(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/ && !/_old/)' $(srctree)/include/uapi/linux/dvb/net.h) \
$(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/video.h) \
$(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/media.h) \
$(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-subdev.h) \
Expand Down Expand Up @@ -179,7 +181,6 @@ DOCUMENTED = \
-e "s/v4l2\-mpeg\-vbi\-ITV0/v4l2-mpeg-vbi-itv0-1/g"

DVB_DOCUMENTED = \
-e "s/\(linkend\=\"\)FE_SET_PROPERTY/\1FE_GET_PROPERTY/g" \
-e "s,\(struct\s\+\)\([a-z0-9_]\+\)\(\s\+{\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \
-e "s,\(}\s\+\)\([a-z0-9_]\+_t\+\),\1\<link linkend=\"\2\">\2\<\/link\>,g" \
-e "s,\(define\s\+\)\(DTV_[A-Z0-9_]\+\)\(\s\+[0-9]\+\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \
Expand All @@ -188,14 +189,17 @@ DVB_DOCUMENTED = \
-e "s,\(audio-mixer\|audio-karaoke\|audio-status\|ca-slot-info\|ca-descr-info\|ca-caps\|ca-msg\|ca-descr\|ca-pid\|dmx-filter\|dmx-caps\|video-system\|video-highlight\|video-spu\|video-spu-palette\|video-navi-pack\)-t,\1,g" \
-e "s,DTV-ISDBT-LAYER[A-C],DTV-ISDBT-LAYER,g" \
-e "s,\(define\s\+\)\([A-Z0-9_]\+\)\(\s\+_IO\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \
-e "s,\(define\s\+\)\(DTV_[A-Z0-9_]\+\)\(\s\+\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \
-e "s,<link\s\+linkend=\".*\">\(__.*_OLD\)<\/link>,\1,g" \
-e "s/\(linkend\=\"\)FE_SET_PROPERTY/\1FE_GET_PROPERTY/g" \
-e "s,<link\s\+linkend=\".*\">\(DTV_ISDBS_TS_ID_LEGACY\|DTV_MAX_COMMAND\|DTV_IOCTL_MAX_MSGS\)<\/link>,\1,g" \

#
# Media targets and dependencies
#

install_media_images = \
$(Q)-cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api
$(Q)-cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api

$(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
$(Q)base64 -d $< >$@
Expand Down Expand Up @@ -243,9 +247,14 @@ $(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/uapi/linux/dvb/dmx.h $(MEDIA_OBJ_
@( \
echo "<programlisting>") > $@
@( \
for ident in $(ENUM_DEFS) ; do \
entity=`echo $$ident | tr _ -` ; \
r="$$r s/([^\w\-])$$ident([^\w\-])/\1\&$$entity\;\2/g;";\
done; \
expand --tabs=8 < $< | \
sed $(ESCAPE) $(DVB_DOCUMENTED) | \
sed 's/i\.e\./&ie;/') >> $@
sed 's/i\.e\./&ie;/' | \
perl -ne "$$r print $$_;") >> $@
@( \
echo "</programlisting>") >> $@

Expand All @@ -254,9 +263,14 @@ $(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/uapi/linux/dvb/frontend.h $(
@( \
echo "<programlisting>") > $@
@( \
for ident in $(ENUM_DEFS) ; do \
entity=`echo $$ident | tr _ -` ; \
r="$$r s/([^\w\-])$$ident([^\w\-])/\1\&$$entity\;\2/g;";\
done; \
expand --tabs=8 < $< | \
sed $(ESCAPE) $(DVB_DOCUMENTED) | \
sed 's/i\.e\./&ie;/') >> $@
sed 's/i\.e\./&ie;/' | \
perl -ne "$$r print $$_;") >> $@
@( \
echo "</programlisting>") >> $@

Expand Down Expand Up @@ -298,11 +312,22 @@ $(MEDIA_OBJ_DIR)/media-entities.tmpl: $(MEDIA_OBJ_DIR)/v4l2.xml
@( \
echo -e "\n<!-- Ioctls -->") >>$@
@( \
for ident in $(IOCTLS) ; do \
for ident in `echo $(IOCTLS) | sed -e "s,VIDIOC_RESERVED,,"`; do\
entity=`echo $$ident | tr _ -` ; \
id=`grep "<refname>$$ident" $(MEDIA_OBJ_DIR)/vidioc-*.xml $(MEDIA_OBJ_DIR)/media-ioc-*.xml | sed -r s,"^.*/(.*).xml.*","\1",` ; \
echo "<!ENTITY $$entity \"<link" \
id=`grep -e "<refname>$$ident" -e "<section id=\"$$ident\"" $$(find $(MEDIA_SRC_DIR) -name *.xml -type f)| sed -r s,"^.*/(.*).xml.*","\1",` ; \
if [ "$$id" != "" ]; then echo "<!ENTITY $$entity \"<link" \
"linkend='$$id'><constant>$$ident</constant></link>\">" \
>>$@ ; else \
echo "Warning: undocumented ioctl: $$ident. Please document it at the media DocBook!" >&2; \
fi; \
done)
@( \
echo -e "\n<!-- Defines -->") >>$@
@( \
for ident in $(DEFINES) ; do \
entity=`echo $$ident | tr _ -` ; \
echo "<!ENTITY $$entity \"<link" \
"linkend='$$entity'><constant>$$ident</constant></link>\">" \
>>$@ ; \
done)
@( \
Expand All @@ -322,6 +347,15 @@ $(MEDIA_OBJ_DIR)/media-entities.tmpl: $(MEDIA_OBJ_DIR)/v4l2.xml
"linkend='$$entity'>$$ident</link>\">" >>$@ ; \
done)
@( \
echo -e "\n<!-- Enum definitions -->") >>$@
@( \
for ident in $(ENUM_DEFS) ; do \
entity=`echo $$ident | tr _ -` ; \
echo "<!ENTITY $$entity \"<link" \
"linkend='$$entity'><constant>$$ident</constant></link>\">" \
>>$@ ; \
done)
@( \
echo -e "\n<!-- Structures -->") >>$@
@( \
for ident in $(STRUCTS) ; do \
Expand Down
6 changes: 3 additions & 3 deletions Documentation/DocBook/media/dvb/audio.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<title>DVB Audio Device</title>
<para>The DVB audio device controls the MPEG2 audio decoder of the DVB hardware. It
can be accessed through <emphasis role="tt">/dev/dvb/adapter0/audio0</emphasis>. Data types and and
ioctl definitions can be accessed by including <emphasis role="tt">linux/dvb/audio.h</emphasis> in your
can be accessed through <constant>/dev/dvb/adapter?/audio?</constant>. Data types and and
ioctl definitions can be accessed by including <constant>linux/dvb/audio.h</constant> in your
application.
</para>
<para>Please note that some DVB cards don&#8217;t have their own MPEG decoder, which results in
Expand Down Expand Up @@ -32,7 +32,7 @@ typedef enum {
</programlisting>
<para>AUDIO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the
DVR device) as the source of the video stream. If AUDIO_SOURCE_MEMORY
is selected the stream comes from the application through the <emphasis role="tt">write()</emphasis> system
is selected the stream comes from the application through the <constant>write()</constant> system
call.
</para>

Expand Down
4 changes: 2 additions & 2 deletions Documentation/DocBook/media/dvb/ca.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<title>DVB CA Device</title>
<para>The DVB CA device controls the conditional access hardware. It can be accessed through
<emphasis role="tt">/dev/dvb/adapter0/ca0</emphasis>. Data types and and ioctl definitions can be accessed by
including <emphasis role="tt">linux/dvb/ca.h</emphasis> in your application.
<constant>/dev/dvb/adapter?/ca?</constant>. Data types and and ioctl definitions can be accessed by
including <constant>linux/dvb/ca.h</constant> in your application.
</para>

<section id="ca_data_types">
Expand Down
61 changes: 39 additions & 22 deletions Documentation/DocBook/media/dvb/demux.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,50 @@
<title>DVB Demux Device</title>

<para>The DVB demux device controls the filters of the DVB hardware/software. It can be
accessed through <emphasis role="tt">/dev/adapter0/demux0</emphasis>. Data types and and ioctl definitions can be
accessed by including <emphasis role="tt">linux/dvb/dmx.h</emphasis> in your application.
accessed through <constant>/dev/adapter?/demux?</constant>. Data types and and ioctl definitions can be
accessed by including <constant>linux/dvb/dmx.h</constant> in your application.
</para>
<section id="dmx_types">
<title>Demux Data Types</title>

<section id="dmx-output-t">
<title>dmx_output_t</title>
<programlisting>
typedef enum
{
DMX_OUT_DECODER, /&#x22C6; Streaming directly to decoder. &#x22C6;/
DMX_OUT_TAP, /&#x22C6; Output going to a memory buffer &#x22C6;/
/&#x22C6; (to be retrieved via the read command).&#x22C6;/
DMX_OUT_TS_TAP, /&#x22C6; Output multiplexed into a new TS &#x22C6;/
/&#x22C6; (to be retrieved by reading from the &#x22C6;/
/&#x22C6; logical DVR device). &#x22C6;/
DMX_OUT_TSDEMUX_TAP /&#x22C6; Like TS_TAP but retrieved from the DMX device &#x22C6;/
} dmx_output_t;
</programlisting>
<para><emphasis role="tt">DMX_OUT_TAP</emphasis> delivers the stream output to the demux device on which the ioctl is
called.
</para>
<para><emphasis role="tt">DMX_OUT_TS_TAP</emphasis> routes output to the logical DVR device <emphasis role="tt">/dev/dvb/adapter0/dvr0</emphasis>,
which delivers a TS multiplexed from all filters for which <emphasis role="tt">DMX_OUT_TS_TAP</emphasis> was
specified.
</para>
<title>Output for the demux</title>

<table pgwide="1" frame="none" id="dmx-output">
<title>enum dmx_output</title>
<tgroup cols="2">
&cs-def;
<thead>
<row>
<entry>ID</entry>
<entry>Description</entry>
</row>
</thead>
<tbody valign="top">
<row>
<entry align="char" id="DMX-OUT-DECODER">DMX_OUT_DECODER</entry>
<entry>Streaming directly to decoder.</entry>
</row><row>
<entry align="char" id="DMX-OUT-TAP">DMX_OUT_TAP</entry>
<entry>Output going to a memory buffer (to be retrieved via the
read command). Delivers the stream output to the demux
device on which the ioctl is called.</entry>
</row><row>
<entry align="char" id="DMX-OUT-TS-TAP">DMX_OUT_TS_TAP</entry>
<entry>Output multiplexed into a new TS (to be retrieved by
reading from the logical DVR device). Routes output to the
logical DVR device <constant>/dev/dvb/adapter?/dvr?</constant>,
which delivers a TS multiplexed from all filters for which
<constant>DMX_OUT_TS_TAP</constant> was specified.</entry>
</row><row>
<entry align="char" id="DMX-OUT-TSDEMUX-TAP">DMX_OUT_TSDEMUX_TAP</entry>
<entry>Like &DMX-OUT-TS-TAP; but retrieved from the DMX
device.</entry>
</row>
</tbody>
</tgroup>
</table>

</section>

<section id="dmx-input-t">
Expand Down
34 changes: 26 additions & 8 deletions Documentation/DocBook/media/dvb/dvbapi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,22 @@
<holder>Convergence GmbH</holder>
</copyright>
<copyright>
<year>2009-2014</year>
<year>2009-2015</year>
<holder>Mauro Carvalho Chehab</holder>
</copyright>

<revhistory>
<!-- Put document revisions here, newest first. -->
<revision>
<revnumber>2.1.0</revnumber>
<date>2015-05-29</date>
<authorinitials>mcc</authorinitials>
<revremark>
DocBook improvements and cleanups, in order to document the
system calls on a more standard way and provide more description
about the current DVB API.
</revremark>
</revision>
<revision>
<revnumber>2.0.4</revnumber>
<date>2011-05-06</date>
Expand Down Expand Up @@ -95,18 +105,26 @@ Added ISDB-T test originally written by Patrick Boettcher
<chapter id="dvb_demux">
&sub-demux;
</chapter>
<chapter id="dvb_video">
&sub-video;
</chapter>
<chapter id="dvb_audio">
&sub-audio;
</chapter>
<chapter id="dvb_ca">
&sub-ca;
</chapter>
<chapter id="dvb_net">
<chapter id="net">
&sub-net;
</chapter>
<chapter id="legacy_dvb_apis">
<title>DVB Deprecated APIs</title>
<para>The APIs described here are kept only for historical reasons. There's
just one driver for a very legacy hardware that uses this API. No
modern drivers should use it. Instead, audio and video should be using
the V4L2 and ALSA APIs, and the pipelines should be set using the
Media Controller API</para>
<section id="dvb_video">
&sub-video;
</section>
<section id="dvb_audio">
&sub-audio;
</section>
</chapter>
<chapter id="dvb_kdapi">
&sub-kdapi;
</chapter>
Expand Down
Loading

0 comments on commit 5b4ca44

Please sign in to comment.