?

Log in

No account? Create an account
devinjh
Pinnacle 801e support for those who can't wait for the merge 
27th-Aug-2008 07:54 pm
Update (11-08-2008): Please DO NOT FOLLOW THE STEPS HERE. The changes have been merged into the v4l-dvb codebase (including the fix for the thermal bug). Please go to this site for updated instructions:

http://www.linuxtv.org/wiki/index.php/Pinnacle_PCTV_HD_Pro_Stick_(801e)

Thanks,

Devin
====

I got a couple of comments from people who would like to try out the new Pinnacle PCTV HD 801e support. The changes basically fall into two categories:

* Fixes for the dib0700 i2c code so the xc5000 works
* A device profile for the Pinnacle 801e

The dib0700 i2c fixes affect all devices, so a patch providing these fixes has been sent out for review. Because we don't want to break any existing devices, we couldn't just check it all in. Once those are verified by other maintainers, the plan is to then check in the 801e support.

For those of you who "just want it to work and don't want to wait" for it to be merged, you can get your device to work by downloading the following patch and applying it to the latest v4l-dvb hg.

Here's what you have to do. This assumes you have at some point you have built the v4l-dvb codebase and are confident that you have the kernel headers installed and the other v4l-dvb build prerequisites have been met.
hg clone http://linuxtv.org/hg/v4l-dvb
cd v4l-dvb
wget http://devinheitmueller.com/801e/pinnacle_801e_support.patch
patch -p1 < pinnacle_801e_support.patch
make
wget http://devinheitmueller.com/801e/dvb-usb-dib0700-1.20.fw
wget http://www.steventoth.net/linux/xc5000/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip
wget http://www.steventoth.net/linux/xc5000/extract.sh
sh extract.sh
make install
cp dvb-fe-xc5000-1.1.fw /lib/firmware
cp dvb-usb-dib0700-1.20.fw /lib/firmware

Then reboot. These instructions were tested on Ubuntu 8.04, building as root. If you're not comfortable with that, run the last three commands with "sudo" in front of them.

If the above steps look too complicated, wait a week or two and it will hopefully be in the main repository by then.

Now for the disclaimers:

  • No guarantees or warranties that the code will work
  • Don't hold me responsible if your PC, Pinnacle tuner, our house catch on fire.
  • This is not a final patch, and the i2c code in particular could potentially interfere with other dib0700 devices (if you have any)
  • There is no analog support yet.
  • Tuning is a little slower than I would like (less than one second but still...). I'm working on this.

Have fun. If you have problems, feel free to comment on this post.

