renatoargh / easycap-somagic-linux

Automatically exported from code.google.com/p/easycap-somagic-linux
0 stars 0 forks source link

smi2012 will not install on fedora #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.running make in the comp;ile of the kernel
2.can't install module from the git clone - I keep getting 'invalid character' 
in module
3.

What is the expected output? see somagic.h
What do you see instead? nothing
if I try to complie the kernel the make command always crashed when it comes to 
the smi2012 section. This is the error I get:
----------------------
 CC [M]  drivers/media/usb/smi2021/smi2021_main.o
drivers/media/usb/smi2021/smi2021_main.c: In function ‘smi2021_set_mode’:
drivers/media/usb/smi2021/smi2021_main.c:47:2: error: implicit declaration of 
function ‘kzalloc’ [-Werror=implicit-function-declaration]
drivers/media/usb/smi2021/smi2021_main.c:47:20: warning: initialization makes 
pointer from integer without a cast [enabled by default]
drivers/media/usb/smi2021/smi2021_main.c:60:2: error: implicit declaration of 
function ‘kfree’ [-Werror=implicit-function-declaration]
drivers/media/usb/smi2021/smi2021_main.c: In function ‘smi2021_set_reg’:
drivers/media/usb/smi2021/smi2021_main.c:120:15: warning: assignment makes 
pointer from integer without a cast [enabled by default]
drivers/media/usb/smi2021/smi2021_main.c: In function ‘smi2021_get_reg’:
drivers/media/usb/smi2021/smi2021_main.c:178:15: warning: assignment makes 
pointer from integer without a cast [enabled by default]
drivers/media/usb/smi2021/smi2021_main.c: In function 
‘smi2021_setup_iso_transfer’:
drivers/media/usb/smi2021/smi2021_main.c:602:22: warning: assignment makes 
pointer from integer without a cast [enabled by default]
drivers/media/usb/smi2021/smi2021_main.c: In function ‘smi2021_usb_probe’:
drivers/media/usb/smi2021/smi2021_main.c:814:10: warning: assignment makes 
pointer from integer without a cast [enabled by default]
drivers/media/usb/smi2021/smi2021_main.c:882:2: error: ‘const struct 
v4l2_subdev_core_ops’ has no member named ‘s_std’
drivers/media/usb/smi2021/smi2021_main.c:882:2: error: ‘const struct 
v4l2_subdev_core_ops’ has no member named ‘s_std’
cc1: some warnings being treated as errors
make[4]: *** [drivers/media/usb/smi2021/smi2021_main.o] Error 1
make[3]: *** [drivers/media/usb/smi2021] Error 2
make[2]: *** [drivers/media/usb] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
-------------------

What version of the product are you using? On what operating system?
easycap dc60 on fedora 16, I've also tried fedora 20, smae problem.

Please provide any additional information below.
I've been slogging at this for days, maybe this device is impossible install, I 
don't know. I can do all the steps at 
https://code.google.com/p/easycap-somagic-linux/wiki/GettingStarted
and device initialises as 1c88:003f but I cannot get /dev/video0 no matter 
what. If anyone has a step-by-step for fedora that would be good.

Original issue reported on code.google.com by neuron...@gmail.com on 14 Jun 2014 at 10:44

GoogleCodeExporter commented 9 years ago
I'd encounter similar issue with kernel 3.16.3
kzalloc can be resolve by adding #include <linux/slab.h> at smi2021_main.c
while the s_std could be a v4l2 api changes?

Original comment by philip.b...@gmail.com on 25 Sep 2014 at 6:03

GoogleCodeExporter commented 9 years ago
manage to get it working with some patches smi2021_main.c, smi2021_v4l2.c

#1
change all:
    v4l2_device_call_all(&smi2021->v4l2_dev, 0, core, s_std,
to:
    v4l2_device_call_all(&smi2021->v4l2_dev, 0, video, s_std,
#2
change:
static int stop_streaming(struct vb2_queue *vq)
to:
static void stop_streaming(struct vb2_queue *vq)
*(and remove all return statements)

#3
change:
   smi2021->vb2q.timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
to:
   smi2021->vb2q.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;

my kernel version is 3.16.3

Original comment by philip.b...@gmail.com on 26 Sep 2014 at 2:09

GoogleCodeExporter commented 9 years ago
update: kernel 3.16.6 patch smi2021_audio.c

change:
    rc = snd_card_create(SNDRV_DEFAULT_IDX1, "smi2021 Audio", THIS_MODULE,
                0, &card);
to:
    rc = snd_card_new(smi2021->dev, SNDRV_DEFAULT_IDX1, "smi2021 Audio", THIS_MODULE,
                0, &card);

Original comment by philip.b...@gmail.com on 30 Oct 2014 at 6:13

GoogleCodeExporter commented 9 years ago
Hi
When building with the 3.18.1 kernel (on openSUSE), there is also one more 
change in smi2021_v4l2.c

-   set_bit(V4L2_FL_USE_FH_PRIO, &smi2021->vdev.flags);
+   set_bit(V4L2_FL_USES_V4L2_FH, &smi2021->vdev.flags);

Attached, please find the full patch I used for openSUSE 13.2 and openSUSE 
Tumbleweed.

Original comment by coyoteu...@gmail.com on 9 Jan 2015 at 4:44

Attachments: