public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Eduard Huguet" <eduardhc@gmail.com>
To: linux-dvb@linuxtv.org
Subject: Re: [linux-dvb] [patch 5/5] mt312: add attach-time setting to invert lnb-voltage (Matthias Schwarzott)
Date: Mon, 14 Apr 2008 11:09:59 +0200	[thread overview]
Message-ID: <617be8890804140209p3b79df8cm3f94de8f82b1faa5@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2285 bytes --]

>
> ---------- Missatge reenviat ----------
> From: Matthias Schwarzott <zzam@gentoo.org>
> 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 <zzam@gentoo.org>
> Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
> ===================================================================
> --- 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 = fe->demodulator_priv;
>         const u8 volt_tab[3] = { 0x00, 0x40, 0x00 };
> +       u8 val;
>
>         if (v > SEC_VOLTAGE_OFF)
>                 return -EINVAL;
>
> -       return mt312_writereg(state, DISEQC_MODE, volt_tab[v]);
> +       val = volt_tab[v];
> +       if (state->config->voltage_inverted)
> +               val ^= 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
> ===================================================================
> --- 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. ¿Is 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,
¿could you tell me if it's better to use use_frontend=0 or 1 for saa7134-dvb
module? I think that this changes the driver used for frontend, but I'm not
sure.

Regards,
  Eduard

[-- Attachment #1.2: Type: text/html, Size: 3337 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

             reply	other threads:[~2008-04-14  9:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-14  9:09 Eduard Huguet [this message]
2008-04-27  3:40 ` [linux-dvb] a700 support (was: [patch 5/5] mt312: add attach-time setting to invert lnb-voltage (Matthias Schwarzott)) Matthias Schwarzott
2008-04-27 11:42   ` Eduard Huguet
2008-04-27 14:59     ` Matthias Schwarzott
2008-04-27 16:54       ` Eduard Huguet
2008-04-27 20:19         ` Eduard Huguet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=617be8890804140209p3b79df8cm3f94de8f82b1faa5@mail.gmail.com \
    --to=eduardhc@gmail.com \
    --cc=linux-dvb@linuxtv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox