Re: STK1160 - no video

2016-03-19 Thread Kevin Fitch
Well, I just tried, and failed to reproduce those kernel log messages.
There is a comment in one of the source file about "spammy" messages
that show up if there is mismatch between the actual and expected
video standards. I don't think I had them mismatched before, but maybe
I did. Or maybe after all my mucking around I had managed to get the
adapter in a weird state. So, for now, that patch seems to be all that
is needed.

Kevin

On Fri, Mar 18, 2016 at 7:11 PM, Ezequiel Garcia
 wrote:
> Hey Kevin,
>
> On 4 March 2016 at 00:11, Kevin Fitch  wrote:
>> Here is a quick patch that gives me actual video. That being said I
>> see some curious stuff being logged while video is streaming:
>>
>
> Patch looks more or less good, but that kernel log is not good.
>
> It indicates that the USB packet is not entirely sane, and so the incoming
> data is not what the driver is expecting.
>
> Have you been able to make any progress with it?
> --
> Ezequiel García, VanguardiaSur
> www.vanguardiasur.com.ar
--
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: STK1160 - no video

2016-03-03 Thread Kevin Fitch
Here is a quick patch that gives me actual video. That being said I
see some curious stuff being logged while video is streaming:

Mar  3 22:04:40 home kernel: [131300.882159] stk1160: streaming started
Mar  3 22:04:49 home kernel: [131309.987118] stk1160: buffer overflow detected
Mar  3 22:04:49 home kernel: [131309.987132] stk1160: buffer overflow detected
Mar  3 22:04:49 home kernel: [131309.987135] stk1160: buffer overflow detected
Mar  3 22:04:49 home kernel: [131309.987138] stk1160: buffer overflow detected
Mar  3 22:04:49 home kernel: [131309.987141] stk1160: buffer overflow detected
Mar  3 22:04:49 home kernel: [131309.987144] stk1160: buffer overflow detected
Mar  3 22:04:49 home kernel: [131309.987147] stk1160: buffer overflow detected
Mar  3 22:04:49 home kernel: [131309.987149] stk1160: buffer overflow detected
Mar  3 22:04:49 home kernel: [131309.987152] stk1160: buffer overflow detected
Mar  3 22:04:49 home kernel: [131309.987155] stk1160: buffer overflow detected
Mar  3 22:04:49 home kernel: [131309.987158] stk1160: buffer overflow detected
Mar  3 22:04:51 home kernel: [131312.547028] stk1160: buffer overflow detected
Mar  3 22:04:52 home kernel: [131312.955081] stk1160: buffer overflow detected
Mar  3 22:04:52 home kernel: [131313.362920] stk1160: buffer overflow detected
Mar  3 22:04:52 home kernel: [131313.507093] stk1160: buffer overflow detected
Mar  3 22:04:55 home kernel: [131315.778953] stk1160: buffer overflow detected
Mar  3 22:04:55 home kernel: [131315.778962] stk1160_copy_video: 323
callbacks suppressed
Mar  3 22:04:55 home kernel: [131315.778964] stk1160: buffer overflow detected
Mar  3 22:04:55 home kernel: [131315.778965] stk1160: buffer overflow detected
Mar  3 22:04:55 home kernel: [131315.778967] stk1160: buffer overflow detected
...

I haven't taken time to look into them at all yet.

Kevin Fitch

On Thu, Mar 3, 2016 at 8:01 PM, Ezequiel Garcia
 wrote:
