Monday 16 September 2013

gentoo kernel 3.10.7: How to install camera on toshiba laptop

the really sad part of installing camera driver in linux is that one can not find anything from commands lsmod, lspci (this requires usbtencil). So the way for me to find out what module is required by camera is to run:
lsmod
on a system that drivers are installed. Alternatively, one can use windows and run devmgmt.msc to find out the models.
from the output, the module shows:
videobuf2_vmalloc       2864  1 uvcvideo
videobuf2_core         26953  1 uvcvideo
videodev              105533  2 uvcvideo,videobuf2_core
media                  10308  2 uvcvideo,videodev
so we try to find uvcvideo module in kenel config.
However, different from info given by forums, the new menuconfig can not find anything about uvc video. therefore, I decided to find out from .config file
#
# Media drivers
#
CONFIG_MEDIA_USB_SUPPORT=y

#
# Webcam devices
#
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
This is equivalent to menuconfig Device Drivers->Multimedia support->Cameras/video grabbers support&V4L platform device
then I am able to get the camera by running:
# modprobe uvcvideo
and further run by boot:
# echo "modules=\"uvcvideo\"">>/etc/conf.d/modules
The above mentioned method works very well for my toshiba laptop, but there is some problem on my logitech C160, as this device contains microphones as well. so we need to add that in. first menuconfig:
# make menuconfig
Device Drivers ->
  sound car support ->
    Advanced linux sound architecture ->
      USB sound devices
      [M]  USB Audio/Midi driver
then one needs to do
# make 
# make modules_install
# modprobe snd_usb_audio
# echo "modules=\"snd_usb_audio\"">>/etc/conf.d/modules
now you can select microphone in skype or check the presence of the card by
# cat /proc/asound/cards
some more information: if one can not find the vendor of the product, one can first find out the device id. for example
# lsusb 
Bus 001 Device 004: ID 046d:0824 Logitech, Inc. 
the information "046d:0824" contains vendor and model of the device, if you search on website, it is logitech webcam c160

No comments:

Post a Comment