[vlc-devel] [PATCH 2/2] dtv multisat: Set dvb_diseqc_master_cmd command length.

Zoran Turalija zoran.turalija at gmail.com
Fri Aug 10 17:13:09 CEST 2012


On Fri, Aug 10, 2012 at 04:15:19PM +0200, Rémi Denis-Courmont wrote:
> On Fri, 10 Aug 2012 15:59:07 +0200, Zoran Turalija
> <zoran.turalija at gmail.com> wrote:
> > If not initialized correctly, FE_DISEQC_SEND_MASTER_CMD will fail,
> > so no DiSEqC switch will occur, preventig multi-satellite tunning.
> > ---
> >  modules/access/dtv/linux.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> > diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
> > index fbc771b..28f2069 100644
> > --- a/modules/access/dtv/linux.c
> > +++ b/modules/access/dtv/linux.c
> > @@ -774,7 +774,8 @@ known:
> >      {
> >          /* DiSEqC 1.0 */
> >  #undef msleep /* we know what we are doing! */
> > -        struct dvb_diseqc_master_cmd cmd;
> > +        struct dvb_diseqc_master_cmd cmd =
> > +            { {0xE0, 0x10, 0x38, 0xF0, 0x00, 0x00}, 4};
> 
> That's a lot of duplication just to set cmd.msg_len = 4.

FE_DISEQC_SEND_MASTER_CMD will fail if command length is not set,
preventing multi-satellite tunning using DiSEqC switch.
---
 modules/access/dtv/linux.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index fbc771b..b0b88be 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -785,6 +785,7 @@ known:
                    | ((voltage == SEC_VOLTAGE_18) << 1) /* polarization */
                    | (tone == SEC_TONE_ON); /* option */
         cmd.msg[4] = cmd.msg[5] = 0; /* unused */
+        cmd.msg_len = 4; /* length*/
         msleep (15000); /* wait 15 ms before DiSEqC command */
         if (ioctl (d->frontend, FE_DISEQC_SEND_MASTER_CMD, &cmd) < 0)
         {
-- 
1.7.5.4



More information about the vlc-devel mailing list