Building Black Gold BGT3xxx DVB-T2 Drivers for Linux

I believe my actual BGT3595 hardware is faulty. I'm now running Win10 and the problem persists. If I turn off one tuner of each type everything is fine, if I don't all tuners stop working.

Apologies for misleading people that it was the driver that was wrong.

Caveat: I'm still not 100% sure as previously I was running the BGT3595 under Win7, where it worked ok for about 4 years, I'm now running Windows 10.
 
I've now been running my BGT3620 with one tuner disabled for almost 3 weeks without any issues, except for not being able to watch multiple channels etc.

I have also tested the card again on my Win10 box, and both tuners seem to work flawlessly...
 
Hi,

I'm attempting to build the driver for my BGT3620 on Ubuntu 16.04 (kernel version 4.4). The card works correctly under Windows 7, but I'm in the process of migrating the system to Ubuntu.

I've tried the build.sh script from Carl's Git repository at BGT3xxx Summary, but it fails with the following error:
Code:
$ sudo ./build.sh
...
  CC [M]  /usr/src/BGT3xxx/bgt-linux-pcie-drv/v4l/cxd2850.o
  CC [M]  /usr/src/BGT3xxx/bgt-linux-pcie-drv/v4l/a8290.o
  CC [M]  /usr/src/BGT3xxx/bgt-linux-pcie-drv/v4l/cxd2817.o
  CC [M]  /usr/src/BGT3xxx/bgt-linux-pcie-drv/v4l/cxd2861.o
  CC [M]  /usr/src/BGT3xxx/bgt-linux-pcie-drv/v4l/saa7231_pci.o
In file included from /usr/src/BGT3xxx/bgt-linux-pcie-drv/v4l/saa7231_pci.c:23:0:
./arch/x86/include/asm/pgtable.h: In function 'has_transparent_hugepage':
./arch/x86/include/asm/pgtable.h:180:9: error: 'cpu_has_pse' undeclared (first use in this function)

  return cpu_has_pse;
         ^
./arch/x86/include/asm/pgtable.h:180:9: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:258: recipe for target '/usr/src/BGT3xxx/bgt-linux-pcie-drv/v4l/saa7231_pci.o' failed
make[2]: *** [/usr/src/BGT3xxx/bgt-linux-pcie-drv/v4l/saa7231_pci.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:1396: recipe for target '_module_/usr/src/BGT3xxx/bgt-linux-pcie-drv/v4l' failed
make[1]: *** [_module_/usr/src/BGT3xxx/bgt-linux-pcie-drv/v4l] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-22-generic'
Makefile:43: recipe for target 'default' failed
make: *** [default] Error 2

I also tried the DKMS method suggested here, but this also fails (log available here):
Code:
$ sudo dkms build -m BGT3xxx -v 1.0.0.0Fixed

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=4.4.0-22-generic KERNELDIR=/lib/modules/4.4.0-22-generic/build...............(bad exit status: 2)
ERROR (dkms apport): binary package for BGT3xxx: 1.0.0.0Fixed not found
Error! Bad return status for module build on kernel: 4.4.0-22-generic (x86_64)
Consult /var/lib/dkms/BGT3xxx/1.0.0.0Fixed/build/make.log for more information.

I'm fairly new to Linux, so I'm not sure how to debug the problem. Is it possible that a fix is required for this kernel version?

The card shows up in lspci but not in lsdvb:
Code:
$ lspci -kvd 1131:
02:00.0 Multimedia controller: Philips Semiconductors SAA7231 (rev aa)
        Subsystem: Modular Technology Holdings Ltd SAA7231
        Flags: bus master, fast devsel, latency 0, IRQ 11
        Memory at fe400000 (64-bit, non-prefetchable) [size=4M]
        Memory at fe000000 (64-bit, non-prefetchable) [size=4M]
        Capabilities: <access denied>

$ lsdvb

                lsdvb: Simple utility to list PCI/PCIe DVB devices
                Version: 0.0.4
                Copyright (C) Manu Abraham
ERROR: Opening /sys/class/dvb directory

Any help getting this working would be greatly appreciated.

Cheers,
Jon
 
I managed to build the driver for kernel version 4.4 in the end, after following NoSpamAV's suggestion of editing saa7231_pci.c. I also had to comment out a couple of lines from build.sh to prevent the change from being overwritten:
Code:
#git pull
#git reset --hard

The device now shows up in lsdvb and in the GUI of TVHeadEnd, so I'm pretty happy.
 
Last edited:
hi sorry about that
i will update my git with the fix you said
been very busy and been killing cards
i will look in the twin tuner problem people have said and look in tot what is wrong
anyway if people have idea ont he code on fixes that be great

thanks
Carl
 
Hi Carl,

I have been running successfully for a few weeks now with just a single tuner enabled. It seems to be having 2 tuners enabled causes the problems.

If there is a fix for having both tuners that would be great.

Regards,
Adrian.
 
HI Adrain
i will have a soultion once i know what is wrong with the driver
just been very busy, been one year in are house and the wife want it all to be painted lol
it killing me lol
plus i about to change job so will get more time to work on the driver in the next month
so will come up with a soultion for all the problem.

please everyone say what problem if you have any that no one has said
this way i can sort out once i know what to look for


thanks
Carl
 
Hi Carl,

I believe I'm having the same stability issue after running with your driver for a week. Disabling the second tuner works around the problem, as adrianeaton described.

Are there any logs or debugging that I can provide to help you work out what's going on?

Thanks for your efforts!

Cheers,
Jon
 
Hi Jon
it ok i can do the testing my self once i get some time in a weeks time
i may get time tomorrow to see

thanks
 
Hello,
My question is regarding Blackgold BGT3635 ... i'm really confused as i don't see any DVB-S2 demodulator on board
My question is, will it work with trident or marcus repos?
I will use it for DVB-S/S2 only.
Regards.
 

Attachments

  • box-BGT3635.jpg
    box-BGT3635.jpg
    876.7 KB · Views: 116
hi all sorry been very very busy and not done any update

Area13 you not see the demodulator as they under the cover
my driver should work but i have to check the spec of that card to see if it does or not

to the rest i hope to start updating the driver in the next month
but first i got to build my bathroom lol done so much house work as it my first house and need a lot of jobs done.

anyway i will be back on the drivers over xmas.
if anyone got any code fixes to give me, please do

thanks
 
Thanks for your efforts on this. I am also trying to get the BGT3635 to work.
Using marcusbirkin source I can build fine on Ubuntu 16.04 and Linux Mint 17.1.
I can then modprobe saa7231 on Linux Mint but there is still no device listed in lsdvb.
Ubuntu I cannot modprobe the module. I get error "Invalid argument".
I'd like to try trident's source but the link isn't working.
 
Last edited:
Struggling to get my BGT3620 working under Linux too, looking forward to seeing this git repo come back online. :)
 
