]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 May 2012 17:21:51 +0000 (10:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 May 2012 17:21:51 +0000 (10:21 -0700)
Pull media updates from Mauro Carvalho Chehab:
 - some V4L2 API updates needed by embedded devices
 - DVB API extensions for ATSC-MH delivery system, used in US for mobile
   TV
 - new tuners for fc0011/0012/0013 and tua9001
 - a new dvb driver for af9033/9035
 - a new ATSC-MH frontend (lg2160)
 - new remote controller keymaps
 - Removal of a few legacy webcam driver that got replaced by gspca on
   several kernel versions ago
 - a new driver for Exynos 4/5 webcams(s5pp fimc-lite)
 - a new webcam sensor driver (smiapp)
 - a new video input driver for embedded (sta2x1xx)
 - several improvements, fixes, cleanups, etc inside the drivers.

Manually fix up conflicts due to err() -> dev_err() conversion in
drivers/staging/media/easycap/easycap_main.c

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (484 commits)
  [media] saa7134-cards: Remove a PCI entry added by mistake
  [media] radio-sf16fmi: add support for SF16-FMD
  [media] rc-loopback: remove duplicate line
  [media] patch for Asus My Cinema PS3-100 (1043:48cd)
  [media] au0828: Move the Kconfig knob under V4L_USB_DRIVERS
  [media] em28xx: simple comment fix
  [media] [resend] radio-sf16fmr2: add PnP support for SF16-FMD2
  [media] smiapp: Use v4l2_ctrl_new_int_menu() instead of v4l2_ctrl_new_custom()
  [media] smiapp: Add support for 8-bit uncompressed formats
  [media] smiapp: Allow generic quirk registers
  [media] smiapp: Use non-binning limits if the binning limit is zero
  [media] smiapp: Initialise rval in smiapp_read_nvm()
  [media] smiapp: Round minimum pre_pll up rather than down in ip_clk_freq check
  [media] smiapp: Use 8-bit reads only before identifying the sensor
  [media] smiapp: Quirk for sensors that only do 8-bit reads
  [media] smiapp: Pass struct sensor to register writing commands instead of i2c_client
  [media] smiapp: Allow using external clock from the clock framework
  [media] zl10353: change .read_snr() to report SNR as a 0.1 dB
  [media] media: add support to gspca/pac7302.c for 093a:2627 (Genius FaceCam 300)
  [media] m88rs2000 - only flip bit 2 on reg 0x70 on 16th try
  ...

1  2 
Documentation/DocBook/media/v4l/controls.xml
Documentation/feature-removal-schedule.txt
MAINTAINERS
arch/arm/mach-imx/mach-imx27_visstrim_m10.c
drivers/staging/media/easycap/easycap_main.c
drivers/staging/media/go7007/s2250-loader.c
drivers/staging/media/lirc/lirc_imon.c
drivers/staging/media/lirc/lirc_sasem.c
include/linux/Kbuild

diff --cc MAINTAINERS
Simple merge
index 6f83d362ab0d4e7ba59b84c34870297b5164edb1,aed953751a906c12cb057d823b755542e801e3f0..a1c45e4dcdce37e0b1ac885fca0e8750591add80
@@@ -3126,6 -3401,176 +3401,175 @@@ static void config_easycap(struct easyc
                        }
                }
        }
 -              err("Not able to register with videodev");
