Re: Division by zero in UVC driver

2012-02-15 Thread loody
hi
2012/2/16 Hans Petter Selasky hsela...@c2i.net:
 Hi,

 After getting through the compilation issues regarding the uvc_debugfs, I am
 now facing another problem, which I think is more generic.

 The FreeBSD port of the Linux UVC driver, webcamd, gives a division by zero
 inside the UVC driver, because it does not properly check if the returned SOF
 counter is the same like the previous one. This can also happen on Linux if
 the UVC capable device is plugged exactly when the EHCI/OHCI/UHCI SOF counter
 is equal to zero!

 Also please note that the SOF counter will only be updated after the each
 completed ISOCHRONOUS transfer on FreeBSD, due to limitations in LibUSB.

 Debug info:

 (gdb) list
 651             else if (sof  mean + (1024  16))
 652                     sof -= 2048  16;
 653
 654             y = (u64)(y2 - y1) * (u64)sof + (u64)y1 * (u64)x2
 655               - (u64)y2 * (u64)x1;
 656             y = div_u64(y, x2 - x1);
 657
 658             div = div_u64_rem(y, NSEC_PER_SEC, rem);
 659             ts.tv_sec = first-host_ts.tv_sec - 1 + div;
 660             ts.tv_nsec = first-host_ts.tv_nsec + rem;
 (gdb)

 Program received signal SIGFPE, Arithmetic exception.
 [Switching to Thread 80100a3c0 (LWP 100096/webcamd)]
 0x005e9337 in div_u64 (rem=71210779720321120, div=0)
    at kernel/linux_func.c:1649
 1649    {
 (gdb) bt
 #0  0x005e9337 in div_u64 (rem=71210779720321120, div=0)
    at kernel/linux_func.c:1649
 #1  0x005169f7 in uvc_video_clock_update (stream=0x8010bf500,
    v4l2_buf=0x801138a00, buf=0x801138a00)
    at media_tree/drivers/media/video/uvc/uvc_video.c:656
 #2  0x005125c3 in uvc_buffer_finish (vb=Variable vb is not
 available.
 )
    at media_tree/drivers/media/video/uvc/uvc_queue.c:114
 #3  0x004ae76a in vb2_dqbuf (q=0x8010bf5b8, b=0x7f1f9d30,
    nonblocking=0 '\0') at media_tree/drivers/media/video/videobuf2-
 core.c:1334
 #4  0x0051236f in uvc_dequeue_buffer (queue=0x8010bf5b8,
    buf=0x7f1f9d30, nonblocking=0)
    at media_tree/drivers/media/video/uvc/uvc_queue.c:193
 #5  0x00513c50 in uvc_v4l2_do_ioctl (file=0x80111d418, cmd=3227014673,
    arg=0x7f1f9d30) at media_tree/drivers/media/video/uvc/uvc_v4l2.c:958
 #6  0x00444780 in video_usercopy (file=0x80111d418, cmd=3227014673,
    arg=65536, func=0x513050 uvc_v4l2_do_ioctl)
    at media_tree/drivers/media/video/v4l2-ioctl.c:2456
 #7  0x00443b40 in v4l2_ioctl (filp=0x80111d418, cmd=3227014673,
    arg=65536) at media_tree/drivers/media/video/v4l2-dev.c:339
 #8  0x005ea4aa in linux_ioctl (handle=0x80111d400, fflags=0,
    cmd=3227014673, arg=0x1) at kernel/linux_file.c:120
 #9  0x005ef01a in v4b_ioctl (cdev=Variable cdev is not available.
 ) at webcamd.c:261
 #10 0x000800a249e6 in cuse_wait_and_process ()
Maybe it is better forwarding this mail to uvc mail list


-- 
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


some question about

2010-09-05 Thread loody
dear all:
I saw there is a Audio Devices Rev. 2.0 Spec and Adopters Agreement
on the usb org.
But so far my device can bought are FS instead of HS.
Since I need HS audio device which list in Audio Devices Rev. 2.0
Spec and Adopters Agreement to verification the performance of my
host.
I try very hard to find some possible devices with linux support on the net.

per your experience, are below 2 meet Audio Devices Rev. 2.0 Spec and
Adopters Agreement?

WinTV-HVR-1950 high performance USB TV tuner
WinTV-HVR-950Q for laptop and notebooks

if they are not would you please tell me where and what device meet
the spec requirement and also supported by linux.
appreciate your help,
miloody
--
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: some question about

2010-09-05 Thread loody
hi:

2010/9/5 Devin Heitmueller dheitmuel...@kernellabs.com:
 On Sun, Sep 5, 2010 at 11:48 AM, Devin Heitmueller
 dheitmuel...@kernellabs.com wrote:
 On Sun, Sep 5, 2010 at 11:36 AM, loody milo...@gmail.com wrote:
 WinTV-HVR-1950 high performance USB TV tuner
 WinTV-HVR-950Q for laptop and notebooks

 Both these devices are supported under Linux, and in fact are unlikely
 to work properly with only Full Speed USB.  At least the 950q
 definitely requires High speed (I put a check in there to specifically
 not load the driver otherwise).

 I perhaps misread your original email.  While the 950q does present
 itself as a USB audio class device, the 1950 does not.  It only
 provides MPEG encoded output (containing both the audio and video),
 and is not a USB audio class device.

 So while both these devices will work under Linux on a high speed
 interface, if you specifically require the device to identify itself
 as a USB audio class device, only the 950q does this.

 Devin
