All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: ian@pickworth.me.uk
Cc: Linux and Kernel Video <video4linux-list@redhat.com>
Subject: Re: gspca_spca561/gspca-main on 2.6.27-gentoo: webcam doesn't work, and udev attribute missing
Date: Sun, 19 Oct 2008 19:51:54 +0200	[thread overview]
Message-ID: <48FB73BA.1040608@hhs.nl> (raw)
In-Reply-To: <48FB6377.40707@pickworth.me.uk>

Ian Pickworth wrote:
> I'm having a go at the latest hg (pulled at 16:00 today - 19 October).
> This is because I previously used the gspcav1-20071224 drivers for my
> webcam, and these no longer compile under 2.6.27, so have to change.
> 
> The two modules that are relevant are gspca_main and gspca_spca561
> 
> Two problems. First is that my udev rule for the web cam no longer
> works. Checking the device attributes, it shows:
> 

<snip>

> In the "old" driver in a kernel 2.6.26, there was an attribute that
> showed this
> 	ATTR{model}=="Logitech QuickCam EC"
> which allowed various applications to display its full device name. Now
> they can just show "Camera" - which is sort of no good if you have more
> than one.

There are 2 things here which you seem to be mixing:
1) the udev ATTR{model} is no longer getting set, which is interesting, do you
know where udev gets this from / what udev expects from a driver to provide
this?

2) The string shown in the application to identify a Camera. Applications
should show the string provided by the driver through the QUERYCAP ioctl, this 
string indeed has changed. We used to have a list of hardcoded strings matched 
to USB-ID's, this however was wrong as many webcam bridges have only one 
usb-id, yet get used in many different cams. So now we show the string provided 
by the cam itself over USB (see dmesg after plug in to see if your cam provides 
one). If the cam manufacturer has been cheap and didn't put an eeprom in the 
cam to provide an USB model string, then we use a generic string in the form 
of: "USB Camera (093a:2476)"

> Second problem is the biggy. The camera doesn't work :-(.

Which is to be expected, the gspca561 bridge delivers frames in a custom 
huffman compressed bayer format. The old gspca driver did format conversion 
inside the kernel. Which is a very bad thing to do and thus has been removed in 
the new version.

Gstreamer, or almost any other app / library for that matter does not know how 
to handle this format. For this I've written libv4l:
http://hansdegoede.livejournal.com/3636.html

Get the latest version here:
http://people.atrpms.net/~hdegoede/libv4l-0.5.1.tar.gz

Then read:
http://moinejf.free.fr/gspca_README.txt
or the included README for install instructions.

As described in the documents you can make existing applications use this lib 
with an LD_PRELOAD loadable wrapper.

FOSS applications can be easily adapted to instead use the library directly, a 
coordinated cross distro effort is underway to make this happen (including 
pushing patches upstream), see:
http://linuxtv.org/v4lwiki/index.php/Libv4l_Progress

You can find patches for quite a few applications here. Help in patching others 
is very much welcome! If you need some quick instructions what to change 
exactly let me know.

Regards,

Hans

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  reply	other threads:[~2008-10-19 17:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-19 16:42 gspca_spca561/gspca-main on 2.6.27-gentoo: webcam doesn't work, and udev attribute missing Ian Pickworth
2008-10-19 17:51 ` Hans de Goede [this message]
2008-10-19 18:50   ` Ian Pickworth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48FB73BA.1040608@hhs.nl \
    --to=j.w.r.degoede@hhs.nl \
    --cc=ian@pickworth.me.uk \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.