summaryrefslogtreecommitdiffstats
path: root/drivers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* [media] siano: add new devices to the Siano DriverMauro Carvalho Chehab2013-03-214-3/+111
| | | | | | | | | | | | This patch is based on Doron Cohen's patches: http://patchwork.linuxtv.org/patch/7881/ http://patchwork.linuxtv.org/patch/7888/ http://patchwork.linuxtv.org/patch/7883/ It basically merges the above patches, rebasing them to the macro definitions used upstream, with are different than the ones used by them internally. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: use the newer stats message for recent firmwaresMauro Carvalho Chehab2013-03-212-20/+260
| | | | | | | | | | | | | | The old statistics request don't work with newer firmwares. Add a logic to use the newer stats if firmware major is 8. Note that I have only 2 devices here, one with firmware 2.1 (Hauppauge model 55009 Rev B1F7) and another one with firmware 8.1. We may need to adjust the firmware minimal version for the *_EX message variants, as we start finding firmware versions between 2.x and 8.x. This patch was based on Doron Cohen patch: http://patchwork.linuxtv.org/patch/7886/ Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: add support for LNA on ISDB-TMauro Carvalho Chehab2013-03-211-1/+18
| | | | | | The very same code also exists for DVB-T. Add it for ISDB-T. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: add support for ISDB-T full-segMauro Carvalho Chehab2013-03-211-29/+17
| | | | | | | Fix the DVBv5 API handling for ISDB-T and add support for 13 segments. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: use a separate completion for statsMauro Carvalho Chehab2013-03-211-2/+4
| | | | | | | | | | Instead of re-use tune_done also for stats, the better is to use a different completion. Also, it was noticed that sometimes, the driver answers with MSG_SMS_SIGNAL_DETECTED_IND for status request. Fix the code to also handle those other signal indicators. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: add some new messages to the smscoreapiMauro Carvalho Chehab2013-03-211-0/+16
| | | | | | | Based on Doron Cohen's patch: http://patchwork.linuxtv.org/patch/7887/ Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: cleanups at smscoreapi.cMauro Carvalho Chehab2013-03-212-10/+16
| | | | | | | | Some cleanups at smscoreapi. Most are just CodingStyle. Also, use kzalloc when allocating a new buffer, as it initializes the allocated space with zero. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: always load smsdvbMauro Carvalho Chehab2013-03-211-13/+1
| | | | | | | | | | | Without smsdvb, the driver actually does nothing, as it lacks the userspace API. While I wrote it independently, in order to make a sms2270 board I have here to work, this patch is functionally identical to this patch from Doron Cohen: http://patchwork.linuxtv.org/patch/7894/ Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: fix the debug messageMauro Carvalho Chehab2013-03-211-5/+8
| | | | | | | | | Instead of displaying this: [ 61.869415] smscore_load_firmware_family2: rc=0, postload=0x (null) Display, instead: [ 1348.441160] smscore_load_firmware_family2: rc=0 Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: report the choosed firmware in debugMauro Carvalho Chehab2013-03-211-0/+1
| | | | | | | | Don't keep in the dark: report the firmware file name after lookup. That helps to debug what's happening when a firmware is not found. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: make load firmware logic to work with newer firmwaresMauro Carvalho Chehab2013-03-212-136/+220
| | | | | | | There are new firmwares for sms2xxx devices. Change the firmware load logic to handle those newer firmwares and devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: store firmware versionMauro Carvalho Chehab2013-03-212-0/+3
| | | | | | | | | As there are some changes that seem to be firmware-dependent, we need to store the firmware version, as we don't want to break support for existing cards that use a legacy (and sometimes custom) firmware. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: use USB endpoint descriptors for in/out endpMauro Carvalho Chehab2013-03-211-26/+73
| | | | | | | | | Instead of using hardcoded descriptors, detect them from the USB descriptors. This patch is rebased form Doron Cohen's patch: http://patchwork.linuxtv.org/patch/7883/ Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: add additional attributes to cards entriesMauro Carvalho Chehab2013-03-211-0/+6
| | | | | | Those attributes will be used by the newer sms2xxx cards. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: Properly initialize board informationMauro Carvalho Chehab2013-03-211-0/+1
| | | | | | | Board #0 is an existing one. Instead of initializing the driver with it, use a different value to detect if board is unknown. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: add the remaining new defines from new driverMauro Carvalho Chehab2013-03-211-6/+33
| | | | | | | Add the remaining new defines/enums from Doron Cohen's patch: http://patchwork.linuxtv.org/patch/7882/ Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: better debug send/receive messagesMauro Carvalho Chehab2013-03-214-18/+354
| | | | | | | | Instead of printing a message for some random messages, print it for all sent/received ones. That helps a lot to debug what's going on. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: update message macrosMauro Carvalho Chehab2013-03-211-53/+321
| | | | | | | | | Convert from #define into an enum and add the newer message macros as found on this patch from Doron Cohen: http://patchwork.linuxtv.org/patch/7882/ No messages got supressed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: remove a duplicated structure definitionMauro Carvalho Chehab2013-03-213-63/+30
| | | | | | | | | | | | The same GPIO config struct was declared twice at the driver, with different names and different macros: struct smscore_config_gpio struct smscore_config_gpio Remove the one that uses CamelCase and fix the references to its attributes/macros. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: Add the new voltage definitions for GPIOMauro Carvalho Chehab2013-03-211-0/+12
| | | | | | | Those new definitions came from this patch, from Doron Cohen: http://patchwork.linuxtv.org/patch/7882/ Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: Change GPIO voltage setting namesMauro Carvalho Chehab2013-03-213-9/+9
| | | | | | | | Siano changed the namespace on more recent API, and re-used some of the old names. In order to be able to update the API to support newer chips, the better is to follow this change. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] davinci: vpbe: fix module buildLad, Prabhakar2013-03-192-0/+6
| | | | | | | | | | | | | | add a null entry in platform_device_id {}. This patch fixes following error: drivers/media/platform/davinci/vpbe_venc: struct platform_device_id is 24 bytes. The last of 3 is: 0x64 0x6d 0x33 0x35 0x35 0x2c 0x76 0x70 0x62 0x65 0x2d 0x76 0x65 0x6e 0x63 0x00 0x00 0x00 0x00 0x00 0x03 0x00 0x00 0x00 FATAL: drivers/media/platform/davinci/vpbe_venc: struct platform_device_id is not terminated with a NULL entry! make[1]: *** [__modpost] Error 1 Reported-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] blackfin: replace V4L2_IN/OUT_CAP_CUSTOM_TIMINGS by DV_TIMINGSHans Verkuil2013-03-191-2/+2
| | | | | | | | | | | The use of V4L2_IN/OUT_CAP_CUSTOM_TIMINGS is obsolete, use DV_TIMINGS instead. Note that V4L2_IN/OUT_CAP_CUSTOM_TIMINGS is just a #define for V4L2_IN/OUT_CAP_DV_TIMINGS. At some point in the future these CUSTOM_TIMINGS defines might be removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] davinci: more gama -> gamma typo fixesHans Verkuil2013-03-194-9/+9
| | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] davinci/dm644x_ccdc: fix compiler warningHans Verkuil2013-03-192-6/+9
| | | | | | | | | | | | | | | | | drivers/media/platform/davinci/dm644x_ccdc.c: In function ‘validate_ccdc_param’: drivers/media/platform/davinci/dm644x_ccdc.c:233:32: warning: comparison between ‘enum ccdc_gama_width’ and ‘enum ccdc_data_size’ [-Wenum-compare] It took a bit of work, see this thread of an earlier attempt to fix this: https://patchwork.kernel.org/patch/1923091/ I've chosen not to follow the suggestions in that thread since gamma_width is really a different property from data_size. What you really want is to know if gamma_width fits inside data_size and for that you need to translate each enum into a maximum bit number so you can safely compare the two. So I put in two static inline translation functions instead, keeping the rest of the code the same (except for fixing the 'gama' typo). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] davinci/vpfe_capture: remove current_normHans Verkuil2013-03-191-1/+0
| | | | | | | | | Since vpfe_capture already provided a g_std op setting current_norm does not actually do anything. Remove it. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] davinci/vpbe_display: remove deprecated current_normHans Verkuil2013-03-191-9/+1
| | | | | | | | | Since vpbe_display already provides a g_std op setting current_norm didn't do anything. Remove that code. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] davinci/vpfe_capture: convert to the control frameworkHans Verkuil2013-03-191-40/+7
| | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGSHans Verkuil2013-03-193-9/+9
| | | | | | | | | | | Remove VPBE_ENC_DV_PRESET (the DV_PRESET API is no longer supported) and VPBE_ENC_CUSTOM_TIMINGS is renamed to VPBE_ENC_DV_TIMINGS since the old "CUSTOM_TIMINGS" name is deprecated in favor of "DV_TIMINGS". Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] davinci_vpfe: fix copy-paste errors in several commentsHans Verkuil2013-03-191-6/+6
| | | | | | | | | This removes some incorrect dv_preset references left over from copy-and-paste errors. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tvp7002: remove dv_preset supportHans Verkuil2013-03-191-70/+0
| | | | | | | | | | | Finally remove the dv_preset support from this driver. Note that dv_preset support was already removed from any bridge drivers that use this i2c driver, so the dv_preset ops were no longer called and can be removed safely. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tvp7002: use dv_timings structs instead of presetsHans Verkuil2013-03-191-37/+17
| | | | | | | | | | | | In the functions tvp7002_mbus_fmt(), tvp7002_log_status and tvp7002_probe() we should use the dv_timings data structures instead of dv_preset data structures and functions. This is the second step towards removing the deprecated preset support of this driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tvp7002: replace 'preset' by 'timings' in various structs/variablesHans Verkuil2013-03-191-45/+45
| | | | | | | | | This is the first step towards removing the deprecated preset support of this driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] [1/1,dvb-usb] GOTVIEW SatelliteHD card supportAndrey Pavlenko2013-03-191-1/+11
| | | | | | | | Added support for the GOTVIEW SatelliteHD card which is based on Montage M88DS3000 and works very well with this driver. Signed-off-by: Andrey Pavlenko <andrey.a.pavlenko@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] rc-core: rename ir_input_class to rc_classDavid Härdeman2013-03-191-6/+6
| | | | | | | | The name is already misleading and will be more so in the future as the connection to the input subsystem is obscured away further. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] rc-core: initialize rc-core earlier if built-inDavid Härdeman2013-03-191-1/+1
| | | | | | | | rc-core is a subsystem so it should be registered earlier if built into the kernel. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] lmedm04: Remove redundant NULL check before kfreeSyam Sidhardhan2013-03-191-2/+1
| | | | | | | kfree on NULL pointer is a no-op. Signed-off-by: Syam Sidhardhan <s.syam@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dvb_demux: Transport stream continuity check fixJohn Smith2013-03-191-11/+13
| | | | | | | | | | | | | This patch avoids incrementing continuity counter demux->cnt_storage[pid] for TS packets without payload in accordance with ISO /IEC 13818-1. [mchehab@redhat.com: unmangle whitespacing and fix CodingStyle. Also checked ISO/IEC spec: patch is according with it] Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: John Smith <johns90812@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] redrat3: missing endian conversions and warningsSean Young2013-03-191-59/+12
| | | | | | | Spotted by sparse. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] redrat3: remove memcpys and fix unaligned memory accessSean Young2013-03-191-248/+103
| | | | | | | | | In stead of doing a memcpy from #defined offset, declare structs which describe the incoming and outgoing data accurately. Tested on first generation RedRat. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] redrat3: limit periods to hardware limitsSean Young2013-03-191-29/+24
| | | | | | | | The redrat hardware cannot handle periods of larger than 32767us, limit appropriately. Also fix memory leak in redrat3_get_timeout. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Add ISDB support for c3tech Digital duoMauro Carvalho Chehab2013-03-194-0/+52
| | | | | | | | This is an hybrid board. However, for analog, it requires a new driver for saa7136. So, for now, let's just add support for Digital TV. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-mem2mem: drop rdy_queue on STREAMOFFJohn Sheu2013-03-191-3/+28
| | | | | | | | | | | | | When a v4l2-mem2mem context gets a STREAMOFF call on either its CAPTURE or OUTPUT queues, we should: * Drop the corresponding rdy_queue, since a subsequent STREAMON expects an empty queue. * Deschedule the context, as it now has at least one empty queue and cannot run. Signed-off-by: John Sheu <sheu@google.com> Acked-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-mem2mem: use CAPTURE queue lockJohn Sheu2013-03-191-0/+3
| | | | | | | | | | In v4l2_m2m_try_schedule(), use the CAPTURE queue lock when accessing the CAPTURE queue, instead of relying on just holding the OUTPUT queue lock. Signed-off-by: John Sheu <sheu@google.com> Acked-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] media: implement 32-on-64 bit compat IOCTL handlingSakari Ailus2013-03-191-13/+89
| | | | | | | | | | | Use the same handlers where the structs are the same. Implement a new handler for link enumeration since struct media_links_enum is different on 32-bit and 64-bit systems. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] media: Add 64--32 bit compat ioctl handlerSakari Ailus2013-03-191-3/+28
| | | | | | | | | Provide an ioctl handler for 32-bit binaries on 64-bit systems. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx25821: Cleanup filename assignment codePeter Senna Tschudin2013-03-191-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm pasting the original code and my proposal on the commit message for make it easy to compare the two versions. Line 62 of cx25821-audio-upstream.h contains: char *_defaultAudioName = "/root/audioGOOD.wav"; Original code after replace kmemdup for kstrdup, and after fix return error code: if (dev->input_audiofilename) { dev->_audiofilename = kstrdup(dev->input_audiofilename, GFP_KERNEL); if (!dev->_audiofilename) { err = -ENOMEM; goto error; } /* Default if filename is empty string */ if (strcmp(dev->input_audiofilename, "") == 0) dev->_audiofilename = "/root/audioGOOD.wav"; } else { dev->_audiofilename = kstrdup(_defaultAudioName, GFP_KERNEL); if (!dev->_audiofilename) { err = -ENOMEM; goto error; } } Code proposed in this patch: if ((dev->input_audiofilename) && (strcmp(dev->input_audiofilename, "") != 0)) dev->_audiofilename = kstrdup(dev->input_audiofilename, GFP_KERNEL); else dev->_audiofilename = kstrdup(_defaultAudioName, GFP_KERNEL); if (!dev->_audiofilename) { err = -ENOMEM; goto error; } Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dvb_frontend: Simplify the emulation logicMauro Carvalho Chehab2013-03-191-110/+109
| | | | | | | | The current logic was broken and too complex; while it works fine for DVB-S2/DVB-S, it is broken for ISDB-T. Make the logic simpler, fixes it for ISDB-T and make it clearer. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dvb-frontend: split set_delivery_system()Mauro Carvalho Chehab2013-03-191-129/+165
| | | | | | | | | | This function is complex, and has different workflows, one for DVBv3 calls, and another one for DVBv5 calls. Break it into 3 functions, in order to make easier to understand what each block does. No functional changes so far. A few comments got improved. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx-i2c: relax error check in em28xx_i2c_recv_bytes()Frank Schaefer2013-03-191-11/+11
| | | | | | | | | | | | | | | | | | It turned out that some devices return less bytes then requested via i2c when ALL of the following 3 conditions are met: - i2c bus B is used - there was no attempt to write to the specified slave address before - no device present at the specified slave address With the current code, this triggers an -EIO error and prints a message to the system log. Because it can happen very often during device probing, it is better to ignore this error and bail out silently after the follwing i2c transaction success check with -ENODEV. [mchehab@redhat.com: a small CodingStyle fix] Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>