Also, I would be interested to know if the Pinnacle PCTV USB that is not the "Pro" edition also has an 801e USB ID (since I'm using the "Pro"). If any of you have one, let me know.
Comments 
28th-Aug-2008 01:43 pm (UTC) - pctv hd ultimate stick
Anonymous
I bought one of the PCTV HD Ultimate Sticks, and returned it for one of the pro's, since seeing your progress in working on this. The Ultimate stick is labeled an '880e' usb device.

28th-Aug-2008 01:54 pm (UTC) - Re: pctv hd ultimate stick
Thanks for replying. Please post if you take the time to try out the driver and let me know how it went.

Mrechberger confirmed the "Ultimate" version is a completely different hardware design using a new em28xx chip that is unsupported:

http://www.linuxtv.org/pipermail/linux-dvb/2007-November/021908.html

I'm actually curious about the device that is one step lower than the "Pro", which I believe just known as the "PCTV HD Stick". If it's an 801e then I will update the Wiki to reflect that so people can just buy the cheaper device. If it's the same hardware but a different USB ID, I can add the device ID so it starts working.

Cheers,

Devin
28th-Aug-2008 04:47 pm (UTC) - Re: pctv hd ultimate stick
Anonymous
Well, after installing, the device was detected fine. After a while though, it became hot to touch, which I found a little worrying. Ran it with mythtv, and it seems to be working well. I need to learn the ins and outs of mythtv though (first dvb card, so all a pretty new experience).

I'm running Fedora 9, kernel 2.6.25.


Thanks for all the work you've put into this.

Christopher
29th-Aug-2008 06:34 pm (UTC) - Pinnacle 801e stick...
Anonymous
I've applied your patches to my MythTV machine last night and everything seems to be working great.... I've had the same heat problem that the other poster has already mentioned, and I'm applying your patch for that right now. I won't be able to feel it to see if it worked or not until after I get off work though.

Didn't notice any problems with anything else DVB related in my machine, although I'm not running anything else with a dbi0700.

Great job on getting this device working, it is very much appreciated.

-Ken
29th-Aug-2008 11:57 pm (UTC) - Re: Pinnacle 801e stick...
Yes, please definitely be sure to apply the second patch mentioned above, and report back your results. The second patch should make the device run much cooler.

Thanks,

Devin
3rd-Sep-2008 05:57 am (UTC) - I have a non-Pro stick
Anonymous
I have a 801e SE, and other than the USB ID being 2304:023b instead of 2304:023a, it seems to be exactly the same. Hardware specs appear to be the same, and indeed I've got some ATSC video up right now, by just adding one line to recognize the 023b ID.

As for the stick: I don't have your second patch in yet, but I ran the stick for a few minutes on a friend's Windows box, and it was quite hot on there too. I think this stick just runs hot!
3rd-Sep-2008 09:04 am (UTC) - Re: I have a non-Pro stick
Hello,

Thanks for the feedback. It's good to finally know what the deal is with the non-Pro stick (I had expected as much).

The device does run hot under Windows as well, from what I have seen. In what would seem to be a bit of irony, I think even the Pinnacle driver for Windows always runs both the demodulator and the cx25843 at the same time. And my original GPIO programming was based off the USB trace of the Windows driver.

Please try out the second patch and let me know if it runs cooler (it's a one line change).

Couple of additional questions:

Does the device have a small port on the side that looks like a USB mini port? On the Pro Stick, this is where an A/V cable would be connected.

Although the product does not come with a remote control, does it appear to have an infrared window on the device?

Would you be willing to pop the cover off and take photos of the PCB and send them to me? In particular, I need to know if there is CS5340 chip which on the Pro device is used for FM radio? The two PCBs are not soldered together and separate quite easily.

Would you be willing to work offline with me to get a USB capture of the Windows driver with SniffUSB? My concern is that while ATSC may be working, I don't know if the GPIOs are being programmed properly for any missing hardware (like the FM radio support)

http://www.pcausa.com/Utilities/UsbSnoop/default.htm

I would really like to get support for both devices into the mainline, but I am hesitant to just check in the additional USB id without knowing I'm not going to burn out everybody's devices after a month of use. :-)
4th-Sep-2008 03:35 am (UTC) - Re: I have a non-Pro stick
Anonymous
"The device does run hot under Windows as well, from what I have seen. In what would seem to be a bit of irony, I think even the Pinnacle driver for Windows always runs both the demodulator and the cx25843 at the same time"
That is pretty funny 8-) I always love when the Linux driver for something ends up actually being better than the Windows one.

"Please try out the second patch and let me know if it runs cooler (it's a one line change)."
Yeah that cooled it down a fair amount. It seems to me it was already cooler (without this patch) than I recall it being on my friend's Windows box.

"Does the device have a small port on the side that looks like a USB mini port?"
Nope.
"Although the product does not come with a remote control, does it appear to have an infrared window on the device?"
It *appears* to, but (see the photos below) there's nothing underneath -- just an LED.. heh.


"Would you be willing to pop the cover off and take photos of the PCB and send them to me?"
Yep. It DOES in fact have the CS5340. These'll take several seconds to load...




"Would you be willing to work offline with me to get a USB capture of the Windows driver with SniffUSB?"

