Plextor Convertx PX-M402U

Aus Mikiwiki
Zur Navigation springen Zur Suche springen

Plextor Convertx PX-M402U (auch: Plextor ConvertX PX-M402U)


Der WIS Go7007 MPEG-4 Encoderchip ist in vielen Videoencodergeräten enthalten, darunter Plextor Convertx PX-M402U. Dieser Chip wird von Linux vollständig unterstützt, sofern der passende Treiber vorhanden ist. Eine Liste der unterstützten Geräte kann unter http://oss.wischip.com/ gefunden werden (inzwischen zeigt der URL allerdings ins Nirwana).

Leider hat WIS den Treiber schon länger nicht mehr aktualisiert, weswegen er auf den meisten modernen Linux-Distributionen nicht funktioniert. Einige nette Programmierer haben deswegen passende Patches geschrieben, sodass die wis-go7007-linux-0.9.8-Quelldateien auch unter Fedora Core 5/6, Fedora 7/8/9 und Ubuntu Dapper/Edgy/Feisty/Gutsy/Hardy funktionieren. Auch das Programm gorecord kann mit einem audio/video Sync-Patch nun Videodateien grösser als 1 GB aufnehmen.

Installation

Ubuntu 8.04 Hardy Heron (Linux 2.6.24-24)

Herunterladen: http://nikosapi.org/wiki/index.php/WIS_Go7007_Linux_driver

Installation der benötigten Entwicklungspakete.

$ sudo apt-get install linux-headers-generic fxload libncurses5-dev
$ sudo apt-get install linux-headers-lum-2.6.24-24-generic

Entfernen der inkorrekten Sound-Kernelheader.

$ sudo mv /usr/src/linux-headers-2.6.24-24-generic/include/sound \
    /usr/src/linux-headers-2.6.24-24-generic/include/sound-BACKUP20090812

Herunterladen der Datei "wis-go7007-linux-0.9.8-2.tar.bz2", welche bereits einige notwendige Patches enthält.

$ mkdir Plextor && cd Plextor
$ wget http://nikosapi.org/software/WIS_Go7007/wis-go7007-linux-0.9.8-2.tar.bz2
$ tar xjf wis-go7007-linux-0.9.8-2.tar.bz2
$ cd wis-go7007-linux-0.9.8-2

In den wis-go7007-Quelldateien muss folgende Zeile am Anfang der Datei "Makefile" eingefügt werden, damit der richtige LUM ALSA-Header berücksichtigt wird.

$ vi kernel/Makefile
EXTRA_CFLAGS += -I /usr/src/linux-headers-lum-2.6.24-24-generic -include sound/config.h

Kompilieren und Installieren.

$ make

***** Using kernel source in /usr/src/linux-headers-2.6.24-24-generic *****

