Bug 18472 - Virtual Video Driver is removed
Summary: Virtual Video Driver is removed
Status: RESOLVED INVALID
Alias: None
Product: v4l-dvb
Classification: Unclassified
Component: v4l-other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: v4l-other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-14 13:41 UTC by Christos Stamatopoulos
Modified: 2010-09-16 14:39 UTC (History)
2 users (show)

See Also:
Kernel Version: >2.6.34
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Christos Stamatopoulos 2010-09-14 13:41:47 UTC
In kernels >2.6.34 the Virtual Video Driver(vivi) has been removed. Unfortunately there are drivers that actually depend on it i.e. webcam drivers.

Is there any reason of its removal and/or is it planned to be put back ?

Thank you in advance
Comment 1 Mauro Carvalho Chehab 2010-09-14 16:42:56 UTC
vivi were not removed. Also, no drivers should depend on it. It is just a test driver to be used by applicaton developers and to help people to develop new drivers. What webcam driver you're referring that are dependent on vivi?
Comment 2 Christos Stamatopoulos 2010-09-14 22:45:35 UTC
Could you please point me to where they are cause I cannot see it in neither .35 or .36. All the Ricoh webcams (r5u870) need it to compile properly. Probably you are right on saying that no drivers should depend on it but what can we do!

Thank you once again
Comment 3 Mauro Carvalho Chehab 2010-09-15 04:14:29 UTC
It is at the same place as before:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/media/video/vivi.c;h=e17b6fee046bb9ee616aadbade77dcbbfe32d315;hb=HEAD

This driver doesn't support r5u870 webcams (nor any other webcam). The proper solution is to submit a driver for r5u870 to be included in kernel, if the uvc driver doesn't support it already.
Comment 4 Christos Stamatopoulos 2010-09-15 04:54:08 UTC
I have also checked the drivers before sending this bug(prolly not) but i cant find in make menuconfig and adding it manually to the .config (CONFIG_VIDEO_VIVI=m or y) is not working. I am aware that the VIVI does not actually support r5u870 but the drivers r5u870(http://www.palmix.org/r5u870-en.html) do and they actually need it. Have added some #include that was needed in that driver to make it work for kernels >2.6.34 and everything was fine but from 2.6.35 and onwards i get problems cause i cannot get vivi compiled with my config and thus driver compilation fails.

UVC actually supports some of the Ricoh, of course you need some userspace tools to upload the firmware to the camera, but not the WDM versions of them. Since i am sort of providing ebuilds to the gentoo people for this package/driver (http://bugs.gentoo.org/show_bug.cgi?id=176824) i am trying to have everything sorted so that everyone can use their webcam.

Thank you again for your time and sorry for the trouble.
Comment 5 Mauro Carvalho Chehab 2010-09-15 09:51:53 UTC
I downloaded the driver from:
http://www.palmix.org/download/r5u870_k2.6.30_amd64.tar.bz2

I didn't see anything there that could be dependent on vivi.
$ grep -i vivi  * */*
<empty>
Yet, the source code didn't compile for me, with a 2.6.32 kernel, due to several api changes that happened since 23/06/2009.

That's the bad thing on non submitting a driver upstream: it gets outdated, as time goes by, and it stops compiling. Also, it contains several bad practices inside it, *and* it conflicts with an existing driver (uvc).

The proper solution is to contact Laurant Pinchart (uvc driver maintainer) and work with him, in order to add support for firmware loading for Ricoh cameras, and add the missing WDM versions on his driver (assuming that those WDM cameras are uvc). If the WDM cameras are not UVC, then you need to submit a separate driver for ricoh-wdm.
Comment 6 Christos Stamatopoulos 2010-09-15 13:27:43 UTC
From my experience I and various other gentoo users did not have problem with compiling it. I would say that the reason of the failure in compilation is due to the bad documentation of the drivers... I am definetly sure that if you compile your kernel with

make CONFIG_VIDEOBUF_DMA_SG=m CONFIG_VIDEOBUF_GEN=m CONFIG_VIDEOBUF_VMALLOC=m CONFIG_VIDEO_VIVI=m 

and then compile the drivers it will all be fine(VIVI is not really needed as i explain in PS2).

As a sidenote i was able to compile VIVI with the above way that i noted but i still cannot see it the menuconfig.I wonder why is that?

I totally agree with you on what you said about not being sent upstream...Unfortunately the main developers of the drivers stopped working on it long time on it and then some other people (that website where you downloaded the source) made it work with 2.6.30 and after that also stopped working on it. None of them seemed to be willing to send it upstream. As for me i am just trying to help myself and other users, to the extent of my knowledge, so that we have working webcams. I know that it conflicts with UVC and of course as it gets outdated more problems are gonna appear(see below *on the PS).

I wish i had the knowledge but i think that i am not at that level(or lets say I never coded stuff interfacing with hardware nor generally for the linux kernel) to work with Laurant but if you think that its possible I'll give it a try and do my best to sort something out with him so that the whole community can benefit from it.

I think i have taken enough of your time so I will say thanks one more time. If possible please can you answer me why the VIVI is not visible on the menuconfig.

PS. As i was able to compile the VIVI i was able to actually compile or lets say to a further step in compiling r5u870 in >2.6.34 to find out that the 
usb_buffer_alloc was changed to usb_alloc_coherentand the usb_buffer_free to usb_free_coherent. As you mentionned outdated packages will have more problems by time. After changing that with sed i was able to get it compile and a working camera ;)

PS2. I had a look as well about the VIVI cause myself as well could not find anything in the code and i think it was just a relic of the previous people taking care of the ebuild that thought it was easier to make it depend on VIVI as it bring in the actual stuff that is needed such as CONFIG_VIDEOBUF_DMA_SG=m CONFIG_VIDEOBUF_GEN=m CONFIG_VIDEOBUF_VMALLOC=m 

PS3. Thanks again
Comment 7 Mauro Carvalho Chehab 2010-09-15 13:38:16 UTC
It is probably because you don't have all dependencies by default. Vivi now depends on some fonts that may not be compiled by default on your distro. All you need to do is too look at Kconfig and check for the requirements (or use a graphical installation).

I think you should really contact Laurent, as things will change even more, and you'll have more troubles trying to keep this out of tree than to work to make it to be integrated in kernel.
Comment 8 Christos Stamatopoulos 2010-09-15 13:50:48 UTC
Ah yeah i read that in the changelog ("Use the kernel's built-in vga8x16 font instead of our own") but i did not think of being dependent on it more like the opposite, that it would enable that font hehe.

My intention of course is not to keep it out of tree and thus i will contact Laurant to work on it. As said i was not the main dev so i was kind of reluctant to do so but you have given me motivation ;)

I guess i should be closing this bug as resolved invalid. Should you not agree feel free to change it.

Thanks you!
Comment 9 Laurent Pinchart 2010-09-16 14:03:33 UTC
(In reply to comment #5)
> I downloaded the driver from:
> http://www.palmix.org/download/r5u870_k2.6.30_amd64.tar.bz2
> 
> I didn't see anything there that could be dependent on vivi.
> $ grep -i vivi  * */*
> <empty>
> Yet, the source code didn't compile for me, with a 2.6.32 kernel, due to
> several api changes that happened since 23/06/2009.
> 
> That's the bad thing on non submitting a driver upstream: it gets outdated,
> as
> time goes by, and it stops compiling. Also, it contains several bad practices
> inside it, *and* it conflicts with an existing driver (uvc).
> 
> The proper solution is to contact Laurant Pinchart (uvc driver maintainer)
> and
> work with him, in order to add support for firmware loading for Ricoh
> cameras,
>
> and add the missing WDM versions on his driver (assuming that those WDM
> cameras are uvc). If the WDM cameras are not UVC, then you need to submit a
> separate driver for ricoh-wdm.

The WDM models are not UVC-compatible. Worse than that, Some non-WDM models that should be UVC compatible expose a buggy UVC API and still answer vendor request using the proprietary Ricoh WDM protocol, or just implement a the very small subset of the UVC API that is needed by the Ricoh Windows driver. For all those webcams, a proprietary protocol driver is needed. I can blacklist them in the uvcvideo driver if I get a list of them.
Comment 10 Christos Stamatopoulos 2010-09-16 14:39:04 UTC
And i was about to contact you Laurent about this matter so thanks for jumping over here to share your knowledge. 

The best i can do to help you is provide this list http://bitbucket.org/ahixon/r5u87x/src/tip/docs/model_matrix.txt
with any uncertainty that comes with it of course.

A driver as mentionned above is existent for the Ricoh cameras and pretty much supports the majority, if not all, of them (even the WDM). What would be the best action to bring it in the tree or anything else so everyone is benefited. Now i am able to compile and use the driver even with .36 kernel without any issue i'd say.

Note You need to log in before you can comment on or make changes to this bug.