I can certainly test stuff out, but I don't have any Windows installs handy. I think it's the same stick with IR and the extra input deleted though.

"I would really like to get support for both devices into the mainline, but I am hesitant to just check in the additional USB id without knowing I'm not going to burn out everybody's devices after a month of use. :-)"

I can certainly test things out. I have a mythtv setup with a BT878 right now. I need a fairly large antenna to get more than 2 channels over the air, so I intend to hook the PCTV up to cable until then, and I think there's quite a few analog-only channels on there. So 1) I can have mythtv give it plenty of exercise and 2) If I burn it out it's not a big deal, I have a working tuner already setup.

8th-Sep-2008 01:34 am (UTC) - hg revert required.
Anonymous
I had to do a 'hg revert -d 8/36/08' on the v4l-dvb clone for it to patch and compile correctly, otherwise the stick would not initialize (load the firmware I think as I could see it with lsmod).

I don't know if this was just me or not but I am running a brand new install of Ubuntu 8.04 i686 with kernel 2.6.24-19-generic.

Anyhow works now! Thanks for doing the work on adding 801e support, this is great!

8th-Sep-2008 01:40 am (UTC) - Re: hg revert required.
The hg diff was based off of a patch from last week, and I believe device support for a couple of other devices got checked in (which would create a conflict).

The i2c fixes went into Patrick's branch yesterday and a pull has been submitted to Mauro. The 801e fixes are being submitted to him tonight, so everything should be in the head sometime in the next couple of days.

Until then, you're going to have to stick with what you've got...

Also, make sure to apply the one line the patch mentioned in the previous comments.
9th-Sep-2008 09:22 pm (UTC) - Regarding the non-Pro version...
Anonymous
I also own an 801e SE and a Windows Vista PC that I'm willing to run a USB capture on it for you. Do you need me to just plug it in and capture Windows initializing it, or do I also need to launch Media Center and tune in some ATSC broadcasts?

-Mike
10th-Sep-2008 02:44 am (UTC) - Re: Regarding the non-Pro version...
If you could help out in getting a capture, I will happily add the device profile for inclusion in the 2.6.28 kernel.

Another user reported that "it's working for him" after just changing the USB ID in the driver, but I want to be sure the GPIOs are the same before I check in a change.

Here's what to do:

1. Get SniffUSB 2.0:
http://www.pcausa.com/Utilities/UsbSnoop/default.htm
2. Install the drivers and the software that came with the device
3. Make sure the software is working by doing a scan for ATSC stations
4. Start SniffUSB and "attach" to the device
5. Start capture in SniffUSB
6. Hit the "replug device" button in Sniff USB
7. Launch the viewing application
8. Tune to a single ATSC channel
9. As soon as you see video, stop capture in sniffusb

In particular, you want to do steps 5-9 in as little time as possible, to minimize the size of the capture file. If you're quick, the file will be around 50 MB.

You can either make the file available to me for download, or you can take one extra step by downloading "USBReplay" and running the script through parser.pl first from a Linux box:
wget http://mcentral.de/hg/~mrec/usbreplay/raw-file/486a40310c52/parser.pl
perl parser.pl capture_file > foo

Then send me the file "foo" (it will be *much* smaller)

My email is "devin.heitmueller" at "gmail.com"

Thanks!

Devin
10th-Sep-2008 02:58 pm (UTC) - Re: Regarding the non-Pro version...
Anonymous
You got it, Devin!

The parsed file has been sent.

-Mike
1st-Oct-2008 01:53 am (UTC) - Pinnacle 801e SE Unable to find symbol s5h1411_attach()
Anonymous
Please forgive me if this isn't the right place to pose this.

I've downloaded today's mercurial v4l-dvb which looks like it has the merge (thanks!).

After installing, when I reboot or unplug and replug the stick, I get this in dmesg:

dvb-usb: found a 'Pinnacle PCTV HD USB Stick' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (Pinnacle PCTV HD USB Stick)
DVB: Unable to find symbol s5h1411_attach()
dvb-usb: no frontend was attached by 'Pinnacle PCTV HD USB Stick'
input: IR-receiver inside an USB DVB receiver as /class/input/input4
dvb-usb: schedule remote query interval to 150 msecs.
dvb-usb: Pinnacle PCTV HD USB Stick successfully initialized and connected.
usbcore: registered new interface driver dvb_usb_dib0700


When I start mythtv-setup, and begin to setup a new card, I see an unknown dvb device. I'm guessing that is to do with the lack of a frontend being loaded.

Is this the way it should work? Do I maually need to modprobe a frontend driver? If so, which one, if not, do you have any suggestions?

Thanks,
Ray
1st-Oct-2008 01:57 am (UTC) - Re: Pinnacle 801e SE Unable to find symbol s5h1411_attach()
Ok, I guess you didn't see the post that said "don't update yet!"

http://devinjh.livejournal.com/146548.html

The code in the v4l-dvb will currently panic your kernel if you were to actually try to tune. I submitted a patch Sunday night but Mauro hasn't merged it yet.

Regarding the problem you reported, start by rebooting your PC. It's possible that not all the modules are in sync. Doing a "make install" will install all the new modules but it won't reload any modules already loaded.

If that doesn't work, email me at devin.heitmueller at gmail.com and I will work with you to isolate the problem.

Regards,

Devin
1st-Oct-2008 02:43 am (UTC) - Re: Pinnacle 801e SE Unable to find symbol s5h1411_attach()
Anonymous
Thanks for letting me know that it'll panic.

I tried unplugging the usb, rebooting, make rminstall, reboot, make install, reboot and re-plugging. It still has the issue of not autodetecting the frontend.

I then manually modprobe s5h1411 and xc5000, replugged the stick and both dmesg and mythtv-setup look correct now.

Now that I can at least manually load the drivers, I'll revert and apply the patches you provided earlier. I'll figure out/remember how to automatically load the modules by preloading when dib0700 loads.

Thanks again!
13th-Oct-2008 06:21 am (UTC) - PCTV Hybrid Pro Stick 340e (xc4000)
Anonymous
Hello.

I accidentally bought 340e, and what it seem to share same firmware/driver with 801e.

http://bahathir.googlepages.com/340e.tgz

I am willing to try any patch with my system.

GNU/Linux Slamd64 (Slacware 12 x86_64 clone)
linux kernel v2.6.27
gcc 4.4.0

The modules/firmware loaded successfully, and the green LED lit.

But, I got this dmesg error during scanning.

DiB0070 I2C write failed


Here is my patch against 2.6.27 vanilla


--- orig/dib0700_devices.c 2008-10-13 13:33:58.000000000 +0800
+++ dib0700_devices.c 2008-10-13 14:00:31.000000000 +0800
@@ -1119,6 +1119,7 @@
{ USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV_DONGLE_STK7700P_2) },
/* 35 */{ USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_TD_STICK_52009) },
{ USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_500_3) },
+ { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_HYBRID_PRO_STICK_340E) },
{ 0 } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table);
@@ -1126,7 +1127,7 @@
#define DIB0700_DEFAULT_DEVICE_PROPERTIES \
.caps = DVB_USB_IS_AN_I2C_ADAPTER, \
.usb_ctrl = DEVICE_SPECIFIC, \
- .firmware = "dvb-usb-dib0700-1.10.fw", \
+ .firmware = "dvb-usb-dib0700-1.20.fw", \
.download_firmware = dib0700_download_firmware, \
.no_reconnect = 1, \
.size_of_priv = sizeof(struct dib0700_state), \
@@ -1374,7 +1375,7 @@
}
},