make modules -C /usr/src/linux-headers-2.6.24-24-generic M=/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel
make[1]: Betrete Verzeichnis '/usr/src/linux-headers-2.6.24-24-generic'
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/go7007-v4l2.o
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/go7007-driver.o
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/go7007-i2c.o
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/go7007-fw.o
  LD [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/go7007.o
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/go7007-usb.o
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.o
In Datei, eingefügt von /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.c:39:
/usr/src/linux-headers-lum-2.6.24-24-generic/sound/driver.h:1:2: Warnung: #warning "This file is deprecated"
In Datei, eingefügt von /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.c:39:
/usr/src/linux-headers-lum-2.6.24-24-generic/sound/driver.h:1:2: Warnung: #warning "This file is deprecated"
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-saa7115.o
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-tw9903.o
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-uda1342.o
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-sony-tuner.o
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-saa7113.o
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-ov7640.o
  CC [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-tw2804.o
  Building modules, stage 2.
  MODPOST 10 modules
WARNING: "snd_pcm_period_elapsed" [/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.ko] undefined!
WARNING: "snd_card_disconnect" [/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.ko] undefined!
WARNING: "snd_device_new" [/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.ko] undefined!
WARNING: "snd_pcm_set_ops" [/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.ko] undefined!
WARNING: "snd_card_free_when_closed" [/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.ko] undefined!
WARNING: "snd_pcm_lib_ioctl" [/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.ko] undefined!
WARNING: "snd_card_new" [/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.ko] undefined!
WARNING: "snd_card_free" [/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.ko] undefined!
WARNING: "snd_card_register" [/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.ko] undefined!
WARNING: "snd_pcm_new" [/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.ko] undefined!
  CC      /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/go7007-usb.mod.o
  LD [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/go7007-usb.ko
  CC      /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/go7007.mod.o
  LD [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/go7007.ko
  CC      /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.mod.o
  LD [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/snd-go7007.ko
  CC      /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-ov7640.mod.o
  LD [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-ov7640.ko
  CC      /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-saa7113.mod.o
  LD [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-saa7113.ko
  CC      /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-saa7115.mod.o
  LD [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-saa7115.ko
  CC      /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-sony-tuner.mod.o
  LD [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-sony-tuner.ko
  CC      /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-tw2804.mod.o
  LD [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-tw2804.ko
  CC      /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-tw9903.mod.o
  LD [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-tw9903.ko
  CC      /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-uda1342.mod.o
  LD [M]  /home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/kernel/wis-uda1342.ko
make[1]: Verlasse Verzeichnis '/usr/src/linux-headers-2.6.24-24-generic'
sed -e s/@FIRMWARE_DIR@/\\/lib\\/firmware/ \
                        -e s/@FXLOAD@/\\/sbin\\/fxload/ \
                <hotplug/wis-ezusb.in >hotplug/wis-ezusb
sed -e s/@FIRMWARE_DIR@/\\/lib\\/firmware/ \
                        -e s/@FXLOAD@/\\/sbin\\/fxload/ \
                <udev/go7007_firmware_load.in >udev/go7007_firmware_load
sed -e s/@DESTDIR@// <udev/91-wis-ezusb.rules.in >udev/91-wis-ezusb.rules
make -C apps CFLAGS="-I/usr/src/linux-headers-2.6.24-24-generic/include -I../include"
make[1]: Betrete Verzeichnis '/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/apps'
gcc -Wall -I/usr/src/linux-headers-2.6.24-24-generic/include -I../include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -o gorecord gorecord.c tv-freq.c
gcc -Wall -I/usr/src/linux-headers-2.6.24-24-generic/include -I../include -o modet modet.c -lncurses
make[1]: Verlasse Verzeichnis '/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/apps'
$ sudo checkinstall
...
 Done. The new package has been installed and saved to
/home/mik/backup/hardware/Plextor/wis-go7007-linux-0.9.8-2/wis-go7007-linux-0.9.8_2-1_i386.deb
You can remove it from your system anytime using: 
     dpkg -r wis-go7007-linux-0.9.8

Damit fxload die Firmware ins Gerät laden kann, muss usbfs (oder usbdevfs) nach "/proc/bus/usb" eingehängt werden. Dazu muss die Datei "/etc/init.d/mountdevsubfs.sh" angepasst werden. Dafür gibt es einen einfachen Patch, der im neuesten Treiberpaket enthalten ist.

$ cd /etc/init.d
$ sudo cp mountdevsubfs.sh mountdevsubfs.sh-BACKUP20090812
$ cd wis-go7007-linux-0.9.8-2
$ wd=`pwd`; sudo patch -d /etc/init.d -p0 -i "$wd"/patches/mountdevsubfs.sh-usbfs.patch
patching file mountdevsubfs.sh
$ sudo /etc/init.d/mountdevsubfs.sh start

Im Verzeichnis "/proc/bus/usb" sollten jetzt Inhalte zu sehen sein.

Bus 005 Device 003: ID 093b:a102 Plextor Corp. 
Bus 005 Device 001: ID 0000:0000  
Bus 004 Device 001: ID 0000:0000  
Bus 003 Device 001: ID 0000:0000  
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
$ dmesg | grep go7007
[12231.024894] go7007-usb: probing new GO7007 USB board
[12231.277032] go7007: registering new Plextor PX-M402U
[12233.628649] usbcore: registered new interface driver go7007
[12233.781610] go7007: unsupported ioctl -2143521279

Test

Für einen Aufnahmetest wird das Video Capture-Gerät eingesteckt und anschliessend der folgende Befehl abgesetzt. Damit werden 20 Sekunden Filmmaterial in die Ausgabedatei "testvideo.avi" geschrieben.

  • "-input 0" für den Composite-Eingang.
  • "-input 1" für den Svideo-Eingang.
$ gorecord -input 0 -duration 20 testvideo.avi
Attempting to determine audio device...
Unable to find associated ALSA device node

If that alsa message is 'Unable to find associated ALSA device node' from gorecord, then that is because gorecord (in apps/gorecord.c) does some searching around in /sys to find the audio device that comes from the same driver, but that logic is probably flawed for recent kernels (at least it doesn't work on my 2.6.28 )... on my wordpress page I show the gorecord command I used myself.

I found which device to use by doing this:

$ ls -ld /sys/class/sound/pcmC*
lrwxrwxrwx 1 root root 0 2009-08-12 16:19 /sys/class/sound/pcmC0D0c -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0/sound/card0/pcmC0D0c
lrwxrwxrwx 1 root root 0 2009-08-12 16:20 /sys/class/sound/pcmC0D0p -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0/sound/card0/pcmC0D0p
lrwxrwxrwx 1 root root 0 2009-08-12 16:20 /sys/class/sound/pcmC0D1c -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0/sound/card0/pcmC0D1c
lrwxrwxrwx 1 root root 0 2009-08-12 16:20 /sys/class/sound/pcmC0D2c -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0/sound/card0/pcmC0D2c
lrwxrwxrwx 1 root root 0 2009-08-12 16:20 /sys/class/sound/pcmC0D2p -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0/sound/card0/pcmC0D2p
lrwxrwxrwx 1 root root 0 2009-08-12 16:20 /sys/class/sound/pcmC0D3p -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0/sound/card0/pcmC0D3p
lrwxrwxrwx 1 root root 0 2009-08-12 16:19 /sys/class/sound/pcmC1D0c -> ../../devices/pci0000:00/0000:00:1d.7/usb5/5-3/5-3:1.0/sound/card1/pcmC1D0c
$ ls -ld /sys/class/sound/pcmC*/device/dsp*
drwxr-xr-x 3 root root 0 2009-08-12 16:22 /sys/class/sound/pcmC0D0c/device/dsp
drwxr-xr-x 3 root root 0 2009-08-12 16:22 /sys/class/sound/pcmC0D0p/device/dsp
drwxr-xr-x 3 root root 0 2009-08-12 16:22 /sys/class/sound/pcmC0D1c/device/dsp
drwxr-xr-x 3 root root 0 2009-08-12 16:22 /sys/class/sound/pcmC0D2c/device/dsp
drwxr-xr-x 3 root root 0 2009-08-12 16:22 /sys/class/sound/pcmC0D2p/device/dsp
drwxr-xr-x 3 root root 0 2009-08-12 16:22 /sys/class/sound/pcmC0D3p/device/dsp
drwxr-xr-x 3 root root 0 2009-08-12 16:13 /sys/class/sound/pcmC1D0c/device/dsp1

and then using the usb device (dsp2 in my case), because there is only one audio device from a driver on a usb bus on my laptop with the plextor plugged in (and it's the one that goes away when I unplug it)...

Test der Wiedergabe.

$ mplayer testvideo.avi

Weblinks

Herausgeber Sprache Webseitentitel Anmerkungen