Gentoo Wiki


This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related



This guide will help you setup your kernel to recognize your Plextor ConvertX PVR (models PX-M402U and PX-TV402U) and how to record video.

About Hardware

The Plextor ConvertX is an external PVR that connects to your computer through USB2 and has native support for Linux through GPL kernel drivers. The PVR also has onboard hardware encoding for mjpeg, MPEG1 (VCD), MPEG2 (SVCD, DVD) and MPEG4 (DivX) with PCM (uncompressed) audio, and uses the kernel's V4L2 (video4linux) modules.

The PX-M402U model has video-in ports for S-Video and Composite, while the PX-TV402U model adds an NTSC-only TV tuner with an RF/coaxial input (on rear side of box, not seen in picture).



Software Limitations

It should be noted that the ConvertX will only output compressed video. This means that programs like mplayer, tvtime and xawtv cannot be used to record video or watch live TV until support is added for them. The Linux SDK includes an open source demo application that can be used as a framework for development.

Currently, MythTV (v0.18 or higher) is one of the few third-party application that can use the ConvertX to both watch live TV and record video.

Kernel Configuration

A software developer kit (SDK) is provided by Plextor that contains two things: external modules so the kernel can see your box, and a demo recording program. Before starting with those though, first set up your current kernel so it has all the necessary drivers included.

The SDK recommends using a kernel of 2.6.10 or higher. The modules will not work on Linux 2.4.

Warning: The modules (version 0.9.8) use some constants that are defined in the kernel source code. Some of these constants have been deprecated and are no longer defined in kernel 2.6.17 or higher. This leads to the 'make' function failing. Therefore you should use a kernel between 2.6.10 and 2.6.16 or use this patch to fix the module source.
Note: The modules (version 0.9.8) will not build on the latest gentoo-sources kernel (2.6.18-gentoo-r6) with the above patch applied. In that case you will need to remove the patch as applied above (it may be easier to just remove the directory and untar it again), then download this patch. Run 'patch -p0 < wis-go7007-updates.diff' from the directory above wis-go7007-linux-0.9.8. At that point the make and make install should both run.

Up to date diffs for compiling to the latest kernels (currently 2.6.18 and 2.6.19) can be found in the Gentoo bugzilla for the media-tv/wis-go7007 ebuild: [1]. Kernel 2.6.21 patches can be found here: [2]. Some up to date patch for kernel 2.6.21 (not especificaly for gentoo...): [3] As of kernel 2.6.24, changes were made to the i2c_algorithm structure that will require removing i2c_algorithm.algo_control() hooks from the driver. A patch (not tested on Gentoo), is available here: [4]

To use the most recent revision of 2.6.16 kernel available, insert the line '>=sys-kernel/gentoo-sources-2.6.17' into your /etc/portage/package.mask file.

Make sure to configure your kernel with the following:

Linux Kernel Configuration:
General setup  --->
  [*] Support for hot-pluggable devices (config: CONFIG_HOTPLUG)
Loadable module support  --->
  [*] Enable loadable module support (config: CONFIG_MODULES)
  [*]   Automatic kernel module loading (config: CONFIG_KMOD)

Note: Unlike other v4l devices, you don't need any other i2c drivers added.

Device Drivers  --->
 Generic Driver Options  --->
  <M> Hotplug firmware loading support (config: CONFIG_FW_LOADER)
 I2C Support --->
  <M> I2C support (config: CONFIG_I2C, module: i2c_core)
 Multimedia devices  --->
  <M> Video For Linux (config: CONFIG_VIDEO_DEV, modules: v4l1_compat, v4l2_common)

Compiled in (not as modules).

Device Drivers  --->
 USB support  --->
  <*> Support for Host-side USB (config: CONFIG_USB, module: usbcore)
  [*]   USB device filesystem (config: CONFIG_USB_DEVICEFS)
  <*> EHCI HCD (USB 2.0) support (config: CONFIG_USB_EHCI_HCD, module: ehci_hcd)
Device Drivers  --->
 Sound  --->
  <*> Sound card support (config: CONFIG_SOUND)
    Advanced Linux Sound Architecture  --->
      <*> Advanced Linux Sound Architecture (config: CONFIG_SND)
      <*> OSS Mixer API (config: CONFIG_SND_MIXER_OSS)
      <*> OSS PCM (digital audio) API (config: CONFIG_SND_PCM_OSS)
          Generic Devices --->
          Pci Devices --->
          Usb Devices --->
