All of lore.kernel.org
 help / color / mirror / Atom feed
From: timf <timf@iinet.net.au>
To: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Cc: linux-dvb@linuxtv.org
Subject: Re: [linux-dvb] Kworld DVB-T 210 - dvb tuning problem
Date: Mon, 14 Apr 2008 06:35:20 +0800	[thread overview]
Message-ID: <48028AA8.40803@iinet.net.au> (raw)
In-Reply-To: <48028513.5010208@iinet.net.au>

timf wrote:
> Hartmut Hackmann wrote:
>   
>> 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
>>
>>     
> OK, this is using v4l-dvb as downloaded via mercurial 9 April2008.
> No modifications.
>
> 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 9e9e | snr 5d5d | ber 0001fffe | unc 00000000 |
> status 1f | signal 9d9d | snr fdfd | ber 0000010c | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9d9d | snr fefe | ber 00000104 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9d9d | snr fefe | ber 00000106 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9d9d | snr fefe | ber 00000116 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9d9d | snr fefe | ber 0000010e | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9d9d | snr fefe | ber 000000f6 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9d9d | snr fefe | ber 0000012c | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9d9d | snr fefe | ber 00000108 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 0000011e | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 00000114 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9d9d | snr fefe | ber 000000f4 | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 0000010e | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 0000013a | unc 00000000 | 
> FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 00000232 | unc 00000000 | 
> FE_HAS_LOCK
>
> Analog-tv - "no signal" - no channels scanned
>
> Regards,
> Tim
>
> _______________________________________________
> linux-dvb mailing list
> linux-dvb@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
>
>
> And here is using my strange code:
>
> 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 9c9c | snr 3636 | ber 0001fffe | unc 00000000 | 
> status 1f | signal 9c9c | snr fefe | ber 000001d0 | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 0000019a | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 00000186 | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 00000176 | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 00000186 | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 0000016a | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 000001ba | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9c9c | snr fefe | ber 000001bc | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 000001dc | unc 00000000 | FE_HAS_LOCK
>
> root@ubuntu:/home/timf# tzap -r "SBS HD"
> using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
> tuning to 704500000 Hz
> video pid 0x0066, audio pid 0x0067
> status 00 | signal 9b9b | snr 4848 | ber 0001fffe | unc 00000000 | 
> status 1f | signal 9b9b | snr fefe | ber 000002a8 | unc ffffffff | FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 00000294 | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 0000024c | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9a9a | snr fefe | ber 00000282 | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9a9a | snr fefe | ber 00000258 | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 00000208 | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 00000156 | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 00000194 | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9a9a | snr fefe | ber 000001a2 | unc 00000000 | FE_HAS_LOCK
> status 1f | signal 9b9b | snr fefe | ber 00000176 | unc 00000000 | FE_HAS_LOCK
>
> <?xml version="1.0"?>
> <!DOCTYPE stationlist PUBLIC "-//tvtime//DTD stationlist 1.0//EN" "http://tvtime.sourceforge.net/DTD/stationlist1.dtd">
> <stationlist xmlns="http://tvtime.sourceforge.net/DTD/">
>   <list norm="PAL" frequencies="australia" audio="bg">
>
>     <station name="3" active="1" position="3" band="VHF Australia" channel="AS2" finetune="0"/>
>
>     <station name="9" active="1" position="9" band="VHF Australia" channel="AS7" finetune="0"/>
>
>     <station name="11" active="1" position="11" band="VHF Australia" channel="AS9" finetune="0"/>
>
>     <station name="13" active="1" position="13" band="VHF Australia" channel="AS10" finetune="0"/>
>
>     <station name="24" active="1" position="24" band="UHF Australia" channel="AU28" finetune="0"/>
>
>     <station name="53" active="1" position="53" band="UHF Australia" channel="AU57" finetune="0"/>
>
>     <station name="56" active="1" position="56" band="UHF Australia" channel="AU60" finetune="0"/>
>
>     <station name="59" active="1" position="59" band="UHF Australia" channel="AU63" finetune="0"/>
>
>     <station name="62" active="1" position="62" band="UHF Australia" channel="AU66" finetune="0"/>
>   </list>
> </stationlist> 
>
>   
Regards,
Tim

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

  reply	other threads:[~2008-04-13 22:35 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
2008-04-13 22:11                           ` timf
2008-04-13 22:35                             ` timf [this message]
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=48028AA8.40803@iinet.net.au \
    --to=timf@iinet.net.au \
    --cc=hartmut.hackmann@t-online.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.