- .num_device_descs = 4,
+ .num_device_descs = 5,
.devices = {
{ "DiBcom STK7070PD reference design",
{ &dib0700_usb_id_table[17], NULL },
@@ -1391,6 +1392,10 @@
{ "Hauppauge Nova-TD-500 (84xxx)",
{ &dib0700_usb_id_table[36], NULL },
{ NULL },
+ },
+ { "Pinnacle 340E",
+ { &dib0700_usb_id_table[37], NULL },
+ { NULL },
}
}
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,

--- orig/dvb-usb-ids.h 2008-10-13 14:19:41.000000000 +0800
+++ dvb-usb-ids.h 2008-10-13 13:43:31.000000000 +0800
@@ -206,4 +206,8 @@
#define USB_PID_ASUS_U3100 0x173f
#define USB_PID_YUAN_EC372S 0x1edc
#define USB_PID_DW2102 0x2102
+
+/* 340e support */
+#define USB_PID_PINNACLE_HYBRID_PRO_STICK_340E 0x023d
+
#endif


Thank You

Mohammad Bahathir Hashim.
13th-Oct-2008 06:23 am (UTC) - Re: PCTV Hybrid Pro Stick 340e (xc4000)
Anonymous
Sorry I forgot to include the reference sites :)

http://www.gkall.nl/pinnacle-pctv-hybrid-pro-stick-340e.html
http://www.linuxtv.org/wiki/index.php/Pinnacle_PCTV_Hybrid_Pro_Stick_340e

Mohammad Bahathir Hashim
13th-Oct-2008 02:13 pm (UTC) - Re: PCTV Hybrid Pro Stick 340e (xc4000)
Unfortunately, the 340e has an xc4000, which is totally unsupported with Linux.

As far as I know, nobody has the datasheet, and nobody has taken the time to reverse engineer the difference between the xc4000 and the xc5000. Since I'm in the United States, I don't have access to a signal that I could use to reverse engineer it (it does dvb-t only whereas I only have access to ATSC).

Other than the xc4000 though, everything else *should* be the same.

Sorry.

Devin

Edited at 2008-10-13 02:13 pm (UTC)
14th-Oct-2008 02:21 am (UTC)
Anonymous
I got it working with the 10/11 v4l-dvb sources. The patch would only apply to 8/26 sources, but wouldn't make a usable 2.6.27 module. I still needed to comment out SAA52?? stuff(./v4l/.config) so it would compile with 10/11 sources. It works though. Any eta on analog / radio support? I'm more interested in those abilities than dvb.

I'm a DVB newbie, so it took a while to figure out to use scan on kaffeine's us-ATSC-* confs to get a channel list. Kaffeine's current scanning is broke by all accounts. But I have at best 13 channels locally for ATSC / DVB. 3 don't render with vlc. 1 has no sound. And all seem to cop out after 20 minutes for some reason. It starts getting choppy then bumps a lot of erros like this:

Errors: [00000458] main decoder error: decoder is leaking pictures, resetting the heap
(while running vlc on a .conf of an individual channel. Doesn't matter which channel, they all get to that point eventually.)

And various libdvbpsi errors. For most channels. I'm not sure if this is normal. And may just be something odd with my local carriers. Like I said, a dvb newbie. But I bought the card for analog and radio. To avoid buying another TV and to get some of my old VHS tapes to DVD. Oh well for now I guess.

Thanks for making a driver. Even if it took me two days to figure it out.
14th-Oct-2008 02:44 am (UTC)
Hello there,

Please don't use the patch referred to in the previous post. Everything is now merged into the v4l-dvb mainline.

Analog support is not present because it doesn't exist in the dvb-usb framework. I am slated to work with mkrufky to add such support, at which point making it work with the Pinnacle 801e will be straightforward. No ETA on that though, as it's relatively low priority (sorry).

I added ATSC scanning support to Kaffeine 0.8.7. If you're using Kaffeine 0.8.6 (which still ships with most distros), scanning is not going to work. Also, there's a known issue with 0.8.7 where it works with over the air ATSC, but not with cable QAM.

I don't think vlc supports ATSC (but I could be wrong and they might have added support since I last looked). If you're not getting sound, it might be because the MPEG decoder used by vlc doesn't recognize the ATSC AC3 sound extension (differs from how it's done in DVB).