> On 3 March 2016 at 21:50, Kevin Fitch  wrote:
>> Thank you for the quick response. Hmm, I am not seeing anything about
>> the saa7113 or similar chip. I just replugged it, and here is what
>> showed up in the log:
>>
>> Mar  3 19:32:45 home kernel: [122185.832751] usb 2-3: New USB device
>> found, idVendor=05e1, idProduct=0408
>> Mar  3 19:32:45 home kernel: [122185.832762] usb 2-3: New USB device
>> strings: Mfr=1, Product=2, SerialNumber=0
>> Mar  3 19:32:45 home kernel: [122185.832769] usb 2-3: Product: USB 2.0
>> Video Capture Controller
>> Mar  3 19:32:45 home kernel: [122185.832774] usb 2-3: Manufacturer:
>> Syntek Semiconductor
>> Mar  3 19:32:45 home mtp-probe: checking bus 2, device 4:
>> "/sys/devices/pci:00/:00:04.1/usb2/2-3"
>> Mar  3 19:32:45 home mtp-probe: bus: 2, device: 4 was not an MTP device
>> Mar  3 19:32:45 home kernel: [122185.885397] usb 2-3: New device
>> Syntek Semiconductor USB 2.0 Video Capture Controller @ 480 Mbps
>> (05e1:0408, interface 0, class 0)
>> Mar  3 19:32:45 home kernel: [122185.885408] usb 2-3: video interface 0 found
>> Mar  3 19:32:45 home kernel: [122186.456571] stk1160: driver ver 0.9.5
>> successfully loaded
>> Mar  3 19:32:46 home kernel: [122186.589683] stk1160: registers to
>> NTSC like standard
>> Mar  3 19:32:46 home kernel: [122186.590676] stk1160 2-3:1.0: V4L2
>> device registered as video0
>> Mar  3 19:32:46 home kernel: [122186.591299] usbcore: registered new
>> interface driver stk1160
>> Mar  3 19:32:46 home pulseaudio[2312]: [pulseaudio]
>> module-alsa-card.c: Failed to find a working profile.
>> Mar  3 19:32:46 home pulseaudio[2312]: [pulseaudio] module.c: Failed
>> to load module "module-alsa-card" (argument: "device_id="3"
>> name="usb-Syntek_Semiconductor_USB_2.0_Video_Capture_Controller-00-stk1160mixer"
>> card_name="alsa_card.usb-Syntek_Semiconductor_USB_2.0_Video_Capture_Controller-00-stk1160mixer"
>> namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no
>> deferred_volume=yes use_ucm=yes
>> card_properties="module-udev-detect.discovered=1""): initialization
>> failed.
>> Mar  3 19:32:47 home pulseaudio[2312]: [pulseaudio] source.c: Default
>> and alternate sample rates are the same.
>> Mar  3 19:32:47 home rtkit-daemon[2314]: Successfully made thread
>> 15492 of process 2312 (n/a) owned by '1000' RT at priority 5.
>> Mar  3 19:32:47 home rtkit-daemon[2314]: Supervising 4 threads of 1
>> processes of 1 users.
>>
>>
>> So, I popped the case on the dongle and I did see  a chip (right next
>> to the video cables) labelled CJC7113. I would assume(/hope) this is a
>> SAA7113 compatible chip. I actually don't care about audio in my
>> parti

Re: STK1160 - no video

2016-03-03 Thread Kevin Fitch
Thank you for the quick response. Hmm, I am not seeing anything about
the saa7113 or similar chip. I just replugged it, and here is what
showed up in the log:

Mar  3 19:32:45 home kernel: [122185.832751] usb 2-3: New USB device
found, idVendor=05e1, idProduct=0408
Mar  3 19:32:45 home kernel: [122185.832762] usb 2-3: New USB device
strings: Mfr=1, Product=2, SerialNumber=0
Mar  3 19:32:45 home kernel: [122185.832769] usb 2-3: Product: USB 2.0
Video Capture Controller
Mar  3 19:32:45 home kernel: [122185.832774] usb 2-3: Manufacturer:
Syntek Semiconductor
Mar  3 19:32:45 home mtp-probe: checking bus 2, device 4:
"/sys/devices/pci:00/:00:04.1/usb2/2-3"
Mar  3 19:32:45 home mtp-probe: bus: 2, device: 4 was not an MTP device
Mar  3 19:32:45 home kernel: [122185.885397] usb 2-3: New device
Syntek Semiconductor USB 2.0 Video Capture Controller @ 480 Mbps
(05e1:0408, interface 0, class 0)
Mar  3 19:32:45 home kernel: [122185.885408] usb 2-3: video interface 0 found
Mar  3 19:32:45 home kernel: [122186.456571] stk1160: driver ver 0.9.5
successfully loaded
Mar  3 19:32:46 home kernel: [122186.589683] stk1160: registers to
NTSC like standard
Mar  3 19:32:46 home kernel: [122186.590676] stk1160 2-3:1.0: V4L2
device registered as video0
Mar  3 19:32:46 home kernel: [122186.591299] usbcore: registered new
interface driver stk1160
Mar  3 19:32:46 home pulseaudio[2312]: [pulseaudio]
module-alsa-card.c: Failed to find a working profile.
Mar  3 19:32:46 home pulseaudio[2312]: [pulseaudio] module.c: Failed
to load module "module-alsa-card" (argument: "device_id="3"
name="usb-Syntek_Semiconductor_USB_2.0_Video_Capture_Controller-00-stk1160mixer"
card_name="alsa_card.usb-Syntek_Semiconductor_USB_2.0_Video_Capture_Controller-00-stk1160mixer"
namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no
deferred_volume=yes use_ucm=yes
card_properties="module-udev-detect.discovered=1""): initialization
failed.
Mar  3 19:32:47 home pulseaudio[2312]: [pulseaudio] source.c: Default
and alternate sample rates are the same.
Mar  3 19:32:47 home rtkit-daemon[2314]: Successfully made thread
15492 of process 2312 (n/a) owned by '1000' RT at priority 5.
Mar  3 19:32:47 home rtkit-daemon[2314]: Supervising 4 threads of 1
processes of 1 users.


So, I popped the case on the dongle and I did see  a chip (right next
to the video cables) labelled CJC7113. I would assume(/hope) this is a
SAA7113 compatible chip. I actually don't care about audio in my
particular application, but there is a Realtek ALC6555 on the bottom
as well.

Kevin Fitch.



On Thu, Mar 3, 2016 at 6:13 PM, Ezequiel Garcia
 wrote:
> Hi Kevin,
>
> Thanks for the report.
>
> On 3 March 2016 at 14:20, Kevin Fitch  wrote:
>> I recently purchased a STK1160 based USB video capture device (Sabrent
>> USB-AVCPT). I have tested it on a windows computer and it works fine,
>> but not on any linux box I have tried.
>>
>> lsusb reports:
>> Bus 002 Device 003: ID 05e1:0408 Syntek Semiconductor Co., Ltd STK1160
>> Video Capture Device
>>
>
> Can you send us the kernel log after the dongle is plugged? In particular,
> we are looking for something like this:
>
> saa7115 7-0025: saa7113 found @ 0x4a (stk1160)
>
> STK1160 devices are known to be sold with different decoder chips,
> and sometimes the decoder chip is not detected by the decoder
> driver.
>
> See this thread for more information:
> http://www.spinics.net/lists/linux-media/msg95216.html
> --
> Ezequiel García, VanguardiaSur
> www.vanguardiasur.com.ar
--
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


STK1160 - no video

2016-03-03 Thread Kevin Fitch
I recently purchased a STK1160 based USB video capture device (Sabrent
USB-AVCPT). I have tested it on a windows computer and it works fine,
but not on any linux box I have tried.

lsusb reports:
Bus 002 Device 003: ID 05e1:0408 Syntek Semiconductor Co., Ltd STK1160
Video Capture Device

I am running Linux Mint with a 4.2.0 based kernel on AMD64:
$ uname -a
Linux home 4.2.0-30-generic #36~14.04.1-Ubuntu SMP Fri Feb 26 18:49:23
UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

The exact results vary in different capture programs, but i always
seems to be something like a timeout waiting for the first frame.

I grabbed the driver source and added a few printk's to see what is
going on. The first time streaming is started it gets a single 8 byte
isochronous packet similar to:
80 0D 00 00 3D 61 0B 00
This is followed by a series of 4 byte packets (which the source code
refers to as "empty packets." These packets continue until streaming
is stopped.

00 01 00 00
00 02 00 00
...
00 3E 00 00
00 3F 00 00
00 00 00 00
00 01 00 00
...

The second time (and all subsequent times) streaming is started I seem
to get a single 8 byte packet similar to:
A0 0E 00 00 3D 61 0B 00

Each time streaming is started the second number appears to be incremented.

The is again followed by the same sequence of 4 byte packets as
mentioned before (all zeros, except the second byte increments
wrapping around after 3F).

I am at a bit of a loss as to where to continue debugging this. Any
suggestions will be appreciated.
--
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