Re: go7007 question
Em Fri, 7 Sep 2012 18:18:31 +0400 vol...@telros.ru escreveu: > On Thu, Sep 06, 2012 at 11:10:14PM +0400, Volokh Konstantin wrote: > > On Mon, Sep 03, 2012 at 02:37:16PM -0400, Adam Rosi-Kessel wrote: > > > > > > [469.928881] wis-saa7115: initializing SAA7115 at address 32 on WIS > > > GO7007SB EZ-USB > > > > > > [469.989083] go7007: probing for module i2c:wis_saa7115 failed > > > > > > [470.004785] wis-uda1342: initializing UDA1342 at address 26 on WIS > > > GO7007SB EZ-USB > > > > > > [470.005454] go7007: probing for module i2c:wis_uda1342 failed > > > > > > [470.011659] wis-sony-tuner: initializing tuner at address 96 on WIS > > > GO7007SB EZ-USB > Hi, I generated patchs, that u may in your own go7007/ folder > It contains go7007 initialization and i2c_subdev fixing > > It was checked for 3.6 branch (compile only) Sorry, but I don't know what do you intend with this post. I can't merge this patch upstream for a number of reasons: - There's no Signed-off-by: on this patch; - There's no description explaining what is there at the patch; - the patch looks too complex - it is hard to believe that this is a single functional change. Merging lots of stuff into the same patch makes hard for it to be reviewed, so please break it into a proper, well-described patch series; - scripts/checkpatch.pl also didn't like the patch: ERROR: Missing Signed-off-by: line(s) total: 5 errors, 44 warnings, 393 lines checked Please fix it. Thanks! Mauro -- 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: go7007 question
On 9/10/2012 6:37 AM, vol...@telros.ru wrote: I`m not seeing wis-sa7115 module, (it`s main module for video device) OK, I recompiled with that built in. I had left it out because I had trouble compiling before, but now it went through fine. Seems to help. After recompiling, I have some progress--I can run gorecord and get audio, but there is no video signal in the resultant AVI. Some error in URB, did u machine have any ATI chipset? Yes: 01:00.0 VGA compatible controller: ATI Technologies Inc RV630 [Radeon HD 2600XT] (prog-if 00 [VGA controller]) 01:00.1 Audio device: ATI Technologies Inc RV630/M76 audio device [Radeon HD 2600 Series] Can u send me: ls /dev/video* ls /dev/audio* ls /dev/tun* # ls -l /dev/tun* /dev/aud* /dev/vid* /dev/dsp* ls: cannot access /dev/tun*: No such file or directory crw-rw+ 1 root audio 14, 4 Sep 10 16:57 /dev/audio crw-rw+ 1 root audio 14, 36 Sep 10 21:01 /dev/audio2 crw-rw+ 1 root audio 14, 3 Sep 10 16:57 /dev/dsp crw-rw+ 1 root audio 14, 35 Sep 10 21:01 /dev/dsp2 crw-rw+ 1 root video 81, 0 Sep 10 21:10 /dev/video0 tail -n 500 /var/log/messages (after calling go_record) Attached. Sep 10 21:05:40 storage kernel: [ 474.278489] [] ? idr_callback+0x80/0x80 Sep 10 21:05:40 storage kernel: [ 474.278492] [] ? send_to_group+0xe5/0x140 Sep 10 21:05:40 storage kernel: [ 474.278497] [] video_ioctl2+0x12/0x20 [videodev] Sep 10 21:05:40 storage kernel: [ 474.278501] [] ? v4l2_ioctl_get_lock+0x50/0x50 [videodev] Sep 10 21:05:40 storage kernel: [ 474.278505] [] v4l2_ioctl+0x103/0x150 [videodev] Sep 10 21:05:40 storage kernel: [ 474.278509] [] ? v4l2_open+0x140/0x140 [videodev] Sep 10 21:05:40 storage kernel: [ 474.278513] [] do_vfs_ioctl+0x7e/0x5c0 Sep 10 21:05:40 storage kernel: [ 474.278518] [] ? file_has_perm+0x9a/0xc0 Sep 10 21:05:40 storage kernel: [ 474.278522] [] ? selinux_file_ioctl+0x56/0x110 Sep 10 21:05:40 storage kernel: [ 474.278524] [] sys_ioctl+0x7f/0x90 Sep 10 21:05:40 storage kernel: [ 474.278528] [] sysenter_do_call+0x12/0x22 Sep 10 21:05:40 storage kernel: [ 474.278530] ---[ end trace 7ad74e28071d6ef7 ]--- Sep 10 21:05:45 storage kernel: [ 479.673046] [ cut here ] Sep 10 21:05:45 storage kernel: [ 479.673058] WARNING: at drivers/usb/core/urb.c:414 usb_submit_urb+0x12a/0x3e0() Sep 10 21:05:45 storage kernel: [ 479.673060] Hardware name: Inspiron 530 Sep 10 21:05:45 storage kernel: [ 479.673062] Device: usb Sep 10 21:05:45 storage kernel: [ 479.673062] BOGUS urb xfer, pipe 1 != type 3 Sep 10 21:05:45 storage kernel: [ 479.673064] Modules linked in: wis_sony_tuner(C) wis_uda1342(C) wis_saa7115(C) go7007_usb(C) go7007(C) v4l2_common videodev media ipt_MASQUERADE xt_tcpudp ipt_REDIRECT xt_conntrack iptable_mangle nf_conntrack_ftp ipt_REJECT xt_LOG xt_limit xt_multiport xt_state iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter ip_tables x_tables fuse ext4 jbd2 crc16 e1000e Sep 10 21:05:45 storage kernel: [ 479.673092] Pid: 11613, comm: gorecord-cvs Tainted: GWC 3.6.0-rc4.go7007.saa7115+ #3 Sep 10 21:05:45 storage kernel: [ 479.673094] Call Trace: Sep 10 21:05:45 storage kernel: [ 479.673100] [] warn_slowpath_common+0x6d/0xa0 Sep 10 21:05:45 storage kernel: [ 479.673103] [] ? usb_submit_urb+0x12a/0x3e0 Sep 10 21:05:45 storage kernel: [ 479.673106] [] ? usb_submit_urb+0x12a/0x3e0 Sep 10 21:05:45 storage kernel: [ 479.673109] [] warn_slowpath_fmt+0x2e/0x30 Sep 10 21:05:45 storage kernel: [ 479.673112] [] usb_submit_urb+0x12a/0x3e0 Sep 10 21:05:45 storage kernel: [ 479.673115] [] ? del_timer_sync+0x29/0x50 Sep 10 21:05:45 storage kernel: [ 479.673120] [] ? schedule_timeout+0xf9/0x1b0 Sep 10 21:05:45 storage kernel: [ 479.673124] [] go7007_usb_read_interrupt+0x1a/0x40 [go7007_usb] Sep 10 21:05:45 storage kernel: [ 479.673127] [] ? lock_timer_base+0x50/0x50 Sep 10 21:05:45 storage kernel: [ 479.673132] [] go7007_read_interrupt+0x24/0x100 [go7007] Sep 10 21:05:45 storage kernel: [ 479.673135] [] go7007_usb_interface_reset+0x4c/0x130 [go7007_usb] Sep 10 21:05:45 storage kernel: [ 479.673139] [] go7007_load_encoder+0xa0/0x180 [go7007] Sep 10 21:05:45 storage kernel: [ 479.673142] [] ? usb_kill_urb+0x90/0xa0 Sep 10 21:05:45 storage kernel: [ 479.673146] [] go7007_reset_encoder+0xb/0x20 [go7007] Sep 10 21:05:45 storage kernel: [ 479.673149] [] go7007_streamoff+0xab/0xb0 [go7007] Sep 10 21:05:45 storage kernel: [ 479.673153] [] vidioc_streamoff+0x29/0x80 [go7007] Sep 10 21:05:45 storage kernel: [ 479.673158] [] v4l_streamoff+0x15/0x20 [videodev] Sep 10 21:05:45 storage kernel: [ 479.673163] [] __video_do_ioctl+0x28c/0x3a0 [videodev] Sep 10 21:05:45 storage kernel: [ 479.673166] [] ? check_preempt_curr+0x72/0x90 Sep 10 21:05:45 storage kernel: [ 479.673170] [] ? try_to_wake_up+0x197/0x220 Sep 10 21:05:45 storage kernel: [ 479.673175] [] ? _copy_from_user+0x38/0x130 Sep 10 21:05:
Re: go7007 question
On Sun, Sep 09, 2012 at 08:21:55AM -0400, Adam Rosi-Kessel wrote: > On Sat, Sep 08, 2012 at 10:23:31PM -0400, Adam Rosi-Kessel wrote: > > On Fri, Sep 07, 2012 at 06:18:31PM +0400, vol...@telros.ru wrote: > > > On Thu, Sep 06, 2012 at 11:10:14PM +0400, Volokh Konstantin wrote: > > e > On Mon, Sep 03, 2012 at 02:37:16PM -0400, Adam Rosi-Kessel wrote: > > > > > [469.928881] wis-saa7115: initializing SAA7115 at address 32 on WIS > > > > > GO7007SB EZ-USB > > > Hi, I generated patchs, that u may in your own go7007/ folder > > > It contains go7007 initialization and i2c_subdev fixing > > > It was checked for 3.6 branch (compile only) > > So I have this installed now (patched with your 3.6 patch) but I'm not > > seeing the device. > > OK, this was just a problem of needing to mount /proc/usb. With that > mounted, the device is detected and the modules load automatically. > gorecord just hangs, however: > > [ cut here ] > WARNING: at drivers/usb/core/urb.c:414 usb_submit_urb+0x12a/0x3e0() > Hardware name: Inspiron 530 > Device: usb > BOGUS urb xfer, pipe 1 != type 3 > Modules linked in: wis_sony_tuner(C) wis_uda1342(C) go7007_usb(C) go7007(C) > v4l2_common videodev media xt_LOG fuse ext4 jbd2 crc16 e1000e I`m not seeing wis-sa7115 module, (it`s main module for video device) > [last unloaded: go7007] > Pid: 18595, comm: gorecord Tainted: GWC 3.6.0-rc4 > Call Trace: > [] warn_slowpath_common+0x6d/0xa0 > [] ? usb_submit_urb+0x12a/0x3e0 Some error in URB, did u machine have any ATI chipset? > [] ? usb_submit_urb+0x12a/0x3e0 > [] warn_slowpath_fmt+0x2e/0x30 > [] usb_submit_urb+0x12a/0x3e0 > [] go7007_usb_read_interrupt+0x1a/0x40 [go7007_usb] > [] go7007_read_interrupt+0x24/0x100 [go7007] > [] ? go7007_usb_send_firmware+0x3e/0x60 [go7007_usb] > [] go7007_start_encoder+0x7d/0x120 [go7007] > [] ? mutex_lock+0x14/0x40 > [] vidioc_streamon+0xdc/0xf0 [go7007] > [] v4l_streamon+0x15/0x20 [videodev] > [] __video_do_ioctl+0x28c/0x3a0 [videodev] > [] ? ktime_get+0x43/0xf0 > [] ? clockevents_program_event+0xca/0x180 > [] ? _copy_from_user+0x38/0x130 > [] video_usercopy+0x143/0x320 [videodev] > [] ? irq_exit+0x54/0xc0 > [] ? smp_apic_timer_interrupt+0x54/0x90 > [] ? inotify_handle_event+0x51/0xc0 > [] ? idr_callback+0x80/0x80 > [] ? apic_timer_interrupt+0x2a/0x30 > [] video_ioctl2+0x12/0x20 [videodev] > [] ? v4l2_ioctl_get_lock+0x50/0x50 [videodev] > [] v4l2_ioctl+0x103/0x150 [videodev] > [] ? v4l2_open+0x140/0x140 [videodev] Can u send me: ls /dev/video* ls /dev/audio* ls /dev/tun* tail -n 500 /var/log/messages (after calling go_record) > [] do_vfs_ioctl+0x7e/0x5c0 > [] ? file_has_perm+0x9a/0xc0 > [] ? selinux_file_ioctl+0x56/0x110 > [] sys_ioctl+0x7f/0x90 > [] sysenter_do_call+0x12/0x22 > ---[ end trace 04d11de2981e53e3 ]--- Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: go7007 question
On Sat, Sep 08, 2012 at 10:23:31PM -0400, Adam Rosi-Kessel wrote: > On Fri, Sep 07, 2012 at 06:18:31PM +0400, vol...@telros.ru wrote: > > On Thu, Sep 06, 2012 at 11:10:14PM +0400, Volokh Konstantin wrote: > > > On Mon, Sep 03, 2012 at 02:37:16PM -0400, Adam Rosi-Kessel wrote: > > > > > > > > [469.928881] wis-saa7115: initializing SAA7115 at address 32 on WIS > > > > GO7007SB EZ-USB > > > > > > > > [469.989083] go7007: probing for module i2c:wis_saa7115 failed > > > > > > > > [470.004785] wis-uda1342: initializing UDA1342 at address 26 on WIS > > > > GO7007SB EZ-USB > > > > > > > > [470.005454] go7007: probing for module i2c:wis_uda1342 failed > > > > > > > > [470.011659] wis-sony-tuner: initializing tuner at address 96 on WIS > > > > GO7007SB EZ-USB > > Hi, I generated patchs, that u may in your own go7007/ folder > > It contains go7007 initialization and i2c_subdev fixing > > > > It was checked for 3.6 branch (compile only) > > So I have this installed now (patched with your 3.6 patch) but I'm not > seeing the device. > > The module is there: > > [ 416.189030] Linux media interface: v0.10 > [ 416.198616] Linux video capture interface: v2.00 > [ 416.220656] wis_uda1342: module is from the staging directory, the quality > is unknown, you have been warned. > > # lsmod|grep -i go7 > go7007_usb 10059 0 > go7007 46966 1 go7007_usb > v4l2_common 4206 1 go7007 > videodev 78250 2 go7007,v4l2_common > > # uname -a > Linux storage 3.6.0-rc4.ajk+ #5 SMP Sat Sep 8 22:05:57 EDT 2012 i686 GNU/Linux > > # grep -i go7 /boot/config-`uname -r` > CONFIG_VIDEO_GO7007=m > CONFIG_VIDEO_GO7007_USB=m > CONFIG_VIDEO_GO7007_OV7640=m > # CONFIG_VIDEO_GO7007_SAA7113 is not set Linux must autoload these modules for working: wis-saa7115 wis-uda1342 wis-sony-tuner, so need set m below: > # CONFIG_VIDEO_GO7007_SAA7115 is not set > CONFIG_VIDEO_GO7007_TW9903=m > CONFIG_VIDEO_GO7007_UDA1342=m > CONFIG_VIDEO_GO7007_SONY_TUNER=m > CONFIG_VIDEO_GO7007_TW2804=m after compilation need install modules, or handly load them. modprobe wis-saa7115, etc ... for each modules. > > But I'm not getting any device to appear: > > # ls /dev/video* > ls: cannot access /dev/video*: No such file or directory > # gorecord -format mpeg4 test.avi > Driver loaded but no GO7007 devices found. > Is the device connected properly? > > When I connect the device I see this: > > [ 585.705406] usb 1-4: udev 4, busnum 1, minor = 3 > [ 585.705412] usb 1-4: New USB device found, idVendor=093b, idProduct=a004 > [ 585.705415] usb 1-4: New USB device strings: Mfr=0, Product=0, > SerialNumber=0 > [ 585.705532] usb 1-4: usb_probe_device > [ 585.705535] usb 1-4: configuration #1 chosen from 1 choice > [ 585.706233] usb 1-4: adding 1-4:1.0 (config #1, interface 0) > > But no video node. > > Am I missing something? > > Adam -- 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: go7007 question
On Sat, Sep 08, 2012 at 10:23:31PM -0400, Adam Rosi-Kessel wrote: > On Fri, Sep 07, 2012 at 06:18:31PM +0400, vol...@telros.ru wrote: > > On Thu, Sep 06, 2012 at 11:10:14PM +0400, Volokh Konstantin wrote: > e > On Mon, Sep 03, 2012 at 02:37:16PM -0400, Adam Rosi-Kessel wrote: > > > > [469.928881] wis-saa7115: initializing SAA7115 at address 32 on WIS > > > > GO7007SB EZ-USB > > Hi, I generated patchs, that u may in your own go7007/ folder > > It contains go7007 initialization and i2c_subdev fixing > > It was checked for 3.6 branch (compile only) > So I have this installed now (patched with your 3.6 patch) but I'm not > seeing the device. OK, this was just a problem of needing to mount /proc/usb. With that mounted, the device is detected and the modules load automatically. gorecord just hangs, however: [ cut here ] WARNING: at drivers/usb/core/urb.c:414 usb_submit_urb+0x12a/0x3e0() Hardware name: Inspiron 530 Device: usb BOGUS urb xfer, pipe 1 != type 3 Modules linked in: wis_sony_tuner(C) wis_uda1342(C) go7007_usb(C) go7007(C) v4l2_common videodev media xt_LOG fuse ext4 jbd2 crc16 e1000e [last unloaded: go7007] Pid: 18595, comm: gorecord Tainted: GWC 3.6.0-rc4 Call Trace: [] warn_slowpath_common+0x6d/0xa0 [] ? usb_submit_urb+0x12a/0x3e0 [] ? usb_submit_urb+0x12a/0x3e0 [] warn_slowpath_fmt+0x2e/0x30 [] usb_submit_urb+0x12a/0x3e0 [] go7007_usb_read_interrupt+0x1a/0x40 [go7007_usb] [] go7007_read_interrupt+0x24/0x100 [go7007] [] ? go7007_usb_send_firmware+0x3e/0x60 [go7007_usb] [] go7007_start_encoder+0x7d/0x120 [go7007] [] ? mutex_lock+0x14/0x40 [] vidioc_streamon+0xdc/0xf0 [go7007] [] v4l_streamon+0x15/0x20 [videodev] [] __video_do_ioctl+0x28c/0x3a0 [videodev] [] ? ktime_get+0x43/0xf0 [] ? clockevents_program_event+0xca/0x180 [] ? _copy_from_user+0x38/0x130 [] video_usercopy+0x143/0x320 [videodev] [] ? irq_exit+0x54/0xc0 [] ? smp_apic_timer_interrupt+0x54/0x90 [] ? inotify_handle_event+0x51/0xc0 [] ? idr_callback+0x80/0x80 [] ? apic_timer_interrupt+0x2a/0x30 [] video_ioctl2+0x12/0x20 [videodev] [] ? v4l2_ioctl_get_lock+0x50/0x50 [videodev] [] v4l2_ioctl+0x103/0x150 [videodev] [] ? v4l2_open+0x140/0x140 [videodev] [] do_vfs_ioctl+0x7e/0x5c0 [] ? file_has_perm+0x9a/0xc0 [] ? selinux_file_ioctl+0x56/0x110 [] sys_ioctl+0x7f/0x90 [] sysenter_do_call+0x12/0x22 ---[ end trace 04d11de2981e53e3 ]--- -- 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: go7007 question
On Fri, Sep 07, 2012 at 06:18:31PM +0400, vol...@telros.ru wrote: > On Thu, Sep 06, 2012 at 11:10:14PM +0400, Volokh Konstantin wrote: > > On Mon, Sep 03, 2012 at 02:37:16PM -0400, Adam Rosi-Kessel wrote: > > > > > > [469.928881] wis-saa7115: initializing SAA7115 at address 32 on WIS > > > GO7007SB EZ-USB > > > > > > [469.989083] go7007: probing for module i2c:wis_saa7115 failed > > > > > > [470.004785] wis-uda1342: initializing UDA1342 at address 26 on WIS > > > GO7007SB EZ-USB > > > > > > [470.005454] go7007: probing for module i2c:wis_uda1342 failed > > > > > > [470.011659] wis-sony-tuner: initializing tuner at address 96 on WIS > > > GO7007SB EZ-USB > Hi, I generated patchs, that u may in your own go7007/ folder > It contains go7007 initialization and i2c_subdev fixing > > It was checked for 3.6 branch (compile only) So I have this installed now (patched with your 3.6 patch) but I'm not seeing the device. The module is there: [ 416.189030] Linux media interface: v0.10 [ 416.198616] Linux video capture interface: v2.00 [ 416.220656] wis_uda1342: module is from the staging directory, the quality is unknown, you have been warned. # lsmod|grep -i go7 go7007_usb 10059 0 go7007 46966 1 go7007_usb v4l2_common 4206 1 go7007 videodev 78250 2 go7007,v4l2_common # uname -a Linux storage 3.6.0-rc4.ajk+ #5 SMP Sat Sep 8 22:05:57 EDT 2012 i686 GNU/Linux # grep -i go7 /boot/config-`uname -r` CONFIG_VIDEO_GO7007=m CONFIG_VIDEO_GO7007_USB=m CONFIG_VIDEO_GO7007_OV7640=m # CONFIG_VIDEO_GO7007_SAA7113 is not set # CONFIG_VIDEO_GO7007_SAA7115 is not set CONFIG_VIDEO_GO7007_TW9903=m CONFIG_VIDEO_GO7007_UDA1342=m CONFIG_VIDEO_GO7007_SONY_TUNER=m CONFIG_VIDEO_GO7007_TW2804=m But I'm not getting any device to appear: # ls /dev/video* ls: cannot access /dev/video*: No such file or directory # gorecord -format mpeg4 test.avi Driver loaded but no GO7007 devices found. Is the device connected properly? When I connect the device I see this: [ 585.705406] usb 1-4: udev 4, busnum 1, minor = 3 [ 585.705412] usb 1-4: New USB device found, idVendor=093b, idProduct=a004 [ 585.705415] usb 1-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 585.705532] usb 1-4: usb_probe_device [ 585.705535] usb 1-4: configuration #1 chosen from 1 choice [ 585.706233] usb 1-4: adding 1-4:1.0 (config #1, interface 0) But no video node. Am I missing something? Adam -- 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: go7007 question
On Thu, Sep 06, 2012 at 11:10:14PM +0400, Volokh Konstantin wrote: > On Mon, Sep 03, 2012 at 02:37:16PM -0400, Adam Rosi-Kessel wrote: > > > > [469.928881] wis-saa7115: initializing SAA7115 at address 32 on WIS > > GO7007SB EZ-USB > > > > [469.989083] go7007: probing for module i2c:wis_saa7115 failed > > > > [470.004785] wis-uda1342: initializing UDA1342 at address 26 on WIS > > GO7007SB EZ-USB > > > > [470.005454] go7007: probing for module i2c:wis_uda1342 failed > > > > [470.011659] wis-sony-tuner: initializing tuner at address 96 on WIS > > GO7007SB EZ-USB Hi, I generated patchs, that u may in your own go7007/ folder It contains go7007 initialization and i2c_subdev fixing It was checked for 3.6 branch (compile only) Regards, Volokh Konstantin diff --git a/drivers/staging/media/go7007/go7007-driver.c b/drivers/staging/media/go7007/go7007-driver.c index ece2dd1..2dff9b5 100644 --- a/drivers/staging/media/go7007/go7007-driver.c +++ b/drivers/staging/media/go7007/go7007-driver.c @@ -173,6 +173,11 @@ static int go7007_init_encoder(struct go7007 *go) go7007_write_addr(go, 0x3c82, 0x0001); go7007_write_addr(go, 0x3c80, 0x00fe); } + if (go->board_id == GO7007_BOARDID_ADLINK_MPG24) { + /* set GPIO5 to be an output, currently low */ + go7007_write_addr(go, 0x3c82, 0x); + go7007_write_addr(go, 0x3c80, 0x00df); + } return 0; } @@ -192,17 +197,23 @@ int go7007_reset_encoder(struct go7007 *go) /* * Attempt to instantiate an I2C client by ID, probably loading a module. */ -static int init_i2c_module(struct i2c_adapter *adapter, const char *type, - int addr) +static int init_i2c_module(struct i2c_adapter *adapter, const struct go_i2c *const i2c) { struct go7007 *go = i2c_get_adapdata(adapter); struct v4l2_device *v4l2_dev = &go->v4l2_dev; + struct i2c_board_info info; + + memset(&info, 0, sizeof(info)); + strlcpy(info.type, i2c->type, sizeof(info.type)); + info.addr = i2c->addr; - if (v4l2_i2c_new_subdev(v4l2_dev, adapter, type, addr, NULL)) + if (i2c->id == I2C_DRIVERID_WIS_TW2804) + info.flags |= I2C_CLIENT_TEN; + if (v4l2_i2c_new_subdev_board(v4l2_dev, adapter, &info, NULL)) return 0; - printk(KERN_INFO "go7007: probing for module i2c:%s failed\n", type); - return -1; + printk(KERN_INFO "go7007: probing for module i2c:%s failed\n", i2c->type); + return -EINVAL; } /* @@ -238,9 +249,7 @@ int go7007_register_encoder(struct go7007 *go) } if (go->i2c_adapter_online) { for (i = 0; i < go->board_info->num_i2c_devs; ++i) - init_i2c_module(&go->i2c_adapter, - go->board_info->i2c_devs[i].type, - go->board_info->i2c_devs[i].addr); + init_i2c_module(&go->i2c_adapter, &go->board_info->i2c_devs[i]); if (go->board_id == GO7007_BOARDID_ADLINK_MPG24) i2c_clients_command(&go->i2c_adapter, DECODER_SET_CHANNEL, &go->channel_number); @@ -571,7 +580,7 @@ struct go7007 *go7007_alloc(struct go7007_board_info *board, struct device *dev) struct go7007 *go; int i; - go = kmalloc(sizeof(struct go7007), GFP_KERNEL); + go = kzalloc(sizeof(struct go7007), GFP_KERNEL); if (go == NULL) return NULL; go->dev = dev; diff --git a/drivers/staging/media/go7007/go7007-priv.h b/drivers/staging/media/go7007/go7007-priv.h index b58c394..b7b939a 100644 --- a/drivers/staging/media/go7007/go7007-priv.h +++ b/drivers/staging/media/go7007/go7007-priv.h @@ -88,7 +88,7 @@ struct go7007_board_info { int audio_bclk_div; int audio_main_div; int num_i2c_devs; - struct { + struct go_i2c { const char *type; int id; int addr; diff --git a/drivers/staging/media/go7007/go7007-usb.c b/drivers/staging/media/go7007/go7007-usb.c index 5443e25..9dbf5ec 100644 --- a/drivers/staging/media/go7007/go7007-usb.c +++ b/drivers/staging/media/go7007/go7007-usb.c @@ -1110,9 +1110,6 @@ static int go7007_usb_probe(struct usb_interface *intf, } else { u16 channel; - /* set GPIO5 to be an output, currently low */ - go7007_write_addr(go, 0x3c82, 0x); - go7007_write_addr(go, 0x3c80, 0x00df); /* read channel number from GPIO[1:0] */ go7007_read_addr(go, 0x3c81, &channel); channel &= 0x3; @@ -1245,7 +1242,6 @@ static void go7007_usb_disconnect(struct usb_interface *intf) struct urb *vurb, *aurb; int i;
Re: go7007 question
On Mon, Sep 03, 2012 at 02:37:16PM -0400, Adam Rosi-Kessel wrote: > Hi: > > I've been searching around for help with go7007 on a Plextor device > (PX-TV402U) and can't find any forum for questions/help. You seem to > be active in development--wondering if you might have any tips. > > I'm running 3.2.23, using the go7007 drivers from your > wis-go7007-3.2.11.patch. I found that it very old patch and it don`t recover existing problems on new linux brunch > > When I try to run gorecord, it can't find the audio device ("Unable > to find associated ALSA device node"). > > If I manually specify an audio device, I get this: > > gorecord -vdevice /dev/video0 -adevice /dev/dsp -format mpeg4 test.avi > > Unable to open /dev/video0: Device or resource busy > > > There seems to be a kernel oops of sort when I connect the USB device: > > [469.653440] go7007-usb: probing new GO7007 USB board > > [469.909932] go7007: registering new Plextor PX-TV402U-NA > > [469.909987] go7007: registered device video0 [v4l2] > > [469.928881] wis-saa7115: initializing SAA7115 at address 32 on WIS > GO7007SB EZ-USB > > [469.989083] go7007: probing for module i2c:wis_saa7115 failed > > [470.004785] wis-uda1342: initializing UDA1342 at address 26 on WIS > GO7007SB EZ-USB > > [470.005454] go7007: probing for module i2c:wis_uda1342 failed > > [470.011659] wis-sony-tuner: initializing tuner at address 96 on WIS > GO7007SB EZ-USB > > [470.011676] Modules linked in: wis_sony_tuner(O) wis_uda1342(O) > wis_saa7115(O) go7007_usb(O+) go7007(O) v4l2_common videodev media > cpufreq_conservative cpufreq_powersave cpufreq_stats > cpufreq_userspace parport_pc ppdev lp parport ipt_MASQUERADE > xt_tcpudp ipt_REDIRECT xt_conntrack iptable_mangle nf_conntrack_ftp > ipt_REJECT ipt_LOG xt_limit xt_multiport xt_state iptable_nat nf_nat > nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter > ip_tables x_tables bridge stp bnep rfcomm bluetooth rfkill radeon > ttm drm_kms_helper drm i2c_algo_bit power_supply binfmt_misc > dm_snapshot dm_mirror dm_region_hash dm_log dm_mod fuse nfsd nfs > lockd fscache auth_rpcgss nfs_acl sunrpc hwmon_vid > snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec > snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm tpm_tis tpm snd_seq_midi > snd_rawmidi snd_seq_midi_event snd_seq acpi_cpufreq mperf snd_timer > snd_seq_device i2c_i801 serio_raw evdev i2c_core coretemp dcdbas > pcspkr tpm_bios snd soundcore processor snd_page_alloc button ext4 > mbcache jbd2 crc16 sg sr_mod cdrom sd_mod crc_t10dif usb_storage uas > ata_generic uhci_hcd ata_piix libata ehci_hcd r8169 mii floppy > scsi_mod usbcore usb_common e1000e thermal fan thermal_sys [last > unloaded: scsi_wait_scan] > > [470.011810][] ? go7007_register_encoder+0xbf/0x11a [go7007] > > [470.011816][] ? go7007_usb_probe+0x47c/0x60c [go7007_usb] When driver probes I found bug that i2c_subdev not init properly > > [470.011932] Modules linked in: wis_sony_tuner(O) wis_uda1342(O) > wis_saa7115(O) go7007_usb(O+) go7007(O) v4l2_common videodev media > cpufreq_conservative cpufreq_powersave cpufreq_stats > cpufreq_userspace parport_pc ppdev lp parport ipt_MASQUERADE > xt_tcpudp ipt_REDIRECT xt_conntrack iptable_mangle nf_conntrack_ftp > ipt_REJECT ipt_LOG xt_limit xt_multiport xt_state iptable_nat nf_nat > nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter > ip_tables x_tables bridge stp bnep rfcomm bluetooth rfkill radeon > ttm drm_kms_helper drm i2c_algo_bit power_supply binfmt_misc > dm_snapshot dm_mirror dm_region_hash dm_log dm_mod fuse nfsd nfs > lockd fscache auth_rpcgss nfs_acl sunrpc hwmon_vid > snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec > snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm tpm_tis tpm snd_seq_midi > snd_rawmidi snd_seq_midi_event snd_seq acpi_cpufreq mperf snd_timer > snd_seq_device i2c_i801 serio_raw evdev i2c_core coretemp dcdbas > pcspkr tpm_bios snd soundcore processor snd_page_alloc button ext4 > mbcache jbd2 crc16 sg sr_mod cdrom sd_mod crc_t10dif usb_storage uas > ata_generic uhci_hcd ata_piix libata ehci_hcd r8169 mii floppy > scsi_mod usbcore usb_common e1000e thermal fan thermal_sys [last > unloaded: scsi_wait_scan] > > [470.012070][] ? go7007_register_encoder+0xbf/0x11a [go7007] > > [470.012075][] ? go7007_usb_probe+0x47c/0x60c [go7007_usb] > > Thanks in advance for any pointers! > I recommend to try to use latest patches: http://www.mail-archive.com/linux-media@vger.kernel.org/msg50930.html http://www.mail-archive.com/linux-media@vger.kernel.org/msg50931.html http://www.mail-archive.com/linux-media@vger.kernel.org/msg50923.html http://www.mail-archive.com/linux-media@vger.kernel.org/msg50922.html http://www.mail-archive.com/linux-media@vger.kernel.org/msg50924.html http://www.mail-archive.com/linux-media@vger.kernel.org/msg50929.html http://www.mail-archive.com/linux-media@vger.kernel.org/msg50926.html http://www.mail-archive.com/linux-media@vger.kernel.org/msg50925.html http://www.mai