public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hartmut Hackmann <hartmut.hackmann@t-online.de>
To: timf <timf@iinet.net.au>
Cc: linux-dvb@linuxtv.org
Subject: Re: [linux-dvb] Kworld DVB-T 210 - dvb tuning problem
Date: Sun, 13 Apr 2008 23:41:23 +0200	[thread overview]
Message-ID: <48027E03.5010704@t-online.de> (raw)
In-Reply-To: <48027653.1000001@iinet.net.au>

Hi,

timf schrieb:
> Hartmut Hackmann wrote:
>> Hi, Tim
>> <snip>
>>>>
>>>> I think i know now how your card needs to be configured.
>>>> Something that seems not to be really clear for you is the 
>>>> configuration
>>>> of the so-called AGC (automatic gain control) of the tuner. This
>>>> needs to be switched according to the function the tuner is used for:
>>>> analog TV -> FM Radio -> DVB-T.
>>>> This is done with the 4052 analog mux and requires 2 control bits -> 
>>>> the GPIOs.
>>>> GPIO 21 is used to switch between analog TV and FM radio.
>>>> Typically GPIO21=0 -> analog TV, GPIO21=1 -> FM Radio.
>>>> In your case, GPIO22 is used to switch between DVB-T and analog 
>>>> while most cards
>>>> use GPIO1 of the tda10046 for this.
>>>>
>>>> You should need to make chages only in saa7134-dvb, dvb_init()
>>>> - remove the old
>>>>     case SAA7134_BOARD_KWORLD_DVBT_210: (plus code)
>>>> -and add it to
>>>>     case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS:
>>>>
>>>> That should do it (though we should add a .antenna switch to the 
>>>> configuration).
>>>>
>>>> Best regards
>>>>   Hartmut
>>>>
>>> Hi Hartmut,
>>>
>>>

<snip>

> Hi Hartmut,
> 
> 
> 1) With    .gpio_config   = TDA10046_GP11_I,
> 
> root@ubuntu:/home/timf# tzap -r "TEN HD"
> using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
> tuning to 788500000 Hz
> video pid 0x0202, audio pid 0x0000
> status 00 | signal 9d9d | snr 3333 | ber 0001fffe | unc 0000004d |
> status 1f | signal 9d9d | snr fdfd | ber 000001b8 | unc ffffffff | 
> FE_HAS_LOCK
> status 1f | signal 9c9c | snr fdfd | ber 000001de | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 0000017c | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 00000182 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 000001a4 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 00000202 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 0000021c | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 00000226 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 00000234 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 00000290 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 00000240 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 000001fa | unc 00000000 | 
> FE_HAS_LOCK
> 
> Analog-tv also scans fine.
> 

Things should look like this.

> 2) With
> //    .gpio_config   = TDA10046_GP11_I,
>    .gpio_config   = TDA10046_GP00_I,
> 
> timf@ubuntu:~$ sudo -s -H
> [sudo] password for timf:
> root@ubuntu:/home/timf# tzap -r "TEN HD"
> using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
> tuning to 788500000 Hz
> video pid 0x0202, audio pid 0x0000
> status 00 | signal 0000 | snr 9494 | ber 0001fffe | unc 00000000 |
> status 1f | signal 0000 | snr ecec | ber 00019622 | unc ffffffff | 
> FE_HAS_LOCK
> status 1f | signal 0000 | snr f8f8 | ber 00014eac | unc ffffffff | 
> FE_HAS_LOCK
> status 00 | signal 0000 | snr 5e5e | ber 0001fffe | unc 00000000 |
> status 1f | signal 0000 | snr fcfc | ber 00002bcc | unc ffffffff | 
> FE_HAS_LOCK
> status 1f | signal 0000 | snr fdfd | ber 000018a2 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 0000 | snr fdfd | ber 00000e74 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 0000 | snr fdfd | ber 00000912 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 0000 | snr fefe | ber 000006b6 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 0000 | snr fefe | ber 0000068e | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 0000 | snr fdfd | ber 000005c2 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 0000 | snr fefe | ber 00000584 | unc 00000000 | 
> FE_HAS_LOCK
> 
> However, analog-tv fails to scan anything -> "no signal"
> 
This is wrong. Although the channel decoder locks, the signal at its
input is very low.

But this means: The analog -> dvb switch is the GPIO of the channel decoder
*not* GPIO22

so we can fix: we need  .gpio_config   = TDA10046_GP11_I

