* [PATCH 1/2] [media] uvcvideo: add a new quirk UVC_QUIRK_SINGLE_ISO
@ 2014-10-10 18:41 John Crispin
2014-10-10 18:41 ` [PATCH 2/2] [media] uvcvideo: add support for iPassion iP2970 John Crispin
2014-10-11 12:03 ` [PATCH 1/2] [media] uvcvideo: add a new quirk UVC_QUIRK_SINGLE_ISO Laurent Pinchart
0 siblings, 2 replies; 4+ messages in thread
From: John Crispin @ 2014-10-10 18:41 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linux-media
The following patch adds the usb ids for the iPassion chip. This chip is found
on D-Link DIR-930 IP cameras. For them to work this patch needs to be applied.
I am almost certain that this is the incorrect fix. Could someone shed a bit of
light on how i should really implement the fix ?
Signed-off-by: John Crispin <blogic@openwrt.org>
---
drivers/media/usb/uvc/uvc_video.c | 2 ++
drivers/media/usb/uvc/uvcvideo.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index 9144a2f..61381fd 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -1495,6 +1495,8 @@ static int uvc_init_video_isoc(struct uvc_streaming *stream,
if (npackets == 0)
return -ENOMEM;
+ if (stream->dev->quirks & UVC_QUIRK_SINGLE_ISO)
+ npackets = 1;
size = npackets * psize;
for (i = 0; i < UVC_URBS; ++i) {
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index b1f69a6..b6df4f8 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -147,6 +147,7 @@
#define UVC_QUIRK_FIX_BANDWIDTH 0x00000080
#define UVC_QUIRK_PROBE_DEF 0x00000100
#define UVC_QUIRK_RESTRICT_FRAME_RATE 0x00000200
+#define UVC_QUIRK_SINGLE_ISO 0x00000400
/* Format flags */
#define UVC_FMT_FLAG_COMPRESSED 0x00000001
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] [media] uvcvideo: add support for iPassion iP2970
2014-10-10 18:41 [PATCH 1/2] [media] uvcvideo: add a new quirk UVC_QUIRK_SINGLE_ISO John Crispin
@ 2014-10-10 18:41 ` John Crispin
2014-10-11 12:03 ` [PATCH 1/2] [media] uvcvideo: add a new quirk UVC_QUIRK_SINGLE_ISO Laurent Pinchart
1 sibling, 0 replies; 4+ messages in thread
From: John Crispin @ 2014-10-10 18:41 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linux-media
This camera chip can be found on D-Link DIR-930 IP cameras.
Signed-off-by: John Crispin <blogic@openwrt.org>
---
drivers/media/usb/uvc/uvc_driver.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index f8135f4..abf8bf2 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2486,6 +2486,17 @@ static struct usb_device_id uvc_ids[] = {
.bInterfaceProtocol = 0,
.driver_info = UVC_QUIRK_PROBE_MINMAX
| UVC_QUIRK_IGNORE_SELECTOR_UNIT },
+ /* iPassion iP2970 */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x1B3B,
+ .idProduct = 0x2970,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_PROBE_MINMAX
+ | UVC_QUIRK_STREAM_NO_FID
+ | UVC_QUIRK_SINGLE_ISO },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, 0) },
{}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] [media] uvcvideo: add a new quirk UVC_QUIRK_SINGLE_ISO
2014-10-10 18:41 [PATCH 1/2] [media] uvcvideo: add a new quirk UVC_QUIRK_SINGLE_ISO John Crispin
2014-10-10 18:41 ` [PATCH 2/2] [media] uvcvideo: add support for iPassion iP2970 John Crispin
@ 2014-10-11 12:03 ` Laurent Pinchart
2014-10-16 9:16 ` John Crispin
1 sibling, 1 reply; 4+ messages in thread
From: Laurent Pinchart @ 2014-10-11 12:03 UTC (permalink / raw)
To: John Crispin; +Cc: linux-media
Hi John,
On Friday 10 October 2014 20:41:12 John Crispin wrote:
> The following patch adds the usb ids for the iPassion chip. This chip is
> found on D-Link DIR-930 IP cameras. For them to work this patch needs to be
> applied. I am almost certain that this is the incorrect fix. Could someone
> shed a bit of light on how i should really implement the fix ?
First of all, could you explain how the camera misbehaves without this patch
set ?
> Signed-off-by: John Crispin <blogic@openwrt.org>
> ---
> drivers/media/usb/uvc/uvc_video.c | 2 ++
> drivers/media/usb/uvc/uvcvideo.h | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/drivers/media/usb/uvc/uvc_video.c
> b/drivers/media/usb/uvc/uvc_video.c index 9144a2f..61381fd 100644
> --- a/drivers/media/usb/uvc/uvc_video.c
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -1495,6 +1495,8 @@ static int uvc_init_video_isoc(struct uvc_streaming
> *stream, if (npackets == 0)
> return -ENOMEM;
>
> + if (stream->dev->quirks & UVC_QUIRK_SINGLE_ISO)
> + npackets = 1;
> size = npackets * psize;
>
> for (i = 0; i < UVC_URBS; ++i) {
> diff --git a/drivers/media/usb/uvc/uvcvideo.h
> b/drivers/media/usb/uvc/uvcvideo.h index b1f69a6..b6df4f8 100644
> --- a/drivers/media/usb/uvc/uvcvideo.h
> +++ b/drivers/media/usb/uvc/uvcvideo.h
> @@ -147,6 +147,7 @@
> #define UVC_QUIRK_FIX_BANDWIDTH 0x00000080
> #define UVC_QUIRK_PROBE_DEF 0x00000100
> #define UVC_QUIRK_RESTRICT_FRAME_RATE 0x00000200
> +#define UVC_QUIRK_SINGLE_ISO 0x00000400
>
> /* Format flags */
> #define UVC_FMT_FLAG_COMPRESSED 0x00000001
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] [media] uvcvideo: add a new quirk UVC_QUIRK_SINGLE_ISO
2014-10-11 12:03 ` [PATCH 1/2] [media] uvcvideo: add a new quirk UVC_QUIRK_SINGLE_ISO Laurent Pinchart
@ 2014-10-16 9:16 ` John Crispin
0 siblings, 0 replies; 4+ messages in thread
From: John Crispin @ 2014-10-16 9:16 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linux-media
Hi Laurent,
On 11/10/2014 14:03, Laurent Pinchart wrote:
> Hi John,
>
> On Friday 10 October 2014 20:41:12 John Crispin wrote:
>> The following patch adds the usb ids for the iPassion chip. This chip is
>> found on D-Link DIR-930 IP cameras. For them to work this patch needs to be
>> applied. I am almost certain that this is the incorrect fix. Could someone
>> shed a bit of light on how i should really implement the fix ?
> First of all, could you explain how the camera misbehaves without this patch
> set ?
good question, i created this patch 2 years ago. normally people will
install mjpeg-streamer on these units and that just gave black frames if
i remember correctly. digging through the GPL drop i found this patch.
i will need a couple of days to get my test unit back. once i have it
here i will do some tests and the let you know the exact symptoms.
John
>> Signed-off-by: John Crispin <blogic@openwrt.org>
>> ---
>> drivers/media/usb/uvc/uvc_video.c | 2 ++
>> drivers/media/usb/uvc/uvcvideo.h | 1 +
>> 2 files changed, 3 insertions(+)
>>
>> diff --git a/drivers/media/usb/uvc/uvc_video.c
>> b/drivers/media/usb/uvc/uvc_video.c index 9144a2f..61381fd 100644
>> --- a/drivers/media/usb/uvc/uvc_video.c
>> +++ b/drivers/media/usb/uvc/uvc_video.c
>> @@ -1495,6 +1495,8 @@ static int uvc_init_video_isoc(struct uvc_streaming
>> *stream, if (npackets == 0)
>> return -ENOMEM;
>>
>> + if (stream->dev->quirks & UVC_QUIRK_SINGLE_ISO)
>> + npackets = 1;
>> size = npackets * psize;
>>
>> for (i = 0; i < UVC_URBS; ++i) {
>> diff --git a/drivers/media/usb/uvc/uvcvideo.h
>> b/drivers/media/usb/uvc/uvcvideo.h index b1f69a6..b6df4f8 100644
>> --- a/drivers/media/usb/uvc/uvcvideo.h
>> +++ b/drivers/media/usb/uvc/uvcvideo.h
>> @@ -147,6 +147,7 @@
>> #define UVC_QUIRK_FIX_BANDWIDTH 0x00000080
>> #define UVC_QUIRK_PROBE_DEF 0x00000100
>> #define UVC_QUIRK_RESTRICT_FRAME_RATE 0x00000200
>> +#define UVC_QUIRK_SINGLE_ISO 0x00000400
>>
>> /* Format flags */
>> #define UVC_FMT_FLAG_COMPRESSED 0x00000001
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-16 9:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-10 18:41 [PATCH 1/2] [media] uvcvideo: add a new quirk UVC_QUIRK_SINGLE_ISO John Crispin
2014-10-10 18:41 ` [PATCH 2/2] [media] uvcvideo: add support for iPassion iP2970 John Crispin
2014-10-11 12:03 ` [PATCH 1/2] [media] uvcvideo: add a new quirk UVC_QUIRK_SINGLE_ISO Laurent Pinchart
2014-10-16 9:16 ` John Crispin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).