+ }
+ /*
+  * This function is called from within easycap_usb_disconnect() and is
+  * protected by semaphores set and cleared by easycap_usb_disconnect().
+  * By this stage the device has already been physically unplugged,
+  * so peasycap->pusb_device is no longer valid.
+  */
+ static void easycap_delete(struct kref *pkref)
+ {
+       struct easycap *peasycap;
+       peasycap = container_of(pkref, struct easycap, kref);
+       if (!peasycap) {
+               SAM("ERROR: peasycap is NULL: cannot perform deletions\n");
+               return;
+       }
+       /* Free video urbs */
+       free_video_urbs(peasycap);
+       /* Free video isoc buffers */
+       free_isocbuffers(peasycap);
+       /* Free video field buffers */
+       free_fieldbuffers(peasycap);
+       /* Free video frame buffers */
+       free_framebuffers(peasycap);
+       /* Free audio urbs */
+       free_audio_urbs(peasycap);
+       /* Free audio isoc buffers */
+       free_audio_buffers(peasycap);
+       free_easycap(peasycap);
+       JOT(4, "ending.\n");
+ }
+ static const struct v4l2_file_operations v4l2_fops = {
+       .owner          = THIS_MODULE,
+       .open           = easycap_open_noinode,
+       .unlocked_ioctl = easycap_unlocked_ioctl,
+       .poll           = easycap_poll,
+       .mmap           = easycap_mmap,
+ };
+ static int easycap_register_video(struct easycap *peasycap)
+ {
+       /*
+        * FIXME: This is believed to be harmless,
+        * but may well be unnecessary or wrong.
+        */
+       peasycap->video_device.v4l2_dev = NULL;
+       strcpy(&peasycap->video_device.name[0], "easycapdc60");
+       peasycap->video_device.fops = &v4l2_fops;
+       peasycap->video_device.minor = -1;
+       peasycap->video_device.release = (void *)(&videodev_release);
+       video_set_drvdata(&(peasycap->video_device), (void *)peasycap);
+       if (0 != (video_register_device(&(peasycap->video_device),
+                                       VFL_TYPE_GRABBER, -1))) {
+               videodev_release(&(peasycap->video_device));
+               return -ENODEV;
+       }
+       peasycap->registered_video++;
+       SAM("registered with videodev: %i=minor\n",
+           peasycap->video_device.minor);
+           peasycap->minor = peasycap->video_device.minor;
+       return 0;
+ }
+ /*
+  * When the device is plugged, this function is called three times,
+  * one for each interface.
+  */
+ static int easycap_usb_probe(struct usb_interface *intf,
+                           const struct usb_device_id *id)
+ {
+       struct usb_device *usbdev;
+       struct usb_host_interface *alt;
+       struct usb_endpoint_descriptor *ep;
+       struct usb_interface_descriptor *interface;
+       struct easycap *peasycap;
+       int i, j, rc;
+       u8 bInterfaceNumber;
+       u8 bInterfaceClass;
+       u8 bInterfaceSubClass;
+       int okalt[8], isokalt;
+       int okepn[8];
+       int okmps[8];
+       int maxpacketsize;
+       usbdev = interface_to_usbdev(intf);
+       alt = usb_altnum_to_altsetting(intf, 0);
+       if (!alt) {
+               SAY("ERROR: usb_host_interface not found\n");
+               return -EFAULT;
+       }
+       interface = &alt->desc;
+       if (!interface) {
+               SAY("ERROR: intf_descriptor is NULL\n");
+               return -EFAULT;
+       }
+       /* Get properties of probed interface */
+       bInterfaceNumber = interface->bInterfaceNumber;
+       bInterfaceClass = interface->bInterfaceClass;
+       bInterfaceSubClass = interface->bInterfaceSubClass;
+       JOT(4, "intf[%i]: num_altsetting=%i\n",
+                       bInterfaceNumber, intf->num_altsetting);
+       JOT(4, "intf[%i]: cur_altsetting - altsetting=%li\n",
+               bInterfaceNumber,
+               (long int)(intf->cur_altsetting - intf->altsetting));
+       JOT(4, "intf[%i]: bInterfaceClass=0x%02X bInterfaceSubClass=0x%02X\n",
+                       bInterfaceNumber, bInterfaceClass, bInterfaceSubClass);
+       /*
+        * A new struct easycap is always allocated when interface 0 is probed.
+        * It is not possible here to free any existing struct easycap.
+        * This should have been done by easycap_delete() when the device was
+        * physically unplugged.
+        * The allocated struct easycap is saved for later usage when
+        * interfaces 1 and 2 are probed.
+        */
+       if (0 == bInterfaceNumber) {
+               /*
+                * Alloc structure and save it in a free slot in
+                * easycapdc60_dongle array
+                */
+               peasycap = alloc_easycap(bInterfaceNumber);
+               if (!peasycap)
+                       return -ENOMEM;
+               /* Perform basic struct initialization */
+               init_easycap(peasycap, usbdev, intf, bInterfaceNumber);
+               /* Dynamically fill in the available formats */
+               rc = easycap_video_fillin_formats();
+               if (0 > rc) {
+                       SAM("ERROR: fillin_formats() rc = %i\n", rc);
+                       return -EFAULT;
+               }
+               JOM(4, "%i formats available\n", rc);
+               /* Populate easycap.inputset[] */
+               rc = populate_inputset(peasycap);
+               if (rc < 0)
+                       return rc;
+               JOM(4, "finished initialization\n");
+       } else {
+               peasycap = get_easycap(usbdev, bInterfaceNumber);
+               if (!peasycap)
+                       return -ENODEV;
+       }
+       config_easycap(peasycap, bInterfaceNumber,
+                                bInterfaceClass,
+                                bInterfaceSubClass);
  
        /*
         * Investigate all altsettings. This is done in detail
                JOM(4, "registered device instance: %s\n",
                        peasycap->v4l2_device.name);
  
-               /*
-                * FIXME: This is believed to be harmless,
-                * but may well be unnecessary or wrong.
-                */
-               peasycap->video_device.v4l2_dev = NULL;
-               strcpy(&peasycap->video_device.name[0], "easycapdc60");
-               peasycap->video_device.fops = &v4l2_fops;
-               peasycap->video_device.minor = -1;
-               peasycap->video_device.release = (void *)(&videodev_release);
-               video_set_drvdata(&(peasycap->video_device), (void *)peasycap);
-               if (0 != (video_register_device(&(peasycap->video_device),
-                                                       VFL_TYPE_GRABBER, -1))) {
+               rc = easycap_register_video(peasycap);
 -              if (rc < 0)
++              if (rc < 0) {
 +                      dev_err(&intf->dev,
 +                              "Not able to register with videodev\n");
-                       videodev_release(&(peasycap->video_device));
                        return -ENODEV;
-               peasycap->registered_video++;
-               SAM("registered with videodev: %i=minor\n",
-                                               peasycap->video_device.minor);
-               peasycap->minor = peasycap->video_device.minor;
 +              }
                break;
        }
        /* 1: Audio control */
index 39737839ce291591008ff8673b11ab2b69b9f3db,d38b3a8fb38061bc368b6c44ffeee8a05ca88f68..74af192ef7ae5e1ea0a49e4f095d38394c810aa2
@@@ -381,8 -381,8 +381,9 @@@ header-y += unistd.
  header-y += usbdevice_fs.h
  header-y += utime.h
  header-y += utsname.h
 +header-y += uuid.h
  header-y += uvcvideo.h
+ header-y += v4l2-dv-timings.h
  header-y += v4l2-mediabus.h
  header-y += v4l2-subdev.h
  header-y += veth.h