The patch number 10584 was added via rjkm
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <linux-me...@vger.kernel.org>

------

change include files


---

 dvb-spec/dvbapi/audio.tex    |   12 ++
 dvb-spec/dvbapi/dvbapi.tex   |    2 
 dvb-spec/dvbapi/examples.tex |  143 +++++++++++++++++------------------
 dvb-spec/dvbapi/frontend.tex |    2 
 dvb-spec/dvbapi/intro.tex    |   19 +---
 dvb-spec/dvbapi/title.tex    |    4 
 dvb-spec/dvbapi/video.tex    |    6 -
 7 files changed, 94 insertions(+), 94 deletions(-)

diff -r d9c781f66397 -r 169cbee5418b dvb-spec/dvbapi/audio.tex
--- a/dvb-spec/dvbapi/audio.tex Fri Sep 21 09:47:12 2001 -0300
+++ b/dvb-spec/dvbapi/audio.tex Wed Mar 06 20:44:49 2002 -0300
@@ -354,7 +354,12 @@ typedef uint16_t audioAttributes_t;
 \ifunction{AUDIO\_SET\_ID}{
   int ioctl(int fd, int request = AUDIO\_SET\_ID, int id);}{
   This ioctl selects which sub-stream is to be decoded if a program or
-  system stream is sent to the video device.
+  system stream is sent to the video device. If no audio stream type is set
+  the id has to be in [0xC0,0xDF] for MPEG sound, in [0x80,0x87] for
+  AC3 and in [0xA0,0xA7] for LPCM. More specifications may follow
+  for other stream types. If the stream type is set the id just
+  specifies the substream id of the audio stream and only the first 5
+  bits are recognized.
   }{
   int fd & File descriptor returned by a previous call to open().\\
   int request & Equals AUDIO\_SET\_ID for this command.\\
@@ -382,7 +387,7 @@ typedef uint16_t audioAttributes_t;
   int ioctl(fd, int request = AUDIO\_SET\_STREAMTYPE, int type);}{
   This ioctl tells the driver which kind of audio stream to expect.
   This is useful if the stream offers several audio sub-streams 
-  like MPEG2 audio and AC3.
+  like LPCM and AC3.
   }{
   int fd      & File descriptor returned by a previous call to open().\\
   int request & Equals AUDIO\_SET\_STREAMTYPE for this command.\\
@@ -395,7 +400,8 @@ typedef uint16_t audioAttributes_t;
 
 \ifunction{AUDIO\_SET\_EXT\_ID}{
   int ioctl(fd, int request = AUDIO\_SET\_EXT\_ID, int id);}{
-  This ioctl can be used to set the audio sub\_stream\_id for DVD playback
+  This ioctl can be used to set the extension id for MPEG streams in 
+  DVD playback. Only the first 3 bits are recognized. 
   }{
   int fd      & File descriptor returned by a previous call to open().\\
   int request & Equals AUDIO\_SET\_EXT\_ID for this command.\\
diff -r d9c781f66397 -r 169cbee5418b dvb-spec/dvbapi/dvbapi.tex
--- a/dvb-spec/dvbapi/dvbapi.tex        Fri Sep 21 09:47:12 2001 -0300
+++ b/dvb-spec/dvbapi/dvbapi.tex        Wed Mar 06 20:44:49 2002 -0300
@@ -131,7 +131,7 @@
 \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}{}}
 \lhead[\fancyplain{}{\bfseries \thepage}]{\bfseries \rightmark}
 \rhead[\fancyplain{}{\bfseries \leftmark}]{\bfseries \thepage}
-\cfoot{\copyright 2001 convergence integrated media GmbH}
+\cfoot{\copyright 2002 convergence GmbH}
 
 \input{intro.tex}
 
diff -r d9c781f66397 -r 169cbee5418b dvb-spec/dvbapi/examples.tex
--- a/dvb-spec/dvbapi/examples.tex      Fri Sep 21 09:47:12 2001 -0300
+++ b/dvb-spec/dvbapi/examples.tex      Wed Mar 06 20:44:49 2002 -0300
@@ -23,29 +23,31 @@ tuners, but can easily be adjusted for Q
 #include <sys/poll.h>
 
 #define DMX "/dev/ost/demux"
-#define QPSK "/dev/ost/qpskfe"
+#define FRONT "/dev/ost/frontend"
 #define SEC "/dev/ost/sec"
 
-/* routine for checking if we have a signal */
-int has_signal(int front)
-{
-        feStatus stat;
-        
-        if ( front < 0 ){
-                if((front = open(QPSK,O_RDWR)) < 0){
-                        perror("FRONTEND DEVICE: ");
-                        return -1;
-                }
-        }
-
-        FEReadStatus(front, &stat);
-        if (stat & FE_HAS_SIGNAL)
-                return 0;
-        else {
-                printf("Tuning failed\n");
-                return -1;
-        }
-}
+/* routine for checking if we have a signal and other status information*/
+int FEReadStatus(int fd, FrontendStatus *stat)
+{
+        int ans;
+
+        if ( (ans = ioctl(fd,FE_READ_STATUS,stat) < 0)){
+                perror("FE READ STATUS: ");
+                return -1;
+        }
+
+        if (*stat & FE_HAS_POWER)
+                printf("FE HAS POWER\n");
+
+        if (*stat & FE_HAS_SIGNAL)
+                printf("FE HAS SIGNAL\n");
+
+        if (*stat & FE_SPECTRUM_INV)
+                printf("SPEKTRUM INV\n");
+
+        return 0;
+}
+
 
 /* tune qpsk */
 /* freq:             frequency of transponder                      */
