-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Hauppauge WinTV-dualHD (Model 01595) Support #2091
Conversation
Adds an i2c mux to the lgdt3306a demodulator. This was done to support the Hauppauge WinTV-dualHD 01595 USB TV tuner (em28xx), which utilizes two si2157 tuners behind gate control. Signed-off-by: Kevin Cheng <kcheng@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hauppauge WinTV-dualHD model 01595 is a USB 2.0 dual ATSC/QAM tuner with the following components: USB bridge: Empia em28274 Demodulator: 2x LG LGDT3306a at addresses 0xb2 and 0x1c Tuner: 2x Silicon Labs si2157 at addresses 0xc0 and 0xc4 This patch enables only the first tuner. Signed-off-by: Kevin Cheng <kcheng@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
@philburr @qaweizoux in reply to initial request Hauppauge's Brad Love promised to upstream the patches. |
We will consider adding patches from upstream when there is demand and the risks seem low. |
Would it be preferable to break this into two pull requests? One for the initial tuner support from 4.11 and a second for the second tuner support when it lands upstream? |
It would have a better chance of being merged. |
About the question if there's a demand: We are using this patch and are quite happy with it. |
Is there a guide on how I can apply this patch, being that it is not in the mainline kernel tree? |
@djwesty Simplest approach is to follow https://www.raspberrypi.org/documentation/linux/kernel/building.md, but use If you have a small amount of git foo, follow the instructions as written and prove you can build a working kernel. Then in your kernel source tree:
Hopefully it won't complain about any conflicts, so rebuild. The list of magic numbers in the cherry-pick are the commit IDs on philburr's tree, as can be read with |
Thank you for your help @6by9 This worked perfectly, and I now have two DVB adapters showing up. Cheers |
Further movement upstream - https://www.spinics.net/lists/linux-media/msg127060.html |
Hello everyone. Every Hauppauge device and all additional support required for their usage has been submitted upstream. It's up to the maintainers now :) |
Thanks @b-rad-NDi - quite an effort, so many thanks to you, and to your bosses for allowing you to. Is that submitted to the list for review, or submitted into upstream trees? I'd seen a flurry of patches from you but can't see any recent merges on linuxtv.org, and the patches are flagged as new on https://patchwork.kernel.org/project/linux-media/list/ In any case I'll start making up a Pi 4.14 branch with them merged, and I do have a couple of WinTV-dualHD devices to try them with. |
Only submitted for review so far, hoping for first pull request this weekend. |
Thanks for the confirmation - I'll keep an eye out for reviews. |
This is great news, just got myself a dualHD for Tvheadend use on Raspberry. |
https://github.com/6by9/linux/tree/rpi-4.14.y-hauppauge is the Pi 4.14 branch with most of Brad's patches applied, plus a couple of other minor dependencies from the linux-media tree. I dropped the patch set related to cx23885 as the Pi has no PCI/PCI-e slot and they weren't merging cleanly. The branch builds, but I haven't tested it yet (I'll look at doing that tonight if I get a chance). |
@6by9 If it runs don't hesitate to drop it to me for more testing if needed. |
Still not had a chance to check this as yet, but here's a tarball of the ArmV7 (ie Pi2/3) kernel built from my rpi-4.14.y-hauppauge branch. I'll try to run it later today, but things have been a little busy. |
Booting, and WinTV-DualHD detecting correctly. Running tvheadend is causing all sorts of errors (complains |
I haven't submitted it for upstream review yet, but there is a patch in my repo which enables auto T/T2 detection. We have found this is required to get a lot of apps to pick up T2 signals. |
w_scan goes through the whole scan allegedly for both DVB-T and DVB-T2 independently. I've picked up patch https://github.com/b-rad-NDi/Ubuntu-media-tree-kernel-builder/blob/master/patches/mainline-extra/4.13.0/0021-si2168-Change-from-DVB-T-to-DVB-T-T2-autodetect.patch and will see what I get. I probably also ought to try the tuner with the original 4.14 kernel and see what that does on the one tuner. I've checked the aerial feed on our Sony TV and that picks up 182 services, so whilst not necessarily the strongest of signals, the muxes are there. |
Reverting to the standard Pi 4.14 kernel (now 4.14.15), whilst I only get the one tuner, w_scan and tvheadend can both find all 8 muxes and seem to tune and stream happily. |
Sorry to intrude. Are the x86 drivers specific to Ubuntu? |
thanks for the help. I got to
but I got error
going to try the same on my laptop see if I get same results. Think I got bad source code from V4L. |
got media_build downloaded and installed though one part were the help request diverges with me is the raspberry pi. just using x86 system should have made that clear earlier. thanks for the help though dont have my hauppauge usb tuner working yet though credit that to my effort and not your advice. |
Apologies, didnt originally notice the patchwork link. looks like what I need to get things going. Thanks juggling a bit much on my plate and have ADD. installed [5/9] em28xx: Add Hauppauge SoloHD/DualHD bulk models patch on kernel 4.14.13 and it works. |
I've finally had a chance to bisect this. It looks like "si2168: Add ts bus coontrol, turn off bus on sleep" is the patch that causes the problems with the WinTV-dualHD. I've rebased to 4.14.24 and added all the relevant patches + a revert of that one to https://github.com/6by9/linux/tree/rpi-4.14.y-hauppauge. That seems to be working OK for me at the moment based on a quick scan. (Add that patch and w_scan finds the mux, but can't find any services). I see there has been no activity in upstream reviewing and merging those patches. I'll talk with others over whether we merge these ahead of them being merged upstream. |
All patches in that particular series have been accepted. |
v2 of the ts bus control patch works, v1 is missing enabling ts bus in set_frontend. |
Thanks @b-rad-NDi for the response. I obviously don't understand patchwork then as for example https://patchwork.kernel.org/patch/10214387/ is still flagged as new, but looking in media-tree I see they are there. I'll cherry-pick across and make a new PR. |
I was told patchwork underwent some sort of kerfluffle in January. Some of my v2 were skipped, so you'll want to grab my additional various fixes along with DualHD related 3f127ce. |
Thanks again. I'll grab straight out of git://linuxtv.org/media_tree.git master branch and see what happens :-) |
Keep me in the loop if anything is abnormal, I think I have most flavours of rPi. |
@6by9 Great, finally we're making progress 👍 |
Hi, I've been reading through this thread with interest, as I've just bought a RPi and a Hauppauge WinTV-soloHD (which seems to have the same chipset etc). Apologies for the newbie question, but I'm a little lost with the current state of affairs now that some things have been merged and others haven't. What steps would I now need to take in order to get my soloHD talking to the RPi? I tried rebuilding the kernel with https://github.com/philburr/linux as a source, but so far no dice. |
I've cherry-picked all the apparently applicable commits from the upstream linuxtv tree, and pushed them to https://github.com/6by9/linux/tree/rpi-4.14.y-hauppauge. It certainly seems to be tuning quite happily on my WinTV-dualHD, so I've created PR #2434. |
@alastaircoote I would have expected a SoloHD to work with the standard kernel, as long as you add the relevant firmware file to /lib/firmware/ https://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-soloHD says supported since 2015-11-19, and the commit text references dvb-demod-si2168-b40-01.fw as the firmware. You can find that at https://github.com/OpenELEC/dvb-firmware/blob/master/firmware/dvb-demod-si2168-b40-01.fw amongst many other places. |
@6by9 d'oh! It isn't working for me out of the box (with firmware downloaded) and I assumed it was related to this issue, but I should have looked closer! Sounds like my issue would be better discussed on a forum, so I'll take discussion there. Thanks! |
Hi guys, I was able to successfully patch the kernel by recompiling kernel and reinstalling it on the RPi with the instructions here. Thanks @6by9! & @b-rad-NDi! Now I got a few questions...
Even if you don't answer this, you guys are the bomb and are light years ahead on me on this stuff! I know eventually this'll hit the mainstream, but I do wish to learn your linux-jedi ways! |
One noobie here is trying to figure out how to get with least troubles my 2x dualHD working again. They have been working well >6 months non-stop in my libreelec htpc (v8.0.2). All 4 tuners were working like charm. They are both model 1590. This libreelec was not supposed to get updated to newer version because in newer versions this dualHD have only 1 tuner/unit active. Something fishy with the drivers in the newer versions. My friend decided to do me a favor and upgrade the system. He did not know that there was a reason why it was the old version. Now 2xdualHD is 2xsoloHD and cannot go back from 8.2.4 to 8.0.2 without reinstalling all. I decided to scrap the set and make a new infra. I put the system to VM of my NAS. What drivers (firmware) do I need to use to get dualHDs working again? At there moment in VM there is Linux Mint 18.3 with updates and upgrades. (Linux MintSylvia 4.10.0-38-generic #42~16.04.1-Ubuntu). I will upgrade it to 19 Tara when it is available. There is a huge set of drivers in hauppage-linuxtv package but there must be easier way to do this. A year ago I tried Palosaari's drivers. Does that work with this kernel and those firmwares? (=.fw files to /lib/firmware) or is there some progress with these dualHDs and kernel? Please tell what files to get and where to put. Please very detailed instructions. Otherwise I'm soooo out. |
|
@Kazipallo What system are you building for? This is a Raspberry Pi repository - whilst it may be possible to apply patches from here elsewhere, we aren't going to be giving support on VM's on random NAS boxes. I'm not 100% certain where you got a kernel that supported both tuners of the dualHD anyway - AFAIK the patches I'm pulling in will be first released in probably 4.17 (they've missed the 4.16 merge window). Unless you were using Brad's out-of-tree patches before - https://github.com/b-rad-NDi/Ubuntu-media-tree-kernel-builder |
There's a subscribe button on the right hand side. Subscribe if you want to get updates. |
Thank you @6by9! & @b-rad-NDi! and anyone else for your hard work on this. so far is working flawlessly (for rpi-3): git clone -b rpi-4.14.y-hauppauge --depth=10 https://github.com/6by9/linux and after reboot i can see: dmesg | grep -i Hauppauge I have never built a kernel before but this worked perfectly! THANK YOU! :) |
@6by9 I am building DVR. I know this is raspberry repository. I previously tried also with my Pi3B to get dual-dualHD setup working but no. Therefore I ended up here. I have couple pi3Bs and was wondering to set one of them or use this NAS based VM. Latter seems to be better. 4 tuners with DVB-T2 gives raspy a hefty load to carry. I know that you are not supporting random setups but was just wandering that there could be one to assist a bit. If even Sir Brad could have commented but I am happy with this. That kernel supporting both tuners was built in as default in Libreelec v8.0.2. And in that version only. Ask libreelec ppl more about it. I can't recall did I add Palosaari's firmwares there too or not. Maybe yes. The setup with dual-dualHD was rock solid and running non-stop for 200+ days with 1000+ recordings. I was very pleased with that one. Libeelec do not support virtualization and therefore was trying now something else. I installed Brads Linux repos and stuff according to instructions at Hauppauges official pages. 2xdualHD = 4 tuners working in VM. But it was a heavy package with all kinds of stuff. My hope was to go with a light and easy way but guess it is not possible right now. Have to it the hard way. Can't wait to try my pi3B with dualHDs. If I can help you with your efforts with Pi I will do that. Like I said I have 2xdualHD (v1590) setup here to try out. |
@6by9 Any progress on getting merged? |
Sorry, not been a priority.
|
@6by9 Got time to work on this in the near future? |
I'm working from home for a couple of days next week so will have access to an aerial during working hours. I'll see if I can find some time to pick this back up again. |
4.19 is available via Hopefully switching to 4.19 as the standard kernel won't be far off, so I'd propose we close this PR (actually to 4.9!) and advise people to use 4.19. I've already closed #2434 for merging the patches into 4.14. |
These patches add support for Hauppauge WinTV-dualHD dual tuner.
The first two patches are from the 4.11 tree. Both applied cleanly to 4.9. The remaining 5 patches are not in the mainline kernel tree. They add support for the second tuner. The patches originate from https://www.mail-archive.com/linux-media@vger.kernel.org/msg113120.html
I've tested receiving simultaneously from both tuners on my dualHD.