Building Kernel Module Error

556 views
Skip to first unread message

mahmoud sherif

unread,
Sep 25, 2014, 7:30:01 AM9/25/14
to easycap-so...@googlegroups.com
I have Somagic easycap and I need to get it in /dev/videoX so I followed the instructions in http://code.google.com/p/easycap-somagic-linux/wiki/BuildingKernelModule and I stuck in
git am smi2021v3.patch with the following error:

Applying: Add a driver for the Somagic smi2021 chip
error: patch failed: drivers/media/usb/Kconfig:28
error: drivers/media/usb/Kconfig: patch does not apply
error: patch failed: drivers/media/usb/Makefile:21
error: drivers/media/usb/Makefile: patch does not apply
Patch failed at 0001 Add a driver for the Somagic smi2021 chip
The copy of the patch that failed is found in:
/home/mande/v4l-dvb2/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

I don't know exactly what is this error


Can I ask for Your help ? I need a solution for this
Thanks all and sorry for my bad English

mahmoud sherif

unread,
Sep 26, 2014, 7:56:01 PM9/26/14
to easycap-so...@googlegroups.com
hey, are you there I need help please?

Jeffry Johnston

unread,
Sep 26, 2014, 8:47:22 PM9/26/14
to easycap-somagic-linux

I haven't built the kernel module, but if you're having trouble and want to use the device right away, why not build and use the user space tools?

--
You received this message because you are subscribed to the Google Groups "easycap-somagic-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to easycap-somagic-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mahmoud sherif

unread,
Sep 27, 2014, 6:05:07 AM9/27/14
to easycap-so...@googlegroups.com, je...@kidsquid.com
I get it working in the user space before, The problem is that I need to do some image processing on the frames so I must get the device in /dev/videoX, Thanks for your answer brother
To unsubscribe from this group and stop receiving emails from it, send an email to easycap-somagic-linux+unsub...@googlegroups.com.

Jon Arne Jørgensen

unread,
Sep 28, 2014, 8:04:10 AM9/28/14
to easycap-so...@googlegroups.com
Hi there,
I'm now in the process of uploading my kernel repo to github.

Should be up in a couple of hours.

You can find it here:
https://github.com/jonjonarnearne/smi2021

I've just rebased the module on top of the latest linux kernel 3.17-rc6+

I've not tried to compile it yet, but the repo should be able to
compile in some hours...
>>> email to easycap-somagic-...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "easycap-somagic-linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to easycap-somagic-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Jonarne
http://jonarne.no

Jon Arne Jørgensen

unread,
Sep 28, 2014, 8:06:06 AM9/28/14
to easycap-so...@googlegroups.com
This means that you don't have to apply the patches to compile the driver....
--
Jonarne
http://jonarne.no

tosiara

unread,
Sep 28, 2014, 9:44:04 AM9/28/14
to easycap-so...@googlegroups.com
Nice work! Will give a try now
>>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "easycap-somagic-linux" group.
>> To unsubscribe from this group and stop receiving emails from it, send an

tosiara

unread,
Sep 28, 2014, 10:49:04 AM9/28/14
to easycap-so...@googlegroups.com
Compilation fails:

  CC [M]  drivers/media/usb/smi2021/smi2021_v4l2.o
drivers/media/usb/smi2021/smi2021_v4l2.c: In function ‘smi2021_video_register’:
drivers/media/usb/smi2021/smi2021_v4l2.c:327:10: error: ‘V4L2_FL_USE_FH_PRIO’ undeclared (first use in this function)
  set_bit(V4L2_FL_USE_FH_PRIO, &smi2021->vdev.flags);
          ^
drivers/media/usb/smi2021/smi2021_v4l2.c:327:10: note: each undeclared identifier is reported only once for each function it appears in

I'm running openSUSE 13.1 x64 with all latest updates

Jon Arne Jørgensen

unread,
Sep 28, 2014, 10:59:44 AM9/28/14
to easycap-so...@googlegroups.com
I knew that would happen...

