Re: linux camera drivers

2012-03-02 Thread Greg KH
On Sat, Mar 03, 2012 at 01:51:31AM -0300, Ricardo Fabbri wrote:
> >> 3.Are there any tutorials/pdfs to understand camera drivers in linux 
> >> kernel.
> >
> > What is wrong with the code itself?
> >
> 
> Please provide a more thoughtful answer. At least say if that's your
> tried-and-true approach or if it's a suggestion to look into the code.

It is always the best approach.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: linux camera drivers

2012-03-02 Thread Greg KH
On Sat, Mar 03, 2012 at 09:51:27AM +0530, Mayank Agarwal wrote:
> On Fri, Mar 2, 2012 at 10:08 AM, Mayank Agarwal  > wrote:
> 
> > 1.I think the device supports i2c or spi protocol.I want to know how the
> > i2c or spi is taking data
> >  from image sensor and giving it to video buffers.

That depends on the i2c controller and the device itself.  You need to
know this before you can determine if Linux supports it or not.

> > 2.I want to understand the whole data flow from image sensor to the
> > display buffer and the role of linux kernel
> > camera drivers in that.

I suggest looking at how the v4l interface works, it's quite complex,
but there is documentation for it already.

If you have specific questions about it, please ask on the linux-media
mailing list.

good luck,

greg k-h

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: linux camera drivers

2012-03-02 Thread Ricardo Fabbri
>> 3.Are there any tutorials/pdfs to understand camera drivers in linux kernel.
>
> What is wrong with the code itself?
>

Please provide a more thoughtful answer. At least say if that's your
tried-and-true approach or if it's a suggestion to look into the code.

Ricardo.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: linux camera drivers

2012-03-02 Thread Mayank Agarwal
On Fri, Mar 2, 2012 at 10:08 AM, Mayank Agarwal  wrote:

> 1.I think the device supports i2c or spi protocol.I want to know how the
> i2c or spi is taking data
>  from image sensor and giving it to video buffers.
>
> 2.I want to understand the whole data flow from image sensor to the
> display buffer and the role of linux kernel
> camera drivers in that.
>
> 3.Currently i am looking at Sony IMX036,Aptima MT9P031.
>
> Thanks and Regards,
> Mayank
>
>
> On Thu, Mar 1, 2012 at 8:22 PM, Greg KH  wrote:
>
>> On Thu, Mar 01, 2012 at 05:57:52PM +0530, Mayank Agarwal wrote:
>> > Hi all,
>> >
>> > I have following questions regarding camera drivers in  linux kernel.
>> >
>> > 1.which are the files/folder in kernel directory where camera drivers
>> support
>> > is provided in linux kernel.
>>
>> It depends, which type of protocol does your device support?
>>
>> > 2.Are they customisable according to different SOC requirements.
>>
>> It depends on what the requirements are.  As it's software, it's always
>> able to be changed :)
>>
>> > 3.Are there any tutorials/pdfs to understand camera drivers in linux
>> kernel.
>>
>> What is wrong with the code itself?
>>
>> > 4.At present which sensor (i mean aptina/sony/omnivision) drivers are
>> supported
>> > in linux kernel.
>>
>> What sensor are you looking for exactly?
>>
>> What device do you need to support, and what protocol does your camera
>> use to talk to the hardware?
>>
>> greg k-h
>>
>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Linux cdc-acm-driver

2012-03-02 Thread Manavendra Nath Manav
On Fri, Mar 2, 2012 at 2:50 PM, Stefan Dreyer
 wrote:
> Hi,
>
> Am 02.03.2012 10:05, schrieb Manavendra Nath Manav:
>
>> Hi Stefan
>>
>> On Thu, Mar 1, 2012 at 7:51 PM, Stefan Dreyer
>>   wrote:
>>>
>>> Hi,
>>>
>>>
>>>
>>> Am 01.03.2012 14:57, schrieb Manavendra Nath Manav:
>>>
 The Metrologic scanner is working perfectly in bi-directional serial
 mode. But when I configure it as USB HID Keyboard mode as shown in the
 link and keyboard layout as US-English, I am not getting any data from
 Scanner. I have opened a terminal and scanned multiple barcodes but no
 output on screen.

 [root@pe1800xs e518816]# dmesg
 [98498.945783] input: Honeywell Scanning and Mobility Honeywell
 Scanning and Mobility Scanner as
 /devices/pci:00/:00:1d.1/usb7/7-2/7-2:1.0/input/input20
 [98498.945850] generic-usb 0003:0C2E:0200.0011: input,hidraw2: USB HID
 v1.11 Keyboard [Honeywell Scanning and Mobility Honeywell Scanning and
 Mobility Scanner] on usb-:00:1d.1-2/input0

 [root@pe1800xs e518816]# lsusb -v
 Bus 007 Device 020: ID 0c2e:0200 Metro Metrologic Scanner
 [root@pe1800xs e518816]# cat /proc/bus/usb/devices
 T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 20 Spd=1.5 MxCh= 0
 D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
 P:  Vendor=0c2e ProdID=0200 Rev=58.88
 S:  Manufacturer=Honeywell Scanning and Mobility
 S:  Product=Honeywell Scanning and Mobility Scanner
 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=450mA
 I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
 E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

 Can you help me in getting data from Scanner in USB HID Keyboard
 Emulation mode as this would reduce the burden of using an extra
 driver and the application program can read directly from the
 emulation keyboard instead of listening to serial device.
>>>
>>>
>>>
>>> For me, that looks good. But i never have any problems using the scanner
>>> in
>>> Keyboard-Mode. Are all the necessary drivers loaded
>>> (usbcore,hid,usbhid,...)
>>> What happens, if you plug a new USB-Keyboard in. Does it works? Did you
>>> try
>>> to recall factory-settings before? Maybe the Keyboard-mode is disabled
>>> somewhere else.
>>>
>>> you can test all the input-devices, in directory /dev/input there must be
>>> device-files named event0 ... eventN (You could identify it via
>>> directory:
>>> /dev/input/by-id, if you have it on fedora 14)
>>> you can test them via
>>> # cat /dev/input/event9 | hexdump
>>> If you scan codes, the hexdump of the keycodes is shown.
>>>
>>
>> I scanned all the required bar-codes to make Metrologic MS1690 work as
>> USB HID Keyboard, it is being detected and driver usbhid attached to
>> it, but I am not able to see any output on console. The output is fine
>> when it is configured in serial mode. However, hexdump shows keycodes.
>> I attached another standard USB Dell keyboard and it is working fine.
>>
>> [98498.945783] input: Honeywell Scanning and Mobility Honeywell
>> Scanning and Mobility Scanner as
>> /devices/pci:00/:00:1d.1/usb7/7-2/7-2:1.0/input/input20
>> [98498.945850] generic-usb 0003:0C2E:0200.0011: input,hidraw2: USB HID
>> v1.11 Keyboard [Honeywell Scanning and Mobility Honeywell Scanning and
>> Mobility Scanner] on usb-:00:1d.1-2/input0
>>
>> [root@pe1800xs input]# cat /proc/bus/usb/devices
>> T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 20 Spd=1.5 MxCh= 0
>> D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
>> P:  Vendor=0c2e ProdID=0200 Rev=58.88
>> S:  Manufacturer=Honeywell Scanning and Mobility
>> S:  Product=Honeywell Scanning and Mobility Scanner
>> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=450mA
>> I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
>> E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
>>
>> [root@pe1800xs ~]# ll /dev/input/by-id/
>> total 0
>> lrwxrwxrwx 1 root root 9 Feb 29 15:46
>> usb-Dell_Dell_QuietKey_Keyboard-event-kbd ->  ../event2
>> lrwxrwxrwx 1 root root 9 Feb 29 17:17
>> usb-Dell_Dell_USB_Entry_Keyboard-event-kbd ->  ../event5
>> lrwxrwxrwx 1 root root 9 Mar  1 19:10
>>
>> usb-Honeywell_Scanning_and_Mobility_Honeywell_Scanning_and_Mobility_Scanner-event-kbd
>> ->  ../event6
>>
>> [root@pe1800xs input]# cat event6 | hexdump
>> 000 8be0 4f50 ef90 0009 0004 0004 0027 0007
>> 010 8be0 4f50 ef97 0009 0001 000b 0001 
>> 020 8be0 4f50 ef98 0009    
>> 030 8be0 4f50 0ecf 000a 0004 0004 0027 0007
>> 040 8be0 4f50 0ed4 000a 0001 000b  
>> 050 8be0 4f50 0ed5 000a    
>> *** snip ***
>>
>> I am getting hexdump after scanning bar-codes, but why it is not
>> coming on console as it should like a standard keyboard.
>
>
> If you get the hexdump, your scanner is configured and working correctly.
> There must be a problem with your console or your X-configuration.
>
>

Thanks Stefan, you are right that if I get hexdump then the scanner 

Re: Linux cdc-acm-driver

2012-03-02 Thread Manavendra Nath Manav
Hi Stefan

On Thu, Mar 1, 2012 at 7:51 PM, Stefan Dreyer
 wrote:
> Hi,
>
>
>
> Am 01.03.2012 14:57, schrieb Manavendra Nath Manav:
>
>> The Metrologic scanner is working perfectly in bi-directional serial
>> mode. But when I configure it as USB HID Keyboard mode as shown in the
>> link and keyboard layout as US-English, I am not getting any data from
>> Scanner. I have opened a terminal and scanned multiple barcodes but no
>> output on screen.
>>
>> [root@pe1800xs e518816]# dmesg
>> [98498.945783] input: Honeywell Scanning and Mobility Honeywell
>> Scanning and Mobility Scanner as
>> /devices/pci:00/:00:1d.1/usb7/7-2/7-2:1.0/input/input20
>> [98498.945850] generic-usb 0003:0C2E:0200.0011: input,hidraw2: USB HID
>> v1.11 Keyboard [Honeywell Scanning and Mobility Honeywell Scanning and
>> Mobility Scanner] on usb-:00:1d.1-2/input0
>>
>> [root@pe1800xs e518816]# lsusb -v
>> Bus 007 Device 020: ID 0c2e:0200 Metro Metrologic Scanner
>> [root@pe1800xs e518816]# cat /proc/bus/usb/devices
>> T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 20 Spd=1.5 MxCh= 0
>> D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
>> P:  Vendor=0c2e ProdID=0200 Rev=58.88
>> S:  Manufacturer=Honeywell Scanning and Mobility
>> S:  Product=Honeywell Scanning and Mobility Scanner
>> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=450mA
>> I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
>> E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
>>
>> Can you help me in getting data from Scanner in USB HID Keyboard
>> Emulation mode as this would reduce the burden of using an extra
>> driver and the application program can read directly from the
>> emulation keyboard instead of listening to serial device.
>
>
> For me, that looks good. But i never have any problems using the scanner in
> Keyboard-Mode. Are all the necessary drivers loaded
> (usbcore,hid,usbhid,...)
> What happens, if you plug a new USB-Keyboard in. Does it works? Did you try
> to recall factory-settings before? Maybe the Keyboard-mode is disabled
> somewhere else.
>
> you can test all the input-devices, in directory /dev/input there must be
> device-files named event0 ... eventN (You could identify it via directory:
> /dev/input/by-id, if you have it on fedora 14)
> you can test them via
> # cat /dev/input/event9 | hexdump
> If you scan codes, the hexdump of the keycodes is shown.
>

I scanned all the required bar-codes to make Metrologic MS1690 work as
USB HID Keyboard, it is being detected and driver usbhid attached to
it, but I am not able to see any output on console. The output is fine
when it is configured in serial mode. However, hexdump shows keycodes.
I attached another standard USB Dell keyboard and it is working fine.

[98498.945783] input: Honeywell Scanning and Mobility Honeywell
Scanning and Mobility Scanner as
/devices/pci:00/:00:1d.1/usb7/7-2/7-2:1.0/input/input20
[98498.945850] generic-usb 0003:0C2E:0200.0011: input,hidraw2: USB HID
v1.11 Keyboard [Honeywell Scanning and Mobility Honeywell Scanning and
Mobility Scanner] on usb-:00:1d.1-2/input0

[root@pe1800xs input]# cat /proc/bus/usb/devices
T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 20 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0c2e ProdID=0200 Rev=58.88
S:  Manufacturer=Honeywell Scanning and Mobility
S:  Product=Honeywell Scanning and Mobility Scanner
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=450mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

[root@pe1800xs ~]# ll /dev/input/by-id/
total 0
lrwxrwxrwx 1 root root 9 Feb 29 15:46
usb-Dell_Dell_QuietKey_Keyboard-event-kbd -> ../event2
lrwxrwxrwx 1 root root 9 Feb 29 17:17
usb-Dell_Dell_USB_Entry_Keyboard-event-kbd -> ../event5
lrwxrwxrwx 1 root root 9 Mar  1 19:10
usb-Honeywell_Scanning_and_Mobility_Honeywell_Scanning_and_Mobility_Scanner-event-kbd
-> ../event6

[root@pe1800xs input]# cat event6 | hexdump
000 8be0 4f50 ef90 0009 0004 0004 0027 0007
010 8be0 4f50 ef97 0009 0001 000b 0001 
020 8be0 4f50 ef98 0009    
030 8be0 4f50 0ecf 000a 0004 0004 0027 0007
040 8be0 4f50 0ed4 000a 0001 000b  
050 8be0 4f50 0ed5 000a    
*** snip ***

I am getting hexdump after scanning bar-codes, but why it is not
coming on console as it should like a standard keyboard.

-- 
Manavendra Nath Manav

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies