Skip to content


HVR-1800 analog debugging

As a result of numerous users reporting that their HVR-1800 didn’t work in analog mode, I finally got some time tonight to dig into the situation.

If you don’t care about the details, the short answer is I’m working on it and be patient. If you want to get some insight into the gory debugging process, keep reading…

Over the next few blog posts, I’ll be walking through the typical debugging process. I don’t actually know what the actual problem(s) are at this point, so this is a chance for those of you at home to play along. Here’s what we do know:

Users have reported a variety of different problems with the HVR-1800 board. Some of these problems appear to have been present since the original cx23885 driver was written; others appear to be a recent regression as a result of work done to add support for the HVR-1850. We’ll be breaking down the individual problems, understanding which problems are inter-related, and get into some of the details regarding the differences between the 1800 and 1850.

We’ve got reports of problems with raw video, different problems when using the onboard MPEG2 encoder, and yet more problems related to audio. Some of the problems always occur regardless of the input chosen, and others only occur when using the onboard analog tuner. In other words: a target rich environment.

As a start, I bootstrapped the latest kernel, and reproduced some different scenarios using the basic tools (i.e. v4l2-ctl, v4l2-dbg, cat, etc). While some of the original reports were from MythTV users, it’s useful to eliminate Myth from the equation if possible. This makes testing considerable simpler and reduces the amount of time wondering if it’s a MythTV bug. While there have been cases where problems *only* manifested themselves with MythTV, in this case the bugs seem readily reproducible even without it.

And in the interest of full disclosure: I’ve been known to cheat at games like this. While I’ll be both showing and using the tools/techniques which are typical to debug this sort of problem, I’ve got an intimate understanding of the hardware design as well as access to the datasheets for the various chips under NDA. Nonetheless, while I may take a shortcut here and there and peek at the datasheet at times since I don’t have a month to figure this out, the underlying debugging methodology is still sound (it just takes longer).

It’s probably also worth recognizing user “tekdoc”, who actually did some git bisects and observed some suspicious behavior by applying/reverting certain patches. He’s definitely done a good bit of legwork which will serve as a good starting point in nailing down these issues.

At this point, I’ve got a machine with a 1800 board in it, built the current 3.4.0-rc7 tree, reproduced a couple of the steps provided by Britney Fransen (a very help user), and poked around at the registers a bit. In the next blog post, we’ll quantify the actual problems so they can be broken down and analyzed individually.

Anyway, this should be fun. :-)

Posted in cx23885, hvr-1800, hvr-1850.


ViewCast Osprey 820e Linux Drivers

ViewCast Osprey 820e Linux drivers  - Released Today!

Are you looking for a dual channel 1080p60 video capture card, with an open source Linux driver and GStreamer support right out of the box? Good news, look no further.

Kernel Labs are pleased to announce for immediate download, the ViewCast Osprey 820e 32/64bit Linux compatible driver.

Driver Features:
  • GPL Licensed – Kernel compatible licensing.
  • Video4Linux compatible APIs – Integrates easily with your existing V4L2 applications.
  • Flexible driver – A large selection of supported frame-rates and resolutions, from SD to HD.
  • GStreamer support – Easily add this to your capture pipeline.
  • ALSA audio support for 48KHz audio capture.
Hardware Technical Specifications:
The 820e card supports capture resolutions from SD to HD, up to 1080p60 across the different video input connectors. This flexibility coupled with the freely available Kernel Labs open source driver allows you to hit the ground running – prototyping your video applications quickly.

“The 820e is a high performance dual channel video capture card. We’ve added to it a no-nonsense Linux driver and made sure the combination fits straight into GStreamer via the standard video4linux interfaces, no fuss, no frustrating proprietary APIs.” – Kernel Labs development staff
Downloads:
Need Assistance?
  • Contact us via support@kernellabs.com

Posted in 820e, ViewCast.


State of WinTV-Aero-m & ATSC-MH support in Linux