I will look into it :)
>>> >>>> email to easycap-somagic-...@googlegroups.com.
>>> >>>> For more options, visit https://groups.google.com/d/optout.
>>> >>
>>> >> --
>>> >> You received this message because you are subscribed to the Google
>>> >> Groups
>>> >> "easycap-somagic-linux" group.
>>> >> To unsubscribe from this group and stop receiving emails from it, send
>>> >> an
>>> >> email to easycap-somagic-...@googlegroups.com.
>>> >> For more options, visit https://groups.google.com/d/optout.
>>> >
>>> >
>>> >
>>> > --
>>> > Jonarne
>>> > http://jonarne.no
>>>
>>>
>>>
>>> --
>>> Jonarne
>>> http://jonarne.no
>
> --
> You received this message because you are subscribed to the Google Groups
> "easycap-somagic-linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to easycap-somagic-...@googlegroups.com.

Jon Arne Jørgensen

unread,
Sep 28, 2014, 11:11:09 AM9/28/14
to easycap-so...@googlegroups.com
That flag is deprecated, and i don't think my driver needed it anyway.
Just remove the whole set_bit line, and recompile.

I'm trying to compile it my self now.

Will update the git repo when I'm sure the build works :)

On Sun, Sep 28, 2014 at 4:59 PM, Jon Arne Jørgensen
--
Jonarne
http://jonarne.no

tosiara

unread,
Sep 28, 2014, 11:56:27 AM9/28/14
to easycap-so...@googlegroups.com
After commenting - compiled fine
However I got "NULL pointer dereference" after unplugging. Posted the details as separate thread
>>>> >>>> For more options, visit https://groups.google.com/d/optout.
>>>> >>
>>>> >> --
>>>> >> You received this message because you are subscribed to the Google
>>>> >> Groups
>>>> >> "easycap-somagic-linux" group.
>>>> >> To unsubscribe from this group and stop receiving emails from it, send
>>>> >> an
>>>> >> For more options, visit https://groups.google.com/d/optout.
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Jonarne
>>>> > http://jonarne.no
>>>>
>>>>
>>>>
>>>> --
>>>> Jonarne
>>>> http://jonarne.no
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "easycap-somagic-linux" group.
>> To unsubscribe from this group and stop receiving emails from it, send an

mahmoud sherif

unread,
Sep 28, 2014, 1:59:14 PM9/28/14
to easycap-so...@googlegroups.com
Thank You Jon, I will try and feed back the results
>>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "easycap-somagic-linux" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
Message has been deleted

mahmoud sherif

unread,
Sep 29, 2014, 3:42:00 PM9/29/14
to easycap-so...@googlegroups.com
HI Jon, I Compiled the kernel module with success
This is the dmesg when I plug the easycap:
[ 6004.048297] usb 1-1: new high-speed USB device number 17 using ehci-pci
[ 6004.390630] usb 1-1: New USB device found, idVendor=1c88, idProduct=0007
[ 6004.390634] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6004.390635] usb 1-1: Product: SM-USB 007
[ 6004.390637] usb 1-1: Manufacturer: Somagic, Inc.
[ 6004.390638] usb 1-1: SerialNumber: SMBL007
[ 6004.392314] usb 1-1: Looking for: smi2021_3f.bin
[ 6004.392332] usb 1-1: Looking for: smi2021_3e.bin
[ 6004.392340] usb 1-1: Looking for: smi2021_3c.bin
[ 6004.392366] usb 1-1: Found firmware for 0x003c
[ 6004.643799] usb 1-1: USB disconnect, device number 17
[ 6005.060689] usb 1-1: new high-speed USB device number 18 using ehci-pci
[ 6005.241395] usb 1-1: New USB device found, idVendor=1c88, idProduct=003c
[ 6005.241401] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6005.241405] usb 1-1: Product: SMI Grabber DEV
[ 6005.241408] usb 1-1: Manufacturer:  Somagic, Inc. 
[ 6005.241410] usb 1-1: SerialNumber: SMIGRABBER9876543210
[ 6005.358597] saa7115 0-004a: gm7113c found @ 0x94 (smi2021)
[ 6005.472427] smi2021 1-1:1.0: Somagic Easy-Cap Video Grabber

And here it is when I unplug the easycap:
[ 6087.709253] usb 1-1: USB disconnect, device number 18

And here is the output of ls /dev/video*:
/dev/video0