What problems are you encountering with the 3620?

I've been playing around with the 3635 and first obvious thing I notice is that 3635 is not mentioned at all in the source code from Marcus repo. I now have it at least using saa7231 module, and lsdvb sees it but then all GUI activity hangs.

sudo lspci -vvv

03:00.0 Multimedia controller: Philips Semiconductors SAA7231 (rev aa)
Subsystem: Modular Technology Holdings Ltd Device 3635
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at f7800000 (64-bit, non-prefetchable) [size=4M]
Region 2: Memory at f7400000 (64-bit, non-prefetchable) [size=4M]
Capabilities: [40] MSI: Enable- Count=1/16 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [50] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <256ns, L1 <1us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <64us
ClockPM- Surprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
Capabilities: [74] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=55mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [7c] Vendor Specific Information: Len=84 <?>
Capabilities: [100 v1] Vendor Specific Information: ID=0000 Rev=0 Len=094 <?>
Kernel driver in use: SAA7231


sudo lsdvb

lsdvb: Simple utility to list PCI/PCIe DVB devices
Version: 0.0.4
Copyright (C) Manu Abraham

SAA7231 (1131:7231 14:3635) on PCI Domain:0 Bus:3 Device:0 Function:0
DEVICE:0 ADAPTER:0

After this it hangs and the GUI freezes too. Only thing I can do is cold reboot!
 
@Area13 I got the two plates off my 3635 to have a look. The chips are D2850A and D2861er. It's practically identical to the 3636. But just changing the 3636 definitions to 3635 in the source code give me the results I detailed above.

This is my stack trace...