Please throw away my patch and use the current v4l-dvb source. It's possible that will fix your issue with the picture cutting out after 20 minutes (there was a thermal bug not addressed in the patch, but the fix is later in the comments section as well as in the v4l-dvb mainline).

Regards,

Devin
14th-Oct-2008 11:49 am (UTC)
Anonymous
Confirmed: current v4l-dvb 10/13 seems to not have the cut out. Although I was using fresh sources from 10/11 when I had the issues. hg pull --update (with 55 updates)

I seem to have fewer issues on my 64 bit desktop than my 32 bit laptop. But I still get a number of PSI errors for some channels.

libdvbpsi error (PSI decoder): PSI section too long
And a bunch of TS discontinuity messages. Some channels run relatively error free. Others generate nothing but errors.

VLC seems to be the only one I've gotten to show most dvb channels. Mplayer only seems to play one channel based on the output of czap as it's channels.conf. Scan found 13 channels on my Desktop and only 10 on my laptop. And at least two channels generate mostly errors with no output on each. Locally it would be Pentago (military channel) that has no audio. And [0008] and [0009] seem to be the local channels that don't yield any media output. Not that I'm worried about it, windows only shows 8 channels.

The device does get hot in both OSes. Steering wheel in the summer(texas) sun hot. But not enough to cause 2nd degree burns (yet). Not that I can tollerate touching the metal cable joint for very long. I'll just assume that this is normal.

Thanks again,
James
(no subject) - Anonymous - Expand
(no subject) - Anonymous - Expand
(no subject) - Anonymous - Expand
Analog support? - Anonymous - Expand
4th-Jul-2009 07:50 am (UTC)
Anonymous
Devin Heitmueller of Kernel Labs is currently considering writing the driver for analog part of dib0700 devices:

"Some discussion I have been having with Andrej Falout has prompted me
to consider finally adding analog support for dib0700 based devices?
As a result, I am interested in trying to figure out how many people
care about this. In particular, this is a rather large project, so I
want to get an idea how many people would actually benefit from this
support (and might be willing to donate a couple of dollars toward the
effort).

I've got all the specs and information required to do the work - it's
just a matter of deciding whether it is worth spending three or four
weeks of my time that could be spent doing stuff that I would almost
certainly consider more interesting.

If you are interested in seeing this work, please reply here, or email
me privately. Also, include what dib0700 based device you have (and
what video decoder and tuner chips it uses if you happen to know).

--
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com"

If you are interested in this functionality, please let Devin know by sending a message to Linux Media Mailing List :
<linux-media@vger.kernel.org>
4th-Jul-2009 01:42 pm (UTC)
Um, I'm not sure who decided to post the above reply, but "Devin Heitmueller of Kernel Labs" is the same person as "Devin Heitmueller of devinjh.livejournal.com"

:-)
21st-Aug-2009 05:09 pm (UTC) - stk7700d analog 1164:1f08
Anonymous
Hello,

I've been looking for a driver for my Hybrid Card from Yuan High Tech for some time now. Finally I got here with at least a little hope :)

My card is recognized by the system as Bus 002 Device 002: ID 1164:1f08

YUAN High-Tech Development Co., Ltd (that what lsusb shows). It's connected via minipci. The digital part works (at least scanning - newer had an opportunity to check it) but the analog and radio part doesn't. Because it seems that this device is very similar to the Pinnacle 801e (same conexant chip etc) I though that your driver (when it'll finally work) could be also adapted to support my device. Would it be possible?

I can provide any info from the system if needed.

Thanks.

Regards
Mario
This page was loaded Sep 23rd 2017, 7:45 pm GMT.