Re: [Q] v4l buffer format inside isoc

2012-03-21 Thread Jean-Francois Moine
On Tue, 20 Mar 2012 21:05:13 -0300
Ezequiel García elezegar...@gmail.com wrote:

 I'm a little lost while writing a driver for an easycap device
 (saa7113 capture device).
 I have my isoc handler, and the isoc urb flying OK.
 I also have the videobuf2 queue setup (or at least I think so), and I 
 understand
 I need to call vb2_buffer_done() with a filled buffer.
 
 What I DON'T understand is how should I fill such buffer?
 I mean, what *format* comes inside the isoc buffer?
 
 Should I look at saa7113 datasheet?
 Should I base in em28xx?
 
 I'm sorry to ask such a generic question.
 Perhaps, someone cares enough to give me a hint.

Hi Ezequiel,

The saa7113 chip is (also?) handled by the gspca spca506 subdriver
which may be a base for your device.

In the gspca test tarball (see my site), I merged the spca506 code into
the spca505 for a webcam which may also do analog video capture. The
webcam works, but the analog video capture has never been tested.
Also, the gspca_main - subdriver interface for vidioc_s_input and
vidioc_s_std is not very clean.

So, you might include your device in this new spca505 subdriver,
forgetting about urb, isoc, videobuf.., and just concentrating on the
device management (image format, video controls, USB exchanges..). I am
ready to cleanup and extend the gspca subdriver interface to handle any
specific need.

-- 
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef |   http://moinejf.free.fr/
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Q] v4l buffer format inside isoc

2012-03-21 Thread Ezequiel García
2012/3/20 Andy Walls awa...@md.metrocast.net:


 Section 8.10 of the SAA7113 data sheet shows 16 data formats.  The
 interesting one for video is #15 Y:U:V 4:2:2.

Thanks. Perhaps, I should have done my homework.


 The EM28xx chip programming might rearrange some data, but I have no
 knowledge or experience with the eMPIA chips.

The chip is not eMPIA, but rather stk1160. It's a new chipset that's not
currently supported (there is a similar one in stk-webcam).
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Q] v4l buffer format inside isoc

2012-03-21 Thread Devin Heitmueller
2012/3/21 Ezequiel García elezegar...@gmail.com:
 2012/3/20 Andy Walls awa...@md.metrocast.net:


 Section 8.10 of the SAA7113 data sheet shows 16 data formats.  The
 interesting one for video is #15 Y:U:V 4:2:2.

Every USB bridge provides their raw video over isoc in a slightly
different format (not just in terms of the colorspace but also how to
read the isoc header to detect the start of video frame, which field
is being sent, etc).  Regarding the colorspace, in many cases it's
simply 16-bit YUYV, so I would probably start there.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Q] v4l buffer format inside isoc

2012-03-21 Thread Ezequiel García
Hi,

2012/3/21 Jean-Francois Moine moin...@free.fr:
 In the gspca test tarball (see my site), I merged the spca506 code into
 the spca505 for a webcam which may also do analog video capture. The
 webcam works, but the analog video capture has never been tested.
 Also, the gspca_main - subdriver interface for vidioc_s_input and
 vidioc_s_std is not very clean.

I'm not sure about this. The device is based on a new chip stk1160, and
according to Mauro a new driver is needed.

Since the chip supports tuner and other stuff besides video capture,
perhaps adding a new driver might ease future development.

Anyway, with saa7115 driver and the new videobuf2/v4l interface
the driver we'll be very minimal (I hope).

Thanks.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Q] v4l buffer format inside isoc

2012-03-21 Thread Ezequiel García
Hi,

2012/3/21 Devin Heitmueller dheitmuel...@kernellabs.com:

 Every USB bridge provides their raw video over isoc in a slightly
 different format (not just in terms of the colorspace but also how to
 read the isoc header to detect the start of video frame, which field
 is being sent, etc).  Regarding the colorspace, in many cases it's
 simply 16-bit YUYV, so I would probably start there.

Ok. So, it's not saa7113 related, but rather stk1160 related?

When there is no video, isoc urbs are received with actual length=4.
This is header right?
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Q] v4l buffer format inside isoc

2012-03-21 Thread Devin Heitmueller
2012/3/21 Ezequiel García elezegar...@gmail.com:
 Ok. So, it's not saa7113 related, but rather stk1160 related?

Yes.

 When there is no video, isoc urbs are received with actual length=4.
 This is header right?

I'm not sure what you mean by no video.  Do you have capture
disabled?  Are you saying that you didn't connect the video cable to
your input?  Most devices will continue to generate video frames over
isoc even if there is no actual video signal present.

But yeah, most of the solutions I have seen have every isoc packet
starting with a header that includes descriptors for things like start
of video frame, odd/even field, etc.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Q] v4l buffer format inside isoc

2012-03-21 Thread Ezequiel García
2012/3/21 Devin Heitmueller dheitmuel...@kernellabs.com:
 I'm not sure what you mean by no video.  Do you have capture
 disabled?  Are you saying that you didn't connect the video cable to
 your input?  Most devices will continue to generate video frames over
 isoc even if there is no actual video signal present.

I mean there is no signal at video input.


 But yeah, most of the solutions I have seen have every isoc packet
 starting with a header that includes descriptors for things like start
 of video frame, odd/even field, etc.


Thanks, I'll keep reading sources and info. Hope it gets me somewhere.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Q] v4l buffer format inside isoc

2012-03-20 Thread Ezequiel García
Hello,

I'm a little lost while writing a driver for an easycap device
(saa7113 capture device).
I have my isoc handler, and the isoc urb flying OK.
I also have the videobuf2 queue setup (or at least I think so), and I understand
I need to call vb2_buffer_done() with a filled buffer.

What I DON'T understand is how should I fill such buffer?
I mean, what *format* comes inside the isoc buffer?

Should I look at saa7113 datasheet?
Should I base in em28xx?

I'm sorry to ask such a generic question.
Perhaps, someone cares enough to give me a hint.

Thanks,
Ezequiel.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Q] v4l buffer format inside isoc

2012-03-20 Thread Andy Walls
On Tue, 2012-03-20 at 21:05 -0300, Ezequiel García wrote:
 Hello,
 
 I'm a little lost while writing a driver for an easycap device
 (saa7113 capture device).
 I have my isoc handler, and the isoc urb flying OK.
 I also have the videobuf2 queue setup (or at least I think so), and I 
 understand
 I need to call vb2_buffer_done() with a filled buffer.
 
 What I DON'T understand is how should I fill such buffer?
 I mean, what *format* comes inside the isoc buffer?
 
 Should I look at saa7113 datasheet?

Section 8.10 of the SAA7113 data sheet shows 16 data formats.  The
interesting one for video is #15 Y:U:V 4:2:2.

The EM28xx chip programming might rearrange some data, but I have no
knowledge or experience with the eMPIA chips.

Regards,
Andy

 Should I base in em28xx?
 
 I'm sorry to ask such a generic question.
 Perhaps, someone cares enough to give me a hint.
 
 Thanks,
 Ezequiel.
 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html