Re: 2.6.35-rc1 fails to boot: OOPS in ir_register_class
It's sad that this bug has gone into 2.6.35-rc1. I already reported it on 24.05.2010: http://article.gmane.org/gmane.linux.drivers.video-input-infrastructure/19564/ Unfortunately it didn't get any attention, which makes me a little bit depressive... What is the right way to report bugs if code is still in linux-next, but not in a release candidate? Should I make an entry in https://bugzilla.kernel.org/? Or ist this list the right place to report it? Greets, Martin -- 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: [PATCH -mmotm] media: ak881x needs slab.h
* Randy Dunlap randy.dun...@oracle.com wrote: From: Randy Dunlap randy.dun...@oracle.com Add slab.h to fix ak881x build: drivers/media/video/ak881x.c:265:error: implicit declaration of function 'kzalloc' drivers/media/video/ak881x.c:265:warning: assignment makes pointer from integer without a cast drivers/media/video/ak881x.c:283:error: implicit declaration of function 'kfree' Signed-off-by: Randy Dunlap randy.dun...@oracle.com Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de Cc: Mauro Carvalho Chehab mche...@infradead.org --- drivers/media/video/ak881x.c |1 + This build bug is now triggering in .35-rc1 as well. Ingo -- 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: question about v4l2_subdev
Hi, 1. Something first should call v4l2_device_register() on a v4l2_device object. (Typically there is only one v4l2_device object per bridge chip between the PCI, PCIe, or USB bus and the subdevices, even if that bridge chip has more than one I2C master implementation.) 2. Then, for subdevices connected to the bridge chip via I2C, something needs to call v4l2_i2c_new_subdev() with the v4l2_device pointer as one of the arguments, to get back a v4l2_subdevice instance pointer. 3. After that, v4l2_subdev_call() with the v4l2_subdev pointer as one of the arguments can be used to invoke the subdevice methods. TV Video capture drivers do this work themselves. Drivers using a camera framework may have the framework doing some of the work for them. Regards, Andy Is there a sensor driver which is using this method? To write the ov2640 driver I have just copied the ov7670.c file, and I didn't find the v4l2_i2c_new_subdev in it... Regards, Sedji -- 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
[patch] V4L/DVB: cpia_usb: remove unneeded variable
This is just a cleanup patch. We never use the udev variable so I have removed it. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/cpia_usb.c b/drivers/media/video/cpia_usb.c index ef1f893..58d193f 100644 --- a/drivers/media/video/cpia_usb.c +++ b/drivers/media/video/cpia_usb.c @@ -584,7 +584,6 @@ static void cpia_disconnect(struct usb_interface *intf) { struct cam_data *cam = usb_get_intfdata(intf); struct usb_cpia *ucpia; - struct usb_device *udev; usb_set_intfdata(intf, NULL); if (!cam) @@ -606,8 +605,6 @@ static void cpia_disconnect(struct usb_interface *intf) if (waitqueue_active(ucpia-wq_stream)) wake_up_interruptible(ucpia-wq_stream); - udev = interface_to_usbdev(intf); - ucpia-curbuff = ucpia-workbuff = NULL; vfree(ucpia-buffers[2]); -- 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: [PATCH] libv4l1: Move VIDIOCGFBUF into libv4l1
Hi, Thanks, I've applied your patch with one small fix, The else block at the end of was wrongly indented (one indent level too much) It is the else for the first if, not the second. Note the first if has a { at the end of the line, and the second does not, and the else starts with a }. Regards, Hans On 05/31/2010 10:03 AM, huzai...@redhat.com wrote: From: Huzaifa Sidhpurwalahuzai...@fedora-12.(none) Move VIDIOCGFBUF into libv4l1 Signed-off-by: Huzaifa Sidhpurwalahuzai...@redhat.com --- lib/libv4l1/libv4l1.c | 45 + 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/lib/libv4l1/libv4l1.c b/lib/libv4l1/libv4l1.c index e13feba..5b2dc29 100644 --- a/lib/libv4l1/libv4l1.c +++ b/lib/libv4l1/libv4l1.c @@ -804,6 +804,51 @@ int v4l1_ioctl(int fd, unsigned long int request, ...) break; } + case VIDIOCGFBUF: { + struct video_buffer *buffer = arg; + struct v4l2_framebuffer fbuf = { 0, }; + + result = v4l2_ioctl(fd, VIDIOC_G_FBUF, buffer); + if (result 0) + break; + + buffer-base = fbuf.base; + buffer-height = fbuf.fmt.height; + buffer-width = fbuf.fmt.width; + + switch (fbuf.fmt.pixelformat) { + case V4L2_PIX_FMT_RGB332: + buffer-depth = 8; + break; + case V4L2_PIX_FMT_RGB555: + buffer-depth = 15; + break; + case V4L2_PIX_FMT_RGB565: + buffer-depth = 16; + break; + case V4L2_PIX_FMT_BGR24: + buffer-depth = 24; + break; + case V4L2_PIX_FMT_BGR32: + buffer-depth = 32; + break; + default: + buffer-depth = 0; + } + + if (fbuf.fmt.bytesperline) { + buffer-bytesperline = fbuf.fmt.bytesperline; + if (!buffer-depth buffer-width) + buffer-depth = ((fbuf.fmt.bytesperline3) + + (buffer-width-1)) + / buffer-width; + } else { + buffer-bytesperline = + (buffer-width * buffer-depth + 7) 7; + buffer-bytesperline= 3; + } + } + default: /* Pass through libv4l2 for applications which are using v4l2 through libv4l1 (this can happen with the v4l1compat.so wrapper preloaded */ -- 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: [PATCH] libv4l1: Move VIDIOCGFBUF into libv4l1
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hans de Goede wrote: Hi, Thanks, I've applied your patch with one small fix, The else block at the end of was wrongly indented (one indent level too much) It is the else for the first if, not the second. Note the first if has a { at the end of the line, and the second does not, and the else starts with a }. Cool , i wonder why checkpatch.pl did not catch it :) Regards, Hans On 05/31/2010 10:03 AM, huzai...@redhat.com wrote: From: Huzaifa Sidhpurwalahuzai...@fedora-12.(none) Move VIDIOCGFBUF into libv4l1 Signed-off-by: Huzaifa Sidhpurwalahuzai...@redhat.com --- lib/libv4l1/libv4l1.c | 45 + 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/lib/libv4l1/libv4l1.c b/lib/libv4l1/libv4l1.c index e13feba..5b2dc29 100644 --- a/lib/libv4l1/libv4l1.c +++ b/lib/libv4l1/libv4l1.c @@ -804,6 +804,51 @@ int v4l1_ioctl(int fd, unsigned long int request, ...) break; } +case VIDIOCGFBUF: { +struct video_buffer *buffer = arg; +struct v4l2_framebuffer fbuf = { 0, }; + +result = v4l2_ioctl(fd, VIDIOC_G_FBUF, buffer); +if (result 0) +break; + +buffer-base = fbuf.base; +buffer-height = fbuf.fmt.height; +buffer-width = fbuf.fmt.width; + +switch (fbuf.fmt.pixelformat) { +case V4L2_PIX_FMT_RGB332: +buffer-depth = 8; +break; +case V4L2_PIX_FMT_RGB555: +buffer-depth = 15; +break; +case V4L2_PIX_FMT_RGB565: +buffer-depth = 16; +break; +case V4L2_PIX_FMT_BGR24: +buffer-depth = 24; +break; +case V4L2_PIX_FMT_BGR32: +buffer-depth = 32; +break; +default: +buffer-depth = 0; +} + +if (fbuf.fmt.bytesperline) { +buffer-bytesperline = fbuf.fmt.bytesperline; +if (!buffer-depth buffer-width) +buffer-depth = ((fbuf.fmt.bytesperline3) ++ (buffer-width-1)) +/ buffer-width; +} else { +buffer-bytesperline = +(buffer-width * buffer-depth + 7) 7; +buffer-bytesperline= 3; +} +} + default: /* Pass through libv4l2 for applications which are using v4l2 through libv4l1 (this can happen with the v4l1compat.so wrapper preloaded */ - -- Regards, Huzaifa Sidhpurwala, RHCE, CCNA (IRC: huzaifas) IT Desktop RD Lead. Global Help Desk, Pune (India) Phone: +91 20 4005 7322 (UTC +5.5) GnuPG Fingerprint: 3A0F DAFB 9279 02ED 273B FFE9 CC70 DCF2 DA5B DAE5 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org/ iD8DBQFMBMfbzHDc8tpb2uURAtJ0AKCPnWfPn3UEdPTxz2n9AJJw4+YzwACgmcvp TH5SM8YvgsiO66KOwspLk5k= =yvT4 -END PGP SIGNATURE- -- 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: [Bugme-new] [Bug 16050] New: The ibmcam driver is not working
Hi, On 05/29/2010 12:46 AM, Andrew Morton wrote: (switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface). On Tue, 25 May 2010 23:02:23 GMT bugzilla-dae...@bugzilla.kernel.org wrote: https://bugzilla.kernel.org/show_bug.cgi?id=16050 URL: https://bugzilla.redhat.com/show_bug.cgi?id=588900 Summary: The ibmcam driver is not working Product: Drivers Version: 2.5 Kernel Version: 2.6.34 Platform: All OS/Version: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: USB AssignedTo: g...@kroah.com ReportedBy: david...@tmr.com Regression: Yes This driver has been working, and around the 1st of May I updated my Fedora kernel (FC13-RC) to current. The camera stopped working, so I built the latest 2.6.34-rc version and verified the problem. When 2.6.34 final released I repeated the test and the driver is still not working. Originally reported against Fedora (not going to be fixed in FC13) the information in the Fedora report may be enough to identify the problem. I can do a bit of test almost any day, but the cams are on a video monitoring system, so I'm not able to do long bisects and such. It's a 2.6.33 - 2.6.34 regression, I think. I don't know whether it's a v4l problem or a USB one.. It may very well be a regression, I don't know. But in general the usbvideo drivers (of which the ibmcam is one) have been unmaintained for a long while, and they are still v4l1 drivers. I've been slowly working on converting all old v4l1 usb webcam drivers to the gspca usb webcam driver framework, removing a lot of code duplication (and other cruft such as controls being controlled through module parameters) from these drivers and making them v4l2 drivers in the progress. I really bough 2 ibmcam driver using webcams in the US and had them shipped to the Netherlands esp. for this purpose. I hope to have a new gspca subdriver to replace ibmcam soon. I know this is not really a fix for the problems with the existing ibmcam driver, but as it is destined to be replaced soon anyways I think this is the best way forward. Regards, Hans -- 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
PULL request: http://linuxtv.org/hg/~hgoede/gspca
Hi Mauro, Please pull from: http://linuxtv.org/hg/~hgoede/gspca For the following changes: gspca_ovfx2: drop first frames in stream if not synced gspca_tv8532: remove a whole bunch of unnecessary register writes gspca_tv8532: add gain control gspca_tv8532: rename brightness control to exposure gspca_ov519: Don't report a saturation control for 7670 sensors Thanks, Hans -- 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
[PATCH] libv4l1: Move VIDIOCSFBUF into libv4l1
From: Huzaifa Sidhpurwala huzai...@fedora-12.(none) Move VIDIOCSFBUF into libv4l1 and correct a missing break with the last commit Signed-Off-by: Huzaifa Sidhpurwala huzai...@redhat.com --- lib/libv4l1/libv4l1.c | 32 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/lib/libv4l1/libv4l1.c b/lib/libv4l1/libv4l1.c index ac3c2d9..877508c 100644 --- a/lib/libv4l1/libv4l1.c +++ b/lib/libv4l1/libv4l1.c @@ -847,6 +847,38 @@ int v4l1_ioctl(int fd, unsigned long int request, ...) (buffer-width * buffer-depth + 7) 7; buffer-bytesperline = 3; } + break; + } + + case VIDIOCSFBUF: { + struct video_buffer *buffer = arg; + struct v4l2_framebuffer fbuf = { 0, }; + + fbuf.base = buffer-base; + fbuf.fmt.height = buffer-height; + fbuf.fmt.width = buffer-width; + + switch (buffer-depth) { + case 8: + fbuf.fmt.pixelformat = V4L2_PIX_FMT_RGB332; + break; + case 15: + fbuf.fmt.pixelformat = V4L2_PIX_FMT_RGB555; + break; + case 16: + fbuf.fmt.pixelformat = V4L2_PIX_FMT_RGB565; + break; + case 24: + fbuf.fmt.pixelformat = V4L2_PIX_FMT_BGR24; + break; + case 32: + fbuf.fmt.pixelformat = V4L2_PIX_FMT_BGR32; + break; + } + + fbuf.fmt.bytesperline = buffer-bytesperline; + result = v4l2_ioctl(fd, VIDIOC_G_FBUF, buffer); + break; } default: -- 1.6.6.1 -- 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: [PATCH] drivers: remove all i2c_set_clientdata(client, NULL)
On Mon, 31 May 2010 14:55:48 +0200, Wolfram Sang wrote: I2C-drivers can use the clientdata-pointer to point to private data. As I2C devices are not really unregistered, but merely detached from their driver, it used to be the drivers obligation to clear this pointer during remove() or a failed probe(). As a couple of drivers forgot to do this, it was agreed that it was cleaner if the i2c-core does this clearance when appropriate, as there is no guarantee for the lifetime of the clientdata-pointer after remove() anyhow. This feature was added to the core with commit e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers. As there is no need anymore to clear the clientdata-pointer, remove all current occurrences in the drivers to simplify the code and prevent confusion. Signed-off-by: Wolfram Sang w.s...@pengutronix.de Cc: Jean Delvare kh...@linux-fr.org (...) Applied, thanks. Will go to Linus in the next few days. -- Jean Delvare -- 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: question about v4l2_subdev
Hi, Sorry to bother you again, but here is the situation: I have 2 drivers: an ov2640 driver and my atmel driver. Basically the ov2640 driver is the same as the ov7670 driver. So what I don't know is how to call the ov2640 functions(such as set format) in my atmel driver. In the ov2640 I used the function: v4l2_i2c_subdev_init, and in the atmel driver I used v4l2_device_register. But I don't know where I should use the v4l2_i2c_new_subdev function, and how to link my atmel video struct to the i2c sensor. Is there any examples in linux? Regards, Sedji Le 6/1/2010 10:14 AM, Sedji Gaouaou a écrit : Hi, 1. Something first should call v4l2_device_register() on a v4l2_device object. (Typically there is only one v4l2_device object per bridge chip between the PCI, PCIe, or USB bus and the subdevices, even if that bridge chip has more than one I2C master implementation.) 2. Then, for subdevices connected to the bridge chip via I2C, something needs to call v4l2_i2c_new_subdev() with the v4l2_device pointer as one of the arguments, to get back a v4l2_subdevice instance pointer. 3. After that, v4l2_subdev_call() with the v4l2_subdev pointer as one of the arguments can be used to invoke the subdevice methods. TV Video capture drivers do this work themselves. Drivers using a camera framework may have the framework doing some of the work for them. Regards, Andy Is there a sensor driver which is using this method? To write the ov2640 driver I have just copied the ov7670.c file, and I didn't find the v4l2_i2c_new_subdev in it... Regards, Sedji -- 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
Re: PROBLEM: 2.6.34-rc7 kernel panics BUG: unable to handle kernel NULL pointer dereference at (null) while channel scan running
On 06/01/2010 01:11 AM, Andy Walls wrote: On Sun, 2010-05-30 at 12:33 +0200, Silamael wrote: Kernel trace: --- [ 773.280361] IP: [f825a7ba] saa7146_buffer_next+0x5e/0x1ed [saa7146_vv] [ 773.280361] *pde = [ 773.280361] Oops: [#1] SMP [ 773.280361] last sysfs file: /sys/module/nfsd/initstate [ 773.280361] Modules linked in: nfsd exportfs nfs lockd nfs_acl auth_rpcgss sunrpc f71882fg coretemp loop lnbp21 stv0299 dvb_ttpci snd_hda_codec_realtek dvb_core saa7146_vv videodev v4l1_compat snd_hda_intel saa7146 snd_hda_codec videobuf_dma_sg snd_hwdep videobuf_core snd_pcm i2c_i801 ttpci_eeprom psmouse snd_timer intel_agp evdev pcspkr snd i2c_core serio_raw agpgart video processor rng_core soundcore button output snd_page_alloc usb_storage uhci_hcd ehci_hcd thermal sd_mod crc_t10dif thermal_sys usbcore nls_base e1000e [last unloaded: scsi_wait_scan] [ 773.280361] [ 773.280361] Pid: 0, comm: swapper Not tainted 2.6.34-rc7 #7 A9830IMS/A9830IMS [ 773.280361] EIP: 0060:[f825a7ba] EFLAGS: 00010246 CPU: 0 [ 773.280361] EIP is at saa7146_buffer_next+0x5e/0x1ed [saa7146_vv] [ 773.280361] EAX: f68b3008 EBX: f733d900 ECX: 0001 EDX: 0002 [ 773.280361] ESI: ffd4 EDI: f68b3000 EBP: ESP: c135fefc [ 773.280361] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 [ 773.280361] Process swapper (pid: 0, ti=c135e000 task=c138cb60 task.ti=c135e000) [ 773.280361] Stack: [ 773.280361] f68b3000 f733d900 c13640bc 000a f825e5f6 f733d900 fff7fbf7 f825a759 [ 773.280361] 0 f733d900 f812bdfc fff7fbf7 f6a1e240 c106793a [ 773.280361] 0 c1364080 000a c13640bc c135ff80 c1069072 000a 000a [ 773.280361] Call Trace: [ 773.280361] [f825e5f6] ? vbi_irq_done+0x99/0x9f [saa7146_vv] [ 773.280361] [f825a759] ? vv_callback+0x10f/0x112 [saa7146_vv] [ 773.280361] [f812bdfc] ? interrupt_hw+0x9f/0x1a8 [saa7146] [ 773.280361] [c106793a] ? handle_IRQ_event+0x49/0xe7 [ 773.280361] [c1069072] ? handle_level_irq+0x55/0x9e [ 773.280361] [c10044cb] ? handle_irq+0x17/0x1c [ 773.280361] [c1003da9] ? do_IRQ+0x38/0x8e [ 773.280361] [c1002d30] ? common_interrupt+0x30/0x38 [ 773.280361] [c10086e6] ? mwait_idle+0x59/0x5e [ 773.280361] [c1001ae7] ? cpu_idle+0x91/0xaa [ 773.280361] [c13b9881] ? start_kernel+0x31c/0x321 [ 773.280361] Code: 50 fc 25 f8 e8 9d 0e 01 c9 83 c4 1c 8b 43 44 89 c2 c1 fa 08 38 c2 75 04 0f 0b eb fe 8b 77 08 8d 47 08 39 c6 74 6b 83 ee 2c 31 ed 8b 4e 2c 8b 56 30 89 51 04 89 0a c7 46 2c 00 01 10 00 c7 46 30 Refer to linux/drivers/media/common/saa7146_fops.c:saa7146_buffer_next() void saa7146_buffer_next(struct saa7146_dev *dev, struct saa7146_dmaqueue *q, int vbi) { struct saa7146_buf *buf,*next = NULL; BUG_ON(!q); DEB_INT((dev:%p, dmaq:%p, vbi:%d\n, dev, q, vbi)); assert_spin_locked(dev-slock); if (!list_empty(q-queue)) { /* activate next one from queue */ buf = list_entry(q-queue.next,struct saa7146_buf,vb.queue); list_del(buf-vb.queue); if (!list_empty(q-queue)) [...] The code bytes from the above disassemble to: 37: e8 9d 0e 01 c9 call 0xc9010ed9 3c: 83 c4 1cadd$0x1c,%esp 3f: 8b 43 44mov0x44(%ebx),%eax 42: 89 c2 mov%eax,%edx 44: c1 fa 08sar$0x8,%edx 47: 38 c2 cmp%al,%dl 49: 75 04 jne0x4f 4b: 0f 0b ud2a ---+ End of BUG_ON() in 4d: eb fe jmp0x4d ---| assert_spin_locked() 4f: 8b 77 08mov0x8(%edi),%esi ; %esi = q-queue-head 52: 8d 47 08lea0x8(%edi),%eax ; %eax = q-queue-head-next 55: 39 c6 cmp%eax,%esi ; if (!list_empty(q-queue)) 57: 74 6b je 0xc4; skip to else clause 59: 83 ee 2csub$0x2c,%esi ; buf = list_entry(q-queue.next,struct saa7146_buf,vb.queue); 5c: 31 ed xor%ebp,%ebp 5e: 8b 4e 2cmov0x2c(%esi),%ecx --- Oops here; %ecx = buf-vb.queue-next 61: 8b 56 30mov0x30(%esi),%edx 64: 89 51 04mov%edx,0x4(%ecx) 67: 89 0a mov%ecx,(%edx) 69: c7 46 2c 00 01 10 00movl $0x100100,0x2c(%esi) The Oops happens because q-queue.next is NULL, which is invalid. There is some sort of saa7146_dmaqueue list or videobuf list corruption problem somewhere. I am not familiar enough with the saa7146 nor videobuf
[PATCH] tm6000: rewrite copy_streams
From: Stefan Ringel stefan.rin...@arcor.de fusion function copy streams and copy_packets to new function copy_streams. Signed-off-by: Stefan Ringel stefan.rin...@arcor.de --- drivers/staging/tm6000/tm6000-usb-isoc.h |5 +- drivers/staging/tm6000/tm6000-video.c| 326 +++--- 2 files changed, 119 insertions(+), 212 deletions(-) diff --git a/drivers/staging/tm6000/tm6000-usb-isoc.h b/drivers/staging/tm6000/tm6000-usb-isoc.h index 5a5049a..138716a 100644 --- a/drivers/staging/tm6000/tm6000-usb-isoc.h +++ b/drivers/staging/tm6000/tm6000-usb-isoc.h @@ -39,7 +39,7 @@ struct usb_isoc_ctl { int pos, size, pktsize; /* Last field: ODD or EVEN? */ - int field; + int vfield; /* Stores incomplete commands */ u32 tmp_buf; @@ -47,7 +47,4 @@ struct usb_isoc_ctl { /* Stores already requested buffers */ struct tm6000_buffer*buf; - - /* Stores the number of received fields */ - int nfields; }; diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 4f7e743..9746fe7 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -186,229 +186,143 @@ const char *tm6000_msg_type[] = { /* * Identify the tm5600/6000 buffer header type and properly handles */ -static int copy_packet(struct urb *urb, u32 header, u8 **ptr, u8 *endp, - u8 *out_p, struct tm6000_buffer **buf) -{ - struct tm6000_dmaqueue *dma_q = urb-context; - struct tm6000_core *dev = container_of(dma_q, struct tm6000_core, vidq); - u8 c; - unsigned int cmd, cpysize, pktsize, size, field, block, line, pos = 0; - int rc = 0; - /* FIXME: move to tm6000-isoc */ - static int last_line = -2, start_line = -2, last_field = -2; - - /* FIXME: this is the hardcoded window size -*/ - unsigned int linewidth = (*buf)-vb.width 1; - - if (!dev-isoc_ctl.cmd) { - c = (header 24) 0xff; - - /* split the header fields */ - size = ((header 0x7e) 1); - - if (size 0) - size -= 4; - - block = (header 7) 0xf; - field = (header 11) 0x1; - line = (header 12) 0x1ff; - cmd = (header 21) 0x7; - - /* Validates header fields */ - if(size TM6000_URB_MSG_LEN) - size = TM6000_URB_MSG_LEN; - - if (cmd == TM6000_URB_MSG_VIDEO) { - if ((block+1)*TM6000_URB_MSG_LENlinewidth) - cmd = TM6000_URB_MSG_ERR; - - /* FIXME: Mounts the image as field0+field1 -* It should, instead, check if the user selected -* entrelaced or non-entrelaced mode -*/ - pos= ((line1)+field)*linewidth + - block*TM6000_URB_MSG_LEN; - - /* Don't allow to write out of the buffer */ - if (pos+TM6000_URB_MSG_LEN (*buf)-vb.size) { - dprintk(dev, V4L2_DEBUG_ISOC, - ERR: size=%d, num=%d, line=%d, - field=%d\n, - size, block, line, field); - - cmd = TM6000_URB_MSG_ERR; - } - } else { - pos=0; - } - - /* Prints debug info */ - dprintk(dev, V4L2_DEBUG_ISOC, size=%d, num=%d, -line=%d, field=%d\n, - size, block, line, field); - - if ((last_line!=line)(last_line+1!=line) - (cmd != TM6000_URB_MSG_ERR) ) { - if (cmd != TM6000_URB_MSG_VIDEO) { - dprintk(dev, V4L2_DEBUG_ISOC, cmd=%d, - size=%d, num=%d, line=%d, field=%d\n, - cmd, size, block, line, field); - } - if (start_line0) - start_line=last_line; - /* Prints debug info */ - dprintk(dev, V4L2_DEBUG_ISOC, lines= %d-%d, - field=%d\n, - start_line, last_line, field); - - if ((start_line6 last_line200) - (last_field != field) ) { - - dev-isoc_ctl.nfields++; - if (dev-isoc_ctl.nfields=2) { -
Re: schedule inside spin_lock_irqsave?
On Sun, May 30, 2010 at 05:24:38PM +0200, Jiri Slaby wrote: Hi, came across following snippet of code (2.6.34:drivers/media/dvb/siano/smscoreapi.c) and ... ... ... This should be wait_event(coredev-buffer_mng_waitq, cb = get_entry()); with get_entry like: struct smscore_buffer_t *get_entry(void) { struct smscore_buffer_t *cb = NULL; spin_lock_irqsave(coredev-bufferslock, flags); if (!list_empty(coredev-buffers)) { cb = (struct smscore_buffer_t *) coredev-buffers.next; list_del(cb-entry); } spin_unlock_irqrestore(coredev-bufferslock, flags); return cb; } ... ... ... Looking at the smscore_buffer_t definition, this is really ugly since it relies on entry being the first in the structure. It should be list_first_entry(coredev-buffers, ...) instead, cast-less. list_del(cb-entry); } spin_unlock_irqrestore(coredev-bufferslock, flags); return cb; } thanks for the suggestions, is it on anyones TODO list or should I cook up my own patch? Would take a few more days till I can get at it. BTW does anyone have knowledge how to enable IR receiver code for the smsxxx devices? Looks like its just the matter of setting sms_board_gpio_cfg.ir to the right value - which value? Richard -- 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: [Bugme-new] [Bug 16050] New: The ibmcam driver is not working
Hans de Goede wrote: Hi, On 05/29/2010 12:46 AM, Andrew Morton wrote: (switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface). On Tue, 25 May 2010 23:02:23 GMT bugzilla-dae...@bugzilla.kernel.org wrote: https://bugzilla.kernel.org/show_bug.cgi?id=16050 URL: https://bugzilla.redhat.com/show_bug.cgi?id=588900 Summary: The ibmcam driver is not working Product: Drivers Version: 2.5 Kernel Version: 2.6.34 Platform: All OS/Version: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: USB AssignedTo: g...@kroah.com ReportedBy: david...@tmr.com Regression: Yes This driver has been working, and around the 1st of May I updated my Fedora kernel (FC13-RC) to current. The camera stopped working, so I built the latest 2.6.34-rc version and verified the problem. When 2.6.34 final released I repeated the test and the driver is still not working. Originally reported against Fedora (not going to be fixed in FC13) the information in the Fedora report may be enough to identify the problem. I can do a bit of test almost any day, but the cams are on a video monitoring system, so I'm not able to do long bisects and such. It's a 2.6.33 - 2.6.34 regression, I think. I don't know whether it's a v4l problem or a USB one.. It may very well be a regression, I don't know. But in general the usbvideo drivers (of which the ibmcam is one) have been unmaintained for a long while, and they are still v4l1 drivers. I've been slowly working on converting all old v4l1 usb webcam drivers to the gspca usb webcam driver framework, removing a lot of code duplication (and other cruft such as controls being controlled through module parameters) from these drivers and making them v4l2 drivers in the progress. I really bough 2 ibmcam driver using webcams in the US and had them shipped to the Netherlands esp. for this purpose. I hope to have a new gspca subdriver to replace ibmcam soon. I know this is not really a fix for the problems with the existing ibmcam driver, but as it is destined to be replaced soon anyways I think this is the best way forward. I tried the 2.6.34-11.fc13.x86_64 kernel, and the cameras sort of work again, I had to change the size being used in the motion.conf file to match what I found in the messages log, then I get imaging again, but the kernel has multiple OOPS issues, which I have sent off to the kerneloops folks. I don't feel comfortable using that kernel, even if it doesn't actually die (or hasn't yet). In case you don't have this information, here is a line from lsusb: Bus 003 Device 002: ID 0545:8080 Xirlink, Inc. IBM C-It Webcam Hopefully the items you have ordered are the same model. -- Bill Davidsen david...@tmr.com We can't solve today's problems by using the same thinking we used in creating them. - Einstein -- 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: [PATCH] support for medion dvb stick 1660:1921
Hi Patrick thank you for your help, I understand my mistake. Here is the new patch, I hope this one is right. regards Stéphane diff -r b576509ea6d2 linux/drivers/media/dvb/dvb-usb/dib0700_devices.c --- a/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c Wed May 19 19:34:33 2010 -0300 +++ b/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c Tue Jun 01 20:28:13 2010 +0200 @@ -2091,6 +2091,7 @@ { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV282E) }, { USB_DEVICE(USB_VID_DIBCOM,USB_PID_DIBCOM_STK8096GP) }, { USB_DEVICE(USB_VID_ELGATO, USB_PID_ELGATO_EYETV_DIVERSITY) }, + { USB_DEVICE(USB_VID_MEDION,USB_PID_MEDION_STICK_CTX_1921) }, { 0 } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); @@ -2606,10 +2607,14 @@ }, }, - .num_device_descs = 2, + .num_device_descs = 3, .devices = { { DiBcom STK7770P reference design, { dib0700_usb_id_table[59], NULL }, + { NULL }, + }, + { Medion Stick ctx 1921, + { dib0700_usb_id_table[69], NULL }, { NULL }, }, { Terratec Cinergy T USB XXS (HD)/ T3, diff -r b576509ea6d2 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h Wed May 19 19:34:33 2010 -0300 +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h Tue Jun 01 20:28:13 2010 +0200 @@ -303,4 +303,5 @@ #define USB_PID_TERRATEC_DVBS2CI_V20x10ac #define USB_PID_TECHNISAT_USB2_HDCI_V1 0x0001 #define USB_PID_TECHNISAT_USB2_HDCI_V2 0x0002 +#define USB_PID_MEDION_STICK_CTX_1921 0x1921 #endif -- 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
[cron job] v4l-dvb daily build 2.6.22 and up: ERRORS, 2.6.16-2.6.21: ERRORS
This message is generated daily by a cron job that builds v4l-dvb for the kernels and architectures in the list below. Results of the daily build of v4l-dvb: date:Tue Jun 1 19:00:19 CEST 2010 path:http://www.linuxtv.org/hg/v4l-dvb changeset: 14875:304cfde05b3f git master: f6760aa024199cfbce564311dc4bc4d47b6fb349 git media-master: 4fcfa8824391ef0f9cff82122067f31c6d920921 gcc version: i686-linux-gcc (GCC) 4.4.3 host hardware:x86_64 host os: 2.6.32.5 linux-2.6.32.6-armv5: OK linux-2.6.33-armv5: OK linux-2.6.34-armv5: ERRORS linux-2.6.35-rc1-armv5: ERRORS linux-2.6.32.6-armv5-davinci: OK linux-2.6.33-armv5-davinci: OK linux-2.6.34-armv5-davinci: ERRORS linux-2.6.35-rc1-armv5-davinci: ERRORS linux-2.6.32.6-armv5-ixp: OK linux-2.6.33-armv5-ixp: OK linux-2.6.34-armv5-ixp: ERRORS linux-2.6.35-rc1-armv5-ixp: ERRORS linux-2.6.32.6-armv5-omap2: OK linux-2.6.33-armv5-omap2: OK linux-2.6.34-armv5-omap2: ERRORS linux-2.6.35-rc1-armv5-omap2: ERRORS linux-2.6.22.19-i686: ERRORS linux-2.6.23.17-i686: ERRORS linux-2.6.24.7-i686: WARNINGS linux-2.6.25.20-i686: WARNINGS linux-2.6.26.8-i686: WARNINGS linux-2.6.27.44-i686: WARNINGS linux-2.6.28.10-i686: WARNINGS linux-2.6.29.1-i686: WARNINGS linux-2.6.30.10-i686: WARNINGS linux-2.6.31.12-i686: OK linux-2.6.32.6-i686: OK linux-2.6.33-i686: OK linux-2.6.34-i686: ERRORS linux-2.6.35-rc1-i686: ERRORS linux-2.6.32.6-m32r: OK linux-2.6.33-m32r: OK linux-2.6.34-m32r: ERRORS linux-2.6.35-rc1-m32r: ERRORS linux-2.6.32.6-mips: OK linux-2.6.33-mips: OK linux-2.6.34-mips: ERRORS linux-2.6.35-rc1-mips: ERRORS linux-2.6.32.6-powerpc64: OK linux-2.6.33-powerpc64: OK linux-2.6.34-powerpc64: ERRORS linux-2.6.35-rc1-powerpc64: ERRORS linux-2.6.22.19-x86_64: ERRORS linux-2.6.23.17-x86_64: ERRORS linux-2.6.24.7-x86_64: WARNINGS linux-2.6.25.20-x86_64: WARNINGS linux-2.6.26.8-x86_64: WARNINGS linux-2.6.27.44-x86_64: WARNINGS linux-2.6.28.10-x86_64: WARNINGS linux-2.6.29.1-x86_64: WARNINGS linux-2.6.30.10-x86_64: WARNINGS linux-2.6.31.12-x86_64: OK linux-2.6.32.6-x86_64: OK linux-2.6.33-x86_64: OK linux-2.6.34-x86_64: ERRORS linux-2.6.35-rc1-x86_64: ERRORS linux-git-armv5: WARNINGS linux-git-armv5-davinci: WARNINGS linux-git-armv5-ixp: WARNINGS linux-git-armv5-omap2: WARNINGS linux-git-i686: WARNINGS linux-git-m32r: OK linux-git-mips: OK linux-git-powerpc64: OK linux-git-x86_64: WARNINGS spec: ERRORS spec-git: OK sparse: ERRORS linux-2.6.16.62-i686: ERRORS linux-2.6.17.14-i686: ERRORS linux-2.6.18.8-i686: ERRORS linux-2.6.19.7-i686: ERRORS linux-2.6.20.21-i686: ERRORS linux-2.6.21.7-i686: ERRORS linux-2.6.16.62-x86_64: ERRORS linux-2.6.17.14-x86_64: ERRORS linux-2.6.18.8-x86_64: ERRORS linux-2.6.19.7-x86_64: ERRORS linux-2.6.20.21-x86_64: ERRORS linux-2.6.21.7-x86_64: ERRORS Detailed results are available here: http://www.xs4all.nl/~hverkuil/logs/Tuesday.log Full logs are available here: http://www.xs4all.nl/~hverkuil/logs/Tuesday.tar.bz2 The V4L-DVB specification from this daily build is here: http://www.xs4all.nl/~hverkuil/spec/media.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
Re: Soc-camera and 2.6.33
Guennadi Liakhovetski g.liakhovet...@gmx.de writes: a lot of things changed in and around soc-camera between 2.6.30 and .33... E.g., previously you could load driver modules in any order, it would work in any case. Now if you load your host driver (pxa) and your client driver is not there yet, it should be automatically loaded. However, if your user-space doesn't support this, it won't work. Can this be the reason gor your problem? Otherwise, I'd suspect a problem with your platform data (cf. other platforms), or, eventually with mt9m111. I tracked down the beast ... :) The problem is with the commit a48c24a696f0d93c49f913b7818e9819612b1f4e [ARM] pxa/mioa701: convert mioa701 to the new platform-device soc-camera interface. This is a tricky one ... : - ic_link is declared normally, and references mioa701_i2c_devices[0] - but mioa701_i2c_devices[] is declared as __initdata, and discarded after init if I understand correctly. This implies that the structure ic_link references something not present anymore, hence my bug. I'm a bit disturbed that the compiler didn't catch that ... Anyway, now I'll have to send a patch to Eric for that, to remove the __initdata specifier from mioa701_i2c_devices[]. Eric, are you still taking in fix patches for the 2.6.35 kernel ? Cheers. -- Robert PS: I checked for other pxa boards, and they don't suffer from my problem. -- 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
[PATCH] IR: only initially enable protocol that matches loaded keymap
Rather than loading all IR protocol decoders as enabled when bringing up a new device, only enable the IR protocol decoder that matches the keymap being loaded. Additional decoders can be enabled on the fly by those that need to, either by twiddling sysfs bits or by using the ir-keytable util from v4l-utils. Functional testing done with the mceusb driver, and it behaves as expected, only the rc6 decoder is enabled, keys are all handled properly, etc. Signed-off-by: Jarod Wilson ja...@redhat.com --- drivers/media/IR/ir-jvc-decoder.c |4 +++- drivers/media/IR/ir-nec-decoder.c |4 +++- drivers/media/IR/ir-rc5-decoder.c |4 +++- drivers/media/IR/ir-rc6-decoder.c |4 +++- drivers/media/IR/ir-sony-decoder.c |4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/media/IR/ir-jvc-decoder.c b/drivers/media/IR/ir-jvc-decoder.c index 0b80494..b02e801 100644 --- a/drivers/media/IR/ir-jvc-decoder.c +++ b/drivers/media/IR/ir-jvc-decoder.c @@ -253,6 +253,7 @@ static int ir_jvc_register(struct input_dev *input_dev) { struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); struct decoder_data *data; + u64 ir_type = ir_dev-rc_tab.ir_type; int rc; rc = sysfs_create_group(ir_dev-dev.kobj, decoder_attribute_group); @@ -266,7 +267,8 @@ static int ir_jvc_register(struct input_dev *input_dev) } data-ir_dev = ir_dev; - data-enabled = 1; + if (ir_type == IR_TYPE_JVC || ir_type == IR_TYPE_UNKNOWN) + data-enabled = 1; spin_lock(decoder_lock); list_add_tail(data-list, decoder_list); diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c index ba79233..6059a1f 100644 --- a/drivers/media/IR/ir-nec-decoder.c +++ b/drivers/media/IR/ir-nec-decoder.c @@ -260,6 +260,7 @@ static int ir_nec_register(struct input_dev *input_dev) { struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); struct decoder_data *data; + u64 ir_type = ir_dev-rc_tab.ir_type; int rc; rc = sysfs_create_group(ir_dev-dev.kobj, decoder_attribute_group); @@ -273,7 +274,8 @@ static int ir_nec_register(struct input_dev *input_dev) } data-ir_dev = ir_dev; - data-enabled = 1; + if (ir_type == IR_TYPE_NEC || ir_type == IR_TYPE_UNKNOWN) + data-enabled = 1; spin_lock(decoder_lock); list_add_tail(data-list, decoder_list); diff --git a/drivers/media/IR/ir-rc5-decoder.c b/drivers/media/IR/ir-rc5-decoder.c index 23cdb1b..4aa797b 100644 --- a/drivers/media/IR/ir-rc5-decoder.c +++ b/drivers/media/IR/ir-rc5-decoder.c @@ -256,6 +256,7 @@ static int ir_rc5_register(struct input_dev *input_dev) { struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); struct decoder_data *data; + u64 ir_type = ir_dev-rc_tab.ir_type; int rc; rc = sysfs_create_group(ir_dev-dev.kobj, decoder_attribute_group); @@ -269,7 +270,8 @@ static int ir_rc5_register(struct input_dev *input_dev) } data-ir_dev = ir_dev; - data-enabled = 1; + if (ir_type == IR_TYPE_RC5 || ir_type == IR_TYPE_UNKNOWN) + data-enabled = 1; spin_lock(decoder_lock); list_add_tail(data-list, decoder_list); diff --git a/drivers/media/IR/ir-rc6-decoder.c b/drivers/media/IR/ir-rc6-decoder.c index 2bf479f..9f61da2 100644 --- a/drivers/media/IR/ir-rc6-decoder.c +++ b/drivers/media/IR/ir-rc6-decoder.c @@ -352,6 +352,7 @@ static int ir_rc6_register(struct input_dev *input_dev) { struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); struct decoder_data *data; + u64 ir_type = ir_dev-rc_tab.ir_type; int rc; rc = sysfs_create_group(ir_dev-dev.kobj, decoder_attribute_group); @@ -365,7 +366,8 @@ static int ir_rc6_register(struct input_dev *input_dev) } data-ir_dev = ir_dev; - data-enabled = 1; + if (ir_type == IR_TYPE_RC6 || ir_type == IR_TYPE_UNKNOWN) + data-enabled = 1; spin_lock(decoder_lock); list_add_tail(data-list, decoder_list); diff --git a/drivers/media/IR/ir-sony-decoder.c b/drivers/media/IR/ir-sony-decoder.c index 9f440c5..219075f 100644 --- a/drivers/media/IR/ir-sony-decoder.c +++ b/drivers/media/IR/ir-sony-decoder.c @@ -245,6 +245,7 @@ static int ir_sony_register(struct input_dev *input_dev) { struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); struct decoder_data *data; + u64 ir_type = ir_dev-rc_tab.ir_type; int rc; rc = sysfs_create_group(ir_dev-dev.kobj, decoder_attribute_group); @@ -258,7 +259,8 @@ static int ir_sony_register(struct input_dev *input_dev) } data-ir_dev = ir_dev; - data-enabled = 1; + if (ir_type == IR_TYPE_SONY || ir_type == IR_TYPE_UNKNOWN) + data-enabled = 1; spin_lock(decoder_lock); list_add_tail(data-list,
[PATCH 1/2 v2] IR: add RC6 keymap for Windows Media Center Ed. remotes
This is the RC6 keymap for the Windows Media Center Edition remotes that come bundled with MCE/eHome Infrared Remote transceivers. Tested with 3 different variants of the remote, but its possible there are still some additional keys missing, but its simple enough to add them in later... This patch also adds an IR_TYPE_ALL convenience macro to make life easier for receivers that support all IR protocols. v2: fix an erroneous comment that referred to imon devices Signed-off-by: Jarod Wilson ja...@redhat.com --- drivers/media/IR/keymaps/Makefile |1 + drivers/media/IR/keymaps/rc-rc6-mce.c | 105 + include/media/rc-map.h|4 + 3 files changed, 110 insertions(+), 0 deletions(-) create mode 100644 drivers/media/IR/keymaps/rc-rc6-mce.c diff --git a/drivers/media/IR/keymaps/Makefile b/drivers/media/IR/keymaps/Makefile index ec25258..08e5a10 100644 --- a/drivers/media/IR/keymaps/Makefile +++ b/drivers/media/IR/keymaps/Makefile @@ -56,6 +56,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-pv951.o \ rc-rc5-hauppauge-new.o \ rc-rc5-tv.o \ + rc-rc6-mce.o \ rc-real-audio-220-32-keys.o \ rc-tbs-nec.o \ rc-terratec-cinergy-xs.o \ diff --git a/drivers/media/IR/keymaps/rc-rc6-mce.c b/drivers/media/IR/keymaps/rc-rc6-mce.c new file mode 100644 index 000..c6726a8 --- /dev/null +++ b/drivers/media/IR/keymaps/rc-rc6-mce.c @@ -0,0 +1,105 @@ +/* rc-rc6-mce.c - Keytable for Windows Media Center RC-6 remotes for use + * with the Media Center Edition eHome Infrared Transceiver. + * + * Copyright (c) 2010 by Jarod Wilson ja...@redhat.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include media/rc-map.h + +static struct ir_scancode rc6_mce[] = { + { 0x800f0415, KEY_REWIND }, + { 0x800f0414, KEY_FASTFORWARD }, + { 0x800f041b, KEY_PREVIOUS }, + { 0x800f041a, KEY_NEXT }, + + { 0x800f0416, KEY_PLAY }, + { 0x800f0418, KEY_PAUSE }, + { 0x800f0419, KEY_STOP }, + { 0x800f0417, KEY_RECORD }, + + { 0x800f041e, KEY_UP }, + { 0x800f041f, KEY_DOWN }, + { 0x800f0420, KEY_LEFT }, + { 0x800f0421, KEY_RIGHT }, + + { 0x800f040b, KEY_ENTER }, + { 0x800f0422, KEY_OK }, + { 0x800f0423, KEY_EXIT }, + { 0x800f040a, KEY_DELETE }, + + { 0x800f040e, KEY_MUTE }, + { 0x800f0410, KEY_VOLUMEUP }, + { 0x800f0411, KEY_VOLUMEDOWN }, + { 0x800f0412, KEY_CHANNELUP }, + { 0x800f0413, KEY_CHANNELDOWN }, + + { 0x800f0401, KEY_NUMERIC_1 }, + { 0x800f0402, KEY_NUMERIC_2 }, + { 0x800f0403, KEY_NUMERIC_3 }, + { 0x800f0404, KEY_NUMERIC_4 }, + { 0x800f0405, KEY_NUMERIC_5 }, + { 0x800f0406, KEY_NUMERIC_6 }, + { 0x800f0407, KEY_NUMERIC_7 }, + { 0x800f0408, KEY_NUMERIC_8 }, + { 0x800f0409, KEY_NUMERIC_9 }, + { 0x800f0400, KEY_NUMERIC_0 }, + + { 0x800f041d, KEY_NUMERIC_STAR }, + { 0x800f041c, KEY_NUMERIC_POUND }, + + { 0x800f0446, KEY_TV }, + { 0x800f0447, KEY_AUDIO }, /* My Music */ + { 0x800f0448, KEY_PVR }, /* RecordedTV */ + { 0x800f0449, KEY_CAMERA }, + { 0x800f044a, KEY_VIDEO }, + { 0x800f0424, KEY_DVD }, + { 0x800f0425, KEY_TUNER }, /* LiveTV */ + { 0x800f0450, KEY_RADIO }, + + { 0x800f044c, KEY_LANGUAGE }, + { 0x800f0427, KEY_ZOOM }, /* Aspect */ + + { 0x800f045b, KEY_RED }, + { 0x800f045c, KEY_GREEN }, + { 0x800f045d, KEY_YELLOW }, + { 0x800f045e, KEY_BLUE }, + + { 0x800f040f, KEY_INFO }, + { 0x800f0426, KEY_EPG }, /* Guide */ + { 0x800f045a, KEY_SUBTITLE }, /* Caption/Teletext */ + { 0x800f044d, KEY_TITLE }, + + { 0x800f040c, KEY_POWER }, + { 0x800f040d, KEY_PROG1 }, /* Windows MCE button */ + +}; + +static struct rc_keymap rc6_mce_map = { + .map = { + .scan= rc6_mce, + .size= ARRAY_SIZE(rc6_mce), + .ir_type = IR_TYPE_RC6, + .name= RC_MAP_RC6_MCE, + } +}; + +static int __init init_rc_map_rc6_mce(void) +{ + return ir_register_map(rc6_mce_map); +} + +static void __exit exit_rc_map_rc6_mce(void) +{ + ir_unregister_map(rc6_mce_map); +} + +module_init(init_rc_map_rc6_mce) +module_exit(exit_rc_map_rc6_mce) + +MODULE_LICENSE(GPL); +MODULE_AUTHOR(Jarod Wilson ja...@redhat.com); diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 5833966..7abe12e 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -19,6 +19,9 @@ #define IR_TYPE_SONY (1 4) /* Sony12/15/20 protocol */ #define
Re: Soc-camera and 2.6.33
On Tue, 1 Jun 2010, Robert Jarzmik wrote: Guennadi Liakhovetski g.liakhovet...@gmx.de writes: a lot of things changed in and around soc-camera between 2.6.30 and .33... E.g., previously you could load driver modules in any order, it would work in any case. Now if you load your host driver (pxa) and your client driver is not there yet, it should be automatically loaded. However, if your user-space doesn't support this, it won't work. Can this be the reason gor your problem? Otherwise, I'd suspect a problem with your platform data (cf. other platforms), or, eventually with mt9m111. I tracked down the beast ... :) The problem is with the commit a48c24a696f0d93c49f913b7818e9819612b1f4e [ARM] pxa/mioa701: convert mioa701 to the new platform-device soc-camera interface. hm, I would humbly disagree - the __initdata was there before that commit. With my conversion I just missed it and noone tested it since then;) This is a tricky one ... : - ic_link is declared normally, and references mioa701_i2c_devices[0] - but mioa701_i2c_devices[] is declared as __initdata, and discarded after init if I understand correctly. This implies that the structure ic_link references something not present anymore, hence my bug. Nice catch! I'm a bit disturbed that the compiler didn't catch that ... Interesting... Anyway, now I'll have to send a patch to Eric for that, to remove the __initdata specifier from mioa701_i2c_devices[]. Eric, are you still taking in fix patches for the 2.6.35 kernel ? Of course, bugfixes must be taken at any time. PS: I checked for other pxa boards, and they don't suffer from my problem. And not only PXA. Thanks for debugging! Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- 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
[PATCH 2/2 v2] IR: add mceusb IR receiver driver
This is a new driver for the Windows Media Center Edition/eHome Infrared Remote transceiver devices. Its a port of the current lirc_mceusb driver to ir-core, and currently lacks transmit support, but will grow it back soon enough... This driver also differs from lirc_mceusb in that it borrows heavily from a simplified IR buffer decode routine found in Jon Smirl's earlier ir-mceusb port. This driver has been tested on the original first-generation MCE IR device with the MS vendor ID, as well as a current-generation device with a Topseed vendor ID. Every receiver supported by lirc_mceusb should work equally well. Testing was done primarily with RC6 MCE remotes, but also briefly with a Hauppauge RC5 remote, and all works as expected. v2: fix call to ir_raw_event_handle so repeats work as they should. Signed-off-by: Jarod Wilson ja...@redhat.com --- drivers/media/IR/Kconfig | 12 + drivers/media/IR/Makefile |1 + drivers/media/IR/mceusb.c | 1085 + 3 files changed, 1098 insertions(+), 0 deletions(-) create mode 100644 drivers/media/IR/mceusb.c diff --git a/drivers/media/IR/Kconfig b/drivers/media/IR/Kconfig index 195c6cf..7ffa86f 100644 --- a/drivers/media/IR/Kconfig +++ b/drivers/media/IR/Kconfig @@ -66,3 +66,15 @@ config IR_IMON To compile this driver as a module, choose M here: the module will be called imon. + +config IR_MCEUSB + tristate Windows Media Center Ed. eHome Infrared Transceiver + depends on USB_ARCH_HAS_HCD + depends on IR_CORE + select USB + ---help--- + Say Y here if you want to use a Windows Media Center Edition + eHome Infrared Transceiver. + + To compile this driver as a module, choose M here: the + module will be called mceusb. diff --git a/drivers/media/IR/Makefile b/drivers/media/IR/Makefile index b998fcc..b43fe36 100644 --- a/drivers/media/IR/Makefile +++ b/drivers/media/IR/Makefile @@ -13,3 +13,4 @@ obj-$(CONFIG_IR_SONY_DECODER) += ir-sony-decoder.o # stand-alone IR receivers/transmitters obj-$(CONFIG_IR_IMON) += imon.o +obj-$(CONFIG_IR_MCEUSB) += mceusb.o diff --git a/drivers/media/IR/mceusb.c b/drivers/media/IR/mceusb.c new file mode 100644 index 000..fe15091 --- /dev/null +++ b/drivers/media/IR/mceusb.c @@ -0,0 +1,1085 @@ +/* + * Driver for USB Windows Media Center Ed. eHome Infrared Transceivers + * + * Copyright (c) 2010 by Jarod Wilson ja...@redhat.com + * + * Based on the original lirc_mceusb and lirc_mceusb2 drivers, by Dan + * Conti, Martin Blatter and Daniel Melander, the latter of which was + * in turn also based on the lirc_atiusb driver by Paul Miller. The + * two mce drivers were merged into one by Jarod Wilson, with transmit + * support for the 1st-gen device added primarily by Patrick Calhoun, + * with a bit of tweaks by Jarod. Debugging improvements and proper + * support for what appears to be 3rd-gen hardware added by Jarod. + * Initial port from lirc driver to ir-core drivery by Jarod, based + * partially on a port to an earlier proposed IR infrastructure by + * Jon Smirl, which included enhancements and simplifications to the + * incoming IR buffer parsing routines. + * + * TODO: + * - add rc-core transmit support, once available + * - enable support for forthcoming ir-lirc-codec interface + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include linux/device.h +#include linux/module.h +#include linux/slab.h +#include linux/usb.h +#include linux/input.h +#include media/ir-core.h +#include media/ir-common.h + +#define DRIVER_VERSION 1.91 +#define DRIVER_AUTHOR Jarod Wilson ja...@wilsonet.com +#define DRIVER_DESCWindows Media Center Ed. eHome Infrared Transceiver \ + device driver +#define DRIVER_NAMEmceusb + +#define USB_BUFLEN 32 /* USB reception buffer length */ +#define IRBUF_SIZE 256 /* IR work buffer length */ + +/* MCE constants */ +#define MCE_CMDBUF_SIZE384 /* MCE Command buffer length */ +#define MCE_TIME_UNIT 50 /* Approx 50us resolution */ +#define MCE_CODE_LENGTH5 /* Normal length of packet (with header) */ +#define MCE_PACKET_SIZE4 /* Normal length of packet (without header) */ +#define MCE_PACKET_HEADER 0x84 /* Actual header format is 0x80 +
[PATCH 0/3] IR: add lirc support to ir-core
This patch series adds the core lirc device interface, lirc_dev, and an ir-core bridge driver. Currently, only the receive side is wired up in the bridge driver, but adding transmit support is up next. Currently, adding this code allows any raw IR ir-core device driver to pass raw IR out to the lirc userspace, without the driver having to have any actual knowledge of lirc -- its just feeding data to another IR protocol decoder engine. This also (hopefully) makes life easier for any currently out-of-tree pure lirc device drivers, as they can count on the lirc core bits being present. This is a Good Thing(tm) while we work on porting additional lirc device drivers to ir-core, and also makes life easier for users to migrate from lirc decoding to in-kernel decoding (where possible) when their device's driver gets ported. This patchset has been tested with the ir-core mceusb driver, and IR receive behaves 100% identical in lirc mode to the old lirc_mceusb. [PATCH 1/3] IR: add core lirc device interface [PATCH 2/3] IR: add an empty lirc protocol keymap [PATCH 3/3] IR: add ir-core to lirc interface bridge driver -- Jarod Wilson ja...@redhat.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
[PATCH 1/3] IR: add core lirc device interface
Add the core lirc device interface (http://lirc.org/). This is a 99.9% unaltered lirc_dev device interface (only change being the path to lirc.h), which has been carried in the Fedora kernels and has been built for numerous other distro kernels for years. In the next two patches in this series, ir-core will be wired up to make use of the lirc interface as one of many IR protocol decoder options. In this case, raw IR will be delivered to the lirc userspace daemon, which will then handle the decoding. Signed-off-by: Jarod Wilson ja...@redhat.com --- drivers/media/IR/Kconfig| 11 + drivers/media/IR/Makefile |1 + drivers/media/IR/lirc_dev.c | 850 +++ drivers/media/IR/lirc_dev.h | 228 include/media/lirc.h| 159 5 files changed, 1249 insertions(+), 0 deletions(-) create mode 100644 drivers/media/IR/lirc_dev.c create mode 100644 drivers/media/IR/lirc_dev.h create mode 100644 include/media/lirc.h diff --git a/drivers/media/IR/Kconfig b/drivers/media/IR/Kconfig index 7ffa86f..c3010fb 100644 --- a/drivers/media/IR/Kconfig +++ b/drivers/media/IR/Kconfig @@ -8,6 +8,17 @@ config VIDEO_IR depends on IR_CORE default IR_CORE +config LIRC + tristate + default y + + ---help--- + Enable this option to build the Linux Infrared Remote + Control (LIRC) core device interface driver. The LIRC + interface passes raw IR to and from userspace, where the + LIRC daemon handles protocol decoding for IR reception ann + encoding for IR transmitting (aka blasting). + source drivers/media/IR/keymaps/Kconfig config IR_NEC_DECODER diff --git a/drivers/media/IR/Makefile b/drivers/media/IR/Makefile index b43fe36..3ba00bb 100644 --- a/drivers/media/IR/Makefile +++ b/drivers/media/IR/Makefile @@ -5,6 +5,7 @@ obj-y += keymaps/ obj-$(CONFIG_IR_CORE) += ir-core.o obj-$(CONFIG_VIDEO_IR) += ir-common.o +obj-$(CONFIG_LIRC) += lirc_dev.o obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o obj-$(CONFIG_IR_RC6_DECODER) += ir-rc6-decoder.o diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c new file mode 100644 index 000..7e45800 --- /dev/null +++ b/drivers/media/IR/lirc_dev.c @@ -0,0 +1,850 @@ +/* + * LIRC base driver + * + * by Artur Lipowski alipow...@interia.pl + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include linux/module.h +#include linux/kernel.h +#include linux/sched.h +#include linux/errno.h +#include linux/ioctl.h +#include linux/fs.h +#include linux/poll.h +#include linux/completion.h +#include linux/errno.h +#include linux/mutex.h +#include linux/wait.h +#include linux/unistd.h +#include linux/kthread.h +#include linux/bitops.h +#include linux/device.h +#include linux/cdev.h +#include linux/smp_lock.h +#ifdef CONFIG_COMPAT +#include linux/compat.h +#endif + +#include media/lirc.h +#include lirc_dev.h + +static int debug; + +#define IRCTL_DEV_NAME BaseRemoteCtl +#define NOPLUG -1 +#define LOGHEADlirc_dev (%s[%d]): + +static dev_t lirc_base_dev; + +struct irctl { + struct lirc_driver d; + int attached; + int open; + + struct mutex irctl_lock; + struct lirc_buffer *buf; + unsigned int chunk_size; + + struct task_struct *task; + long jiffies_to_wait; + + struct cdev cdev; +}; + +static DEFINE_MUTEX(lirc_dev_lock); + +static struct irctl *irctls[MAX_IRCTL_DEVICES]; + +/* Only used for sysfs but defined to void otherwise */ +static struct class *lirc_class; + +/* helper function + * initializes the irctl structure + */ +static void init_irctl(struct irctl *ir) +{ + dev_dbg(ir-d.dev, LOGHEAD initializing irctl\n, + ir-d.name, ir-d.minor); + mutex_init(ir-irctl_lock); + ir-d.minor = NOPLUG; +} + +static void cleanup(struct irctl *ir) +{ + dev_dbg(ir-d.dev, LOGHEAD cleaning up\n, ir-d.name, ir-d.minor); + + device_destroy(lirc_class, MKDEV(MAJOR(lirc_base_dev), ir-d.minor)); + + if (ir-buf != ir-d.rbuf) { + lirc_buffer_free(ir-buf); + kfree(ir-buf); + } + ir-buf = NULL; +} + +/* helper function + * reads key codes from driver and
[PATCH 2/3] IR: add an empty lirc protocol keymap
This keymap can be specified for loading for a setup where the user wants to bypass in-kernel decoding and only use the lirc interface. Signed-off-by: Jarod Wilson ja...@redhat.com --- drivers/media/IR/keymaps/Makefile |1 + drivers/media/IR/keymaps/rc-lirc.c | 41 include/media/rc-map.h |5 +++- 3 files changed, 46 insertions(+), 1 deletions(-) create mode 100644 drivers/media/IR/keymaps/rc-lirc.c diff --git a/drivers/media/IR/keymaps/Makefile b/drivers/media/IR/keymaps/Makefile index 08e5a10..7dffd41 100644 --- a/drivers/media/IR/keymaps/Makefile +++ b/drivers/media/IR/keymaps/Makefile @@ -36,6 +36,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-kaiomy.o \ rc-kworld-315u.o \ rc-kworld-plus-tv-analog.o \ + rc-lirc.o \ rc-manli.o \ rc-msi-tvanywhere.o \ rc-msi-tvanywhere-plus.o \ diff --git a/drivers/media/IR/keymaps/rc-lirc.c b/drivers/media/IR/keymaps/rc-lirc.c new file mode 100644 index 000..63c0a33 --- /dev/null +++ b/drivers/media/IR/keymaps/rc-lirc.c @@ -0,0 +1,41 @@ +/* rc-lirc.c - Empty dummy keytable, for use when its preferred to pass + * all raw IR data to the lirc userspace decoder. + * + * Copyright (c) 2010 by Jarod Wilson ja...@redhat.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include media/rc-map.h + +static struct ir_scancode lirc[] = { + { }, +}; + +static struct rc_keymap lirc_map = { + .map = { + .scan= lirc, + .size= ARRAY_SIZE(lirc), + .ir_type = IR_TYPE_LIRC, + .name= RC_MAP_LIRC, + } +}; + +static int __init init_rc_map_lirc(void) +{ + return ir_register_map(lirc_map); +} + +static void __exit exit_rc_map_lirc(void) +{ + ir_unregister_map(lirc_map); +} + +module_init(init_rc_map_lirc) +module_exit(exit_rc_map_lirc) + +MODULE_LICENSE(GPL); +MODULE_AUTHOR(Jarod Wilson ja...@redhat.com); diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 7abe12e..056d0e4 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -17,10 +17,12 @@ #define IR_TYPE_RC6(1 2) /* Philips RC6 protocol */ #define IR_TYPE_JVC(1 3) /* JVC protocol */ #define IR_TYPE_SONY (1 4) /* Sony12/15/20 protocol */ +#define IR_TYPE_LIRC (1 30) /* Pass raw IR to lirc userspace */ #define IR_TYPE_OTHER (1u 31) #define IR_TYPE_ALL (IR_TYPE_RC5 | IR_TYPE_NEC | IR_TYPE_RC6 | \ -IR_TYPE_JVC | IR_TYPE_SONY | IR_TYPE_OTHER) +IR_TYPE_JVC | IR_TYPE_SONY | IR_TYPE_LIRC | \ +IR_TYPE_OTHER) struct ir_scancode { u32 scancode; @@ -89,6 +91,7 @@ void rc_map_init(void); #define RC_MAP_KAIOMYrc-kaiomy #define RC_MAP_KWORLD_315U rc-kworld-315u #define RC_MAP_KWORLD_PLUS_TV_ANALOG rc-kworld-plus-tv-analog +#define RC_MAP_LIRC rc-lirc #define RC_MAP_MANLI rc-manli #define RC_MAP_MSI_TVANYWHERE_PLUS rc-msi-tvanywhere-plus #define RC_MAP_MSI_TVANYWHERErc-msi-tvanywhere -- 1.6.5.2 -- Jarod Wilson ja...@redhat.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
[PATCH 3/3] IR: add ir-core to lirc interface bridge driver
This is a new ir-core protocol plugin, which bridges from ir-core raw IR data collection to the classic lirc device interface, which allows pure ir-core drivers to pass raw IR data out to userspace to be handled by the lirc userspace daemon. At the moment, only the receive side is wired up, with future plans to enable the transmit side as well. Tested successfully with the mceusb driver and lirc 0.8.6. Nb: since we're still hashing out what transmit support will look like, its possible this should actually be ir-lirc-decoder, and transmit support provided by a separate ir-lirc-encoder, but for the moment, I'm going with ir-lirc-codec, as lirc_dev is also a two-way device interface. Signed-off-by: Jarod Wilson ja...@redhat.com --- drivers/media/IR/Kconfig | 10 ++ drivers/media/IR/Makefile|1 + drivers/media/IR/ir-core-priv.h |7 + drivers/media/IR/ir-lirc-codec.c | 301 ++ drivers/media/IR/ir-raw-event.c |1 + 5 files changed, 320 insertions(+), 0 deletions(-) create mode 100644 drivers/media/IR/ir-lirc-codec.c diff --git a/drivers/media/IR/Kconfig b/drivers/media/IR/Kconfig index c3010fb..bd7ee8b 100644 --- a/drivers/media/IR/Kconfig +++ b/drivers/media/IR/Kconfig @@ -66,6 +66,16 @@ config IR_SONY_DECODER Enable this option if you have an infrared remote control which uses the Sony protocol, and you need software decoding support. +config IR_LIRC_CODEC + tristate Enable IR to LIRC bridge + depends on IR_CORE + depends on LIRC + default y + + ---help--- + Enable this option to pass raw IR to and from userspace via + the LIRC interface. + config IR_IMON tristate SoundGraph iMON Receiver and Display depends on USB_ARCH_HAS_HCD diff --git a/drivers/media/IR/Makefile b/drivers/media/IR/Makefile index 3ba00bb..2ae4f3a 100644 --- a/drivers/media/IR/Makefile +++ b/drivers/media/IR/Makefile @@ -11,6 +11,7 @@ obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o obj-$(CONFIG_IR_RC6_DECODER) += ir-rc6-decoder.o obj-$(CONFIG_IR_JVC_DECODER) += ir-jvc-decoder.o obj-$(CONFIG_IR_SONY_DECODER) += ir-sony-decoder.o +obj-$(CONFIG_IR_LIRC_CODEC) += ir-lirc-codec.o # stand-alone IR receivers/transmitters obj-$(CONFIG_IR_IMON) += imon.o diff --git a/drivers/media/IR/ir-core-priv.h b/drivers/media/IR/ir-core-priv.h index b79446f..7ad080d 100644 --- a/drivers/media/IR/ir-core-priv.h +++ b/drivers/media/IR/ir-core-priv.h @@ -122,4 +122,11 @@ void ir_raw_init(void); #define load_sony_decode() 0 #endif +/* from ir-lirc-codec.c */ +#ifdef CONFIG_IR_LIRC_CODEC_MODULE +#define load_lirc_codec() request_module(ir-lirc-codec) +#else +#define load_lirc_codec() 0 +#endif + #endif /* _IR_RAW_EVENT */ diff --git a/drivers/media/IR/ir-lirc-codec.c b/drivers/media/IR/ir-lirc-codec.c new file mode 100644 index 000..b838ab8 --- /dev/null +++ b/drivers/media/IR/ir-lirc-codec.c @@ -0,0 +1,301 @@ +/* ir-lirc-codec.c - ir-core to classic lirc interface bridge + * + * Copyright (C) 2010 by Jarod Wilson ja...@redhat.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/sched.h +#include linux/wait.h +#include media/lirc.h +#include media/ir-core.h +#include ir-core-priv.h +#include lirc_dev.h + +/* Used to register lirc_codec clients */ +static LIST_HEAD(decoder_list); +static DEFINE_SPINLOCK(decoder_lock); + +struct decoder_data { + struct list_headlist; + struct ir_input_dev *ir_dev; + int enabled:1; + + /* lirc interface bits */ + struct lirc_driver *drv; + int lircdata; +}; + +#define LIRCBUF_SIZE 256 + +/** + * get_decoder_data() - gets decoder data + * @ir_input_dev: input device + * + * Returns the struct decoder_data that corresponds to a device + */ +static struct decoder_data *get_decoder_data(struct ir_input_dev *ir_dev) +{ + struct decoder_data *data = NULL; + + spin_lock(decoder_lock); + list_for_each_entry(data, decoder_list, list) { + if (data-ir_dev == ir_dev) + break; + } + spin_unlock(decoder_lock); + return data; +} + +static ssize_t store_enabled(struct device *d, +struct device_attribute *mattr, +const char *buf, +size_t len) +{ + unsigned long value; + struct ir_input_dev *ir_dev = dev_get_drvdata(d); + struct decoder_data *data = get_decoder_data(ir_dev); + +
Re: question about v4l2_subdev
On Tue, Jun 1, 2010 at 10:04 AM, Sedji Gaouaou sedji.gaou...@atmel.com wrote: Hi, Sorry to bother you again, but here is the situation: I have 2 drivers: an ov2640 driver and my atmel driver. Basically the ov2640 driver is the same as the ov7670 driver. So what I don't know is how to call the ov2640 functions(such as set format) in my atmel driver. In the ov2640 I used the function: v4l2_i2c_subdev_init, and in the atmel driver I used v4l2_device_register. But I don't know where I should use the v4l2_i2c_new_subdev function, and how to link my atmel video struct to the i2c sensor. Is there any examples in linux? Regards, Sedji If I understand what you're saying, ov2640 and ovv7670 are both video drivers but they have shared functionality. If the shared functionality is in the form of controlling say an i2c device of some sorts then you should implement that functionality as a subdev. Otherwise, you should extract the shared functionality into its own module that can be utilized by both drivers (there are many examples of this within the kernel). Regards, David Ellingsworth -- 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: [PATCH] input: fix error at the default input_get_keycode call
Hi Valdis, Em 31-05-2010 16:01, valdis.kletni...@vt.edu escreveu: On Thu, 20 May 2010 13:51:46 EDT, valdis.kletni...@vt.edu said: *ping*? Still broken in a linux-next pull I did about an hour ago. The patch fixed one oops, but it just died a little further down - I'm guessing it missed a case? Sorry, -ETOOMUCHWORK I've removed the offended patches from my linux-next tree for now. I'll do more tests on it and provide a a fix for it soon. I've created a separate branch for the input changes at: http://git.linuxtv.org/v4l-dvb.git?a=shortlog;h=refs/heads/staging/input input_default_getkeycode_from_index() returns the scancode at kt_entry.scancode pointer. Fill it with the scancode address at the function call. Thanks-to: Vladis Kletnieks valdis.kletni...@vt.edu for pointing the issue Cc: Dmitry Torokhov dmitry.torok...@gmail.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com diff --git a/drivers/input/input.c b/drivers/input/input.c index 3b63fad..7851d8e 100644 Still dies, but in input_set_keycode() instead... [ 35.294528] BUG: unable to handle kernel NULL pointer dereference at (null ) [ 35.295005] IP: [(null)] (null) [ 35.296935] PGD 11da3c067 PUD 11d4ad067 PMD 0 [ 35.296935] Oops: 0010 [#1] PREEMPT SMP [ 35.299667] last sysfs file: /sys/devices/pci:00/:00:1a.7/usb1/idVendor [ 35.300328] CPU 0 [ 35.300328] Modules linked in: [ 35.300328] [ 35.300328] Pid: 2481, comm: keymap Not tainted 2.6.34-mmotm0519 #1 0X564R/Latitude E6500 [ 35.300328] RIP: 0010:[] [(null)] (null) [ 35.300328] RSP: 0018:88011d4d5cb0 EFLAGS: 00010046 [ 35.310163] RAX: RBX: 88011c03e000 RCX: 0081 [ 35.310163] RDX: 88011d4d5cc4 RSI: 88011d4d5cc8 RDI: 88011c03e000 [ 35.310163] RBP: 88011d4d5d28 R08: 88011e9b28e8 R09: 0001 [ 35.310163] R10: 81e0b160 R11: 0004 R12: 00a4 [ 35.310163] R13: 88011c03e830 R14: 0286 R15: 88011d4d5cc8 [ 35.310163] FS: 7f4b86283700() GS:88000260() knlGS: [ 35.319397] CS: 0010 DS: ES: CR0: 80050033 [ 35.319397] CR2: CR3: 00011d575000 CR4: 000406f0 [ 35.319397] DR0: DR1: DR2: [ 35.319397] DR3: DR6: 0ff0 DR7: 0400 [ 35.319397] Process keymap (pid: 2481, threadinfo 88011d4d4000, task 88011e9b28c0) [ 35.319397] Stack: [ 35.319397] 813bf3d1 88011d4d5cf8 00810246 008100a4 [ 35.319397] 0 0004 88011d4d5cc4 88011cf11200 [ 35.319397] 0 88011c179000 88011d4d5d28 0081 7fff9ee21fa0 [ 35.319397] Call Trace: [ 35.319397] [813bf3d1] ? input_set_keycode+0xad/0x12c [ 35.319397] [813c231d] evdev_do_ioctl+0x22b/0x79b [ 35.337913] [815a4b04] ? __mutex_lock_common+0x564/0x580 [ 35.337913] [813c28ca] ? evdev_ioctl_handler+0x3d/0x80 [ 35.341507] [813c28ca] ? evdev_ioctl_handler+0x3d/0x80 [ 35.341507] [813c28f0] evdev_ioctl_handler+0x63/0x80 [ 35.344034] [813c292a] evdev_ioctl+0xb/0xd [ 35.344034] [810ea6cd] vfs_ioctl+0x2d/0xa1 [ 35.344034] [810eac4c] do_vfs_ioctl+0x494/0x4cd [ 35.344034] [810eacdc] sys_ioctl+0x57/0x95 [ 35.344034] [8100266b] system_call_fastpath+0x16/0x1b [ 35.344034] Code: Bad RIP value. [ 35.344034] RIP [(null)] (null) [ 35.344034] RSP 88011d4d5cb0 [ 35.344034] CR2: [ 35.357018] ---[ end trace 394fa5aa8a77b6f3 ]--- -- 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
[PATCH] s2255drv: cleanup of device structure
s2255drv: cleanup of device structure From: Dean Anderson linux-...@sensoray.com cleanup of device structure. single channel array instead of multiple arrays in device for each channel property. simplifies open callback by removing search for channel index. Priority: normal Signed-off-by: Dean Anderson linux-...@sensoray.com drivers/media/video/s2255drv.c | 724 +++- 1 files changed, 352 insertions(+), 372 deletions(-) --- diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index 3c7a79f..8ec7c9a 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c @@ -191,7 +191,6 @@ struct s2255_bufferi { struct s2255_dmaqueue { struct list_headactive; struct s2255_dev*dev; - int channel; }; /* for firmware loading, fw_state */ @@ -226,51 +225,60 @@ struct s2255_pipeinfo { }; struct s2255_fmt; /*forward declaration */ +struct s2255_dev; + +struct s2255_channel { + struct video_device vdev; + int resources; + struct s2255_dmaqueue vidq; + struct s2255_bufferibuffer; + struct s2255_mode mode; + /* jpeg compression */ + struct v4l2_jpegcompression jc; + /* capture parameters (for high quality mode full size) */ + struct v4l2_captureparm cap_parm; + int cur_frame; + int last_frame; + + int b_acquire; + /* allocated image size */ + unsigned long req_image_size; + /* received packet size */ + unsigned long pkt_size; + int bad_payload; + unsigned long frame_count; + /* if JPEG image */ + int jpg_size; + /* if channel configured to default state */ + int configured; + wait_queue_head_t wait_setmode; + int setmode_ready; + /* video status items */ + int vidstatus; + wait_queue_head_t wait_vidstatus; + int vidstatus_ready; + unsigned intwidth; + unsigned intheight; + const struct s2255_fmt *fmt; + int idx; /* channel number on device, 0-3 */ +}; + struct s2255_dev { - struct video_device vdev[MAX_CHANNELS]; + struct s2255_channelchannel[MAX_CHANNELS]; struct v4l2_device v4l2_dev; - atomic_tchannels; /* number of channels registered */ + atomic_tnum_channels; int frames; struct mutexlock; struct mutexopen_lock; - int resources[MAX_CHANNELS]; struct usb_device *udev; struct usb_interface*interface; u8 read_endpoint; - - struct s2255_dmaqueue vidq[MAX_CHANNELS]; struct timer_list timer; struct s2255_fw *fw_data; struct s2255_pipeinfo pipe; - struct s2255_bufferibuffer[MAX_CHANNELS]; - struct s2255_mode mode[MAX_CHANNELS]; - /* jpeg compression */ - struct v4l2_jpegcompression jc[MAX_CHANNELS]; - /* capture parameters (for high quality mode full size) */ - struct v4l2_captureparm cap_parm[MAX_CHANNELS]; - const struct s2255_fmt *cur_fmt[MAX_CHANNELS]; - int cur_frame[MAX_CHANNELS]; - int last_frame[MAX_CHANNELS]; u32 cc; /* current channel */ - int b_acquire[MAX_CHANNELS]; - /* allocated image size */ - unsigned long req_image_size[MAX_CHANNELS]; - /* received packet size */ - unsigned long pkt_size[MAX_CHANNELS]; - int bad_payload[MAX_CHANNELS]; - unsigned long frame_count[MAX_CHANNELS]; int frame_ready; - /* if JPEG image */ - int jpg_size[MAX_CHANNELS]; - /* if channel configured to default state */ - int chn_configured[MAX_CHANNELS]; - wait_queue_head_t wait_setmode[MAX_CHANNELS]; - int setmode_ready[MAX_CHANNELS]; - /* video status items */ - int vidstatus[MAX_CHANNELS]; - wait_queue_head_t wait_vidstatus[MAX_CHANNELS]; - int vidstatus_ready[MAX_CHANNELS]; int chn_ready; spinlock_t slock; /* dsp firmware version (f2255usb.bin) */ @@ -298,16 +306,10 @@ struct s2255_buffer { struct s2255_fh { struct s2255_dev*dev; - const struct s2255_fmt *fmt; - unsigned intwidth; - unsigned int
[PATCH 0/6] gspca - gl860 new driver for MI2020 and others changes
Hello! This is a new submit of last sunday 3 patches. The first patch is the new driver for MI2020, other patches are functional changes and some minor changes. Regards -- 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
[PATCH 1/6] gspca - gl860: new driver for MI2020 sensor
gspca - gl860: new driver for MI2020 sensor From: Olivier Lorin o.lo...@laposte.net - new MI2020 driver version made from a webcam gift - all previous flavors of this driver removed Priority: normal Signed-off-by: Olivier Lorin o.lo...@laposte.net diff -urpN i0/gl860.c gl860/gl860.c --- i0/gl860.c 2010-03-27 10:08:16.0 +0100 +++ gl860/gl860.c 2010-06-01 23:26:22.0 +0200 @@ -91,7 +91,6 @@ SD_SETGET(contrast) /* control table */ static struct ctrl sd_ctrls_mi1320[GL860_NCTRLS]; static struct ctrl sd_ctrls_mi2020[GL860_NCTRLS]; -static struct ctrl sd_ctrls_mi2020b[GL860_NCTRLS]; static struct ctrl sd_ctrls_ov2640[GL860_NCTRLS]; static struct ctrl sd_ctrls_ov9655[GL860_NCTRLS]; @@ -121,8 +120,6 @@ static int gl860_build_control_table(str sd_ctrls = sd_ctrls_mi1320; else if (_MI2020_) sd_ctrls = sd_ctrls_mi2020; - else if (_MI2020b_) - sd_ctrls = sd_ctrls_mi2020b; else if (_OV2640_) sd_ctrls = sd_ctrls_ov2640; else if (_OV9655_) @@ -187,19 +184,6 @@ static const struct sd_desc sd_desc_mi20 .dq_callback = sd_callback, }; -static const struct sd_desc sd_desc_mi2020b = { - .name= MODULE_NAME, - .ctrls = sd_ctrls_mi2020b, - .nctrls = GL860_NCTRLS, - .config = sd_config, - .init= sd_init, - .isoc_init = sd_isoc_init, - .start = sd_start, - .stop0 = sd_stop0, - .pkt_scan= sd_pkt_scan, - .dq_callback = sd_callback, -}; - static const struct sd_desc sd_desc_ov2640 = { .name= MODULE_NAME, .ctrls = sd_ctrls_ov2640, @@ -344,8 +328,6 @@ static int sd_config(struct gspca_dev *g sd-sensor = ID_OV9655; else if (strcmp(sensor, MI2020) == 0) sd-sensor = ID_MI2020; - else if (strcmp(sensor, MI2020b) == 0) - sd-sensor = ID_MI2020b; /* Get sensor and set the suitable init/start/../stop functions */ if (gl860_guess_sensor(gspca_dev, vendor_id, product_id) == -1) @@ -369,13 +351,6 @@ static int sd_config(struct gspca_dev *g dev_init_settings = mi2020_init_settings; break; - case ID_MI2020b: - gspca_dev-sd_desc = sd_desc_mi2020b; - cam-cam_mode = mi2020_mode; - cam-nmodes = ARRAY_SIZE(mi2020_mode); - dev_init_settings = mi2020_init_settings; - break; - case ID_OV2640: gspca_dev-sd_desc = sd_desc_ov2640; cam-cam_mode = ov2640_mode; @@ -620,7 +595,7 @@ int gl860_RTx(struct gspca_dev *gspca_de else if (len 1 r len) PDEBUG(D_ERR, short ctrl transfer %d/%d, r, len); - if ((_MI2020_ || _MI2020b_ || _MI2020c_) (val || index)) + if (_MI2020_ (val || index)) msleep(1); if (_OV2640_) msleep(1); @@ -767,8 +742,6 @@ static int gl860_guess_sensor(struct gsp PDEBUG(D_PROBE, 05e3:f191 sensor MI1320 (1.3M)); } else if (_MI2020_) { PDEBUG(D_PROBE, 05e3:0503 sensor MI2020 (2.0M)); - } else if (_MI2020b_) { - PDEBUG(D_PROBE, 05e3:0503 sensor MI2020 alt. driver (2.0M)); } else if (_OV9655_) { PDEBUG(D_PROBE, 05e3:0503 sensor OV9655 (1.3M)); } else if (_OV2640_) { diff -urpN i0/gl860.h gl860/gl860.h --- i0/gl860.h 2010-03-27 10:08:25.0 +0100 +++ gl860/gl860.h 2010-06-01 23:10:52.0 +0200 @@ -32,12 +32,9 @@ #define ID_OV2640 2 #define ID_OV9655 4 #define ID_MI2020 8 -#define ID_MI2020b 16 #define _MI1320_ (((struct sd *) gspca_dev)-sensor == ID_MI1320) #define _MI2020_ (((struct sd *) gspca_dev)-sensor == ID_MI2020) -#define _MI2020b_ (((struct sd *) gspca_dev)-sensor == ID_MI2020b) -#define _MI2020c_ 0 #define _OV2640_ (((struct sd *) gspca_dev)-sensor == ID_OV2640) #define _OV9655_ (((struct sd *) gspca_dev)-sensor == ID_OV9655) diff -urpN i0/gl860-mi2020.c gl860/gl860-mi2020.c --- i0/gl860-mi2020.c 2010-03-27 10:08:16.0 +0100 +++ gl860/gl860-mi2020.c2010-05-30 23:40:33.0 +0200 @@ -1,6 +1,7 @@ /* Subdriver for the GL860 chip with the MI2020 sensor - * Author Olivier LORIN, from Ice/Soro2005's logs(A), Fret_saw/Hulkie's - * logs(B) and Tricids logs(C). With the help of Kytrix/BUGabundo/Blazercist. + * Author Olivier LORIN, from logs by Iceman/Soro2005 + Fret_saw/Hulkie/Tricid + * with the help of Kytrix/BUGabundo/Blazercist. + * Driver achieved thanks to a webcam gift by Kytrix. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,47 +21,70 @@ #include gl860.h +static u8 dat_wbal1[] = {0x8c, 0xa2, 0x0c}; + static u8 dat_bright1[] = {0x8c, 0xa2, 0x06}; static u8 dat_bright3[] = {0x8c, 0xa1, 0x02};
[PATCH 2/6] gspca - gl860: setting changes applied after an EOI
gspca - gl860: setting changes applied after an EOI From: Olivier Lorin o.lo...@laposte.net - Setting changes applied after an end of image marker reception This is the way MI2020 sensor works. It seems to be logical to wait for a complete image before to change a setting. Priority: normal Signed-off-by: Olivier Lorin o.lo...@laposte.net diff -urpN i1/gl860.c gl860/gl860.c --- i1/gl860.c 2010-06-01 23:26:22.0 +0200 +++ gl860/gl860.c 2010-06-01 23:11:26.0 +0200 @@ -63,7 +63,7 @@ static int sd_set_##thename(struct gspca \ sd-vcur.thename = val;\ if (gspca_dev-streaming)\ - sd-dev_camera_settings(gspca_dev);\ + sd-waitSet = 1;\ return 0;\ } \ static int sd_get_##thename(struct gspca_dev *gspca_dev, s32 *val)\ -- 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
[PATCH 3/6] gspca - gl860: USB control message delay unification
gspca - gl860: USB control message delay unification From: Olivier Lorin o.lo...@laposte.net - 1 ms msleep applied to each sensor after USB control data exchange This was done for two sensors because these exchanges were known to be too quick depending on laptop model. It is fairly logical to apply this delay to each sensor in order to prevent from having errors with untested hardwares. Priority: normal Signed-off-by: Olivier Lorin o.lo...@laposte.net diff -urpN i2/gl860.c gl860/gl860.c --- i2/gl860.c 2010-06-01 23:11:26.0 +0200 +++ gl860/gl860.c 2010-06-01 23:16:59.0 +0200 @@ -595,10 +595,7 @@ int gl860_RTx(struct gspca_dev *gspca_de else if (len 1 r len) PDEBUG(D_ERR, short ctrl transfer %d/%d, r, len); - if (_MI2020_ (val || index)) - msleep(1); - if (_OV2640_) - msleep(1); + msleep(1); return r; } -- 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
[PATCH 4/6] gspca - gl860: use of real resolutions for MI2020 sensor
gspca - gl860: use of real resolutions for MI2020 sensor From: Olivier Lorin o.lo...@laposte.net - Change of rounded image resolutions to the real ones for MI2020 sensor in order to discard 2 random lines in the bottom of images Priority: normal Signed-off-by: Olivier Lorin o.lo...@laposte.net diff -urpN i3/gl860.c gl860/gl860.c --- i3/gl860.c 2010-06-01 23:16:59.0 +0200 +++ gl860/gl860.c 2010-04-28 23:45:19.0 +0200 @@ -219,9 +219,9 @@ static struct v4l2_pix_format mi2020_mod .colorspace = V4L2_COLORSPACE_SRGB, .priv = 0 }, - { 800, 600, V4L2_PIX_FMT_SGBRG8, V4L2_FIELD_NONE, + { 800, 598, V4L2_PIX_FMT_SGBRG8, V4L2_FIELD_NONE, .bytesperline = 800, - .sizeimage = 800 * 600, + .sizeimage = 800 * 598, .colorspace = V4L2_COLORSPACE_SRGB, .priv = 1 }, @@ -231,9 +231,9 @@ static struct v4l2_pix_format mi2020_mod .colorspace = V4L2_COLORSPACE_SRGB, .priv = 2 }, - {1600, 1200, V4L2_PIX_FMT_SGBRG8, V4L2_FIELD_NONE, + {1600, 1198, V4L2_PIX_FMT_SGBRG8, V4L2_FIELD_NONE, .bytesperline = 1600, - .sizeimage = 1600 * 1200, + .sizeimage = 1600 * 1198, .colorspace = V4L2_COLORSPACE_SRGB, .priv = 3 }, -- 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
[PATCH 5/6] gspca - gl860: fix for wrong 0V9655 resolution identifier name
gspca - gl860: fix for wrong 0V9655 resolution identifier name From: Olivier Lorin o.lo...@laposte.net - Fix for a wrong OV9655 image resolution identifier name Priority: normal Signed-off-by: Olivier Lorin o.lo...@laposte.net diff -urpN i4/gl860-ov9655.c gl860/gl860-ov9655.c --- i4/gl860-ov9655.c 2010-06-01 23:18:28.0 +0200 +++ gl860/gl860-ov9655.c2010-04-28 13:39:14.0 +0200 @@ -69,7 +69,7 @@ static u8 *tbl_640[] = { \xd0\x01\xd1\x08\xd2\xe0\xd3\x01 \xd4\x10\xd5\x80 }; -static u8 *tbl_800[] = { +static u8 *tbl_1280[] = { \x00\x40\x07\x6a\x06\xf3\x0d\x6a \x10\x10\xc1\x01 , \x12\x80\x00\x00\x01\x98\x02\x80 \x03\x12\x04\x01\x0b\x57\x0e\x61 @@ -217,7 +217,7 @@ static int ov9655_init_post_alt(struct g ctrl_out(gspca_dev, 0x40, 5, 0x0001, 0x, 0, NULL); - tbl = (reso == IMAGE_640) ? tbl_640 : tbl_800; + tbl = (reso == IMAGE_640) ? tbl_640 : tbl_1280; ctrl_out(gspca_dev, 0x40, 3, 0x, 0x0200, tbl_length[0], tbl[0]); -- 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
[PATCH 6/6] gspca - gl860: text alignment
gspca - gl860: text alignment From: Olivier Lorin o.lo...@laposte.net - Extra spaces to align some variable names and a defined value Priority: normal Signed-off-by: Olivier Lorin o.lo...@laposte.net diff -urpN i5/gl860.h gl860/gl860.h --- i5/gl860.h 2010-06-01 23:20:10.0 +0200 +++ gl860/gl860.h 2010-04-28 13:36:36.0 +0200 @@ -41,7 +41,7 @@ #define IMAGE_640 0 #define IMAGE_800 1 #define IMAGE_1280 2 -#define IMAGE_1600 3 +#define IMAGE_1600 3 struct sd_gl860 { u16 backlight; @@ -72,10 +72,10 @@ struct sd { int (*dev_camera_settings)(struct gspca_dev *); u8 swapRB; - u8 mirrorMask; - u8 sensor; - s32 nbIm; - s32 nbRightUp; + u8 mirrorMask; + u8 sensor; + s32 nbIm; + s32 nbRightUp; u8 waitSet; }; -- 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
[PATCH] tm6000, video decoder fix
Hi Fix video decoder overflow when TV signal is lost. No more junk audio packets when TV signal is lost. diff -r 8f5129efe974 linux/drivers/staging/tm6000/tm6000-stds.c --- a/linux/drivers/staging/tm6000/tm6000-stds.cSun May 16 18:48:01 2010 -0300 +++ b/linux/drivers/staging/tm6000/tm6000-stds.cWed Jun 02 04:40:52 2010 +1000 @@ -78,7 +78,7 @@ {TM6010_REQ07_R01_VIDEO_CONTROL1, 0x0e}, {TM6010_REQ07_R02_VIDEO_CONTROL2, 0x5f}, {TM6010_REQ07_R03_YC_SEP_CONTROL, 0x00}, - {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x01}, + {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x31}, {TM6010_REQ07_R18_CHROMA_DTO_INCREMENT3, 0x1e}, {TM6010_REQ07_R19_CHROMA_DTO_INCREMENT2, 0x83}, {TM6010_REQ07_R1A_CHROMA_DTO_INCREMENT1, 0x0a}, @@ -136,7 +136,7 @@ {TM6010_REQ07_R01_VIDEO_CONTROL1, 0x0e}, {TM6010_REQ07_R02_VIDEO_CONTROL2, 0x5f}, {TM6010_REQ07_R03_YC_SEP_CONTROL, 0x02}, - {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x01}, + {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x31}, {TM6010_REQ07_R18_CHROMA_DTO_INCREMENT3, 0x1e}, {TM6010_REQ07_R19_CHROMA_DTO_INCREMENT2, 0x91}, {TM6010_REQ07_R1A_CHROMA_DTO_INCREMENT1, 0x1f}, @@ -194,7 +194,7 @@ {TM6010_REQ07_R01_VIDEO_CONTROL1, 0x0e}, {TM6010_REQ07_R02_VIDEO_CONTROL2, 0x5f}, {TM6010_REQ07_R03_YC_SEP_CONTROL, 0x02}, - {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x01}, + {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x31}, {TM6010_REQ07_R18_CHROMA_DTO_INCREMENT3, 0x25}, {TM6010_REQ07_R19_CHROMA_DTO_INCREMENT2, 0xd5}, {TM6010_REQ07_R1A_CHROMA_DTO_INCREMENT1, 0x63}, @@ -252,7 +252,7 @@ {TM6010_REQ07_R01_VIDEO_CONTROL1, 0x0e}, {TM6010_REQ07_R02_VIDEO_CONTROL2, 0x5f}, {TM6010_REQ07_R03_YC_SEP_CONTROL, 0x02}, - {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x01}, + {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x31}, {TM6010_REQ07_R18_CHROMA_DTO_INCREMENT3, 0x24}, {TM6010_REQ07_R19_CHROMA_DTO_INCREMENT2, 0x92}, {TM6010_REQ07_R1A_CHROMA_DTO_INCREMENT1, 0xe8}, @@ -309,7 +309,7 @@ {TM6010_REQ07_R01_VIDEO_CONTROL1, 0x0f}, {TM6010_REQ07_R02_VIDEO_CONTROL2, 0x5f}, {TM6010_REQ07_R03_YC_SEP_CONTROL, 0x00}, - {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x01}, + {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x31}, {TM6010_REQ07_R18_CHROMA_DTO_INCREMENT3, 0x1e}, {TM6010_REQ07_R19_CHROMA_DTO_INCREMENT2, 0x8b}, {TM6010_REQ07_R1A_CHROMA_DTO_INCREMENT1, 0xa2}, @@ -355,7 +355,7 @@ {TM6010_REQ07_R01_VIDEO_CONTROL1, 0x0e}, {TM6010_REQ07_R02_VIDEO_CONTROL2, 0x5f}, {TM6010_REQ07_R03_YC_SEP_CONTROL, 0x00}, - {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x01}, + {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x31}, {TM6010_REQ07_R18_CHROMA_DTO_INCREMENT3, 0x1e}, {TM6010_REQ07_R19_CHROMA_DTO_INCREMENT2, 0x83}, {TM6010_REQ07_R1A_CHROMA_DTO_INCREMENT1, 0x0a}, @@ -397,7 +397,7 @@ {TM6010_REQ07_R01_VIDEO_CONTROL1, 0x0e}, {TM6010_REQ07_R02_VIDEO_CONTROL2, 0x5f}, {TM6010_REQ07_R03_YC_SEP_CONTROL, 0x02}, - {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x01}, + {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x31}, {TM6010_REQ07_R18_CHROMA_DTO_INCREMENT3, 0x1e}, {TM6010_REQ07_R19_CHROMA_DTO_INCREMENT2, 0x91}, {TM6010_REQ07_R1A_CHROMA_DTO_INCREMENT1, 0x1f}, @@ -439,7 +439,7 @@ {TM6010_REQ07_R01_VIDEO_CONTROL1, 0x0e}, {TM6010_REQ07_R02_VIDEO_CONTROL2, 0x5f}, {TM6010_REQ07_R03_YC_SEP_CONTROL, 0x02}, - {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x01}, + {TM6010_REQ07_R07_OUTPUT_CONTROL, 0x31}, {TM6010_REQ07_R18_CHROMA_DTO_INCREMENT3, 0x25}, {TM6010_REQ07_R19_CHROMA_DTO_INCREMENT2, 0xd5}, {TM6010_REQ07_R1A_CHROMA_DTO_INCREMENT1, 0x63}, @@ -481,7 +481,7 @@ {TM6010_REQ07_R01_VIDEO_CONTROL1, 0x0e}, {TM6010_REQ07_R02_VIDEO_CONTROL2, 0x5f},
AVerTV Hybrid Volar HD
I just did something stupid and bought this USB device, which according to AVerMedia has no Linux driver and no planned support. Other than trying to sell this on eBay, is there a way of getting this to work? I have searched the archives and google, but cannot find any reference to this device as its just been released. I don't need support for the remote, I just want to use MythTV I'm running 64Bit Ubuntu Karmic with kernel 2.6.31-21-generic lsusb lists the device as 07ca:0830 Thanks for your help Leo -- 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