@@ -65,14 +67,15 @@ int set_qpsk_channel(int freq, int vpid,
         struct secCommand scmd;
         struct secCmdSequence scmds;
         struct dmxPesFilterParams pesFilterParams; 
-        struct qpskParameters qpsk;
+        FrontendParameters frp;
         struct pollfd pfd[1];
-        struct qpskEvent event;
-        int front, sec, demux1, demux2, demux3;
-
-        /* Open all the necessary the devices */
-
-        if((front = open(QPSK,O_RDWR)) < 0){
+        FrontendEvent event;
+        int demux1, dmeux2, demux3, front,
+
+        frequency = (uint32_t) freq;
+        symbolrate = (uint32_t) srate;
+
+        if((front = open(FRONT,O_RDWR)) < 0){
                 perror("FRONTEND DEVICE: ");
                 return -1;
         }
@@ -82,40 +85,41 @@ int set_qpsk_channel(int freq, int vpid,
                 return -1;
         }
 
-        if ((demux1 = open(DMX, O_RDWR|O_NONBLOCK))  < 0){
-                perror("DEMUX DEVICE: ");
-                return -1;
-        }
-
-        if ((demux2 = open(DMX, O_RDWR|O_NONBLOCK))  < 0){
-                perror("DEMUX DEVICE: ");
-                return -1;
-        }
-
-        if ((demux3 = open(DMX, O_RDWR|O_NONBLOCK))  < 0){
-                perror("DEMUX DEVICE: ");
-                return -1;
-        }
-
-      /* Set the frequency of the transponder, taking into account the
-         local frequencies of the LNB */
+        if (demux1 < 0){
+                if ((demux1=open(DMX, O_RDWR|O_NONBLOCK)) 
+                    < 0){
+                        perror("DEMUX DEVICE: ");
+                        return -1;
+                }
+        }
+
+        if (demux2 < 0){
+                if ((demux2=open(DMX, O_RDWR|O_NONBLOCK)) 
+                    < 0){
+                        perror("DEMUX DEVICE: ");
+                        return -1;
+                }
+        }
+
+        if (demux3 < 0){
+                if ((demux3=open(DMX, O_RDWR|O_NONBLOCK)) 
+                    < 0){
+                        perror("DEMUX DEVICE: ");
+                        return -1;
+                }
+        }
 
         if (freq < lnb_slof) {
-                qpsk.iFrequency = (freq - lnb_lof1);
+                frp.Frequency = (freq - lnb_lof1);
                 scmds.continuousTone = SEC_TONE_OFF;
         } else {
-                qpsk.iFrequency = (freq - lnb_lof2);
+                frp.Frequency = (freq - lnb_lof2);
                 scmds.continuousTone = SEC_TONE_ON;
         }
-
-      /* Set the polarity of the transponder by setting the correct
-         voltage on the universal LNB */
-
+        frp.Inversion = INVERSION_AUTO;
         if (pol) scmds.voltage = SEC_VOLTAGE_18;
         else scmds.voltage = SEC_VOLTAGE_13;
-
-      /* In case we have a DiSEqC, set it to the correct address */
-
+        
         scmd.type=0;
         scmd.u.diseqc.addr=0x10;
         scmd.u.diseqc.cmd=0x38;
@@ -127,32 +131,31 @@ int set_qpsk_channel(int freq, int vpid,
         scmds.miniCommand=SEC_MINI_NONE;
         scmds.numCommands=1;
         scmds.commands=&scmd;
-
-      /* Send the data to the SEC device to prepare the LNB for tuning  */
         if (ioctl(sec, SEC_SEND_SEQUENCE, &scmds) < 0){
                 perror("SEC SEND: ");
                 return -1;
         }
 
-      /* Set symbol rate and FEC */
-
-        qpsk.SymbolRate = srate;
-        qpsk.FEC_inner = fec;
-
-      /* Now send it all to the frontend device */
-        if (ioctl(front, QPSK_TUNE, &qpsk) < 0){
+        if (ioctl(sec, SEC_SEND_SEQUENCE, &scmds) < 0){
+                perror("SEC SEND: ");
+                return -1;
+        }
+
+        frp.u.qpsk.SymbolRate = srate;
+        frp.u.qpsk.FEC_inner = fec;
+
+        if (ioctl(front, FE_SET_FRONTEND, &frp) < 0){
                 perror("QPSK TUNE: ");
                 return -1;
         }
  
-      /* poll for QPSK event to check if tuning worked */
         pfd[0].fd = front;
         pfd[0].events = POLLIN;
 
         if (poll(pfd,1,3000)){
                 if (pfd[0].revents & POLLIN){
                         printf("Getting QPSK event\n");
-                        if ( ioctl(front, QPSK_GET_EVENT, &event)  
+                        if ( ioctl(front, FE_GET_EVENT, &event)  
 
                              == -EBUFFEROVERFLOW){
                                 perror("qpsk get event");
@@ -166,14 +169,13 @@ int set_qpsk_channel(int freq, int vpid,
                         case FE_FAILURE_EV:
                                 printf("failure event\n");
                                 return -1;
-                       case FE_COMPLETION_EV:
+                                
+                        case FE_COMPLETION_EV:
                                 printf("completion event\n");
                         }
                 }
         }
       
-
-      /* Set the filters for video, audio and teletext demuxing */
 
         pesFilterParams.pid     = vpid;
         pesFilterParams.input   = DMX_IN_FRONTEND; 
@@ -205,8 +207,7 @@ int set_qpsk_channel(int freq, int vpid,
                 return -1;
         }
 
-        /* check if we have a signal */
-        return has_signal(front);
+        return has_signal(fds);
 }
 
 \end{verbatim}
@@ -262,7 +263,7 @@ int switch_to_record(int demux1, int dem
         }
 
         if (demux2 < 0){
-                if ((demux2=open(DMXdemuxs, O_RDWR|O_NONBLOCK)) 
+                if ((demux2=open(DMX, O_RDWR|O_NONBLOCK)) 
                     < 0){
                         perror("DEMUX DEVICE: ");
                         return -1;
diff -r d9c781f66397 -r 169cbee5418b dvb-spec/dvbapi/frontend.tex
--- a/dvb-spec/dvbapi/frontend.tex      Fri Sep 21 09:47:12 2001 -0300
+++ b/dvb-spec/dvbapi/frontend.tex      Wed Mar 06 20:44:49 2002 -0300
@@ -114,7 +114,7 @@ typedef enum {
 } SpectralInversion;
 \end{verbatim}
 It indicates if spectral inversion should be presumed or not. 
-In the automatic setting (INVERSION_AUTO) the hardware will
+In the automatic setting (\verb INVERSION_AUTO) the hardware will
 try to figure out the correct setting by itself.
 
 \noindent
diff -r d9c781f66397 -r 169cbee5418b dvb-spec/dvbapi/intro.tex
--- a/dvb-spec/dvbapi/intro.tex Fri Sep 21 09:47:12 2001 -0300
+++ b/dvb-spec/dvbapi/intro.tex Wed Mar 06 20:44:49 2002 -0300
@@ -68,7 +68,7 @@ time and re-inserted into the TS.
 
 The demultiplexer splits the TS into its components like audio and video 
 streams. Besides usually several of such audio and video streams it also 
-contains data strams with information about the programs offered in this
+contains data streams with information about the programs offered in this
 or other streams of the same provider.
 
 \item MPEG2 audio and video decoder 
@@ -110,22 +110,13 @@ The individual devices are called
 \begin{itemize}
 \item \texttt{/dev/ost/audio},
 \item \texttt{/dev/ost/video},
-\item \texttt{/dev/ost/qpskfe},
-\item \texttt{/dev/ost/qamfe},
+\item \texttt{/dev/ost/frontend},
 \item \texttt{/dev/ost/sec},
 \item \texttt{/dev/ost/demux},
 \item \texttt{/dev/ost/ca},
 \end{itemize}
 but we will omit the ``\texttt{/dev/ost/}'' in the further dicussion of 
 these devices. 
-
-%Thus, the \texttt{audio} and \texttt{video} devices directly control 
-%the MPEG2 decoder audio and video decoder, respectively. 
-%Depending on the kind of frontend present (satellite, cable or
-%terrestrial), it will be controlled either through the 
-%\texttt{qpsk} or \texttt{qamfe} device. 
-%DiSEqC or other kinds of control signals can be sent to the 
-%antenna hardware through the \texttt{sec} device.
 
 If more than one card is present in the system the other cards
 can be accessed through the corresponding devices with the
@@ -151,7 +142,7 @@ Consider, e.g., two DVB cards, one with 
 Consider, e.g., two DVB cards, one with two frontends and
 one demultiplexer, the other with one frontend and two demultiplexers.
 If we just assign them consecutive numbers, there would be a demultiplexer
-and a frontend which do notbelong to the same card but have 
+and a frontend which do not belong to the same card but have 
 the same number.
 
 With \textsl{devfs} we propose a different scheme for the device names.
@@ -169,14 +160,14 @@ complete \texttt{/dev/dvb} tree will loo
 complete \texttt{/dev/dvb} tree will look like this:
 
 \begin{verbatim}
-/dev/dvb/card0/qam0
+/dev/dvb/card0/frontend0
                demux0
 
 /dev/dvb/card1/video0
                audio0
                demux0
                demux1
-               qpskfe0
+               frontend0
                sec0
 \end{verbatim}
 
diff -r d9c781f66397 -r 169cbee5418b dvb-spec/dvbapi/title.tex
--- a/dvb-spec/dvbapi/title.tex Fri Sep 21 09:47:12 2001 -0300
+++ b/dvb-spec/dvbapi/title.tex Wed Mar 06 20:44:49 2002 -0300
@@ -12,7 +12,7 @@
 %  Rosenthalerstr. 51\\
 %  10178 Berlin\\Germany
 }
-\date{09/15/2001\\V 0.9.4}
+\date{02/14/2002\\V 0.9.4}
 \maketitle
 
 \newpage
@@ -21,4 +21,4 @@
 % Local Variables: 
 % mode: latex
 % TeX-master: "dvbapi"
-% End: 
\ No newline at end of file
+% End: 
diff -r d9c781f66397 -r 169cbee5418b dvb-spec/dvbapi/video.tex
--- a/dvb-spec/dvbapi/video.tex Fri Sep 21 09:47:12 2001 -0300
+++ b/dvb-spec/dvbapi/video.tex Wed Mar 06 20:44:49 2002 -0300
@@ -2,8 +2,10 @@
 
 The DVB video device controls the MPEG2 video decoder of the DVB hardware.
 It can be accessed through \texttt{/dev/ost/video}.
-The include file \texttt{ost/video.h} defines the data types and lists all I/O 
calls.
-
+The include file \texttt{ost/video.h} defines the data types and lists
+all I/O calls. Please note that some DVB cards don't have their own
+MPEG decoder, which results in the omission of the audio and video
+device as well as the video4linux device. 
 
 \devsubsec{Video Data Types}
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/169cbee5418b4c065d910bc185b9a19214a79721

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to