Note: In the 2.6.18-gentoo-r6 kernel CONFIG_FW_LOADER is enabled through "Userspace firmware loading support" under Generic Driver Options

Be sure to select your actual hardware device under Advanced Linux Sound Architecture -> generic devices ->, pci devices ->, or usb devices ->, if listed.

Once finished, build your modules and new kernel.

mount /boot
make install modules_install

ALSA Setup

The latest version of the kernel modules (v0.9.8) are incompatible with the ALSA libraries v1.0.11 and higher. Since they are already stable in portage, you will need to mask anything higher than 1.0.10 and use those instead.

Add these lines to your package.mask in the /etc/portage directory:

# ALSA libs for go7007 stable

Note: I did get this working with the 0.9.8 kernel modules and Alsa version 1.0.11rc4, kernel version 2.16.17-gentoo-r8. I did have to apply the patch above to get the kernel modules to build & install.

Gentoo Packages

There are a few packages provided in portage that you'll need to emerge to recognize the USB device and load the firmware.

emerge coldplug hotplug fxload

coldplug is needed to recognize USB devices that are already plugged in, and load their drivers while booting the kernel.

hotplug loads the modules anytime you plugin any usb devices.

fxload loads the ConvertX's firmware.

If you are using the alsa-driver package, and must load the ALSA drivers as modules (or if you just want to load them as modules in the first place), then you must start coldplug after alsasound in your init startup. The reason is because coldplug will load your Plextor drivers just fine, but it won't register the sound modules if there are no existing sound devices.

To solve that problem, just add alsasound to boot (instead of default) and coldplug to default startup, and they will load in the proper order:

rc-update add alsasound boot
rc-update add coldplug default

Add coldplug and hotplug to your startup scripts:

rc-update add coldplug default
rc-update add hotplug default

Note: If you're not using ALSA modules or the alsasound init script, then you can add coldplug and hotplug to boot if you like. Also, if you plan on having your USB devices always plugged in on bootup, you don't need to install hotplug at all.

Plextor Modules

If you are not already running your revised kernel with the new settings, if needed, compile the kernel and reboot.

Now you're ready to download and install the third party modules.

Download the latest Linux SDK from the Wis Technologies website:

Untar the tarball, and go into the wis-go7007-linux-0.9.8 directory.

The driver Makefile relies on your current setup in /usr/src/linux. Therefore, you must recompile your kernel and reboot before compiling the wis-go7007 drivers whenever you change:

Compile and install the driver:

Code: Compile and install the driver
make clean; make; make install

The Makefile will do two things: build and install your modules and the "gorecorder" demo application.

Now plug the USB cable from the Plextor ConvertX PVR to your computer and reboot. Assuming coldplug started on boot, it will load the appropriate modules.

Once the modules are loaded, you can run lsusb (emerge: sys-apps/usbutils) to see if the device is recognized:

Code: lsusb
Bus 003 Device 004: ID 093b:a104 Plextor Corp.

Now that the device is loaded properly, it's time to look at recording some video.

You can verify that the device(s) registered as video4linux devices:

Code: Checking video4linux registration
#grep go7007 /sys/class/video4linux/video*/name

Verify that there were no errors loading the driver or transfering the firmware:

Code: Checking for driver loading and firmware transfer errors (example with errors)
#dmesg|grep go7007
go7007-usb: probing new GO7007 USB board
go7007-usb: device is hung, status reg = 0xfff4
go7007: version magic ' SMP PENTIUM4 gcc-3.4' should be ' SMP PENTIUM4 gcc-3.3'
go7007_usb: version magic ' SMP PENTIUM4 gcc-3.4' should be ' SMP PENTIUM4 gcc-3.3'
go7007-usb: probing new GO7007 USB board
go7007-usb: error in WriteInterrupt: -71
go7007: error transferring firmware

Trouble Shooting


MythTV 0.18 adds native support for the Plextor ConvertX PVR. You can watch live TV, and record video streams just fine.


As of 0.18.1, seeking is broken. While you can seek, the frame shown may be garbled. YMMV.

Seeking is fixed in 0.19.

Capture Cards

To setup your Plextor PVR as a recording device, first start mythbackend, then mythtv-setup. Make sure MySQL is started, too.