As of the release of Linux Kernel 3.1, Hauppauge’s WinTV-Aero-m is fully supported for use with both ATSC and DVB-T, using the new MFE framework within dvb-usb to represent two frontends on a single DVB adapter. This makes the Aero-m the first semi-worldwide terrestrial digital television broadcast receiver to be supported under Linux.

The device is built of two LG broadcast demodulators and a MaxLinear SoC. The first LG demodulator, LG DT3305, has been well supported in Linux for ATSC ever since I released it a few years ago. I’ve written a new driver to support the other LG demodulator, LG2161, for ATSC-MH, but it hasn’t yet been merged upstream.

Since ATSC-MH is a relatively new delivery system, some API changes will need to get cleaned up and merged before support for the LG2161 can be added to the kernel. Additionally, since the payload format is different from standard transport streams, some changes will have to be made to the kernel demux and / or some userspace libraries in order to make ATSC-MH work with userspace applications.

What is ATSC-MH? In summary, it is a way to broadcast digital television to devices in motion, similar to (but not the same as) DVB-H. The content co-exists with ATSC, and is usually standard definition or lower resolutions, meant to be viewed on handheld / mobile devices.

As of today, there is open source driver support for ATSC-MH and the LG2161 in my own development repositories, but there is no open source userspace applications to support this as of yet. (There are, however, closed-source solutions available. Contact me privately for more info) I have plans to eventually get all of this done for the general public, but I am also working on various other kernel & userspace projects as well, most of which are much more exciting to me right now. I’d like to get these API changes done for ATSC-MH, so that I can close the book on this project, but I haven’t seen much interest for it in the community. Are there people out there that want ATSC-MH to work in Linux?

Basically, I want to know if anybody cares about ATSC-MH. Do you want to be able to watch TV on your linux-based laptop / mobile device while commuting to work on the train? Do you want to display video advertisements and other content on the sides of city buses? Do you want to be able to enjoy your favorite television show *while* crossing the street? ;-) Please let me know. I want to know if it’s worth it to move forward with this. Are there any users or companies that want or need to use ATSC-MH in Linux, or should I just wait until I have nothing better to do? I *will* get this completed eventually, I’m just trying to understand how much it will benefit the community. If nobody cares, then I’ll surely get this all done within the year (or so) … but if people really are interested, I can have it ready by next weekend. You tell me.

In the meanwhile, please enjoy this semi-worldwide tuner using Linux 3.1 or later. I haven’t heard *any* bug reports yet. That means either my driver is awesome, or nobody is using it. Give me some feedback.

EDIT: (2012-03-19) Thanks to everybody who sent email talking about their experiences with the Aero-M under Linux 3.2 – It’s great to get emails like this, although I was kinda hoping to get some people commenting here on this blog post. Either way, I have to announce that I’ve tested the driver in the newly released Linux Kernel 3.3 and there is a small bug that breaks streaming. The fix was released in Linux 3.3.1 For those that want to use Linux 3.3, please use stable 3.3.y kernel series or apply the patch located here: mxl111sf: fix error on stream stop in mxl111sf_ep6_streaming_ctrl()

Posted in aero-m, hauppauge, lg2161, lgdt3305, mxl111sf.


HVR-1800/1850 Analog support

After quite some time of talking about it, we finally got around to getting the analog support for the HVR-1850 submitted upstream. Support for all things analog is present and tested on all the various input types: the MPEG encoder, raw capture, analog audio. This patch series also includes a fix for a long-standing regression in the HVR-1800 as well.

http://git.kernellabs.com/?p=stoth/cx23885-hvr1850-fixups.git

Users are free to try it building from the above git tree, or they can wait a few days for it to be merged into the upstream linux-media tree.

The HVR-1850 is a really nice card (effectively the PCIe equivalent to the HVR-1600 that is already a popular choice with the MythTV crowd), and we will be happy to see the card fully supported in the mainline kernel.

Comments/feedback welcome!

Posted in cx23885, hvr-1800, hvr-1850.


HVR-950q fixes and tvtime…

