From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from rv-out-0506.google.com ([209.85.198.231]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1JlKhd-0006uZ-C7 for linux-dvb@linuxtv.org; Mon, 14 Apr 2008 11:10:26 +0200 Received: by rv-out-0506.google.com with SMTP id b25so714370rvf.41 for ; Mon, 14 Apr 2008 02:09:59 -0700 (PDT) Message-ID: <617be8890804140209p3b79df8cm3f94de8f82b1faa5@mail.gmail.com> Date: Mon, 14 Apr 2008 11:09:59 +0200 From: "Eduard Huguet" To: linux-dvb@linuxtv.org MIME-Version: 1.0 Subject: Re: [linux-dvb] [patch 5/5] mt312: add attach-time setting to invert lnb-voltage (Matthias Schwarzott) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1987909761==" Mime-version: 1.0 Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: --===============1987909761== Content-Type: multipart/alternative; boundary="----=_Part_36719_5459260.1208164199157" ------=_Part_36719_5459260.1208164199157 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > > ---------- Missatge reenviat ---------- > From: Matthias Schwarzott > To: linux-dvb@linuxtv.org > Date: Sat, 12 Apr 2008 17:04:50 +0200 > Subject: [linux-dvb] [patch 5/5] mt312: add attach-time setting to invert > lnb-voltage > Add a setting to config struct for inversion of lnb-voltage. > Needed for support of Avermedia A700 cards. > > Signed-off-by: Matthias Schwarzott > Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- v4l-dvb.orig/linux/drivers/media/dvb/frontends/mt312.c > +++ v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c > @@ -422,11 +422,16 @@ static int mt312_set_voltage(struct dvb_ > { > struct mt312_state *state =3D fe->demodulator_priv; > const u8 volt_tab[3] =3D { 0x00, 0x40, 0x00 }; > + u8 val; > > if (v > SEC_VOLTAGE_OFF) > return -EINVAL; > > - return mt312_writereg(state, DISEQC_MODE, volt_tab[v]); > + val =3D volt_tab[v]; > + if (state->config->voltage_inverted) > + val ^=3D 0x40; > + > + return mt312_writereg(state, DISEQC_MODE, val); > } > > static int mt312_read_status(struct dvb_frontend *fe, fe_status_t *s) > Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- v4l-dvb.orig/linux/drivers/media/dvb/frontends/mt312.h > +++ v4l-dvb/linux/drivers/media/dvb/frontends/mt312.h > @@ -31,6 +31,9 @@ > struct mt312_config { > /* the demodulator's i2c address */ > u8 demod_address; > + > + /* inverted voltage setting */ > + int voltage_inverted:1; > }; > > #if defined(CONFIG_DVB_MT312) || (defined(CONFIG_DVB_MT312_MODULE) && > defined(MODULE)) > -- > Thanks for the patches. =BFIs your lastest unified diff on your page (a700_full_20080412.diff) equivalent to these patches or must they be applied separately? I'll try to some tests tonight, if you have made some progress. By the way, =BFcould you tell me if it's better to use use_frontend=3D0 or 1 for saa713= 4-dvb module? I think that this changes the driver used for frontend, but I'm not sure. Regards, Eduard ------=_Part_36719_5459260.1208164199157 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
---------- Missatge reenviat ----------
From: Mat= thias Schwarzott <zzam@gentoo.org= >
To: linux-dvb@linuxtv.org
D= ate: Sat, 12 Apr 2008 17:04:50 +0200
Subject: [linux-dvb] [patch 5/5] mt= 312: add attach-time setting to invert lnb-voltage
Add a setting to conf= ig struct for inversion of lnb-voltage.
Needed for support of Avermedia A700 cards.

Signed-off-by: Matthi= as Schwarzott <zzam@gentoo.org>= ;
Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/mt312.c
+++ v4l-dvb= /linux/drivers/media/dvb/frontends/mt312.c
@@ -422,11 +422,16 @@ static= int mt312_set_voltage(struct dvb_
  {
   &n= bsp;    struct mt312_state *state =3D fe->demodulato= r_priv;
        const u8 volt_tab[3] =3D { = 0x00, 0x40, 0x00 };
+       u8 val;
<= br>        if (v > SEC_VOLTAGE_O= FF)
           &n= bsp;    return -EINVAL;

-   &nb= sp;   return mt312_writereg(state, DISEQC_MODE, volt_tab[v]);
+       val =3D volt_tab[v];
+ &nbs= p;     if (state->config->voltage_inverted)
+=             &nb= sp;  val ^=3D 0x40;
+
+       re= turn mt312_writereg(state, DISEQC_MODE, val);
  }

&nbs= p; static int mt312_read_status(struct dvb_frontend *fe, fe_status_t *= s)
Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.h
=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- v4l-dvb.orig/linux/drivers/= media/dvb/frontends/mt312.h
+++ v4l-dvb/linux/drivers/media/dvb/fronten= ds/mt312.h
@@ -31,6 +31,9 @@
  struct mt312_config {
  &nbs= p;     /* the demodulator's i2c address */
=         u8 demod_address;
+
= +       /* inverted voltage setting */
+=        int voltage_inverted:1;
  = ;};

  #if defined(CONFIG_DVB_MT312) || (defined(CONFIG_DVB_MT312= _MODULE) && defined(MODULE))
--


= Thanks for the patches. =BFIs your lastest unified diff on your page (a700_= full_20080412.diff) equivalent to these patches or must they be applied sep= arately?

I'll try to some tests tonight, if you have made some progress. By = the way, =BFcould you tell me if it's better to use use_frontend=3D0 or= 1 for saa7134-dvb module? I think that this changes the driver used for fr= ontend, but I'm not sure.

Regards,
  Eduard





------=_Part_36719_5459260.1208164199157-- --===============1987909761== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb --===============1987909761==--