Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TBS6991 support #180

Open
woooow1 opened this issue May 16, 2024 · 7 comments
Open

TBS6991 support #180

woooow1 opened this issue May 16, 2024 · 7 comments

Comments

@woooow1
Copy link

woooow1 commented May 16, 2024

Hello Luis,
Need some support for this card! I am trying to run it in opensource driver, but with no luck so far!
In code I see that :

tbs6991 seems to have different settings depending on a value that the closed
source driver reads from the eeprom. This is probabbly related to card HW revisons.

When I change default TBS6991_TSMODE0 to 1, card was able to tune in tvheadend, but with lot of errors. When I change to 0- unable to tune! Transport error indicator (total 1)
I also try do decompile closed source driver to find any useful info.This is related to tsmode:

tbs6991fe_wr(state_00,0xd,uVar2 | 0xc0); if (state_00->demod == 0) { tbs6991fe_wr(state_00,0xe6,0x10); tbs6991fe_wr(state_00,0xe7,0x32); tbs6991fe_wr(state_00,0xe8,0x54); tbs6991fe_wr(state_00,0xe9,0x76); tbs6991fe_wr(state_00,0xea,0xa8); tbs6991fe_wr(state_00,0xeb,0x9b); iVar1 = state_00->tsmode; } else { tbs6991fe_wr(state_00,0xe6,0x30); tbs6991fe_wr(state_00,0xe7,0x21); tbs6991fe_wr(state_00,0xe8,0x54); tbs6991fe_wr(state_00,0xe9,0x76); tbs6991fe_wr(state_00,0xea,0xb8); tbs6991fe_wr(state_00,0xeb,0x9a); iVar1 = state_00->tsmode; } if (iVar1 == 1) { tbs6991fe_wr(state_00,0xe0,0x31); } else { tbs6991fe_wr(state_00,0xe0,0x33); }
Any help is welcome!

@crazycat69
Copy link
Contributor

crazycat69 commented May 17, 2024

This demod TS bus config (TAS2101 pins for TS bus).
Need configure CI support chip for different TBS cards - use TBS fork which contain CI support for SAA716x based cards
https://github.com/tbsdtv/linux_media/blob/latest/drivers/media/pci/saa716x/tbs-ci.c#L397

P.S. Supported kernels 4.14-6.8
https://github.com/tbsdtv/linux_media
https://github.com/tbsdtv/media_build

@woooow1
Copy link
Author

woooow1 commented May 18, 2024

@crazycat69 , thanks for reply! I already use tbs fork, but card not work! Tested also on fta channels. Card is v13! I think need some settings in tuner, or demod... I2c is detected :

i2c-9 smbus Mantis I2C SMBus adapter
i2c-10 i2c TT-Budget S2-1600 PCI I2C adapter
i2c-11 i2c SAA716x I2C Core 0 I2C adapter
i2c-12 i2c SAA716x I2C Core 1 I2C adapter
i2c-13 i2c SAA716x I2C Core 0 I2C adapter
i2c-14 i2c SAA716x I2C Core 1 I2C adapter

Ci slot is available... Driver modules are loaded. What else is missing???
With same settings in tvheadend, with closed source driver, both tuners working!

@crazycat69
Copy link
Contributor

TBS6991_TSMODE0 (0x33) is parallel TS
TBS6991_TSMODE1 (0x31) is serial TS

@woooow1
Copy link
Author

woooow1 commented May 18, 2024

Other related settings in decompiled driver for tsmode in function called tbs6991fe_attach:
if (((iVar2 == 0x58) || (iVar2 < 0x59)) || ((iVar2 != 0x66 && (iVar2 != 0x68)))) { state_00->tsmode = 0; } else { state_00->tsmode = 1; }

@crazycat69
Copy link
Contributor

you have "tbsci: Initializing TBS 6991 v13 CI" in kernel log ?

@crazycat69
Copy link
Contributor

@woooow1
Copy link
Author

woooow1 commented May 19, 2024

you have "tbsci: Initializing TBS 6991 v13 CI" in kernel log ?

Yes, tbsci: Initializing TBS 6991 v13 CI 0 slot
tbsci: Initializing TBS 6991 v13 CI 1 slot

I already try you suggestion, with ret = tbsci_i2c_probe(adapter,count?3:4); ci slots is not initialized!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants