Welcome to GOFASTMOTORSPORTS.com ... ... ... Green Flag - Green Flag - Go Go Go ... ... Brought to you by Ricks Satellite - Where the Big Dish Rules!

Ricks Satellite Wildfeed and Backhaul Forum
Register Latest Topics
 
 
 


Reply
  Author   Comment   Page 3 of 5      Prev   1   2   3   4   5   Next
Richard

Registered:
Posts: 58
Reply with quote  #31 
Many thanks, it's given me something more concrete to start from. Will keep you posted.

Kind regards,

Richard
Richard

Registered:
Posts: 58
Reply with quote  #32 
Progress report.

If I use the numerical values for:

.demod_mode and .pathX_mode

and comment out all the ".tuner_* = NULL" entries, it compiles OK although I'm not sure if removing the latter is going to cause breakage.

At this point I've not attempted to use the card, as for unrelated reasons, (Kconfig maybe), I can't get any of the saa716x stuff to attempt to build when added to Majortom's tree, but am still working on it.

It may make more sense to add the Pendragon driver changes to the 4.12 kernel I've tested the compile on. Lots of learning going on anyway.

Regards,

Richard
pendragon

Registered:
Posts: 1,017
Reply with quote  #33 
If you added an #include for stv0900_priv.h, the code would probably compile with the symbolic names, not that it matters. I should have moved those definitions to stv0900.h long ago, but I'm always in a hurry when I find time to work on DVB code.

My original code distribution contains only the files I modified. There are not many. That makes it straightforward to merge those files into any kernel, because most of those files never change, and when they do the changes are minor. When I update my kernel, that is where I start, and it rarely takes me 30 minutes to merge my DVB code. But I don't do that more often than once every 2-3 years. 

People here can't live without the latest kernel, so their solution is to release new, complete distros with their DVB changes each time a new kernel appears. Thus the knowledge and experience at Rick's is geared around that approach, and hence majortom's motivation to kick start v4l-pendragon. However no one is keeping it 'current', and I won't be starting there when I move to a newer kernel.

It might be simpler if the only thing I was doing with Linux was DVB. I could post my modified distro whenever I did a baseline merge. But DVB is only a tiny fraction of what I'm doing, and the rest of my work would be likely of little or no interest to anyone here. While I post some of my other work to other special interest groups somewhat like Rick's, it can take a lot of time to isolate and excerpt only that code relevant to each domain, once the whole is assembled. Any time I invest toward that personally gains me nothing. I'm fine with contributing to the open-source community and have for 40 years, but I also know how one can get overwhelmed and drown.
Richard

Registered:
Posts: 58
Reply with quote  #34 
OK, I finally got saa716x to build in v4l-pendragon and have just booted it.

For some reason, it's having a problem attaching the demods:

[   15.961891] SAA716x FF FPGA version 1.10
[   16.056223] SAA716x FF loader version 1.03
[   17.089247] DVB: registering new adapter (SAA716x dvb adapter)
[   17.115350] stv0900_attach: demod_mode 1 addr 68
[   17.115359] stv0900_attach: Failed to attach STV0900 demodulator 0
[   17.115630] DVB: registering new adapter (SAA716x dvb adapter)
[   17.116638] stv0900_attach: demod_mode 1 addr 68
[   17.116645] stv0900_attach: Failed to attach STV0900 demodulator 1
[   17.942411] SAA716x FF firmware version 0.5.1
[   17.942518] input: TT6400 DVB IR receiver as /devices/pci0000:00/0000:00:1c.2/0000:02:00.0/input/input7

lsmod shows:

stv0900                57877  0
saa716x_ff             26537  0
saa716x_core           53073  1 saa716x_ff
dvb_core               91889  3 saa716x_ff,saa716x_core,stv0900

so missing the tuners and LNB controllers, but that's probably to be expected as the demods aren't attached.

To recap, here are the revised config and attach functions:

static struct stv0900_config tt6400_stv0900_config = {

        .demod_mode             = 1,
        .clkmode                = 2,

        .xtal                   = 13500000,
        .demod_address          = 0x68,

        .path1_mode = 2,
        .path2_mode = 2,

        .tun1_auto = 1,
        .tun2_auto = 1,
        .tun1_type = STV0900_TUNER_STV6110,
        .tun2_type = STV0900_TUNER_STV6110,
        .tun1_clkdiv = 2,
        .tun2_clkdiv = 2,

};