would you mind to send me the device descriptors for me?
I want to check whether the input/output unit and audio/video format
does meet the spec.
BTW, will the device support mp3 output?
since the spec define mp3 as one of input/output format.
that means if I put the raw data of mp3 to that device, it should
play/record well.

appreciate your help,
miloody
--
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: where I can get UVC svn repository

2010-02-18 Thread loody
hi:

2010/2/8 Paulo Assis pj.as...@gmail.com:
 Hi,
 linuxtv uses mercurial (or git) not svn, please check the how-to:

 http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers

 regards,
 Paulo

 2010/2/8 loody milo...@gmail.com:
 Dear all:
 I hear UVC is change its repository to linxutv.
 But I tried several possible repositories like
 svn co http://linuxtv.org/hg/~pinchartl/uvcvideo/tags
 svn co http://linuxtv.org/hg/~pinchartl/uvcvideo/rev/75c97b2d1a2a

 But svn says the repository is incorrect.
 Would anyone tell me where is the correct location?
 appreciate your help,
 miloody
thanks for ur help :)
I have successfully check the source code out.
I have 2 questions:
1.When looking into the v4l folder, I find it seems different than
kernel/driver/media/video; it seems more files than the one in kernel
source.
in my opinion, the source I checkout should be the same as
kernel/driver/media/video, since they are kernel driver, right?

2. I try to build v4l2-apps but it seems I need to have at4 in advance.
My distribution is ubuntu and I have already sudo apt-get install
qt4-dev-tools, but it still complain:

g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB
-I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I../../include
-I../../libv4l2util -I../../libv4l/include -I. -o qv4l2.o qv4l2.cpp
In file included from qv4l2.cpp:20:
qv4l2.h:23:23: error: QMainWindow: No such file or directory

I find it is really no any qt4 headers in the include file that -I point to.
does that mean I apt-get the wrong package?
appreciate your kind help,
miloody
--
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


where I can get UVC svn repository

2010-02-08 Thread loody
Dear all:
I hear UVC is change its repository to linxutv.
But I tried several possible repositories like
svn co http://linuxtv.org/hg/~pinchartl/uvcvideo/tags
svn co http://linuxtv.org/hg/~pinchartl/uvcvideo/rev/75c97b2d1a2a

But svn says the repository is incorrect.
Would anyone tell me where is the correct location?
appreciate your help,
miloody
--
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


Error message about cross-compile linux-dvb-app

2009-07-25 Thread loody
Dear all:
I download the latest linux_dvb_apps from
http://packages.debian.org/source/stable/linuxtv-dvb-apps, but find
the compile error message below:

Desktop/dvb-apps-63dae165ffe8# make CROSS_COMPILE=mipsel-linux- V=1
make -C lib all
make[1]: Entering directory `/home/cc/Desktop/dvb-apps-63dae165ffe8/lib'
make -C libdvbapi all
make[2]: Entering directory
`/home/cc/Desktop/dvb-apps-63dae165ffe8/lib/libdvbapi'
mipsel-linux-gcc -c -I../../lib -g -Wall -W -Wshadow -Wpointer-arith
-Wstrict-prototypes -fPIC -MMD -o dvbaudio.o dvbaudio.c
In file included from dvbaudio.c:28:
/media/sda6/uclinux/toolchain/mips/temp/buildroot-2009.05/uclibc_0_9_30_build_mipsel/staging_dir/usr/include/linux/dvb/audio.h:79:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'audio_attributes_t'
make[2]: *** [dvbaudio.o] Error 1

I google the problem and I find someone has reported this bug before,
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525580.
It seems fixed at 25th Apri 2009.
Did I get the wrong version or something I forget to set?
If someone knows where the problem come from or have any idea, please
let me know.
Appreciate your help,
miloody
--
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 ci drivers in dvb

2009-04-09 Thread loody
Hi:

2009/4/8 Sharwan Joram sharwan.jo...@gmail.com:
 Luc was working on to provide the support for this device on Linux in Year
 2008. I'am not sure about it's current status but you can visit the project
 home page and  check the  status : http://www.bsc-bvba.be/linux/dvb/

 Regards
 Sharwan
thanks for your kind help,
miloody
--
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 ci drivers in dvb

2009-04-08 Thread loody
Dear all:
There is a ci-module with usb connector produced by hauppauge.
http://www.hauppauge.com.sg/site/products/data_ci.html
Have anyone used this one before and know whether linux supports this device?
appreciate your help,
miloody

2009/4/6 loody milo...@gmail.com:
 Dear all:
 I have read ci.txt under documents/dvb, and at end of it, it mentions
 about apdu protocol defined in en50221.
 but I cannot see this part of source in dvb_ca_en50221.c.
 Is this part implemented at other place or I check the wrong document?
 appreciate your help,
 miloody

--
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


Question about ci drivers in dvb

2009-04-06 Thread loody
Dear all:
I have read ci.txt under documents/dvb, and at end of it, it mentions
about apdu protocol defined in en50221.
but I cannot see this part of source in dvb_ca_en50221.c.
Is this part implemented at other place or I check the wrong document?
appreciate your help,
miloody
--
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


how to watch Pay TV under linux

2009-04-05 Thread loody
Dear all:
I know if I want to see pay tv, it seems I have to got a tv card which
supports ci module.
Would anyone tell me which card that linux driver already support so far?
appreciate your help,
miloody
--
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