From owner-freebsd-multimedia@FreeBSD.ORG Fri Aug 16 20:01:37 2013 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C00F95E8 for ; Fri, 16 Aug 2013 20:01:37 +0000 (UTC) (envelope-from srinivas.kandagatla@st.com) Received: from eu1sys200aog125.obsmtp.com (eu1sys200aog125.obsmtp.com [207.126.144.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B11A52E32 for ; Fri, 16 Aug 2013 20:01:35 +0000 (UTC) Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob125.postini.com ([207.126.147.11]) with SMTP ID DSNKUg6E/aPFoVAJI03jc2bAnWyWbzz3kdFL@postini.com; Fri, 16 Aug 2013 20:01:36 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6CCF92F4; Fri, 16 Aug 2013 17:14:19 +0000 (GMT) Received: from mail7.sgp.st.com (unknown [164.129.223.81]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 81C83552F; Fri, 16 Aug 2013 17:13:47 +0000 (GMT) Received: from [10.65.51.59] (king.bri.st.com [10.65.51.59]) by mail7.sgp.st.com (MOS 4.3.3-GA) with ESMTP id BJX24205 (AUTH srinivak); Fri, 16 Aug 2013 19:14:27 +0200 Message-ID: <520E5A98.9060004@st.com> Date: Fri, 16 Aug 2013 18:00:08 +0100 From: Srinivas KANDAGATLA Organization: STMicroelectronics User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: Hans Petter Selasky Subject: Re: New version of webcamd [3.11.0.1] ready for testing References: <51A10BD5.1050107@bitfrost.no> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: "freebsd-multimedia@freebsd.org" , Juergen Lock , Mauro Carvalho Chehab X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: srinivas.kandagatla@st.com List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Aug 2013 20:01:37 -0000 + adding Mauro Chehab On 16/08/13 17:51, Hans Petter Selasky wrote: > Hi Jurgen, > > I think this is something broken at the Linux side or I have sources out of sync. > You should just ignore the NULL function pointer, hence the technisat driver does not have these callbacks. I agree, I was under the impression that open/close are mandatory. Can you please send a patch to fix this to linux-media@vger.kernel.org. Thanks, srini > Change: > if (!rdev->users++) > rval = rdev->open(rdev); > Into: > if (!rdev->users++ && rdev->open != NULL) > rval = rdev->open(rdev); > > And the same for the: > > rdev->close > > case. > > CC'ed: Srinivas KANDAGATLA > > https://lkml.org/lkml/2013/7/22/93 > > --HPS > > > > -----Original message----- >> From:Juergen Lock > >> Sent: Friday 16th August 2013 18:05 >> To: Hans Petter Selasky > >> Cc: freebsd-multimedia@freebsd.org >> Subject: Re: New version of webcamd [3.11.0.1] ready for testing >> >> On Fri, Aug 16, 2013 at 02:23:06PM +0200, Hans Petter Selasky wrote: >>> Hi, >> Hi! >>> >>> There is a new version of webcamd available. Changes: >>> >>> - Update to the latest and greatest Linux V4L codebase (Linux 3.11). >>> >>> Please test and report back! >>> >>> svn --username anonsvn --password anonsvn \ >>> checkout svn://svn.turbocat.net/i4b/trunk/ports >>> >> Segfaults with technisat-usb2: >> >> Linux video capture interface: v2.00 >> lirc_dev: IR Remote Control driver registered, major 14 >> IR NEC protocol handler initialized >> IR RC5(x) protocol handler initialized >> IR RC6 protocol handler initialized >> IR JVC protocol handler initialized >> IR Sony protocol handler initialized >> IR RC5 (streamzap) protocol handler initialized >> IR SANYO protocol handler initialized >> IR LIRC bridge handler initialized >> b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip loaded successfully >> uvcvideo: Unable to create debugfs directory >> USB Video Class driver (1.1.1) >> cpia2: V4L-Driver for Vision CPiA2 based cameras v3.0.1 >> au0828 driver loaded >> pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner >> pvrusb2: Debug mask is 31 (0x1f) >> USBVision USB Video Device Driver for Linux : 0.9.11 >> Em28xx: Initialized (Em28xx dvb Extension) extension >> virtual DVB server adapter driver, version 1.0-hps, (c) 2011 Hans Petter Selasky >> Attached to ugen5.2[0] >> technisat-usb2: set alternate setting >> technisat-usb2: firmware version: 17.63 >> dvb-usb: found a 'Technisat SkyStar USB HD (DVB-S/S2)' in warm state. >> dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. >> DVB: registering new adapter (Technisat SkyStar USB HD (DVB-S/S2)) >> dvb-usb: MAC address: 0x8014c3188M >> stv6110x_attach: Attaching STV6110x >> DBG: : dvb_register_frontend: >> INFO: : DVB: registering adapter 0 frontend 0 (Technisat SkyStar USB HD (DVB-S/S2))... >> DBG: : dvb_frontend_clear_cache: Clearing cache for delivery system 5 >> Registered IR keymap rc-technisat-usb2 >> rc0: IR-receiver inside an USB DVB receiver as webcamd >> DBG: rc0: lirc_dev: lirc_register_driver: sample_rate: 0 >> INFO: rc0: lirc_dev: driver ir-lirc-codec (technisat-usb2) registered at minor = 0 >> dvb-usb: schedule remote query interval to 100 msecs. >> dvb-usb: Technisat SkyStar USB HD (DVB-S/S2) successfully initialized and connected. >> Waiting for HAL USB device. >> Creating /dev/dvb/adapter0/demux0 >> Creating /dev/dvb/adapter0/dvr0 >> DBG: : dvb_frontend_open: >> DBG: : dvb_frontend_release: >> Creating /dev/dvb/adapter0/frontend0 >> DBG: rc0: lirc_dev (ir-lirc-codec (technisat-usb2)[0]): open called >> zsh: segmentation fault (core dumped) webcamd-31101x -d 5.2 -H >> # gdb $(which webcamd-31101x ) webcamd.core >> GNU gdb 6.1.1 [FreeBSD] >> Copyright 2004 Free Software Foundation, Inc. >> GDB is free software, covered by the GNU General Public License, and you are >> welcome to change it and/or distribute copies of it under certain conditions. >> Type "show copying" to see the conditions. >> There is absolutely no warranty for GDB. Type "show warranty" for details. >> This GDB was configured as "amd64-marcel-freebsd"... >> >> warning: core file may not match specified executable file. >> Core was generated by `webcamd'. >> Program terminated with signal 11, Segmentation fault. >> Reading symbols from /usr/local/lib/libdbus-1.so.3...done. >> Loaded symbols for /usr/local/lib/libdbus-1.so.3 >> Reading symbols from /usr/local/lib/libhal.so.1...done. >> Loaded symbols for /usr/local/lib/libhal.so.1 >> Reading symbols from /usr/lib/libusb.so.2...done. >> Loaded symbols for /usr/lib/libusb.so.2 >> Reading symbols from /usr/local/lib/libcuse4bsd.so.1...done. >> Loaded symbols for /usr/local/lib/libcuse4bsd.so.1 >> Reading symbols from /lib/libutil.so.8...done. >> Loaded symbols for /lib/libutil.so.8 >> Reading symbols from /lib/libthr.so.3...done. >> Loaded symbols for /lib/libthr.so.3 >> Reading symbols from /lib/libc.so.7...done. >> Loaded symbols for /lib/libc.so.7 >> Reading symbols from /libexec/ld-elf.so.1...done. >> Loaded symbols for /libexec/ld-elf.so.1 >> #0 0x0000000000000000 in ?? () >> [New Thread 8014087c0 (LWP 100307/webcamd)] >> [New Thread 801408980 (LWP 100306/webcamd)] >> [New Thread 801408b40 (LWP 100305/webcamd)] >> [New Thread 801408d00 (LWP 100304/webcamd)] >> [New Thread 801409080 (LWP 100303/webcamd)] >> [New Thread 801409240 (LWP 100302/webcamd)] >> [New Thread 801409400 (LWP 100301/webcamd)] >> [New Thread 8014095c0 (LWP 100299/webcamd)] >> [New Thread 801409940 (LWP 100298/webcamd)] >> [New Thread 801409b00 (LWP 100289/webcamd)] >> [New Thread 801409cc0 (LWP 100288/webcamd)] >> [New Thread 801409e80 (LWP 100287/webcamd)] >> [New Thread 80140a3c0 (LWP 100274/webcamd)] >> [New Thread 80140a740 (LWP 100265/webcamd)] >> [New Thread 80140aac0 (LWP 100260/webcamd)] >> [New Thread 80140ac80 (LWP 100229/webcamd)] >> [New Thread 80140ae40 (LWP 100159/webcamd)] >> [New Thread 80144f1c0 (LWP 100146/webcamd)] >> [New Thread 8014041c0 (LWP 100541/initial thread)] >> (gdb) bt >> #0 0x0000000000000000 in ?? () >> #1 0x00000000005abcca in rc_open (rdev=0x8015aea00) >> at media_tree/drivers/media/rc/rc-main.c:711 >> #2 0x00000000005ae488 in lirc_dev_fop_open (inode=0x801499508, >> file=0x801499520) at media_tree/drivers/media/rc/lirc_dev.c:472 >> #3 0x000000000070e8db in linux_open (f_v4b=288, fflags=0) >> at kernel/linux_file.c:57 >> #4 0x0000000000715a21 in v4b_create (unit=-1) at webcamd.c:353 >> #5 0x0000000000716636 in main (argc=4, argv=0x7fffffffe2b8) at webcamd.c:719 >> (gdb) fr 1 >> #1 0x00000000005abcca in rc_open (rdev=0x8015aea00) >> at media_tree/drivers/media/rc/rc-main.c:711 >> 711 rval = rdev->open(rdev); >> (gdb) p rdev >> $1 = (struct rc_dev *) 0x8015aea00 >> (gdb) p *rdev >> $2 = {dev = {minor = 0, busnum = 0, kobj = {parent = 0x0}, refcount = { >> refcount = {counter = 1}}, release = 0, driver = 0x0, >> parent = 0x8014be000, type = 0x954700, platform_data = 0x0, >> driver_data = 0x8015aea00, fops = 0x0, cdev = 0x0, class = 0x9545a0, >> driver_static = {name = 0x0, owner = 0x0, pm = 0x0}, devt = 0, >> name = "rc0", '\0' , bus_name = '\0' , >> bus_id = '\0' }, >> input_name = 0x77e958 "IR-receiver inside an USB DVB receiver", >> input_phys = 0x8014c42a8 "usb-/dev/usb-/dev/usb/ir0", input_id = { >> bustype = 3, vendor = 5367, product = 1280, version = 1}, >> driver_name = 0x787852 "technisat-usb2", >> map_name = 0x787840 "rc-technisat-usb2", rc_map = {scan = 0x80148ae00, >> size = 64, len = 33, alloc = 512, rc_type = RC_TYPE_RC5, >> name = 0x770887 "rc-technisat-usb2", lock = }, lock = { >> sem = {value = 0, owner = 0x8014041c0}}, devno = 0, raw = 0x80148ac00, >> input_dev = 0x8015b9400, driver_type = RC_DRIVER_IR_RAW, idle = false, >> allowed_protos = 262143, enabled_protocols = 18446744073709551615, >> users = 1, scanmask = 0, priv = 0x8014c2000, keylock = , >> keypressed = false, keyup_jiffies = 0, timer_keyup = {entry = { >> tqe_next = 0x0, tqe_prev = 0x0}, function = 0x5ab930 , >> expires = 0, data = 34382473728}, last_keycode = 0, last_scancode = 0, >> last_toggle = 0 '\0', timeout = 0, min_timeout = 0, max_timeout = 0, >> rx_resolution = 0, tx_resolution = 0, change_protocol = 0, open = 0, >> ---Type to continue, or q to quit--- >> close = 0, s_tx_mask = 0, s_tx_carrier = 0, s_tx_duty_cycle = 0, >> s_rx_carrier_range = 0, tx_ir = 0, s_idle = 0, s_learning_mode = 0, >> s_carrier_report = 0} >> (gdb) p rdev->open >> $3 = (int (*)(struct rc_dev *)) 0 >> (gdb) q >> >> Thanx, >> Juergen >> >> PS: pctv452e (TT-S2 3600) and dual dib0700 seem to work so far. >> > >