Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Onliner09
Old
(Last edited by Onliner09; 20th February 2011 at 07:20 PM.)
#1  
Member - OP
Thanks Meter 5
Posts: 30
Join Date: Dec 2010
Default [DEV] Driver for analogue video grabber USB sticks

beside my DVB-T stick, which is working very well with chulri's DVB-T drivers I have also an analogue frame grabber USB stick like the "Terratec Grabby" flying around.
I think it would be a nice feature, when the A101IT could also handle analogue video sources additional to DVB-sticks.
Those devices, along with some DVB-T sticks like are controlled with the em28xx kernel module.
The common chipset of those sticks includes USB-Bridge Empia EM2860, Philips SAA7113 (video decoder), EMP202 (AC'97 audio processor).
More information:
http://www.linuxtv.org/wiki/index.php/Em28xx_devices

Maybe later, this driver could be backmerged into chulri's DVB-T package.

Actual status:
I was able to compile the 2.6.29 based em28xx (along with dependent modules e.g. saa7115, em28xx-alsa, etc...) and load the kernel module on A101IT.
I did also a few minor modifactions, so that the Magix frame grabber stick with usbid 1b80:e34b is recognized correctly. (source files attached in em28xx_src.zip)
dmesg:
Code:
em28xx 2-1:1.0: usb_probe_interface
em28xx 2-1:1.0: usb_probe_interface - got id
em28xx: New device USB 2863 Device @ 480 Mbps (1b80:e34b, interface 0, class 0)
em28xx #0: Identified as Magix Videograbber (card=77)
em28xx #0: chip ID is em2860
saa7115' 4-0025: saa7113 found (1f7113d0e100000) @ 0x4a (em28xx #0)
em28xx #0: i2c eeprom 00: 1a eb 67 95 80 1b 4b e3 50 00 20 03 6a 20 00 00
em28xx #0: i2c eeprom 10: 00 00 04 57 06 02 00 00 00 00 00 00 00 00 00 00
em28xx #0: i2c eeprom 20: 02 00 01 00 f0 00 01 00 00 00 00 00 5b 00 00 00
em28xx #0: i2c eeprom 30: 00 00 20 40 20 80 02 20 01 01 02 01 00 00 00 00
em28xx #0: i2c eeprom 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
em28xx #0: i2c eeprom 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
em28xx #0: i2c eeprom 60: 00 00 00 00 00 00 00 00 00 00 20 03 55 00 53 00 
em28xx #0: i2c eeprom 70: 42 00 20 00 32 00 38 00 36 00 33 00 20 00 44 00
em28xx #0: i2c eeprom 80: 65 00 76 00 69 00 63 00 65 00 00 00 00 00 00 00
em28xx #0: i2c eeprom 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
em28xx #0: i2c eeprom a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
em28xx #0: i2c eeprom b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
em28xx #0: i2c eeprom c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
em28xx #0: i2c eeprom d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
em28xx #0: i2c eeprom e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
em28xx #0: i2c eeprom f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
em28xx #0: EEPROM ID= 0x9567eb1a, EEPROM hash = 0x979a2140
em28xx #0: EEPROM info:
em28xx #0:      AC97 audio (5 sample rates)
em28xx #0:      500mA max power
em28xx #0:      Table at 0x04, strings=0x206a, 0x0000, 0x0000
em28xx #0: Registering snapshot button...
input: em28xx snapshot button as /devices/platform/musb_hdrc/usb2/2-1/input/input16
em28xx #0: Config register raw data: 0x50
em28xx #0: AC97 vendor ID = 0x83847650
em28xx #0: AC97 features = 0x6a90
em28xx #0: Empia 202 AC97 audio processor detected
em28xx #0: v4l2 driver version 0.1.1
em28xx #0: V4L2 device registered as /dev/video3 and /dev/vbi0
em28xx-audio.c: probing for em28x1 non standard usbaudio
em28xx-audio.c: Copyright (C) :eek:2006 Markus Rechberger
When I try now to do cat /dev/video3 > test.ts, then a memory allocation error occured:

Code:
cat: page allocation failure. order:5, mode:0x0
[<c03518f0>] (dump_stack+0x0/0x14) from [<c00bbb5c>] (__alloc_pages_internal+0x3c0/0x3e8)
[<c00bb79c>] (__alloc_pages_internal+0x0/0x3e8) from [<c00471a4>] (__dma_alloc+0x154/0x408)
[<c0047050>] (__dma_alloc+0x0/0x408) from [<c00474e4>] (dma_alloc_coherent+0x58/0x64)
[<c004748c>] (dma_alloc_coherent+0x0/0x64) from [<c0248db8>] (hcd_buffer_alloc+0x8c/0x94)
 r7:00000004 r6:c1dd1f00 r5:c9bf4000 r4:00000800
[<c0248d2c>] (hcd_buffer_alloc+0x0/0x94) from [<c023b8b4>] (usb_buffer_alloc+0x24/0x30)
 r5:c9bf4000 r4:c81aa800
[<c023b890>] (usb_buffer_alloc+0x0/0x30) from [<bf348768>] (em28xx_init_isoc+0x124/0x2dc [em28xx])
[<bf348644>] (em28xx_init_isoc+0x0/0x2dc [em28xx]) from [<bf344834>] (buffer_prepare+0xe8/0xf8 [em28xx])
[<bf34474c>] (buffer_prepare+0x0/0xf8 [em28xx]) from [<c0221dd0>] (__videobuf_read_start+0xbc/0x174)
 r7:00000001 r6:ca248c8c r5:ca248c90 r4:ca248c8c
[<c0221d14>] (__videobuf_read_start+0x0/0x174) from [<c0222028>] (videobuf_read_stream+0x90/0x248)
 r8:00000000 r7:00001000 r6:00001000 r5:ca601d40 r4:ca248c8c
[<c0221f98>] (videobuf_read_stream+0x0/0x248) from [<bf3453ac>] (em28xx_v4l2_read+0xc0/0xd0 [em28xx])
[<bf3452ec>] (em28xx_v4l2_read+0x0/0xd0 [em28xx]) from [<c0216a94>] (v4l2_read+0x50/0x58)
[<c0216a44>] (v4l2_read+0x0/0x58) from [<c00df654>] (vfs_read+0xb4/0x144)
 r5:ca601d40 r4:00001000
[<c00df5a0>] (vfs_read+0x0/0x144) from [<c00df7a8>] (sys_read+0x44/0x70)
 r7:00000000 r6:00000000 r5:becc6ae8 r4:ca601d40
[<c00df764>] (sys_read+0x0/0x70) from [<c0040e80>] (ret_fast_syscall+0x0/0x2c)
 r8:c0041028 r7:00000003 r6:becc6ae8 r5:00001000 r4:40092450
Mem-info:
Normal per-cpu:
CPU    0: hi:   90, btch:  15 usd:  85
Active_anon:9544 active_file:3850 inactive_anon:9574
 inactive_file:11687 unevictable:0 dirty:6 writeback:0 unstable:0
 free:7421 slab:2380 mapped:12278 pagetables:1318 bounce:0
Normal free:29684kB min:2036kB low:2544kB high:3052kB active_anon:38176kB inactive_anon:38296kB active_file:15400kB inactive_file:46748kB unevictable:0kB present:260096kB pages_scanned:33 all_unreclaimable? no
lowmem_reserve[]: 0 0
Normal: 7185*4kB 44*8kB 23*16kB 7*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 29684kB
15757 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
65536 pages of RAM
7910 free pages
10335 reserved pages
2380 slab pages
59244 pages shared
0 pages swap cached
unable to allocate 115680 bytes for transfer buffer 4
Instructions to load the driver:
1. Install chulri's DVB-T package:
http://code.google.com/p/archos-gen8...label:Featured

2. Read the Howto:
http://code.google.com/p/archos-gen8-dvb/wiki/HowToTest

3. Copy the content of the attached em28xx_mod.zip into the mod/ directory

4. sh loadmod mod/em28xx.ko

5. cat /dev/video3 > test.ts

Does someone have an idea, what could be be the cause for this memory allocation problem ? (maybe RAM shortage on the A101?)

Suggestions, comments and general support, to get this driver working are very welcome !

Best regards,
Onliner09
Attached Files
File Type: zip em28xx_mod.zip - [Click for QR Code] (560.0 KB, 53 views)
File Type: zip em28xx_src.zip - [Click for QR Code] (58.0 KB, 34 views)
The Following User Says Thank You to Onliner09 For This Useful Post: [ Click to Expand ]
 
jakkrith
Old
#2  
jakkrith's Avatar
Senior Member
Thanks Meter 18
Posts: 314
Join Date: Jun 2007
Location: Bangkok
Thank you very much for this thread

I have an analogue frame grabber USB stick and need to use it with my Archos 101 too.

Quote:
dmesg result:

...

usb 2-1: New USB device found, idVendor=07ca, idProduct=1827
usb 2-1: Product: AVerTV
usb 2-1: Manufacture: AVerMedia
usb 2-1: SerialNumber: 301306400071

...

usbid = 07ca:1827
I wish you can find the solutions to fix this problem and then I will join to test with you.
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...