> 3) antenna_switch
> 
> static int philips_tda827x_tuner_init(struct dvb_frontend *fe)
> {
>    struct saa7134_dev *dev = fe->dvb->priv;
>    struct tda1004x_state *state = fe->demodulator_priv;
> 
>    switch (state->config->antenna_switch) {
>    case 0: break;
>    case 1:    dprintk("setting GPIO21 to 0 (TV antenna?)\n");
>        saa7134_set_gpio(dev, 21, 0);
>        break;
>    case 2: dprintk("setting GPIO21 to 1 (Radio antenna?)\n");
>        saa7134_set_gpio(dev, 21, 1);
>        break;
>    }
>    return 0;
> }
> 
> static int philips_tda827x_tuner_sleep(struct dvb_frontend *fe)
> {
>    struct saa7134_dev *dev = fe->dvb->priv;
>    struct tda1004x_state *state = fe->demodulator_priv;
> 
>    switch (state->config->antenna_switch) {
>    case 0: break;
>    case 1: dprintk("setting GPIO21 to 1 (Radio antenna?)\n");
>        saa7134_set_gpio(dev, 21, 1);
>        break;
>    case 2:    dprintk("setting GPIO21 to 0 (TV antenna?)\n");
>        saa7134_set_gpio(dev, 21, 0);
>        break;
>    }
>    return 0;
> }
> 
> If I put .antenna_switch = 1 or 2, in my struct, dvb-t fails to scan.
> I can't put antenna_switch in my struct, can I, as I am using gpio22?
> So I took it out, and in saa7134-cards.c, changed .radio to this:
> 
I don't believe that this is right.
It is just a static signal and can't be anything else.

>    [SAA7134_BOARD_KWORLD_DVBT_210] = {
>        .name           = "KWorld DVB-T 210",
>        .audio_clock    = 0x00187de7,
>        .tuner_type     = TUNER_PHILIPS_TDA8290,
>        .radio_type     = UNSET,
>        .tuner_addr    = ADDR_UNSET,
>        .radio_addr    = ADDR_UNSET,
>        .mpeg           = SAA7134_MPEG_DVB,
>        .gpiomask    = 0 << 21,
>        .inputs = {{
>            .name   = name_tv,
>            .vmux   = 1,
>            .amux   = TV,
>            .tv     = 1,
>        },{
>            .name   = name_comp1,
>            .vmux   = 3,
>            .amux   = LINE1,
>        },{
>            .name   = name_svideo,
>            .vmux   = 8,
>            .amux   = LINE1,
>        }},
>        .radio = {
>            .name   = name_radio,
>            .amux   = TV,
>            .gpio    = 0x00000000,

This is wrong. It has to be .gpio = 0x0200000, as it was in the original
source code.

>        },
>    },
> I still can't tune to a radio cahnnel.
> I'm not sure how to switch to radio, I'm not even sure which gpio it's on.
> I assume it's on gpio21, but I've tried various configs - none work.
> 
> Regards,
> Tim
> 
Tim, seriously: For me it looks like you messed up the entire code. I would
recommend you roll back completely and start over again.


Hartmut

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

  reply	other threads:[~2008-04-13 21:41 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-10 16:22 [linux-dvb] Kworld DVB-T 210 - dvb tuning problem timf
2008-04-10 22:08 ` Hartmut Hackmann
2008-04-10 23:30   ` hermann pitton
2008-04-11 17:54     ` timf
2008-04-11 22:14       ` Hartmut Hackmann
2008-04-13  6:00         ` timf
2008-04-13  7:59           ` timf
2008-04-13 15:54             ` timf
2008-04-13 17:08               ` timf
2008-04-13 18:56                 ` Hartmut Hackmann
2008-04-13 19:25                   ` timf
2008-04-13 20:23                     ` Hartmut Hackmann
2008-04-13 21:08                       ` timf
2008-04-13 21:41                         ` Hartmut Hackmann [this message]
2008-04-13 22:11                           ` timf
2008-04-13 22:35                             ` timf
2008-04-13 22:53                             ` Hartmut Hackmann
2008-04-14 14:10                               ` timf
2008-04-15  0:42                                 ` hermann pitton
2008-04-11 21:23     ` Hartmut Hackmann
2008-04-12 11:30       ` hermann pitton
2008-04-12 12:00         ` timf
  -- strict thread matches above, loose matches on Subject: below --
2008-03-14 12:52 Steve Moreau
     [not found] <1204893775.10536.4.camel@ubuntu>
     [not found] ` <47D1A65B.3080900@t-online.de>
2008-03-14  7:41   ` timf
2008-03-17 21:22     ` Hartmut Hackmann
2008-03-18 14:40       ` timf
2008-03-18 22:56         ` Hartmut Hackmann
2008-03-19  4:03           ` timf
2008-03-19 23:18             ` Hartmut Hackmann
     [not found]         ` <1213744559.11684.4.camel@asus.lounge>
2008-06-18  2:12           ` timf
2008-06-18  2:51             ` timf
2008-03-07 12:51 timf

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=48027E03.5010704@t-online.de \
    --to=hartmut.hackmann@t-online.de \
    --cc=linux-dvb@linuxtv.org \
    --cc=timf@iinet.net.au \
    /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