DocBook: Add the other DVB API header files
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/13 DocBook: Add the other DVB API header files
Documentation/DocBook/media/Makefile +91 -1
@@ -11,7 +11,13 @@ MEDIA_TEMP = media-entities.tmpl \ media-indices.tmpl \ videodev2.h.xml \ v4l2.xml \ - frontend.h.xml + audio.h.xml \ + ca.h.xml \ + dmx.h.xml \ + frontend.h.xml \ + net.h.xml \ + osd.h.xml \ + video.h.xml \ IMGFILES := $(addprefix $(MEDIA_OBJ_DIR)/media/, $(notdir $(shell ls $(MEDIA_SRC_DIR)/*/*.gif $(MEDIA_SRC_DIR)/*/*.png))) GENFILES := $(addprefix $(MEDIA_OBJ_DIR)/, $(MEDIA_TEMP))
@@ -51,7 +57,13 @@ FUNCS = \ IOCTLS = \ $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/videodev2.h) \ + $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/audio.h) \ + $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/ca.h) \ + $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/dmx.h) \ $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/frontend.h) \ + $(shell perl -ne 'print "$$1 " if /\#define\s+([A-Z][^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/net.h) \ + $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/osd.h) \ + $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/video.h) \ $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/media.h) \ $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/v4l2-subdev.h) \ VIDIOC_SUBDEV_G_FRAME_INTERVAL \
@@ -66,14 +78,26 @@ TYPES = \ ENUMS = \ $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/videodev2.h) \ + $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/audio.h) \ + $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/ca.h) \ + $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/dmx.h) \ $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/frontend.h) \ + $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/net.h) \ + $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/osd.h) \ + $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/video.h) \ $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/media.h) \ $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-mediabus.h) \ $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-subdev.h) STRUCTS = \ $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/videodev2.h) \ + $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s\{]+)\s*/)' $(srctree)/include/linux/dvb/audio.h) \ + $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/ca.h) \ + $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/dmx.h) \ $(shell perl -ne 'print "$$1 " if (!/dtv\_cmds\_h/ && /^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/frontend.h) \ + $(shell perl -ne 'print "$$1 " if (/^struct\s+([A-Z][^\s]+)\s+/)' $(srctree)/include/linux/dvb/net.h) \ + $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/osd.h) \ + $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/video.h) \ $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/media.h) \ $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-subdev.h) \ $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-mediabus.h)
@@ -151,6 +175,39 @@ $(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/linux/videodev2.h $(MEDIA_O @( \ echo "</programlisting>") >> $@ +$(MEDIA_OBJ_DIR)/audio.h.xml: $(srctree)/include/linux/dvb/audio.h $(MEDIA_OBJ_DIR)/v4l2.xml + @$($(quiet)gen_xml) + @( \ + echo "<programlisting>") > $@ + @( \ + expand --tabs=8 < $< | \ + sed $(ESCAPE) $(DVB_DOCUMENTED) | \ + sed 's/i\.e\./&ie;/') >> $@ + @( \ + echo "</programlisting>") >> $@ + +$(MEDIA_OBJ_DIR)/ca.h.xml: $(srctree)/include/linux/dvb/ca.h $(MEDIA_OBJ_DIR)/v4l2.xml + @$($(quiet)gen_xml) + @( \ + echo "<programlisting>") > $@ + @( \ + expand --tabs=8 < $< | \ + sed $(ESCAPE) $(DVB_DOCUMENTED) | \ + sed 's/i\.e\./&ie;/') >> $@ + @( \ + echo "</programlisting>") >> $@ + +$(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/linux/dvb/dmx.h $(MEDIA_OBJ_DIR)/v4l2.xml + @$($(quiet)gen_xml) + @( \ + echo "<programlisting>") > $@ + @( \ + expand --tabs=8 < $< | \ + sed $(ESCAPE) $(DVB_DOCUMENTED) | \ + sed 's/i\.e\./&ie;/') >> $@ + @( \ + echo "</programlisting>") >> $@ + $(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/linux/dvb/frontend.h $(MEDIA_OBJ_DIR)/v4l2.xml @$($(quiet)gen_xml) @( \
@@ -162,6 +219,39 @@ $(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/linux/dvb/frontend.h $(MEDIA @( \ echo "</programlisting>") >> $@ +$(MEDIA_OBJ_DIR)/net.h.xml: $(srctree)/include/linux/dvb/net.h $(MEDIA_OBJ_DIR)/v4l2.xml + @$($(quiet)gen_xml) + @( \ + echo "<programlisting>") > $@ + @( \ + expand --tabs=8 < $< | \ + sed $(ESCAPE) $(DVB_DOCUMENTED) | \ + sed 's/i\.e\./&ie;/') >> $@ + @( \ + echo "</programlisting>") >> $@ + +$(MEDIA_OBJ_DIR)/osd.h.xml: $(srctree)/include/linux/dvb/osd.h $(MEDIA_OBJ_DIR)/v4l2.xml + @$($(quiet)gen_xml) + @( \ + echo "<programlisting>") > $@ + @( \ + expand --tabs=8 < $< | \ + sed $(ESCAPE) $(DVB_DOCUMENTED) | \ + sed 's/i\.e\./&ie;/') >> $@ + @( \ + echo "</programlisting>") >> $@ + +$(MEDIA_OBJ_DIR)/video.h.xml: $(srctree)/include/linux/dvb/video.h $(MEDIA_OBJ_DIR)/v4l2.xml + @$($(quiet)gen_xml) + @( \ + echo "<programlisting>") > $@ + @( \ + expand --tabs=8 < $< | \ + sed $(ESCAPE) $(DVB_DOCUMENTED) | \ + sed 's/i\.e\./&ie;/') >> $@ + @( \ + echo "</programlisting>") >> $@ + $(MEDIA_OBJ_DIR)/media-entities.tmpl: $(MEDIA_OBJ_DIR)/v4l2.xml @$($(quiet)gen_xml) @( \
Documentation/DocBook/media/dvb/dvbapi.xml +24 -0
@@ -114,8 +114,32 @@ Added ISDB-T test originally written by Patrick Boettcher &sub-examples; </chapter> <!-- END OF CHAPTERS --> + <appendix id="audio_h"> + <title>DVB Audio Header File</title> + &sub-audio-h; + </appendix> + <appendix id="ca_h"> + <title>DVB Conditional Access Header File</title> + &sub-ca-h; + </appendix> + <appendix id="dmx_h"> + <title>DVB Demux Header File</title> + &sub-dmx-h; + </appendix> <appendix id="frontend_h"> <title>DVB Frontend Header File</title> &sub-frontend-h; </appendix> + <appendix id="net_h"> + <title>DVB Network Header File</title> + &sub-net-h; + </appendix> + <appendix id="osd_h"> + <title>DVB OSD Header File</title> + &sub-osd-h; + </appendix> + <appendix id="video_h"> + <title>DVB Video Header File</title> + &sub-video-h; + </appendix>
Documentation/DocBook/media/dvb/intro.xml +18 -1
@@ -175,10 +175,27 @@ the devices are described in the following chapters.</para> The DVB API include files should be included in application sources with a partial path like:</para> - +<programlisting> + #include <linux/dvb/audio.h> +</programlisting> +<programlisting> + #include <linux/dvb/ca.h> +</programlisting> +<programlisting> + #include <linux/dvb/dmx.h> +</programlisting> <programlisting> #include <linux/dvb/frontend.h> </programlisting> +<programlisting> + #include <linux/dvb/net.h> +</programlisting> +<programlisting> + #include <linux/dvb/osd.h> +</programlisting> +<programlisting> + #include <linux/dvb/video.h> +</programlisting> <para>To enable applications to support different API version, an additional include file <emphasis
Signature · 1 line
1.7.1
PATCH 2/13 DocBook/audio.xml: match section ID's with the reference links
In reply to a message not in the archiveMake sure that both audio.h.xml and audio.xml will match the same names. This way, it is now possible to identify API spec gaps:
Error: no ID for constraint linkend: AUDIO_CONTINUE.
Error: no ID for constraint linkend: AUDIO_GET_PTS.
Error: no ID for constraint linkend: AUDIO_BILINGUAL_CHANNEL_SELECT.
While here, fix the cut-and-paste description error on AUDIO_SET_KARAOKE.
Documentation/DocBook/media/Makefile +1 -0
@@ -150,6 +150,7 @@ DVB_DOCUMENTED = \ -e "s,\(define\s\+\)\(DTV_[A-Z0-9_]\+\)\(\s\+[0-9]\+\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \ -e "s,<link linkend=\".*\">\(DTV_IOCTL_MAX_MSGS\|dtv_cmds_h\)<\/link>,\1,g" \ -e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" \ + -e "s,\(audio-mixer\|audio-karaoke\|audio-status\)-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" \
Documentation/DocBook/media/dvb/audio.xml +26 -26
208 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 3/13 DocBook/audio.xml: synchronize attribute changes
In reply to a message not in the archiveSome attributes suffered some changes since DVBv1. Sync them with the current API header files.
Documentation/DocBook/media/dvb/audio.xml +35 -32
@@ -21,10 +21,10 @@ the following values, depending on whether we are replaying from an internal (de external (user write) source. </para> <programlisting> - typedef enum { - AUDIO_SOURCE_DEMUX, - AUDIO_SOURCE_MEMORY - } audio_stream_source_t; +typedef enum { + AUDIO_SOURCE_DEMUX, + AUDIO_SOURCE_MEMORY +} audio_stream_source_t; </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
@@ -39,11 +39,11 @@ call. state of audio playback. </para> <programlisting> - typedef enum { - AUDIO_STOPPED, - AUDIO_PLAYING, - AUDIO_PAUSED - } audio_play_state_t; +typedef enum { + AUDIO_STOPPED, + AUDIO_PLAYING, + AUDIO_PAUSED +} audio_play_state_t; </programlisting> </section>
@@ -53,11 +53,13 @@ state of audio playback. following values. </para> <programlisting> - typedef enum { - AUDIO_STEREO, - AUDIO_MONO_LEFT, - AUDIO_MONO_RIGHT, - } audio_channel_select_t; +typedef enum { + AUDIO_STEREO, + AUDIO_MONO_LEFT, + AUDIO_MONO_RIGHT, + AUDIO_MONO, + AUDIO_STEREO_SWAPPED +} audio_channel_select_t; </programlisting> </section>
@@ -67,14 +69,15 @@ following values. states of the playback operation. </para> <programlisting> - typedef struct audio_status { - boolean AV_sync_state; - boolean mute_state; - audio_play_state_t play_state; - audio_stream_source_t stream_source; - audio_channel_select_t channel_select; - boolean bypass_mode; - } audio_status_t; +typedef struct audio_status { + boolean AV_sync_state; + boolean mute_state; + audio_play_state_t play_state; + audio_stream_source_t stream_source; + audio_channel_select_t channel_select; + boolean bypass_mode; + audio_mixer_t mixer_state; +} audio_status_t; </programlisting> </section>
@@ -84,10 +87,10 @@ states of the playback operation. volume. </para> <programlisting> - typedef struct audio_mixer { - unsigned int volume_left; - unsigned int volume_right; - } audio_mixer_t; +typedef struct audio_mixer { + unsigned int volume_left; + unsigned int volume_right; +} audio_mixer_t; </programlisting> </section>
@@ -114,12 +117,12 @@ bits set according to the hardwares capabilities. <para>The ioctl AUDIO_SET_KARAOKE uses the following format: </para> <programlisting> - typedef - struct audio_karaoke{ - int vocal1; - int vocal2; - int melody; - } audio_karaoke_t; +typedef +struct audio_karaoke { + int vocal1; + int vocal2; + int melody; +} audio_karaoke_t; </programlisting> <para>If Vocal1 or Vocal2 are non-zero, they get mixed into left and right t at 70% each. If both, Vocal1 and Vocal2 are non-zero, Vocal1 gets mixed into the left channel and Vocal2 into the
include/linux/dvb/audio.h +1 -1
@@ -67,7 +67,7 @@ typedef struct audio_status { typedef -struct audio_karaoke{ /* if Vocal1 or Vocal2 are non-zero, they get mixed */ +struct audio_karaoke { /* if Vocal1 or Vocal2 are non-zero, they get mixed */ int vocal1; /* into left and right t at 70% each */ int vocal2; /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/ int melody; /* mixed into the left channel and */
Signature · 1 line
1.7.1
PATCH 4/13 DocBook: Document AUDIO_CONTINUE ioctl
In reply to a message not in the archiveAlthough this ioctl is only used at the av7110 driver, it is not described at the API docbook. Yet, AUDIO_PAUSE ioctl description somewhat describes it. Fill the gap by using the information there and by looking inside av7110 implementation.
Documentation/DocBook/media/dvb/audio.xml +57 -0
@@ -524,6 +524,63 @@ role="subsection"><title>AUDIO_PAUSE</title> </entry> </row></tbody></tgroup></informaltable> + +</section><section id="AUDIO_CONTINUE" +role="subsection"><title>AUDIO_CONTINUE</title> +<para>DESCRIPTION +</para> +<informaltable><tgroup cols="1"><tbody><row><entry + align="char"> +<para>This ioctl restarts the decoding and playing process previously paused +with AUDIO_PAUSE command.</para> +</entry> + </row><row><entry + align="char"> +<para>It only works if the stream were previously stopped with AUDIO_PAUSE</para> +</entry> + </row></tbody></tgroup></informaltable> +<para>SYNOPSIS +</para> +<informaltable><tgroup cols="1"><tbody><row><entry + align="char"> +<para>int ioctl(int fd, int request = AUDIO_CONTINUE);</para> +</entry> + </row></tbody></tgroup></informaltable> +<para>PARAMETERS +</para> +<informaltable><tgroup cols="2"><tbody><row><entry + align="char"> +<para>int fd</para> +</entry><entry + align="char"> +<para>File descriptor returned by a previous call to open().</para> +</entry> + </row><row><entry + align="char"> +<para>int request</para> +</entry><entry + align="char"> +<para>Equals AUDIO_CONTINUE for this command.</para> +</entry> + </row></tbody></tgroup></informaltable> +<para>ERRORS +</para> +<informaltable><tgroup cols="2"><tbody><row><entry + align="char"> +<para>EBADF</para> +</entry><entry + align="char"> +<para>fd is not a valid open file descriptor.</para> +</entry> + </row><row><entry + align="char"> +<para>EINTERNAL</para> +</entry><entry + align="char"> +<para>Internal error.</para> +</entry> + </row></tbody></tgroup></informaltable> + </section><section id="AUDIO_SELECT_SOURCE" role="subsection"><title>AUDIO_SELECT_SOURCE</title> <para>DESCRIPTION
Signature · 1 line
1.7.1
PATCH 5/13 dvb/audio.h: Remove definition for AUDIO_GET_PTS
In reply to a message not in the archiveWhile this ioctl is defined inside dvb/audio.h, it is not docummented at the API specs, nor implemented on any driver inside the Linux Kernel. So, it doesn't make sense to keep it here.
As this is not used anywere, removing it is not a regression. So, there's no need to use the normal features-to-be-removed process.
include/linux/dvb/audio.h +0 -12
@@ -118,18 +118,6 @@ typedef __u16 audio_attributes_t;#define AUDIO_SET_ATTRIBUTES _IOW('o', 17, audio_attributes_t)#define AUDIO_SET_KARAOKE _IOW('o', 18, audio_karaoke_t) -/** -* AUDIO_GET_PTS -* -* Read the 33 bit presentation time stamp as defined -* in ITU T-REC-H.222.0 / ISO/IEC 13818-1. -* -* The PTS should belong to the currently played -* frame if possible, but may also be a value close to it -* like the PTS of the last decoded frame or the last PTS -* extracted by the PES parser. -*/ -#define AUDIO_GET_PTS _IOR('o', 19, __u64)#define AUDIO_BILINGUAL_CHANNEL_SELECT _IO('o', 20)#endif /* _DVBAUDIO_H_ */
Signature · 1 line
1.7.1
Re: [PATCH 05/13] [media] dvb/audio.h: Remove definition for AUDIO_GET_PTS
Quoted 22 lines · Mauro Carvalho Chehab
While this ioctl is defined inside
dvb/audio.h, it is not docummented at the API specs, nor implemented on any driver inside the Linux Kernel. So, it doesn't make sense to keep it here.As this is not used anywere, removing it is not a regression. So, there's no need to use the normal features-to-be-removed process.
Signed-off-by Mauro Carvalho Chehab <[email protected]>include/linux/dvb/audio.h +0
-5@@ -118,18 +118,6 @@ typedef __u16 audio_attributes_t;#define AUDIO_SET_ATTRIBUTES _IOW('o', 17, audio_attributes_t)#define AUDIO_SET_KARAOKE _IOW('o', 18, audio_karaoke_t) -/** -* AUDIO_GET_PTS -* -* Read the 33 bit presentation time stamp as defined -* in ITU T-REC-H.222.0 / ISO/IEC 13818-1.
include/linux/dvb/audio.h typedef __u16 audio_attributes_t; · line 123
Quoted 10 lines
include/linux/dvb/audio.h +0
-7-* -* The PTS should belong to the currently played -* frame if possible, but may also be a value close to it -* like the PTS of the last decoded frame or the last PTS -* extracted by the PES parser. -*/ -#define AUDIO_GET_PTS _IOR('o', 19, __u64)#define AUDIO_BILINGUAL_CHANNEL_SELECT _IO('o', 20)#endif /* _DVBAUDIO_H_ */
Please don't apply this patch. In general, many ioctls aren't implemented in mainline drivers, because most if not all supported devices inside the kernel tree are either PCI or USB add-in devices and usually quite simple compared to a STB.
This ioctl is used at least by enigma2 in userspace and implemented in drivers for several generations of the dreambox.
Regards,
Andreas
Re: [PATCH 05/13] [media] dvb/audio.h: Remove definition for AUDIO_GET_PTS
Hi Andreas,
Em 09-06-2011 09:44, Andreas Oberritter escreveu:
Quoted 39 lines · Mauro Carvalho Chehab
Quoted 22 lines
While this ioctl is defined inside
dvb/audio.h, it is not docummented at the API specs, nor implemented on any driver inside the Linux Kernel. So, it doesn't make sense to keep it here.As this is not used anywere, removing it is not a regression. So, there's no need to use the normal features-to-be-removed process.
Signed-off-by Mauro Carvalho Chehab <[email protected]>include/linux/dvb/audio.h +0
-5@@ -118,18 +118,6 @@ typedef __u16 audio_attributes_t;#define AUDIO_SET_ATTRIBUTES _IOW('o', 17, audio_attributes_t)#define AUDIO_SET_KARAOKE _IOW('o', 18, audio_karaoke_t) -/** -* AUDIO_GET_PTS -* -* Read the 33 bit presentation time stamp as defined -* in ITU T-REC-H.222.0 / ISO/IEC 13818-1. include/linux/dvb/audio.h typedef __u16 audio_attributes_t; · line 123
Quoted 10 lines
include/linux/dvb/audio.h +0
-7-* -* The PTS should belong to the currently played -* frame if possible, but may also be a value close to it -* like the PTS of the last decoded frame or the last PTS -* extracted by the PES parser. -*/ -#define AUDIO_GET_PTS _IOR('o', 19, __u64)#define AUDIO_BILINGUAL_CHANNEL_SELECT _IO('o', 20)#endif /* _DVBAUDIO_H_ */ Please don't apply this patch. In general, many ioctls aren't implemented in mainline drivers, because most if not all supported devices inside the kernel tree are either PCI or USB add-in devices and usually quite simple compared to a STB.
Quoted 2 lines
This ioctl is used at least by enigma2 in userspace and implemented in drivers for several generations of the dreambox.
If this is implemented on userspace only, what's the point of having it inside the kernel API?
Cheers,
Mauro
Re: [PATCH 05/13] [media] dvb/audio.h: Remove definition for AUDIO_GET_PTS
Quoted 42 lines · Mauro Carvalho Chehab
Hi Andreas,
Em 09-06-2011 09:44, Andreas Oberritter escreveu:
Quoted 39 lines · Mauro Carvalho Chehab
Quoted 22 lines
While this ioctl is defined inside
dvb/audio.h, it is not docummented at the API specs, nor implemented on any driver inside the Linux Kernel. So, it doesn't make sense to keep it here.As this is not used anywere, removing it is not a regression. So, there's no need to use the normal features-to-be-removed process.
Signed-off-by Mauro Carvalho Chehab <[email protected]>include/linux/dvb/audio.h +0
-5@@ -118,18 +118,6 @@ typedef __u16 audio_attributes_t;#define AUDIO_SET_ATTRIBUTES _IOW('o', 17, audio_attributes_t)#define AUDIO_SET_KARAOKE _IOW('o', 18, audio_karaoke_t) -/** -* AUDIO_GET_PTS -* -* Read the 33 bit presentation time stamp as defined -* in ITU T-REC-H.222.0 / ISO/IEC 13818-1. include/linux/dvb/audio.h typedef __u16 audio_attributes_t; · line 123
Quoted 10 lines
include/linux/dvb/audio.h +0
-7-* -* The PTS should belong to the currently played -* frame if possible, but may also be a value close to it -* like the PTS of the last decoded frame or the last PTS -* extracted by the PES parser. -*/ -#define AUDIO_GET_PTS _IOR('o', 19, __u64)#define AUDIO_BILINGUAL_CHANNEL_SELECT _IO('o', 20)#endif /* _DVBAUDIO_H_ */ Please don't apply this patch. In general, many ioctls aren't implemented in mainline drivers, because most if not all supported devices inside the kernel tree are either PCI or USB add-in devices and usually quite simple compared to a STB.
Quoted 5 lines
Quoted 2 lines
This ioctl is used at least by enigma2 in userspace and implemented in drivers for several generations of the dreambox.
If this is implemented on userspace only, what's the point of having it inside the kernel API?
... implemented in *kernel* drivers for several generations of the dreambox.
I mentioned enigma2, because a kernel API without a user wouldn't make much sense either.
Regards,
Andreas
Re: [PATCH 05/13] [media] dvb/audio.h: Remove definition for AUDIO_GET_PTS
Quoted 1 line · Andreas Oberritter
... implemented in *kernel* drivers for several generations of the dreambox.
Well, let's see the source code to the drivers in question, and from there we can make some decisions on how to best proceed.
Devin
Signature · 2 lines
Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com
Re: [linux-media] Re: [PATCH 05/13] [media] dvb/audio.h: Remove definition for AUDIO_GET_PTS
Quoted 5 lines · Devin Heitmueller
Quoted 1 line · Andreas Oberritter
... implemented in *kernel* drivers for several generations of the dreambox.
Well, let's see the source code to the drivers in question, and from there we can make some decisions on how to best proceed.
Just a side note: VDR uses this (and others) in its full featured output devices. I'm not sure whether this discussion is aiming at completely doing away with these definitions, or if there will be a replacement. Just wanted to make you folks aware of this.
Klaus
PATCH 6/13 Docbook/ca.xml: match section ID's with the reference links
In reply to a message not in the archiveMake sure that both ca.h.xml and ca.xml will match the same names for the sections/links.
This way, it is now possible to identify API spec gaps:
Error: no ID for constraint linkend: ca-pid.
Error: no ID for constraint linkend: ca-pid.
Error: no ID for constraint linkend: CA_RESET.
Error: no ID for constraint linkend: CA_GET_CAP.
Error: no ID for constraint linkend: CA_GET_SLOT_INFO.
Error: no ID for constraint linkend: CA_GET_DESCR_INFO.
Error: no ID for constraint linkend: CA_GET_MSG.
Error: no ID for constraint linkend: CA_SEND_MSG.
Error: no ID for constraint linkend: CA_SET_DESCR.
Error: no ID for constraint linkend: CA_SET_PID.
Basically, in this case, no CA ioctl is described at the specs, and one file structure (ca-pid) is missing.
Documentation/DocBook/media/Makefile +1 -1
@@ -150,7 +150,7 @@ DVB_DOCUMENTED = \ -e "s,\(define\s\+\)\(DTV_[A-Z0-9_]\+\)\(\s\+[0-9]\+\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \ -e "s,<link linkend=\".*\">\(DTV_IOCTL_MAX_MSGS\|dtv_cmds_h\)<\/link>,\1,g" \ -e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" \ - -e "s,\(audio-mixer\|audio-karaoke\|audio-status\)-t,\1,g" \ + -e "s,\(audio-mixer\|audio-karaoke\|audio-status\|ca-slot-info\|ca-descr-info\|ca-caps\|ca-msg\|ca-descr\|ca-pid\)-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" \
Documentation/DocBook/media/dvb/ca.xml +46 -47
119 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 7/13 DocBook/ca.xml: Describe structure ca_pid
In reply to a message not in the archiveThis is the remaining missing structure at ca.xml. The ioctl's are still missing through.
Documentation/DocBook/media/dvb/ca.xml +13 -2
@@ -44,7 +44,7 @@ typedef struct ca_descr_info { <section id="ca-caps"> <title>ca_caps_t</title> <programlisting> -typedef struct ca_cap_s { +typedef struct ca_caps { unsigned int slot_num; /⋆ total number of CA card and module slots ⋆/ unsigned int slot_type; /⋆ OR of all supported types ⋆/ unsigned int descr_num; /⋆ total number of descrambler slots (keys) ⋆/
@@ -75,7 +75,18 @@ typedef struct ca_descr { unsigned char cw[8]; } ca_descr_t; </programlisting> - </section></section> +</section> + +<section id="ca-pid"> +<title>ca-pid</title> +<programlisting> +typedef struct ca_pid { + unsigned int pid; + int index; /⋆ -1 == disable⋆/ +} ca_pid_t; +</programlisting> +</section></section> + <section id="ca_function_calls"> <title>CA Function Calls</title>
Signature · 1 line
1.7.1
PATCH 8/13 DocBook/demux.xml: Fix section references with dmx.h.xml
In reply to a message not in the archiveMake the reference links at dmx.h.xml to match the ones at demux.xml.
While here, also syncronizes the structures defined inside the API, in order to match the current API.
Documentation/DocBook/media/Makefile +1 -1
@@ -150,7 +150,7 @@ DVB_DOCUMENTED = \ -e "s,\(define\s\+\)\(DTV_[A-Z0-9_]\+\)\(\s\+[0-9]\+\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \ -e "s,<link linkend=\".*\">\(DTV_IOCTL_MAX_MSGS\|dtv_cmds_h\)<\/link>,\1,g" \ -e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" \ - -e "s,\(audio-mixer\|audio-karaoke\|audio-status\|ca-slot-info\|ca-descr-info\|ca-caps\|ca-msg\|ca-descr\|ca-pid\)-t,\1,g" \ + -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\)-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" \
Documentation/DocBook/media/dvb/demux.xml +90 -87
264 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 9/13 DocBook/demux.xml: Add the remaining data structures to the API spec
In reply to a message not in the archiveStill, there are a few ioctl's not documented:
Error: no ID for constraint linkend: DMX_GET_PES_PIDS.
Error: no ID for constraint linkend: DMX_GET_CAPS.
Error: no ID for constraint linkend: DMX_SET_SOURCE.
Error: no ID for constraint linkend: DMX_ADD_PID.
Error: no ID for constraint linkend: DMX_REMOVE_PID.
Documentation/DocBook/media/dvb/demux.xml +27 -2
@@ -135,17 +135,42 @@ struct dmx_pes_filter_params <section id="dmx-stc"> <title>struct dmx_stc</title> - <programlisting> +<programlisting> struct dmx_stc { unsigned int num; /⋆ input : which STC? 0..N ⋆/ unsigned int base; /⋆ output: divisor for stc to get 90 kHz clock ⋆/ __u64 stc; /⋆ output: stc in 'base'⋆90 kHz units ⋆/ }; </programlisting> - </section> +</section> + +<section id="dmx-caps"> +<title>struct dmx_caps</title> +<programlisting> + typedef struct dmx_caps { + __u32 caps; + int num_decoders; +} dmx_caps_t; +</programlisting> +</section> +<section id="dmx-source-t"> +<title>enum dmx_source_t</title> +<programlisting> +typedef enum { + DMX_SOURCE_FRONT0 = 0, + DMX_SOURCE_FRONT1, + DMX_SOURCE_FRONT2, + DMX_SOURCE_FRONT3, + DMX_SOURCE_DVR0 = 16, + DMX_SOURCE_DVR1, + DMX_SOURCE_DVR2, + DMX_SOURCE_DVR3 +} dmx_source_t; +</programlisting> </section> +</section> <section id="dmx_fcalls"> <title>Demux Function Calls</title>
Signature · 1 line
1.7.1
PATCH 10/13 DocBook/net.xml: Synchronize Network data structure
In reply to a message not in the archiveThere's no documentation at all for the DVB net API. Still, better to remove a few warnings about the missing symbols. So, add the net data structure inside the net.xml. Now, only the ioctl documentation is missed.
Documentation/DocBook/media/Makefile +2 -1
@@ -148,11 +148,12 @@ DVB_DOCUMENTED = \ -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" \ - -e "s,<link linkend=\".*\">\(DTV_IOCTL_MAX_MSGS\|dtv_cmds_h\)<\/link>,\1,g" \ + -e "s,<link\s\+linkend=\".*\">\(DTV_IOCTL_MAX_MSGS\|dtv_cmds_h\|__.*_old\)<\/link>,\1,g" \ -e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" \ -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\)-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,<link\s\+linkend=\".*\">\(__.*_OLD\)<\/link>,\1,g" \ # # Media targets and dependencies
Documentation/DocBook/media/dvb/net.xml +17 -0
@@ -7,6 +7,23 @@ application. </para> <section id="dvb_net_types"> <title>DVB Net Data Types</title> + +<section id="dvb-net-if"> +<title>struct dvb_net_if</title> +<programlisting> +struct dvb_net_if { + __u16 pid; + __u16 if_num; + __u8 feedtype; +#define DVB_NET_FEEDTYPE_MPE 0 /⋆ multi protocol encapsulation ⋆/ +#define DVB_NET_FEEDTYPE_ULE 1 /⋆ ultra lightweight encapsulation ⋆/ +}; +</programlisting> +</section> + +</section> +<section id="net_fcalls"> +<title>DVB net Function Calls</title> <para>To be written… </para> </section>
Signature · 1 line
1.7.1
PATCH 11/13 DocBook/Makefile: Remove osd.h header
In reply to a message not in the archiveThe av7110 uses an OSD API. Such API is not documented at all. Also, the osd.h API uses camelCase and some other weird stuff. Also, dvb-core doesn't recognize it.
I don't see any good reason why we should document it. It seems better to just let it as-is. If ever needed, it is probably better to write a different API for dvb-core.
Documentation/DocBook/media/Makefile +0 -15
@@ -16,7 +16,6 @@ MEDIA_TEMP = media-entities.tmpl \ dmx.h.xml \ frontend.h.xml \ net.h.xml \ - osd.h.xml \ video.h.xml \ IMGFILES := $(addprefix $(MEDIA_OBJ_DIR)/media/, $(notdir $(shell ls $(MEDIA_SRC_DIR)/*/*.gif $(MEDIA_SRC_DIR)/*/*.png)))
@@ -62,7 +61,6 @@ IOCTLS = \ $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/dmx.h) \ $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/frontend.h) \ $(shell perl -ne 'print "$$1 " if /\#define\s+([A-Z][^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/net.h) \ - $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/osd.h) \ $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/video.h) \ $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/media.h) \ $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/v4l2-subdev.h) \
@@ -83,7 +81,6 @@ ENUMS = \ $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/dmx.h) \ $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/frontend.h) \ $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/net.h) \ - $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/osd.h) \ $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/video.h) \ $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/media.h) \ $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-mediabus.h) \
@@ -96,7 +93,6 @@ STRUCTS = \ $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/dmx.h) \ $(shell perl -ne 'print "$$1 " if (!/dtv\_cmds\_h/ && /^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/frontend.h) \ $(shell perl -ne 'print "$$1 " if (/^struct\s+([A-Z][^\s]+)\s+/)' $(srctree)/include/linux/dvb/net.h) \ - $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/osd.h) \ $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/video.h) \ $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/media.h) \ $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-subdev.h) \
@@ -232,17 +228,6 @@ $(MEDIA_OBJ_DIR)/net.h.xml: $(srctree)/include/linux/dvb/net.h $(MEDIA_OBJ_DIR)/ @( \ echo "</programlisting>") >> $@ -$(MEDIA_OBJ_DIR)/osd.h.xml: $(srctree)/include/linux/dvb/osd.h $(MEDIA_OBJ_DIR)/v4l2.xml - @$($(quiet)gen_xml) - @( \ - echo "<programlisting>") > $@ - @( \ - expand --tabs=8 < $< | \ - sed $(ESCAPE) $(DVB_DOCUMENTED) | \ - sed 's/i\.e\./&ie;/') >> $@ - @( \ - echo "</programlisting>") >> $@ - $(MEDIA_OBJ_DIR)/video.h.xml: $(srctree)/include/linux/dvb/video.h $(MEDIA_OBJ_DIR)/v4l2.xml @$($(quiet)gen_xml) @( \
Documentation/DocBook/media/dvb/dvbapi.xml +0 -4
@@ -134,10 +134,6 @@ Added ISDB-T test originally written by Patrick Boettcher <title>DVB Network Header File</title> &sub-net-h; </appendix> - <appendix id="osd_h"> - <title>DVB OSD Header File</title> - &sub-osd-h; - </appendix> <appendix id="video_h"> <title>DVB Video Header File</title> &sub-video-h;
Signature · 1 line
1.7.1
PATCH 12/13 DocBook/video.xml: Fix section references with video.h.xml
In reply to a message not in the archiveMake the reference links at video.h.xml to match the ones at video.xml.
Documentation/DocBook/media/Makefile +1 -1
@@ -146,7 +146,7 @@ DVB_DOCUMENTED = \ -e "s,\(define\s\+\)\(DTV_[A-Z0-9_]\+\)\(\s\+[0-9]\+\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \ -e "s,<link\s\+linkend=\".*\">\(DTV_IOCTL_MAX_MSGS\|dtv_cmds_h\|__.*_old\)<\/link>,\1,g" \ -e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" \ - -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\)-t,\1,g" \ + -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,<link\s\+linkend=\".*\">\(__.*_OLD\)<\/link>,\1,g" \
Documentation/DocBook/media/dvb/video.xml +92 -83
422 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 13/13 DocBook/video.xml: Document the remaining data structures
In reply to a message not in the archiveNow, all data structures are commented. A few ioctls remain undocumented:
Error: no ID for constraint linkend: VIDEO_GET_SIZE.
Error: no ID for constraint linkend: VIDEO_GET_FRAME_RATE.
Error: no ID for constraint linkend: VIDEO_GET_PTS.
Error: no ID for constraint linkend: VIDEO_GET_FRAME_COUNT.
Error: no ID for constraint linkend: VIDEO_COMMAND.
Error: no ID for constraint linkend: VIDEO_TRY_COMMAND.
Documentation/DocBook/media/dvb/video.xml +45 -2
@@ -37,8 +37,8 @@ stream. </para> </section> -<section id="video-display-format-t"> -<title>video_display_format_t</title> +<section id="video-displayformat-t"> +<title>video_displayformat_t</title> <para>In case the display format of the video stream and of the display hardware differ the application has to specify how to handle the cropping of the picture. This can be done using the VIDEO_SET_DISPLAY_FORMAT call (??) which accepts
@@ -89,6 +89,49 @@ typedef enum { </programlisting> </section> +<section id="video-command"> +<para>The structure must be zeroed before use by the application +This ensures it can be extended safely in the future.</para> +<title>struct video-command</title> +<programlisting> +struct video_command { + __u32 cmd; + __u32 flags; + union { + struct { + __u64 pts; + } stop; + + struct { + /⋆ 0 or 1000 specifies normal speed, + 1 specifies forward single stepping, + -1 specifies backward single stepping, + >>1: playback at speed/1000 of the normal speed, + <-1: reverse playback at (-speed/1000) of the normal speed. ⋆/ + __s32 speed; + __u32 format; + } play; + + struct { + __u32 data[16]; + } raw; + }; +}; +</programlisting> +</section> + +<section id="video-size-t"> +<title>struct video_size-t</title> +<programlisting> +typedef struct { + int w; + int h; + video_format_t aspect_ratio; +} video_size_t; +</programlisting> +</section> + + <section id="video-event"> <title>struct video_event</title> <para>The following is the structure of a video event as it is returned by the VIDEO_GET_EVENT
Signature · 1 line
1.7.1