It’s been a while since we’ve had a blog post, so I figured it would be a good time for an update as to some things going on. We’re continuing to work in a number of areas, although in some cases things are moving along “behind the scenes” and are less visible to the public.

First, let’s talk about the HVR-950q….

As a result of some consulting we did in the last month, I spent *alot* of time digging into the tuning behavior for the HVR-950q. This included finding several bugs which explain some of the “sometimes tuning just fails” type behavior. These are the sorts of things that only happen 1% of the time, so they tend to be quite annoying to track down. I’ve said this in the past and it continues to be true – getting a device up and running is very different than making it work reliably. It can take a ton of work to get a product from a state where it’s good enough for casual TV watching to a state where it’s good enough for embedding in a commercial product.

The patches will be posted soon enough, and I believe that everybody will be happy to see faster tuning times and more reliable/consistent behavior in particular for digital tuning (ATSC/ClearQAM). But to make the analog people happy as well, I also isolated a nasty bug where sometimes changing channels would cause a green screen and it would stay that way until you restarted the device.

All that said, there are still a couple of lingering issues that I want to investigate deeper — in particular one issue related to analog audio not always working. It just goes to show that even if you spend weeks working on a single driver that there are always some weird edge cases outstanding that still need to be isolated and worked on…

Moving on to tvtime…

Kernel Labs’ involvement with tvtime falls under the adage “necessity is the mother of invention.” We needed a tool that was readily available which demonstrated to customers that our drivers were working as advertised. This, combined with the fact that tvtime didn’t build against recent Linux distributions, prompted us to set up our own repository and start making fixes as well as incorporating patches from the various distros. We became a “defacto maintainer” in light of nobody else really being willing to do the work.

Times have changed though and in recent weeks there has been renewed interest in forming a development community around tvtime. This is largely been among the LinuxTV developers, as well as a couple of individuals who have been porting patches between various distros. The net result though is that the tvtime tree will be moving to linuxtv.org, where it can be maintained on an ongoing basis by several people (myself included). This will hopefully lead to the remaining patches from distros being consolidated and the distributions all switching to the LinuxTV version of tvtime as the “official upstream provider”. Plus, with multiple maintainers there should be less of a situation where perfectly good patches get blocked from being merged as a result of a single person being too busy (something which I myself have been known to cause).

In closing…

Beyond that, we’re continuing to grind away at drivers for new devices, do fixes in userland as needed (in fact, some VLC fixes I did for closed captioning were merged upstream last week), and we’ll continue to provide status updates as things can be made public…

Posted in au0828, au8522, hauppauge, hvr-950q, tvtime.


mxl111sf / aero-m mercurial repo forward ported for Linux 3.x

For those wanting to test the mxl111sf driver for the WinTV-Aero-M but not willing to rebuild your kernel, there is good news for you!

I have applied the minimal backports required to dvb-core and the dvb-usb framework to get the old mercurial repository building against Linux 3.x

http://kernellabs.com/hg/~mkrufky/mxl111sf-linux-3.x

I had to disable all IR / remote stuff, since there’s been tons of changes there that I don’t want to deal with.

I’ve only tested the mxl111sf driver in this tree, but other drivers may build successfully as well — try them at your own risk. I’m willing to accept backport patches if there are any features in the newer media tree that would be helpful here.  If things work out well, this can be the starting point for the resurrection of mercurial backports (but let’s not get ahead of ourselves just yet).  For now, this repository is primarily intended for testing the aero-m.

How it works:

This repository contains a combination of some hacks and some backports from the upstream media kernel tree.  The quilt package is required to use the modified build method.

From within this repository, push all of the included quilt patches:

 quilt push -a

After all patches are applied, build the repository and install the modules, just as you would with the older mercurial v4l-dvb test procedure:

 make
 sudo make install

Then insert the usb dongle, the drivers should load up, and you are ready to go!

Note: there are detailed instructions for using the mercurial repositories on linuxtv.org, please consult with online resources before asking me for help with the build system.

Note to driver developers: If you want to be able to use the quilt tool without interfering with the included top-level quilt series, simply spawn a new quilt series under linux/

