0

I have an Acer netbook, with built-in camera, running just fine under Ubuntu/x86. I also have a stack of broken netbooks of the same model that suffered various accidents over the years of intense use, and serve as source of spare parts. And I got an Orange Pi, to which I wanted to attach a small, lean webcam - the thingy fitting in the narrow bar above the screen was the perfect size, and I knew for a fact it's USB (albeit a special snowfake running on 3.3V instead of USB's standard 5) so I extracted one, found the pinout, hooked it to USB data, 3.3V and GND on my Orange Pi, and it showed up in lsusb just fine, same as on the netbook:

Bus 001 Device 002: ID 04f2:b367 Chicony Electronics Co., Ltd 

And that's where my adventure hit a roadblock: there appears to be no kernel module in my Pi's distro to support this camera. No surprise there, I might be the first person in the world who wants to hook up the camera manufactured exclusively to be built into Acer x86 netbooks, to an ARM SBC. Why clutter an ARM build with drivers for hardware never seen before outside an Intel machine? lsmod doesn't show anything related to video. I bet I could compile and add the relevant module if I knew which one is it.

Meanwhile, my (working) netbook's lsusb displays over 80 modules, names of most telling me nothing about what they do.

   Module                  Size  Used by                                                                                                  
   option                 57344  0                                                                                                        
   huawei_cdc_ncm         16384  0                                                                                                        
   cdc_wdm                20480  1 huawei_cdc_ncm                                                                                         
   cdc_ncm                40960  1 huawei_cdc_ncm                                                                                         
   usb_wwan               20480  1 option                                                                                                 
   usbnet                 45056  2 cdc_ncm,huawei_cdc_ncm                                                                                 
   usbserial              45056  2 usb_wwan,option                                                                                        
   uas                    24576  0                                                                                                        
   usb_storage            69632  1 uas                                                                                                    
   binfmt_misc            20480  1                                                                                                        
   ccm                    20480  6                                                                                                        
   snd_hrtimer            16384  1                                                                                                        
   wl                   6447104  0                                                                                                        
   snd_hda_codec_realtek   110592  1                                                                                                      
   snd_hda_codec_generic    73728  1 snd_hda_codec_realtek                                                                                
   snd_hda_codec_hdmi     49152  1                                                                                                        
   uvcvideo               90112  0                                                                                                        
   videobuf2_vmalloc      16384  1 uvcvideo                                                                                               
   snd_hda_intel          45056  3                                                                                                        
   videobuf2_memops       16384  1 videobuf2_vmalloc
   videobuf2_v4l2         24576  1 uvcvideo
   videobuf2_core         40960  2 videobuf2_v4l2,uvcvideo
   videodev              188416  3 videobuf2_core,videobuf2_v4l2,uvcvideo
   snd_hda_codec         126976  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
   media                  40960  2 videodev,uvcvideo
   snd_hda_core           81920  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
   snd_hwdep              20480  1 snd_hda_codec
   intel_powerclamp       16384  0
   snd_pcm                98304  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
   arc4                   16384  2
   coretemp               16384  0
   ath9k                 155648  0
   ath9k_common           36864  1 ath9k
   snd_seq_midi           16384  0
   ath9k_hw              471040  2 ath9k_common,ath9k
   snd_seq_midi_event     16384  1 snd_seq_midi
   input_leds             16384  0
   acer_wmi               20480  0
   joydev                 24576  0
   sparse_keymap          16384  1 acer_wmi
   ath                    32768  3 ath9k_common,ath9k,ath9k_hw
   serio_raw              16384  0
   wmi_bmof               16384  0
   mac80211              786432  1 ath9k
   rtsx_pci_ms            20480  0
   memstick               16384  1 rtsx_pci_ms
   snd_rawmidi            32768  1 snd_seq_midi
   snd_seq                65536  3 snd_seq_midi,snd_seq_midi_event
   lpc_ich                24576  0
   cfg80211              634880  5 wl,ath9k_common,ath9k,ath,mac80211
   snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
   snd_timer              32768  3 snd_seq,snd_hrtimer,snd_pcm
   mac_hid                16384  0
   snd                    81920  18 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,snd_rawmidi
   soundcore              16384  1 snd
   shpchp                 36864  0
   sch_fq_codel           20480  2
   cuse                   16384  3
   parport_pc             32768  0
   ppdev                  20480  0
   lp                     20480  0
   parport                49152  3 parport_pc,lp,ppdev
   ip_tables              28672  0
   x_tables               40960  1 ip_tables
   autofs4                40960  2
   rtsx_pci_sdmmc         24576  0
   gma500_gfx            184320  2
   i2c_algo_bit           16384  1 gma500_gfx
   drm_kms_helper        172032  1 gma500_gfx
   syscopyarea            16384  1 drm_kms_helper
   sysfillrect            16384  1 drm_kms_helper
   psmouse               151552  0
   sysimgblt              16384  1 drm_kms_helper
   ahci                   40960  2
   fb_sys_fops            16384  1 drm_kms_helper
   libahci                32768  1 ahci
   drm                   401408  4 drm_kms_helper,gma500_gfx
   r8169                  86016  0
   rtsx_pci               69632  2 rtsx_pci_sdmmc,rtsx_pci_ms
   mii                    16384  2 r8169,usbnet
   wmi                    24576  2 acer_wmi,wmi_bmof
   video                  45056  2 acer_wmi,gma500_gfx

How do I go about finding the right one?

2 Answers 2

2

You can search through the kernel sources for the vendor id "04f2", then filter for the product id "b367". I found 2 video files with the vendor id,though one zr364xx.c is no longer in the version 6 kernel. No files have the specific product id. You could try editing the other uvc_driver.c file by duplicating the struct entry for /* Chicony CNF7129 (Asus EEE 100HE) */ and changing the product id, then recompiling the module.

2

You can use modinfo on a given kernel module to find out what devices it applies to. For example, if you do sudo modinfo uvcvideo, you get a list of patterns for USB classes and particular USB devices. There is kernel documentation somewhere that describes the format.

Compare the pattern with what you get when you do lsusb -v for a particular USB device.

You can also do an lsusb -t, and then look under /sys/bus/usb/devices/ for a particular device in the USB tree, and follow the driver symlink to see which module was loaded for it.

Finally, you can use udevadm in various ways (see man udevadm) to get similar information.

My guess is that your camera is handled by uvcvideo, and then it's a bit surprising it doesn't get handled on the Orange Pi....

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .