# usb webcam gadget

## EasterParade

new in kernel 2.6.39-r1.

What webcam should it be used for?

----------

## NeddySeagoon

transsib,

Long time no see.  I hope you are yours are well.

We need to know the Vendor and Device IDs of the device.  The output of lsusb will show that.

----------

## EasterParade

Hi NeddySeagoon,

nice to see you again   :Very Happy: 

I hope you are doing fine and all´s well. 

I am just fine; I have been to the USA for three weeks. Always love to be

on that side of the Atlantic, mainly Big Sky Country, Idaho, Oregon and Washington.

Seen 6 black bears, no grizzly though.   :Very Happy: 

The curent config works for my Logitech Pro HD C 910.

Even usb-audio works fine (except in skype where I get 

a monster voice)

```
Bus 001 Device 002: ID 046d:0821 Logitech, Inc.
```

I am merely curious as to what kind of webcam this new

kernel driver should be used for.

The idea of combining video and audio in only one driver 

for a webcam is good I think.

Regards

transsib

----------

## NeddySeagoon

transsib,

I'm getting better thanks. I've had a very heavy summer cold.

That webcam uses the kernel uvc driver for the video and snd-usb-audio for the mic, if it has one.

Why would you want to combine the two drivers into a single driver?

That would mean snd-usb-audio whould have to be maintained in lots of different webcam drivers.

Your 'monster voice' in Skype is probably an artefact of Skypes audio compression, rather than anything to do with the kernel module.

----------

## cach0rr0

i think what he's saying is this: he's stumbled upon a new driver in the kernel, and is wondering what it's for

transsib: what's the symbol name for that driver? if you hit Help on menuconfig it should show you, and say something like CONFIG_???_?????

----------

## EasterParade

@NeddySeagoon, nothing is worse than a summer cold.   :Sad: 

@cach0rr0, what`s Ronnie doing in the glory of red ?   :Cool: 

O.k., let`s see

```
The Webcam Gadget acts as a composite USB Audio and Video Class                                                                       

  device. It provides a userspace API to process UVC control requests                                                                    

   and stream video data to the host.                                                                                                      

                                                                                                                                           

   Say "y" to link the driver statically, or "m" to build a                                                                                

  dynamically linked module called "g_webcam".                                                                                            

                                                                                                                                           

   Symbol: USB_G_WEBCAM [=n]                                                                                                               

 │ Type  : tristate                                                                                                                        

   Prompt: USB Webcam Gadget                                                                                                          │   

     Defined at drivers/usb/gadget/Kconfig:1014                                                                                            

 │   Depends on: <choice> && VIDEO_DEV [=m]                                                                                               

  │   Location:                                                                                                                             

  │     -> Device Drivers                                                                                                                   

  │       -> USB support (USB_SUPPORT [=y])                                                                                                 

  │         -> USB Gadget Support (USB_GADGET [=m])                                                                                         

  │           -> USB Gadget Drivers (<choice> [=m])   
```

That`s the help text from make menuconfig.

My Logitech works with two drivers: uvc and usb-audio. They must work

together ( and they do ).

Now I find a driver in usb gadgets, that has both video and audio in one

driver, not separately, just like the device itself, the webcam, that has

a mic and video capture function.

Doesn`t it seem logical to combine both functions in just one driver than

forcing two drivers to work together.

The help text does not tell me, what make and model needs it. 

I wouldn`t change my arrangement now as it works just fine

( skype is a jerk if you ask me and I know many people who have the

same issue in skype but nowhere else - I don`t care much for that )

I only thought one of you might know where the newcomer would be useful

as I like to explore a new kernel.

----------

## NeddySeagoon

transsib,

 *kernel help wrote:*   

> It provides a userspace API to process UVC control requests 

 is a good hint.

UVC is USB Video Class, so it works with any USB device compliant with the Video Class specification.

It looks like a step in the direction of moving some things from the kernel to user space.

----------

## EasterParade

 *Quote:*   

> It looks like a step in the direction of moving some things from the kernel to user space.

 

So it may be some kind of blueprint for the kernel thinktank or a working basis

for future developements?

----------

## cach0rr0

 *transsib wrote:*   

> 
> 
> So it may be some kind of blueprint for the kernel thinktank or a working basis for future developements?

 

something along those lines. Basically, for the time being, it provides the userspace API that various sundry applications might use to interact with the webcam; however, I would be surprised if any of the userspace tools have yet been updated to make use of it. 

basically, it's an additional protocol for this - http://www.linux-usb.org/gadget/ - that's to be used for webcams

 *transsib wrote:*   

> 
> 
> @cach0rr0, what`s Ronnie doing in the glory of red ?
> 
> 

 

doing his best Che impression of course.

----------

## EasterParade

Thank you for the input the two of you. And NeddySeagoon, see you around.   :Very Happy: 

 *Quote:*   

> 
> 
> transsib hat Folgendes geschrieben:
> 
> @cach0rr0, what`s Ronnie doing in the glory of red ?
> ...

 

Yep, it certainly fits to him.   :Laughing: 

----------