static int saa716x_s26400_frontend_attach(struct saa716x_adapter *adapter, int count)
{
        struct saa716x_dev *saa716x     = adapter->saa716x;
        struct saa716x_i2c *i2c         = saa716x->i2c;
        struct i2c_adapter *i2c_adapter = &i2c[SAA716x_I2C_BUS_A].i2c_adapter;

        dprintk(SAA716x_DEBUG, 1, "Adapter (%d) SAA716x frontend Init", count);
        dprintk(SAA716x_DEBUG, 1, "Adapter (%d) Device ID=%02x", count, saa716x->pdev->subsystem_device);

        if (count == 0 || count == 1) {
                adapter->fe = dvb_attach(stv0900_attach,
                                         &tt6400_stv0900_config,
                                         i2c_adapter,
                                         count);

                if (adapter->fe) {

                        if (count == 1) {
                                /* call the init function once to initialize
                                   tuner's clock output divider and demod's
                                   master clock */
                                /* The second tuner drives the STV0900 so
                                   call it only for adapter 1 */
                                if (adapter->fe->ops.init)
                                        adapter->fe->ops.init(adapter->fe);
                        }

                        dvb_attach(isl6423_attach,
                                   adapter->fe,
                                   i2c_adapter,
                                   &tt6400_isl6423_config[count]);

                        if (adapter->fe->ops.sleep)
                                adapter->fe->ops.sleep(adapter->fe);
                }
        }
        return 0;
}


Regards,

Richard
pendragon

Registered:
Posts: 1,017
Reply with quote  #35 