Dec 9 23:39:30 tv kernel: [ 61.980938] Call Trace:
Dec 9 23:39:30 tv kernel: [ 61.980944] [<ffffffff81613905>] ? i2c_unlock_adapter+0x25/0x40
Dec 9 23:39:30 tv kernel: [ 61.980947] [<ffffffff81613fe4>] ? i2c_transfer+0x64/0xd0
Dec 9 23:39:30 tv kernel: [ 61.980951] [<ffffffffc06011b1>] ? cxd2817_wr_regs+0x151/0x1e0 [cxd2817]
Dec 9 23:39:30 tv kernel: [ 61.980956] [<ffffffffc06084c8>] cxd2861_init+0x68/0x2e0 [cxd2861]
Dec 9 23:39:30 tv kernel: [ 61.980962] [<ffffffffc03fc669>] dvb_frontend_init+0x59/0xb0 [dvb_core]
Dec 9 23:39:30 tv kernel: [ 61.980968] [<ffffffffc03fdca7>] dvb_frontend_thread+0x77/0x720 [dvb_core]
Dec 9 23:39:30 tv kernel: [ 61.980972] [<ffffffff817b256b>] ? __schedule+0x37b/0x820
Dec 9 23:39:30 tv kernel: [ 61.980978] [<ffffffffc03fdc30>] ? dvb_frontend_should_wakeup.isra.2+0x80/0x80 [dvb_core]
Dec 9 23:39:30 tv kernel: [ 61.980983] [<ffffffff81093822>] kthread+0xd2/0xf0
Dec 9 23:39:30 tv kernel: [ 61.980986] [<ffffffff81093750>] ? kthread_create_on_node+0x1c0/0x1c0
Dec 9 23:39:30 tv kernel: [ 61.980990] [<ffffffff817b6d18>] ret_from_fork+0x58/0x90
Dec 9 23:39:30 tv kernel: [ 61.980993] [<ffffffff81093750>] ? kthread_create_on_node+0x1c0/0x1c0
Dec 9 23:39:30 tv kernel: [ 61.980996] Code: 44 0f b6 e1 40 0f b6 c6 44 01 e0 83 f8 7f 0f 8f fe 00 00 00 40 88 b5 49 ff ff ff 48 8b b5 28 ff ff ff 48 83 c7 01 e8 86 c0 da c0 <49> 8b 85 68 01 00 00 48 85 c0 74 0a be 01 00 00 00 4c 89 ef ff
Dec 9 23:39:30 tv kernel: [ 61.981040] RIP [<ffffffffc060816a>] cxd2861_wr_regs+0xaa/0x1a0 [cxd2861]
Dec 9 23:39:30 tv kernel: [ 61.981043] RSP <ffff8800ba49fcc8>
Dec 9 23:39:30 tv kernel: [ 61.981045] CR2: 0000000000000168
Dec 9 23:39:30 tv kernel: [ 61.985556] ---[ end trace 921a93032f0808d1 ]---

I'll try to figure this out but if anyone else is cleverer than I am please jump in!
 
Could someone post a copy of the original repo since it is not available anymore.
Thanks in advance
 
sorry my git is back up
still not had time to do any coding
just turn on my linux develpment machine tonigh to start on the code
as i've finshed one bathroom now another still to do but it be a lot easy this time lol

thanks all
 
Last edited:
Hi Guys,

I have a Ubuntu machine running Kernel 4.4 with 2 x BlackGold BGT3620.

I am running Carl's drivers and tried a lot of fixes with mentioned in the above thread but i'm not able to get them running correctly.

Once I boot the machine, both cards work absolutely fine and i am able to stream and record via TVHeadEnd, but shortly (an hour or so) after the TV Cards seem to fall over, which is no good if i have recordings scheduled.

At this point, I don't know whether to roll back to an earlier kernel or wait it out? Is there something more wrong with my setup than the drivers for the BlackGold Cards or is it just a matter of waiting?

If anyone could advise, and tell me what logs they would need to see and where to find them ill post them up!

TIA

N
 
lol small world
i have to say if need we can meet up and look in to the problem.
just right now my time is still to get the main bathroom done. done so much but got so much more to do lol

was everthing ok before you do any changes like new kernel
as if it ubuntu i have a small fix i need to add for the newer version but not sure if it help you
aswhat i hear it seem to be a lock over time that stop it. anyway i will get to it lol

thanks
 
lol small world
i have to say if need we can meet up and look in to the problem.
just right now my time is still to get the main bathroom done. done so much but got so much more to do lol

was everthing ok before you do any changes like new kernel
as if it ubuntu i have a small fix i need to add for the newer version but not sure if it help you
aswhat i hear it seem to be a lock over time that stop it. anyway i will get to it lol

thanks

Its ok, i dont expect you to do that!

The machine is running ubuntu, its a fresh(ish) build so its not worked properly as of yet! I have second machine running kodibuntu with some CBS cards that run fine, so this machine will just be used as a failsafe / backup / testing.

Kernel is 4.4.0-59-generic
Distro is Ubuntu 16.04.1 LTS

The Cards work fine from a a reboot, but after a an hour or two it doesn't seem to want to initiate. This is the error from TVHeadEnd:

2017-02-07 11:42:49.576 subscription: 00A1: "DVR: Vic the Viking" subscribing on channel "POP", weight: 300, adapter: "Sony CXD2820R : DVB-T #1", network: "DVB-T Sandy Heath", mux: "690MHz", service: "POP", profile="pass"

2017-02-07 11:42:50.755 linuxdvb: Sony CXD2820R : DVB-T #1 - poll TIMEOUT
 
i do my work on slackware but ubuntu think you need to go back one version
been so busy not had time to check the code.sorry
 

The latest video from AVForums

Is 4K Blu-ray Worth It?
Subscribe to our YouTube channel
Back
Top Bottom