STK1160 not working

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

STK1160 not working

Postby Kabbone » Fri Jan 15, 2016 2:20 pm

Has anyone got a videograbber with stk1160 chipset working on the raspberry pi? At my notebook with Arch (Kernel 4.3.3-2) it is working flawlessly but on the pi it makes problems.

After the plugin everything seems to be fine:
dmesg
$this->bbcode_second_pass_code('', '
[77682.293925] usb 1-1.3.4: new high-speed USB device number 9 using dwc_otg
[77682.395030] usb 1-1.3.4: New USB device found, idVendor=05e1, idProduct=0408
[77682.395067] usb 1-1.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[77682.395084] usb 1-1.3.4: Product: USB 2.0 Video Capture Controller
[77682.395099] usb 1-1.3.4: Manufacturer: Syntek Semiconductor
[77682.400387] usb 1-1.3.4: New device Syntek Semiconductor USB 2.0 Video Capture Controller @ 480 Mbps (05e1:0408, interface 0, class 0)
[77682.400422] usb 1-1.3.4: video interface 0 found
[77683.093208] saa7115 3-0025: saa7113 found @ 0x4a (stk1160)
[77684.354789] stk1160: driver ver 0.9.5 successfully loaded
[77684.455669] stk1160 1-1.3.4:1.0: AC'97 0 access is not valid [0x0], removing mixer.
[77684.466576] stk1160: registers to NTSC like standard
[77684.628631] stk1160 1-1.3.4:1.0: V4L2 device registered as video0
')

by trying to access video0 there seems to be a problem with allocating memory
$this->bbcode_second_pass_code('', '
$ mplayer -vo fbdev2 -tv device=/dev/video0:norm=PAL-60 tv://
MPlayer SVN-r37379 (C) 2000-2015 MPlayer Team
210 audio & 441 video codecs
mplayer: could not open config files /home/kabbone/.lircrc and /etc/lirc/lircrc
mplayer: No such file or directory
Failed to read LIRC config file ~/.lircrc.

Playing tv://.
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
comment: first try, more to come ;-)
Selected device: stk1160
Capabilities: video capture read/write streaming
supported norms: 0 = NTSC; 1 = NTSC-M; 2 = NTSC-M-JP; 3 = NTSC-M-KR; 4 = NTSC-443; 5 = PAL; 6 = PAL-BG; 7 = PAL-H; 8 = PAL-I; 9 = PAL-DK; 10 = PAL-M; 11 = PAL-N; 12 = PAL-Nc; 13 = PAL-60; 14 = SECAM; 15 = SECAM-B; 16 = SECAM-G; 17 = SECAM-H; 18 = SECAM-DK; 19 = SECAM-L; 20 = SECAM-Lc;
inputs: 0 = Composite0; 1 = Composite1; 2 = Composite2; 3 = Composite3; 4 = S-Video;
Current input: 0
Current format: UYVY
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl streamon failed: Cannot allocate memory
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x15b0520] bicubic scaler, from uyvy422 to bgra using C
VO: [fbdev2] 720x480 => 720x480 BGRA
Selected video codec: [rawuyvy] vfm: raw (RAW UYVY)
==========================================================================
Audio: no sound
Starting playback...
V: 0.0 88/ 88 ??% ??% ??,?% 0 0


MPlayer interrupted by signal 2 in module: video_read_frame
V: 0.0 89/ 89 ??% ??% ??,?% 0 0
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 0 frames dropped.

Exiting... (Quit)
')

dmesg
$this->bbcode_second_pass_code('', '
[77716.135023] stk1160: queue_setup: buffer count 8, each 691200 bytes
[77716.148833] stk1160: setting alternate 5
[77716.148864] stk1160: minimum isoc packet size: 3072 (alt=5)
[77716.148875] stk1160: setting alt 5 with wMaxPacketSize=3072
[77716.149434] stk1160: allocating urbs...
[77716.149477] stk1160: cannot alloc 196608 bytes for tx[0] buffer
[77716.155690] stk1160: freeing 1 urb buffers...
[77716.155708] stk1160: all urb buffers freed
[77716.161021] stk1160: buffer [c7284800/0] aborted
[77716.161048] stk1160: buffer [c7284000/1] aborted
[77716.161060] stk1160: buffer [c7285400/2] aborted
[77716.161070] stk1160: buffer [c7285c00/3] aborted
[77716.161081] stk1160: buffer [d0e21800/4] aborted
[77716.161091] stk1160: buffer [c4c8a000/5] aborted
[77716.161102] stk1160: buffer [c4c8a800/6] aborted
[77716.161112] stk1160: buffer [c4f52c00/7] aborted
[77716.161123] ------------[ cut here ]------------
[77716.161214] WARNING: CPU: 0 PID: 16127 at drivers/media/v4l2-core/videobuf2-core.c:1825 vb2_start_streaming+0xb8/0x158 [videobuf2_core]()
[77716.161227] Modules linked in: joydev snd_usb_audio snd_usbmidi_lib snd_hwdep snd_rawmidi snd_seq_device saa7115 stk1160 snd_ac97_codec ac97_bus videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common videodev media snd_soc_wm8804_i2c snd_soc_wm8804 regmap_i2c evdev iptable_filter snd_soc_bcm2708_i2s regmap_mmio snd_soc_hifiberry_digi snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd i2c_bcm2708 spi_bcm2835 ir_lirc_codec ir_xmp_decoder lirc_dev ir_mce_kbd_decoder ir_sharp_decoder bcm2835_gpiomem ir_sanyo_decoder ir_sony_decoder ir_jvc_decoder ir_rc6_decoder ir_rc5_decoder ir_nec_decoder bcm2835_rng rc_rc6_mce gpio_ir_recv rc_core uio_pdrv_genirq uio sch_fq_codel bcm2708_rng rng_core ip_tables x_tables ipv6
[77716.161550] CPU: 0 PID: 16127 Comm: hyperion-v4l2 Tainted: G W 4.1.15-3-ARCH #1
[77716.161565] Hardware name: BCM2708
[77716.161634] [<c00145a4>] (unwind_backtrace) from [<c0012558>] (show_stack+0x10/0x14)
[77716.161682] [<c0012558>] (show_stack) from [<c00267dc>] (warn_slowpath_common+0x78/0xb0)
[77716.161711] [<c00267dc>] (warn_slowpath_common) from [<c00268b0>] (warn_slowpath_null+0x1c/0x24)
[77716.161773] [<c00268b0>] (warn_slowpath_null) from [<bf2ac214>] (vb2_start_streaming+0xb8/0x158 [videobuf2_core])
[77716.161845] [<bf2ac214>] (vb2_start_streaming [videobuf2_core]) from [<bf2ae254>] (vb2_internal_streamon+0xec/0x148 [videobuf2_core])
[77716.162078] [<bf2ae254>] (vb2_internal_streamon [videobuf2_core]) from [<bf205528>] (__video_do_ioctl+0x2a8/0x328 [videodev])
[77716.162302] [<bf205528>] (__video_do_ioctl [videodev]) from [<bf204ee4>] (video_usercopy+0x1a8/0x538 [videodev])
[77716.162495] [<bf204ee4>] (video_usercopy [videodev]) from [<bf20053c>] (v4l2_ioctl+0xa0/0xdc [videodev])
[77716.162617] [<bf20053c>] (v4l2_ioctl [videodev]) from [<c012982c>] (do_vfs_ioctl+0x3a8/0x5a8)
[77716.162652] [<c012982c>] (do_vfs_ioctl) from [<c0129a60>] (SyS_ioctl+0x34/0x5c)
[77716.162685] [<c0129a60>] (SyS_ioctl) from [<c000eea0>] (ret_fast_syscall+0x0/0x3c)
[77716.162701] ---[ end trace acf5f190a34b7170 ]---
')
Kabbone
 
Posts: 153
Joined: Thu Jul 25, 2013 9:20 am

Re: STK1160 not working

Postby sdjf » Sun Jan 17, 2016 4:14 am

Look at the 3rd line of output after you call mplayer. You are missing a configuration file for lirc. Is that installed?
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm

Re: STK1160 not working

Postby Kabbone » Sun Jan 17, 2016 11:09 am

$this->bbcode_second_pass_quote('sdjf', 'L')ook at the 3rd line of output after you call mplayer. You are missing a configuration file for lirc. Is that installed?


I think it shouldn't matter, but yes it's installed ;) It's not like mplayer crashes, I just don't get the composite input from the grabber.
Kabbone
 
Posts: 153
Joined: Thu Jul 25, 2013 9:20 am

Re: STK1160 not working

Postby sdjf » Sun Jan 17, 2016 5:42 pm

Seems like it makes sense to add a config file for lirc, just in case.

The other thing you could do is start mplayer with strace and see if there are any system calls that fail which could explain problem.
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm

Re: STK1160 not working

Postby sambul13 » Mon Feb 01, 2016 6:46 pm

$this->bbcode_second_pass_quote('Kabbone', 'H')as anyone got a videograbber with stk1160 chipset working on the raspberry pi? At my notebook with Arch (Kernel 4.3.3-2) it is working flawlessly but on the pi it makes problems.

$this->bbcode_second_pass_code('', '
[77716.149477] stk1160: cannot alloc 196608 bytes for tx[0] buffer')


This seems to occur with EASYCAP DC60 USB2.0 stk1160 Grabber on many small devices with limited memory. The driver developer suggested the following fix tested working on some devices. If it doesn't work for you, he's active on Linux Media mailing list.

Use "keep_buffers" option. This option should tell the driver to try to not release the video buffers in an attempt to prevent memory from fragmenting.

$this->bbcode_second_pass_code('', '$ modprobe stk1160 keep_buffers=1

# or make it permanent:

$ echo "options stk1160 keep_buffers=1" > /etc/modprobe.d/stk1160.conf')
sambul13
 
Posts: 258
Joined: Sat Aug 18, 2012 10:32 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 9 guests