In stv0900_init_chip in file stv0900_core.c, change

    if (!inode && demod->config->demod_mode == STV0900_SINGLE) {

to

    if (!inode) {

Hopefully it will get farther. With .tun*_auto=1 the demod directly controls the tuner, so no tuner driver will be attached. We will see whether more changes are required to get this to work. Also, you can delete the following in saa716x_s26400_frontend_attach because stv0900_attach already sleeps the demod before it exits:

    if (adapter->fe->ops.sleep)
        adapter->fe->ops.sleep(adapter->fe);

Richard

Registered:
Posts: 58
Reply with quote  #36 
Woo Hoo! [smile]

[   15.755121] SAA716x FF FPGA version 1.10
[   15.842718] SAA716x FF loader version 1.03
[   16.844018] DVB: registering new adapter (SAA716x dvb adapter)
[   16.991196] stv0900_attach: demod_mode 1 addr 68
[   16.991204] stv0900_init_chip: Create new chip structure!
[   16.991207] stv0900_hard_reset
[   16.991733] stv0900_initialize chip_id 0x20 errs 0
[   17.110155] stv0900_set_mclk: Mclk set to 135000000, Quartz = 13500000
[   17.123998] stv0900_set_ts_parallel_serial path1 2 path2 2
[   17.150234] stv0900_sleep
[   17.156480] stv0900_attach: Attaching STV0900 demodulator 0, chip id 20
[   17.241781] SAA716x FF 0000:02:00.0: DVB: registering adapter 2 frontend 0 (STV0900 frontend)...
[   17.242443] DVB: registering new adapter (SAA716x dvb adapter)
[   17.243418] stv0900_attach: demod_mode 1 addr 68
[   17.243425] stv0900_init_chip: Create new chip structure!
[   17.243428] stv0900_hard_reset
[   17.244004] stv0900_initialize chip_id 0x20 errs 0
[   17.364854] stv0900_set_mclk: Mclk set to 135000000, Quartz = 13500000
[   17.378923] stv0900_set_ts_parallel_serial path1 2 path2 2
[   17.405467] stv0900_sleep
[   17.411504] stv0900_attach: Attaching STV0900 demodulator 1, chip id 20
[   17.411520] stv0900_init
[   17.411529] stv0900_wakeup
[   17.417580] stv0900_hard_reset
[   17.418359] stv0900_initialize chip_id 0x20 errs 0
[   17.532100] stv0900_set_mclk: Mclk set to 135000000, Quartz = 13500000
[   17.544938] stv0900_set_ts_parallel_serial path1 2 path2 2
[   17.575778] SAA716x FF 0000:02:00.0: DVB: registering adapter 3 frontend 0 (STV0900 frontend)...

Thanks very much for your help. I'll now modify tune-s2 or similar to suit your API to make sure all is working, but the above looks pretty promising.

As an aside, but pertaining to your driver work, I finally, after much headscratching, had a "lightbulb moment", as to how you were achieving the narrow spectrum bandwidths. That was a nice piece of reasoning.

Also the Digital Devices stv0910_regs.h file, which was updated last year, now lists 975 registers, vs your version with 735, so maybe some more gems hidden in there.

Kind regards,

Richard
majortom

Avatar / Picture

Registered:
Posts: 4,942
Reply with quote  #37 
after testing, are you going to commit and push the changes to the repo, so someone else might
actually benefit?

__________________
Perfect 10 7.5' mesh Chapparal C/Ku Co-Rotor feed, Norsat 8115 CBAND, Norsat 4106A Ku Thomson Saginaw Actuator, Vbox positioner,
Home Brew Polarotor683 Servo circuit. Openbox S9, Prof7500, v4l-updatelee linux drivers installed.
ricardo's geo-orbit archive: https://web.archive.org/web/20150516202529/http://www.geo-orbit.org:80/sizepgs/tuningp2.html#anchor469886
Richard

Registered:
Posts: 58
Reply with quote  #38 
Certainly, but I'll need to find out how to do that first.
majortom

Avatar / Picture

Registered:
Posts: 4,942
Reply with quote  #39 
it is easy ..

git commit -am "some message detailing your changes"

git push

assuming you have read/write permissions to the bitbucket repo.
midwestmac, as admin of the repo, can grant you that.

You may need to edit your name and email info in your ~/.gitconfig
first.

__________________
Perfect 10 7.5' mesh Chapparal C/Ku Co-Rotor feed, Norsat 8115 CBAND, Norsat 4106A Ku Thomson Saginaw Actuator, Vbox positioner,
Home Brew Polarotor683 Servo circuit. Openbox S9, Prof7500, v4l-updatelee linux drivers installed.
ricardo's geo-orbit archive: https://web.archive.org/web/20150516202529/http://www.geo-orbit.org:80/sizepgs/tuningp2.html#anchor469886
Richard

Registered:
Posts: 58
Reply with quote  #40 
Thanks.

The only uncertainty I have, is that whether this change:

In stv0900_init_chip in file stv0900_core.c, change

    if (!inode && demod->config->demod_mode == STV0900_SINGLE) {

to

    if (!inode) {

will impact other cards which don't seem to need this.

Regards,

Richard

majortom

Avatar / Picture

Registered:
Posts: 4,942
Reply with quote  #41 
No idea, would need to be tested I guess.
But I did notice that someone is actively working on an stv0910 driver. I am not sure what it is you are working on.

But, Go here and search for stv0910:
https://www.mail-archive.com/linux-media@vger.kernel.org/

__________________
Perfect 10 7.5' mesh Chapparal C/Ku Co-Rotor feed, Norsat 8115 CBAND, Norsat 4106A Ku Thomson Saginaw Actuator, Vbox positioner,
Home Brew Polarotor683 Servo circuit. Openbox S9, Prof7500, v4l-updatelee linux drivers installed.
ricardo's geo-orbit archive: https://web.archive.org/web/20150516202529/http://www.geo-orbit.org:80/sizepgs/tuningp2.html#anchor469886
Richard

Registered:
Posts: 58
Reply with quote  #42 
Quote:
Originally Posted by majortom
No idea, would need to be tested I guess.
But I did notice that someone is actively working on an stv0910 driver. I am not sure what it is you are working on.

But, Go here and search for stv0910:
https://www.mail-archive.com/linux-media@vger.kernel.org/


If you are referring to the recent series of patches for stv0910/stv6111 and ddbridge by Daniel Scheller, then yes, I have been acting as a tester for him, with a DD Cine S2 V7A card.

What I'm doing here, is hoping to learn enough (my coding skills are non-existent to rudimentary at best), to eventually add Pendragons spectrum scan feature and to this end I've resurrected a TT S2 6400 card which uses stv0900 to start playing will this here.

The last thing I want to do is start committing changes to v4l-pendragon that break stuff for others.

It's possible the change I mentioned will be harmless, but, not having other cards to test myself, don't want to throw that burden at others.

Regards,

Richard
pendragon

Registered:
Posts: 1,017
Reply with quote  #43 
The change to stv0900_init_chip will not affect existing single tuner cards. It's only a bug fix for dual tuner cards.
Richard

Registered:
Posts: 58
Reply with quote  #44 
Thanks pendragon. I saw STV0900_SINGLE was defined in stv0900_priv.h, along with the other symbolic names discussed earlier, so I thought I'd put everything back as it was and add stv0900_priv.h, but it created a whole lot of other errors.

So if this change will have no adverse effects for others, I'll leave it.
Richard

Registered:
Posts: 58
Reply with quote  #45 
@pendragon

Sorry to bother you again, but I've stalled.

After following the guidance you gave midwestmac earlier, I have managed to get tune-s2 to send sensible tuning data, but am not having any luck getting any sort of lock - log messages seem sane and show the expected carrier freq and symbol rate values being tried.

I am wondering if I don't  have diseqc configured correctly (it will require some serious disruption to cable direct). I'm using universal LNB's so continuous 22kHz tone is required to activate the highband L.O. after the diseqc command is sent.

Output from tune-s2: (this command works fine on the original setup, using the stv090x driver)

 ./tune-s2 12456 H 22500 -adapter 2 -committed 1 -lnb UNIVERSAL
LNB: low: 9750 high: 10600 switch: 11700
opening: /dev/dvb/adapter2/frontend0
frontend: (STV0900 frontend)
fmin 940000 MHz
fmax 2160000 MHz
min_sr 100 Ksps
max_sr 60000 Ksps
HIGH band
22khz ON
DiSEqC: e0 10 38 f0 00 00 length: 4

Tuning specs:
System:     DVB-S
Frequency:  12456000 H 22500
22khz:      ON
Modulation: QPSK
FEC:        AUTO
Inversion:  AUTO
Rolloff:    AUTO
Pilot:      AUTO
MIS:        -1

Log output:

Aug 02 17:15:43 vdr kernel: stv0900_init
Aug 02 17:15:43 vdr kernel: stv0900_wakeup
Aug 02 17:15:43 vdr kernel: stv0900_hard_reset
Aug 02 17:15:43 vdr kernel: stv0900_initialize chip_id 0x20 errs 0
Aug 02 17:15:43 vdr kernel: stv0900_set_mclk: Mclk set to 135000000, Quartz = 13500000
Aug 02 17:15:43 vdr kernel: stv0900_set_ts_parallel_serial path1 2 path2 2
Aug 02 17:15:43 vdr kernel: stv0900_algo
Aug 02 17:15:43 vdr kernel: stv0900_set_tuner: freq 1856000000 bw 30375000
Aug 02 17:15:43 vdr kernel: stv0900_wait_tuner: time 20
Aug 02 17:15:43 vdr kernel: stv0900_set_search_standard: DVB-S
Aug 02 17:15:43 vdr kernel: stv0900_set_viterbi_standard: ViterbiStandard DVB-S
Aug 02 17:15:43 vdr kernel: stv0900_set_symbol_rate: sr 1000000
Aug 02 17:15:43 vdr kernel: stv0900_blind_check_agc2_min_level: status 0 step 6 min 360 th af0
Aug 02 17:15:43 vdr kernel: stv0900_set_symbol_rate: sr 22500000
Aug 02 17:15:43 vdr kernel: stv0900_blind_search_algo: step 0 k_ref_tmg 80 pass 0
Aug 02 17:15:43 vdr kernel: coarse: time 13 start 0 cf 3394332 4348 sr 266761 8175 timing 10 agc2 82
Aug 02 17:15:43 vdr kernel: fine: freq 1859347457 sr 266761 min 186732 max 346789
Aug 02 17:15:55 vdr kernel: DEMOD LOCK FAIL time 9880 freq 1859378139 sr 340630
Aug 02 17:15:55 vdr kernel: Search Fail
Aug 02 17:15:55 vdr kernel: stv0900_sleep

In stv0900_core.c:

static int stv0900_diseqc_init(struct dvb_frontend *fe){
        struct stv0900_demod *demod = fe->demodulator_priv;
        stv0900_write_bits(demod, DISTX_MODE, demod->config->diseqc_mode);

In stv0900.h:

stv0900_config {
....
                      u8      diseqc_mode;

In stv0900_priv.h:

enum stv0900_diseqc_mode {
        STV0900_22KHZ_Continues = 0,
        STV0900_DISEQC_2_3_PWM = 2,
        STV0900_DISEQC_3_3_PWM = 3,
        STV0900_DISEQC_2_3_ENVELOP = 4,
        STV0900_DISEQC_3_3_ENVELOP = 5
};

I'm assuming it is set to diseqc_mode = 0

Does this seem the correct mode for my situation?

Regards,

Richard




Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.

Fellow Members, your posts are welcome here! Do not worry about posting everything perfect. Different receivers and LNB's will give you different Frequencies and Symbol Rates. Some set top boxes, PCI cards and USB receivers, Do Not Require all of the same information that others may need. It is not Required to post everything that others may need to tune in a feed. It is just most important to share the find. We can always adjust the Frequency and Symbol Rates and try the various Modulations and FEC's on our own receivers until we get a lock and then give a polite reply with what works for your receiver, as that information might help others as well. We all appreciate the efforts and energy of the Posters!

Thank You for Visiting GOFASTMOTORSPORTS.com - Keep Your Eyes on the Sky and the Track!