Posted in aero-m, hauppauge, mxl111sf.


Hauppauge WinTV-Aero-m Linux driver

I’m pleased to announce the mxl111sf Linux driver with support for ATSC on the Hauppauge WinTV-Aero-m.

The device uses a Max Linear tuner with the LG DT3305 ATSC/QAM demodulator. The device also supports ATSC-MH Mobile DTV, but that feature is not yet supported under Linux.

Since I began work on this driver over a year and a half ago, mercurial was the tool used to track development.

If you are the owner of one of these USB dongles, please feel free to give the following repository a try:

http://kernellabs.com/hg/~mkrufky/mxl111sf

Please note, the mxl111sf mercurial development repository is based on a rather old v4l-dvb base tree.  The mercurial repository will not work with the latest kernels.  For those looking to build this driver using git, I have pushed the driver into the ‘atsc’ branch of my mxl111sf git tree on linuxtv.org:

http://git.linuxtv.org/mkrufky/mxl111sf.git

To clone the atsc branch, run the following command:

 git clone -b atsc git://git.linuxtv.org/mkrufky/mxl111sf.git

This is a really cool device – I look forward to hearing your feedback after testing.

Posted in aero-m, hauppauge, lgdt3305, mxl111sf.


Fix for Hauppauge USBLive2 Regression

Several users who saw the announcement of support for the Hauppauge USBLive2 several months ago reported in the blog comments that the support became broken in the mainline kernel.

After finally getting some time to investigate, I did confirm that there had been a regression, identified the issue, and have submitted a patch for upstream inclusion.

The patch can be found at the following link. It can be applied against the current media_build tree, as well as the 3.0.0 kernel.

http://www.mail-archive.com/linux-media@vger.kernel.org/msg34771.html

Thanks go out to Robert DeLuca for sponsoring the development of a fix for this issue.

Comments/feedback welcome, as always.

Posted in cx231xx, hauppauge, usblive2.


HVR-1300 s-video fix when using MPEG encoder

A couple of days ago I submitted a patch for the HVR-1300 to fix a problem where the s-video would have the comb filter enabled even when capturing on s-video. This caused distortion of the video, as Florent Audebert pointed out on the linux-media mailing list. The weird thing is that it only happened when capturing on MPEG, which ultimately was a bug where the input was getting switched whenever the cx88 driver started up the MPEG encoder.

The patch can be found here:

http://www.mail-archive.com/linux-media@vger.kernel.org/msg34236.html

Thanks to Anevia S.A. for sponsoring the fix to this issue.

Posted in cx88, hauppauge, hvr-1300.


Call for Testers: HVR-1300, HVR-3000, HVR-4000 DVB-T tuning fix

For quite some time, there have been users complaining of DVB-T scanning problems using application such as MythTV or w_scan. Even stranger, they claimed that using /usr/bin/scan would indeed work as expected.

For example, this Launchpad ticket has tracked the issue for almost two years:

https://bugs.launchpad.net/mythtv/+bug/439163/

MythTV has a ticket tracking the issue too (although closed due to it being declared “upstream”):

http://code.mythtv.org/trac/ticket/9270
http://www.mythtvtalk.com/hvr-4000-fails-scan-11318/

I finally got my hands on some hardware to test with, and what I found was not a device specific bug, but rather a race condition in the framework. This will actually effect far more devices than just the three noted above. Pretty much any card which strobes the reset pin in it’s ts_ctrl() function will hit this issue with applications like MythTV.

I’ve cooked up a patch for the issue and submitted it to the linux-media mailing list for upstream inclusion. It can also be found here if users want to apply it directly to a media_build tree themselves:

https://launchpadlibrarian.net/74557311/frontend_dvb_init.patch

My hope is that this should fix a longstanding issue where no developer had the time to investigate. I’ve tested it with my DVB-T generator and now I can see that w_scan does work. But it would be great it some users would try it out and report back as to whether it improves their situations. Feedback in the comments section welcome below….

Posted in hauppauge, hvr-1300, hvr-3000, hvr-4000.