Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b4ca444 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents 0db9723c faebbd8f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
!*.svg
+61 −27
Original line number Diff line number Diff line
@@ -65,29 +65,31 @@ 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) \
@@ -95,7 +97,7 @@ STRUCTS = \
	$(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) \
@@ -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" \
@@ -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 $< >$@
@@ -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>") >> $@

@@ -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>") >> $@

@@ -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)
	@(								\
@@ -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					\
+3 −3
Original line number Diff line number Diff line
<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
@@ -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>

+2 −2
Original line number Diff line number Diff line
<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">
+39 −22
Original line number Diff line number Diff line
<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">
Loading