All things are fine, now when I issue mplayer command to show the output of the device I only got a green frames no data and here is the output of mplayer:

mande@linux-2lpt:~> mplayer tv:// -tv device=/dev/video0
MPlayer -4.8 (C) 2000-2014 MPlayer Team                                                                                                       
mplayer: could not connect to socket                                                                                                          
mplayer: No such file or directory                                                                                                            
Failed to open LIRC support. You will not be able to use your remote control.                                                                 
                                                                                                                                              
Playing tv://.                                                                                                                                
TV file format detected.                                                                                                                      
Selected driver: v4l2                                                                                                                         
 name: Video 4 Linux 2 input                                                                                                                  
 author: Martin Olschewski <olsch...@zpr.uni-koeln.de>                                                                                      
 comment: first try, more to come ;-)                                                                                                         
Selected device: smi2021                                                                                                                      
 Capabilities:  video capture  read/write  streaming
 supported norms: 0 = NTSC; 1 = NTSC-M; 2 = NTSC-M-JP; 3 = NTSC-M-KR; 4 = NTSC-443; 5 = PAL; 6 = PAL-BG; 7 = PAL-H; 8 = PAL-I; 9 = PAL-DK; 10 = PAL-M; 11 = PAL-N; 12 = PAL-Nc; 13 = PAL-60; 14 = SECAM; 15 = SECAM-B; 16 = SECAM-G; 17 = SECAM-H; 18 = SECAM-DK; 19 = SECAM-L; 20 = SECAM-Lc;
 inputs: 0 = Composite; 1 = S-Video;
 Current input: 0
 Current format: UYVY
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 720x576 => 720x576 Packed UYVY  [zoom]
Selected video codec: [rawuyvy] vfm: raw (RAW UYVY)
==========================================================================
Audio: no sound
Starting playback...
v4l2: select timeout
V:   0.0   1/  1 ??% ??% ??,?% 0 0
v4l2: select timeout
V:   0.0   3/  3 ??% ??% ??,?% 0 0
v4l2: select timeout
V:   0.0   5/  5 ??% ??% ??,?% 0 0
v4l2: select timeout
V:   0.0   8/  8 ??% ??% ??,?% 0 0
v4l2: select timeout
V:   0.0  11/ 11 ??% ??% ??,?% 0 0

what's wrong?

mahmoud sherif

unread,
Sep 30, 2014, 3:42:26 PM9/30/14
to easycap-so...@googlegroups.com
where are you guys? I need help

calamari

unread,
Sep 30, 2014, 3:51:11 PM9/30/14
to easycap-so...@googlegroups.com
Mahmoud,

Thank you for taking an interest in our project. As you may have noticed, this is an open source project run solely by volunteers. As such, you cannot expect nor demand timely support. For that matter you cannot demand any kind of support (please refer to the terms of the GPL v2).

This project has NOT been abandoned. If we have not replied, that means we have not have time to reply, or we have other life obligations that prevented us from doing so.

You must be patient. Maybe you can find an answer or solution yourself. If you can, you are welcome to share it to contribute to the project.

Jeff

mahmoud sherif

unread,
Sep 30, 2014, 5:55:27 PM9/30/14
to easycap-so...@googlegroups.com
ok, Thank you for your answer calamari and no problem, I will be patient and I'm sorry bro

Jon Arne Jørgensen

unread,
Oct 1, 2014, 6:13:34 AM10/1/14
to easycap-so...@googlegroups.com
My best guess to why it's not working is that you have connected your
video source to the S-VIDEO input of your easycap dongle.
The driver expects signal on the CVBS input by default. You need to
tell mplayer to use the S-VIDEO input.
> --
> You received this message because you are subscribed to the Google Groups
> "easycap-somagic-linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to easycap-somagic-...@googlegroups.com.
Message has been deleted

mahmoud sherif

unread,
Oct 1, 2014, 4:12:11 PM10/1/14
to easycap-so...@googlegroups.com
Finally I solved it, it's because I use Vmware , After installing Opensuse on my pc every thing worked fine without any issues expect incomplete frames drop issue, frames are smoth and sharp.
Thank You Jon for your answer, and I hope you solve incomplete frames drop issue soon.
Reply all
Reply to author
Forward
0 new messages