Building EasyCAP support with easycap-somagic-linux on Fedora Core 19

Introduction & EasyCAP Identification

Needing a video display solution for streamed video from the Cobra, I obtained a EasyCAP USB 2.0 Audio/Video Capture off DX.com.

This device turned out to identify as follows in Fedora Core 19 with kernel 3.13.9-100.fc19.x86_64 and was not available as a device in V4L

New USB device found, idVendor=1c88, idProduct=0007

Or with lsusb

1c88:0007 Somagic, Inc. SMI Grabber (EasyCAP DC60+ clone) (no firmware) [SMI-2021CBE]

Drivers *are* available from a the easycap-somagic-linux project but require compilation.

DSC-RX100_2014-04-26_9638

The unit

The Solution on Fedora

The steps that follow combine the instructions from both the project page as well as teh Fedora wiki:

The Process

Preparation

sudo yum install rpmdevtools yum-utils
rpmdev-setuptree
yumdownloader --source kernel
su -c 'yum-builddep kernel-3.12.9-201.fc19.src.rpm'
rpm -Uvh kernel-3.12.9-201.fc19.src.rpm
cd ~/rpmbuild/SPECS
rpmbuild -bp --target=$(uname -m) kernel.spec

To make everything match, you may also want to install a matching, updated kernel

yum install kernel kernel-headers

Then setting up and patching:

cd ~/rpmbuild
wget --no-check-certificate https://patchwork.linuxtv.org/patch/20010/mbox/ -O smi2021v3.patch

cd BUILD/kernel*
patch -p1 < ~/rpmbuild/smi2021v3.patch

cp configs/kernel-3.12.9-x86_64.config .config
< or change to the version you are working with >
make oldconfig
< should ask just one question about the SMI driver: say m>

Edit Makefile to set EXTRAVERSION as follows to ensure module symbol match

EXTRAVERSION = -100.fc19.x86_64

In this version, for some reason or another, drivers/media/usb/smi2021.h needed the following line to be included as well:

#include <linux/slab.h>

Finally ready to build:

make prepare
make scripts
make M=drivers/media/i2c modules
make M=drivers/media/usb/smi2021 modules

These files can then be copied from drivers/media/i2c/saa71105.ko and drivers/media/usb/smi2021/smi2021.ko to /lib/modules/linux…./kernel/drivers/… and depmod -a run to update dependencies.

The end result then is lsusb shows as follows:

1c88:003c Somagic, Inc. SMI Grabber (EasyCAP DC60+ clone) [SMI-2021CBE]

The full dmesg logs now show as below. The firmware is sourced from the CD and installed into /lib/firmware

[ 7052.131294] usb 1-7: new high-speed USB device number 10 using ehci-pci
[ 7052.246951] usb 1-7: New USB device found, idVendor=1c88, idProduct=0007
[ 7052.246964] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7052.246973] usb 1-7: Product: SM-USB 007
[ 7052.246979] usb 1-7: Manufacturer: Somagic, Inc.
[ 7052.246986] usb 1-7: SerialNumber: SMBL007
[ 7052.270102] usb 1-7: Looking for: smi2021_3c.bin
[ 7052.270400] usb 1-7: Found firmware for 0x003c
[ 7052.270406] usb 1-7: Looking for: smi2021_3e.bin
[ 7052.270429] usb 1-7: Direct firmware load failed with error -2
[ 7052.270433] usb 1-7: Falling back to user helper
[ 7052.270438] usb 1-7: Looking for: smi2021_3f.bin
[ 7052.270460] usb 1-7: Direct firmware load failed with error -2
[ 7052.270464] usb 1-7: Falling back to user helper
[ 7052.287171] usbcore: registered new interface driver smi2021
[ 7052.288202] usb 1-7: USB disconnect, device number 10
[ 7052.288276] usb 1-7: Releasing firmware for 0x003c
[ 7052.521290] usb 1-7: new high-speed USB device number 11 using ehci-pci
[ 7052.636134] usb 1-7: New USB device found, idVendor=1c88, idProduct=003c
[ 7052.636148] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7052.636155] usb 1-7: Product: SMI Grabber DEV 
[ 7052.636163] usb 1-7: Manufacturer: Somagic, Inc. 
[ 7052.636169] usb 1-7: SerialNumber: SMIGRABBER9876543210
[ 7052.666958] smi2021 1-7:1.0: Somagic Easy-Cap Video Grabber

Finally to test:

vlc v4l://