# /etc/init.d/mysql start
# /etc/init.d/mythbackend start
$ mythtv-setup

If you need to see this HOWTO while setting it up, just set the geometry to something smaller. By default it will start fullscreen.

 $ mythtv-setup -geometry 640x480

If you're setting up your MythTV for the first time, you can answer yes or no to delete your current card configuration.

At the main menu, select "Capture Cards", then "New capture card". Change the card type option to "USB Mpeg-4 Encoder (Plextor ConvertX, etc)".

The defaults for video and vbi device should be fine. Change audio device to /dev/dsp1, since /dev/dsp is more than likely your primary sound card.

Audio sampling rate can be set to whatever your preference is.

For default input, set it to Tuner if you are using a coaxial cable (cable tv) to connect to your Plextor.

Switching between sources (Tuner, Composite, S-Video) only works in 0.19 after applying this patch Ticket #1757

When you're done, click Finish. You can exit out of mythtv-setup, too. The next setup will be in mythfrontend.

Recording Profiles

Next you will need to setup your recording profiles. If you skip this step, when you go to watch Live TV you will most likely see just a green screen with audio only.

Startup mythtvfrontend (again, make sure MySQL and mythbackend are still running).

$ mythfrontend -geometry 640x480

From the main menu, goto "Utilities / Setup", then "Setup", then "TV Settings" then "Recording Profiles". You should see at least these two options: "USB Mpeg4 Encoder (Plextor ConvertX, etc)" and "Transcoders". Select the ConvertX option.

For each one of these options, you will need to change the default width and height or you will not be able to record or watch TV correctly. Pick one. Skip the profile naming screen. On the second page, set the width to 640 and leave the height to 480.

Note: Alternatively, you can set it to width 320 and height 240, and if you are burning the shows to removable media (CD, DVD) to watch on TV, both will show up just fine. The smaller resolution will also put less of a strain on your ConvertX.

On the next page, leave the codec set to MPEG-4. In fact, that's the only option. You can change the slider options all you like, though I doubt that most of the checkboxes will work (can someone confirm?).

On the audio page, change the codec to "Uncompressed." The ConvertX does not encode the audio on the fly (just the video). Change the sampling rate and volume to your preferences, and finish up. Now change the other profiles the same way.

Note: You can, of course, change the setting in the "Transcoding" profile to whatever codecs and settings you want, since that is post-processing, or, in other words, it all happens after you've recorded your video. So you could set your default to encode just the audio which will make the files a little smaller.

Once you're done, you should be able to back up to the main menu and watch Live TV just fine! Enjoy!

Stablizing /dev/sound/dspN

Devices for video and audio are created as they are discovered. This means if your audio card is discovered before your ConvertX, then your ConvertX might have an audio device of /dev/dsp1 while its video device is /dev/v4l/video0. Adding the following to your udev local rules file will create a predictable symbolic link for your audio device. For every ConvertX /dev/v4l/videoN a corresponding /dev/convertx/dspN is created. This is especially useful if your audio card is not predictably discovered.

Code: /etc/udev/rules.d/10-local.rules:
 # Create a corresponding convertx/dspN for each v4l/videoN.
 # If sound/dspN is unpredictable due to other the presence audio devices
 # and v4l/videoN is predictable, then this provided predictable convertx/dspN.
 BUS=="usb", SUBSYSTEM=="sound", DRIVERS=="go7007", \
  ATTRS{product}=="Plextor ConvertX TV402U",  SYMLINK+="convertx/dsp%c", \
  PROGRAM="/usr/bin/perl -e 'exit 1 if (qw($kernel) !~ /^dsp/); $$v = </sys$devpath/device/video*>; $$v =~ /(.)$$/ ;  print $$1;'"

After adding the above rule, you can have your /dev/convertx/dspN devices created by any of these methods:

  1. Unplug and plug back in your ConvertX.
  2. Power cycle your ConvertX.
  3. Reboot.
  4. Run: udevtrigger (from a modern sys-fs/udev).

gorecord Patches and Alternatives


Leave comments, suggestions and bug reports on the Talk page.

That should be enough to get you started. Have fun with your new PVR!

For a discussion on the hardware, see this Gentoo Forums thread.

External Links

Retrieved from ""

Last modified: Sat, 30 Aug 2008 21:59:00 +0000 Hits: 46,277