1. 14 May, 2012 40 commits
    • Hans Verkuil's avatar
      [media] v4l2-dev: rename two functions · 152a3a73
      Hans Verkuil authored
      Rename the function v4l2_dont_use_lock to v4l2_disable_ioctl_locking,
      and rename v4l2_dont_use_cmd to v4l2_disable_ioctl.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      152a3a73
    • Hans Verkuil's avatar
      [media] v4l2-dev.h: add comment not to use V4L2_FL_LOCK_ALL_FOPS in new drivers · 47bd4bc1
      Hans Verkuil authored
      This flag is for legacy drivers only and will go away in the future.
      
      A note regarding commit 5126f259
      (v4l2-dev: add flag to have the core lock all file operations):
      
      That commit message suggests that by not taking the core lock for fops
      other than unlocked_ioctl all problems relating to AB-BA locking and
      mm->mmap_sem are solved. This is not the case.
      
      More work needs to be done by moving the core lock further down into
      video_ioctl2. It should only be taken after the copy_from/to_user calls
      are done.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      47bd4bc1
    • Hans Verkuil's avatar
      [media] v4l2-framework.txt: update the core lock documentation · 74f22c48
      Hans Verkuil authored
      Thanks to Laurent Pinchart for pointing out that this information was missing.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      74f22c48
    • Hans Verkuil's avatar
      [media] av7110: fix v4l2_compliance test issues · a299e407
      Hans Verkuil authored
      Besides the usual inconsistencies in input enumeration there was also a
      kernel crash if you tried to poll on a vbi node. The checks for sliced
      vbi output vs vbi capture were not complete enough.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      a299e407
    • Hans Verkuil's avatar
      [media] vivi: add the alpha component control · 7088f4df
      Hans Verkuil authored
      Useful to set the alpha component for the pixel formats with an alpha channel.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      7088f4df
    • Hans Verkuil's avatar
      [media] vivi: add more pixelformats · 3d51dca2
      Hans Verkuil authored
      This is very useful for testing whether userspace can handle the various formats
      correctly.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      3d51dca2
    • Hans Verkuil's avatar
      [media] hexium-orion: fix incorrect input table · fa0fcf46
      Hans Verkuil authored
      Fix the standard and audioset values.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      fa0fcf46
    • Hans Verkuil's avatar
      [media] hexium-gemini: remove B&W control, fix input table · 332e799c
      Hans Verkuil authored
      The B&W control never worked, and you get the same effect by setting saturation to the
      lowest value. So it has been removed. Also fixed some incorrect entries in the input
      table. This driver now passes v4l2-compliance.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      332e799c
    • Hans Verkuil's avatar
    • Hans Verkuil's avatar
      [media] saa7146: fix querycap, vbi/video separation and g/s_register · ab49ae0f
      Hans Verkuil authored
      The querycap ioctl returned an incorrect version number and incorrect
      capabilities (mixing up vbi and video caps).
      
      The reason for that was that video nodes could do vbi activities: that
      should be separated between the vbi and video nodes.
      
      There were also a few minor problems with dbg_g/s_register that have
      been resolved. The mxb/saa7146 driver now passes the v4l2_compliance tests.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      ab49ae0f
    • Hans Verkuil's avatar
      [media] saa7146: support control events and priority handling · 537fa492
      Hans Verkuil authored
      Use v4l2_fh which gives you control events and priority handling for free.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      537fa492
    • Hans Verkuil's avatar
      [media] saa7146: rename vbi/video_q to vbi/video_dmaq · 9bb60193
      Hans Verkuil authored
      There was also a vbi_q and video_q in saa7146_fh, so that was confusing.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      9bb60193
    • Hans Verkuil's avatar
      [media] saa7146: remove the unneeded type field from saa7146_fh · 6694a560
      Hans Verkuil authored
      This information can also be retrieved from struct video_device.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      6694a560
    • Hans Verkuil's avatar
      [media] saa7146: move vbi fields from saa7146_fh to saa7146_vv · fca3469a
      Hans Verkuil authored
      This fields are global and don't belong in a fh struct.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      fca3469a
    • Hans Verkuil's avatar
      [media] saa7146: move video_fmt from saa7146_fh to saa7146_vv · fd74d6eb
      Hans Verkuil authored
      This is a global structure and does not belong to saa7146_fh.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      fd74d6eb
    • Hans Verkuil's avatar
      [media] saa7146: move overlay information from saa7146_fh into saa7146_vv · 5da545ad
      Hans Verkuil authored
      This is global information, not per-filehandle information.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      5da545ad
    • Hans Verkuil's avatar
    • Hans Verkuil's avatar
      [media] tda9840: fix setting of the audio mode · 8bb5bafa
      Hans Verkuil authored
      You have to first detect the current rxsubchans (mono, stereo or bilingual),
      and depending on that you can set the audio mode. It does not automatically
      switch when the audio channels change.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      8bb5bafa
    • Hans Verkuil's avatar
    • Hans Verkuil's avatar
      [media] mxb: fix audio handling · 66804277
      Hans Verkuil authored
      Instead of using custom ioctls use the VIDIOC_ENUM/G/S/_AUDIO ioctls.
      Also send the same audio to both CDROM-out and line-out.
      
      This is what you would expect and anyway, the CDROM-out connector is unlikely
      to be used these days as it is obsolete.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      66804277
    • Hans Verkuil's avatar
    • Hans Verkuil's avatar
      [media] mxb/saa7146: first round of cleanups · 6e65ca94
      Hans Verkuil authored
      Convert to the control framework, fix the easy v4l2-compliance failures.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      6e65ca94
    • Hans Verkuil's avatar
      [media] v4l/dvb: fix compiler warnings · 5becbc58
      Hans Verkuil authored
      media_build/v4l/drxk_hard.c: In function 'DownloadMicrocode':
      media_build/v4l/drxk_hard.c:1388:6: warning: variable 'BlockCRC' set but not used [-Wunused-but-set-variable]
      media_build/v4l/drxk_hard.c:1384:6: warning: variable 'Drain' set but not used [-Wunused-but-set-variable]
      media_build/v4l/drxk_hard.c:1383:6: warning: variable 'Flags' set but not used [-Wunused-but-set-variable]
      media_build/v4l/lmedm04.c: In function 'lme2510_probe':
      media_build/v4l/lmedm04.c:1208:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/hopper_cards.c: In function 'hopper_irq_handler':
      media_build/v4l/hopper_cards.c:68:26: warning: variable 'lstat' set but not used [-Wunused-but-set-variable]
      media_build/v4l/mantis_cards.c: In function 'mantis_irq_handler':
      media_build/v4l/mantis_cards.c:76:26: warning: variable 'lstat' set but not used [-Wunused-but-set-variable]
      media_build/v4l/mantis_dma.c: In function 'mantis_dma_stop':
      media_build/v4l/mantis_dma.c:202:16: warning: variable 'mask' set but not used [-Wunused-but-set-variable]
      media_build/v4l/mantis_dma.c:202:6: warning: variable 'stat' set but not used [-Wunused-but-set-variable]
      media_build/v4l/mantis_evm.c: In function 'mantis_hifevm_work':
      media_build/v4l/mantis_evm.c:44:17: warning: variable 'gpif_mask' set but not used [-Wunused-but-set-variable]
      media_build/v4l/stb0899_drv.c: In function 'stb0899_init_calc':
      media_build/v4l/stb0899_drv.c:640:5: warning: variable 'agc1cn' set but not used [-Wunused-but-set-variable]
      media_build/v4l/stb0899_drv.c: In function 'stb0899_diseqc_init':
      media_build/v4l/stb0899_drv.c:830:13: warning: variable 'f22_rx' set but not used [-Wunused-but-set-variable]
      media_build/v4l/stb0899_drv.c:826:31: warning: variable 'tx_data' set but not used [-Wunused-but-set-variable]
      media_build/v4l/stv0900_sw.c: In function 'stv0900_track_optimization':
      media_build/v4l/stv0900_sw.c:838:26: warning: variable 'rolloff' set but not used [-Wunused-but-set-variable]
      media_build/v4l/ir-sanyo-decoder.c: In function 'ir_sanyo_decode':
      media_build/v4l/ir-sanyo-decoder.c:59:14: warning: variable 'not_address' set but not used [-Wunused-but-set-variable]
      media_build/v4l/mceusb.c: In function 'mceusb_dev_printdata':
      media_build/v4l/mceusb.c:523:46: warning: variable 'data5' set but not used [-Wunused-but-set-variable]
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      5becbc58
    • Hans Verkuil's avatar
      [media] v4l/dvb: fix compiler warnings · fdf07b02
      Hans Verkuil authored
      media_build/v4l/stb6100.c: In function 'stb6100_read_reg':
      media_build/v4l/stb6100.c:161:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx24110.c: In function 'cx24110_read_ucblocks':
      media_build/v4l/cx24110.c:515:6: warning: variable 'lastbyer' set but not used [-Wunused-but-set-variable]
      media_build/v4l/dib9000.c: In function 'dib9000_mbx_process':
      media_build/v4l/dib9000.c:711:6: warning: variable 'tmp' set but not used [-Wunused-but-set-variable]
      media_build/v4l/zl10353.c: In function 'zl10353_init':
      media_build/v4l/zl10353.c:562:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
      media_build/v4l/stv0297.c: In function 'stv0297_set_frontend':
      media_build/v4l/stv0297.c:417:16: warning: variable 'starttime' set but not used [-Wunused-but-set-variable]
      media_build/v4l/lgs8gxx.c: In function 'lgs8gxx_set_mode_manual':
      media_build/v4l/lgs8gxx.c:265:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/af9013.c: In function 'af9013_statistics_work':
      media_build/v4l/af9013.c:517:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/stv090x.c: In function 'stv090x_optimize_track':
      media_build/v4l/stv090x.c:2845:23: warning: variable 'rolloff' set but not used [-Wunused-but-set-variable]
      media_build/v4l/stv090x.c: In function 'stv090x_algo':
      media_build/v4l/stv090x.c:3177:28: warning: variable 'no_signal' set but not used [-Wunused-but-set-variable]
      media_build/v4l/it913x-fe.c: In function 'it913x_fe_read_ber':
      media_build/v4l/it913x-fe.c:636:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/it913x-fe.c: In function 'it913x_fe_get_frontend':
      media_build/v4l/it913x-fe.c:661:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/it913x-fe.c: In function 'it913x_fe_set_frontend':
      media_build/v4l/it913x-fe.c:694:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/m88rs2000.c: In function 'm88rs2000_set_fec':
      media_build/v4l/m88rs2000.c:657:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/dst_ca.c: In function 'ca_send_message':
      media_build/v4l/dst_ca.c:480:15: warning: variable 'ca_message_header_len' set but not used [-Wunused-but-set-variable]
      media_build/v4l/smssdio.c: In function 'smssdio_interrupt':
      media_build/v4l/smssdio.c:117:11: warning: variable 'isr' set but not used [-Wunused-but-set-variable]
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      fdf07b02
    • Hans Verkuil's avatar
      [media] v4l: fix compiler warnings · 8173090a
      Hans Verkuil authored
      media_build/v4l/adv7343.c: In function 'adv7343_setstd':
      media_build/v4l/adv7343.c:133:6: warning: variable 'output_idx' set but not used [-Wunused-but-set-variable]
      media_build/v4l/tvp5150.c: In function 'tvp5150_mbus_fmt':
      media_build/v4l/tvp5150.c:833:14: warning: variable 'std' set but not used [-Wunused-but-set-variable]
      media_build/v4l/tvp7002.c: In function 'tvp7002_query_dv_preset':
      media_build/v4l/tvp7002.c:673:18: warning: variable 'device' set but not used [-Wunused-but-set-variable]
      media_build/v4l/c-qcam.c: In function 'qc_capture':
      media_build/v4l/c-qcam.c:381:33: warning: variable 'bitsperxfer' set but not used [-Wunused-but-set-variable]
      media_build/v4l/pms.c: In function 'pms_s_std':
      media_build/v4l/pms.c:738:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/pms.c: In function 'init_mediavision':
      media_build/v4l/pms.c:959:6: warning: variable 'id' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-alsa.c: In function 'cx25821_irq':
      media_build/v4l/cx25821-alsa.c:294:6: warning: variable 'audint_count' set but not used [-Wunused-but-set-variable]
      media_build/v4l/zr364xx.c: In function 'zr364xx_fillbuff':
      media_build/v4l/zr364xx.c:510:25: warning: variable 'frm' set but not used [-Wunused-but-set-variable]
      media_build/v4l/s2255drv.c: In function 's2255_fillbuff':
      media_build/v4l/s2255drv.c:637:23: warning: variable 'frm' set but not used [-Wunused-but-set-variable]
      media_build/v4l/s2255drv.c: In function 'vidioc_s_fmt_vid_cap':
      media_build/v4l/s2255drv.c:990:6: warning: variable 'norm' set but not used [-Wunused-but-set-variable]
      media_build/v4l/tm6000-stds.c: In function 'tm6000_set_audio_std':
      media_build/v4l/tm6000-stds.c:341:10: warning: variable 'nicam_flag' set but not used [-Wunused-but-set-variable]
      media_build/v4l/tm6000-video.c: In function 'get_next_buf':
      media_build/v4l/tm6000-video.c:172:8: warning: variable 'outp' set but not used [-Wunused-but-set-variable]
      media_build/v4l/tm6000-video.c: In function 'copy_streams':
      media_build/v4l/tm6000-video.c:214:36: warning: variable 'c' set but not used [-Wunused-but-set-variable]
      media_build/v4l/tm6000-input.c: In function 'tm6000_ir_urb_received':
      media_build/v4l/tm6000-input.c:171:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
      media_build/v4l/usbvision-core.c: In function 'usbvision_decompress':
      media_build/v4l/usbvision-core.c:604:23: warning: variable 'max_pos' set but not used [-Wunused-but-set-variable]
      media_build/v4l/usbvision-core.c: In function 'usbvision_parse_compress':
      media_build/v4l/usbvision-core.c:705:39: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
      media_build/v4l/usbvision-core.c:705:22: warning: variable 'bytes_per_pixel' set but not used [-Wunused-but-set-variable]
      media_build/v4l/zoran_device.c: In function 'write_overlay_mask':
      media_build/v4l/zoran_device.c:545:6: warning: variable 'reg' set but not used [-Wunused-but-set-variable]
      media_build/v4l/go7007-v4l2.c: In function 'go7007_streamoff':
      media_build/v4l/go7007-v4l2.c:79:6: warning: variable 'retval' set but not used [-Wunused-but-set-variable]
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      8173090a
    • Hans Verkuil's avatar
      [media] v4l: fix compiler warnings · e92ba283
      Hans Verkuil authored
      media_build/v4l/au0828-video.c: In function 'au0828_irq_callback':
      media_build/v4l/au0828-video.c:123:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx23888-ir.c: In function 'pulse_clocks_to_clock_divider':
      media_build/v4l/cx23888-ir.c:334:6: warning: variable 'rem' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25840-ir.c: In function 'pulse_clocks_to_clock_divider':
      media_build/v4l/cx25840-ir.c:319:6: warning: variable 'rem' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25840-ir.c: In function 'cx25840_ir_tx_write':
      media_build/v4l/cx25840-ir.c:863:21: warning: variable 'c' set but not used [-Wunused-but-set-variable]
      media_build/v4l/em28xx-audio.c: In function 'snd_em28xx_hw_capture_params':
      media_build/v4l/em28xx-audio.c:346:31: warning: variable 'format' set but not used [-Wunused-but-set-variable]
      media_build/v4l/em28xx-audio.c:346:25: warning: variable 'rate' set but not used [-Wunused-but-set-variable]
      media_build/v4l/em28xx-audio.c:346:15: warning: variable 'channels' set but not used [-Wunused-but-set-variable]
      media_build/v4l/hdpvr-control.c: In function 'get_input_lines_info':
      media_build/v4l/hdpvr-control.c:98:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/hdpvr-video.c: In function 'hdpvr_try_ctrl':
      media_build/v4l/hdpvr-video.c:955:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/saa7134-video.c: In function 'saa7134_s_tuner':
      media_build/v4l/saa7134-video.c:2030:6: warning: variable 'rx' set but not used [-Wunused-but-set-variable]
      media_build/v4l/sn9c102_core.c: In function 'sn9c102_stream_interrupt':
      media_build/v4l/sn9c102_core.c:998:7: warning: variable 'timeout' set but not used [-Wunused-but-set-variable]
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Acked-by: default avatarJanne Grunau <j@jannau.net>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      e92ba283
    • Hans Verkuil's avatar
      [media] cx25821: fix compiler warnings · 30fdf035
      Hans Verkuil authored
      media_build/v4l/cx25821-core.c: In function 'cx_i2c_read_print':
      media_build/v4l/cx25821-core.c:386:6: warning: variable 'value' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-core.c: In function 'cx25821_dev_setup':
      media_build/v4l/cx25821-core.c:899:6: warning: variable 'io_size' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-core.c: In function 'cx25821_irq':
      media_build/v4l/cx25821-core.c:1321:18: warning: variable 'pci_mask' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-i2c.c: In function 'cx25821_i2c_read':
      media_build/v4l/cx25821-i2c.c:365:6: warning: variable 'retval' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-medusa-video.c: In function 'medusa_enable_bluefield_output':
      media_build/v4l/cx25821-medusa-video.c:39:6: warning: variable 'ret_val' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-medusa-video.c: In function 'medusa_set_resolution':
      media_build/v4l/cx25821-medusa-video.c:435:6: warning: variable 'ret_val' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-medusa-video.c: In function 'medusa_set_decoderduration':
      media_build/v4l/cx25821-medusa-video.c:498:6: warning: variable 'ret_val' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-video.c: In function 'cx25821_dump_video_queue':
      media_build/v4l/cx25821-video.c:116:25: warning: variable 'buf' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-video.c: In function 'cx25821_buffer_prepare':
      media_build/v4l/cx25821-video.c:561:20: warning: variable 'line1_offset' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-video.c: In function 'video_ioctl_set':
      media_build/v4l/cx25821-video.c:1834:6: warning: variable 'value' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-video-upstream.c: In function 'cx25821_upstream_irq':
      media_build/v4l/cx25821-video-upstream.c:641:6: warning: variable 'msk_stat' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-video-upstream-ch2.c: In function 'cx25821_upstream_irq_ch2':
      media_build/v4l/cx25821-video-upstream-ch2.c:591:6: warning: variable 'msk_stat' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-audio-upstream.c: In function 'cx25821_upstream_irq_audio':
      media_build/v4l/cx25821-audio-upstream.c:589:6: warning: variable 'msk_stat' set but not used [-Wunused-but-set-variable]
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      30fdf035
    • Hans Verkuil's avatar
      [media] ivtv/cx18: fix compiler warnings · 932205a7
      Hans Verkuil authored
      media_build/v4l/cx18-alsa-main.c: In function 'cx18_alsa_exit':
      media_build/v4l/cx18-alsa-main.c:282:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx18-mailbox.c: In function 'cx18_api_call':
      media_build/v4l/cx18-mailbox.c:598:6: warning: variable 'state' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx18-alsa-pcm.c: In function 'snd_cx18_pcm_capture_open':
      media_build/v4l/cx18-alsa-pcm.c:156:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx18-alsa-pcm.c: In function 'snd_cx18_pcm_capture_close':
      media_build/v4l/cx18-alsa-pcm.c:202:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx18-alsa-pcm.c: In function 'snd_cx18_pcm_hw_params':
      media_build/v4l/cx18-alsa-pcm.c:255:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx18-streams.c: In function 'cx18_stop_v4l2_encode_stream':
      media_build/v4l/cx18-streams.c:983:16: warning: variable 'then' set but not used [-Wunused-but-set-variable]
      media_build/v4l/ivtv-ioctl.c: In function 'ivtv_set_speed':
      media_build/v4l/ivtv-ioctl.c:138:22: warning: variable 's' set but not used [-Wunused-but-set-variable]
      media_build/v4l/ivtvfb.c: In function 'ivtvfb_init':
      media_build/v4l/ivtvfb.c:1286:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]
      media_build/v4l/ivtvfb.c: In function 'ivtvfb_cleanup':
      media_build/v4l/ivtvfb.c:1306:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      932205a7
    • Hans Verkuil's avatar
      [media] cx231xx: fix compiler warnings · da983503
      Hans Verkuil authored
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-audio.c: In function ‘snd_cx231xx_hw_capture_params’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-audio.c:527:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-audio.c:526:31: warning: variable ‘format’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-audio.c:526:25: warning: variable ‘rate’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-audio.c:526:15: warning: variable ‘channels’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-audio.c: In function ‘snd_cx231xx_capture_trigger’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-audio.c:589:6: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-video.c: In function ‘cx231xx_isoc_copy’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-video.c:331:17: warning: variable ‘outp’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-video.c: In function ‘cx231xx_bulk_copy’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-video.c:434:17: warning: variable ‘outp’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-video.c: In function ‘cx231xx_reset_video_buffer’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-video.c:704:7: warning: variable ‘outp’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-core.c: In function ‘cx231xx_set_mode’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-core.c:699:6: warning: variable ‘errCode’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-core.c: In function ‘cx231xx_ep5_bulkout’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-core.c:763:6: warning: variable ‘errCode’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-core.c: In function ‘cx231xx_isoc_irq_callback’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-core.c:800:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-core.c: In function ‘cx231xx_bulk_irq_callback’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-core.c:846:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-core.c: In function ‘cx231xx_stop_TS1’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-core.c:1234:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-core.c: In function ‘cx231xx_start_TS1’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-core.c:1254:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c: In function ‘cx231xx_enable656’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c:937:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c: In function ‘cx231xx_disable656’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c:955:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c: In function ‘cx231xx_dump_HH_reg’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c:1323:5: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c: In function ‘cx231xx_dump_SC_reg’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c:1358:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c: In function ‘cx231xx_Setup_AFE_for_LowIF’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c:1444:5: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c: In function ‘cx231xx_set_Colibri_For_LowIF’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c:1504:5: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c: In function ‘cx231xx_set_DIF_bandpass’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c:1559:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c: In function ‘cx231xx_gpio_i2c_write’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-avcore.c:3093:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-417.c: In function ‘cx231xx_initialize_codec’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-417.c:1098:9: warning: variable ‘data’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-417.c: In function ‘vidioc_streamon’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-417.c:1795:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-vbi.c: In function ‘cx231xx_isoc_vbi_copy’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-vbi.c:86:25: warning: variable ‘buf’ set but not used [-Wunused-but-set-variable]
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-vbi.c: In function ‘cx231xx_irq_vbi_callback’:
      v4l-dvb-git/drivers/media/video/cx231xx/cx231xx-vbi.c:313:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      da983503
    • Hans Verkuil's avatar
      [media] dw2102: fix compile warnings · d51dbecc
      Hans Verkuil authored
      media_build/v4l/dw2102.c:151:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/dw2102.c:224:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/dw2102.c:279:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/dw2102.c:352:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/dw2102.c:435:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/dw2102.c:499:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      d51dbecc
    • Sylwester Nawrocki's avatar
      [media] m5mols: Add 3A lock control · 9346459a
      Sylwester Nawrocki authored
      Add control for locking automatic exposure, focus and white balance
      adjustments. While at it, tidy up the data structure documentation.
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      9346459a
    • Sylwester Nawrocki's avatar
      [media] m5mols: Add JPEG compression quality control · dd9c471d
      Sylwester Nawrocki authored
      Add JPEG compression quality control for snapshot capture.
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      dd9c471d
    • Sylwester Nawrocki's avatar
      [media] m5mols: Add exposure metering control · 50d3f93e
      Sylwester Nawrocki authored
      This patch adds V4L2_CID_EXPOSURE_METERING control which allows
      to select the light metering mode for automatic exposure as one
      of the following modes: spot (small area at the frame center),
      center weighted and frame averaged.
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      50d3f93e
    • Sylwester Nawrocki's avatar
    • Sylwester Nawrocki's avatar
    • Sylwester Nawrocki's avatar
      [media] m5mols: Add exposure bias control · 48311db6
      Sylwester Nawrocki authored
      Add integer menu control for exposure bias. The control value range is
      -2.0 EV to +2.0 EV, in 0.5 EV steps.
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      48311db6
    • Sylwester Nawrocki's avatar
      [media] m5mols: Add auto and preset white balance control · d7a87e4c
      Sylwester Nawrocki authored
      Replace the V4L2_CID_AUTO_WHITE_BALANCE control with its extended
      version - V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE so the white balance
      presets feature is exposed to user land.
      Acked-by: default avatarHeungJun Kim <riverful.kim@samsung.com>
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      d7a87e4c
    • Sylwester Nawrocki's avatar
      [media] m5mols: Add ISO sensitivity controls · 44b153ca
      Sylwester Nawrocki authored
      Add controls for manual/auto ISO sensitivity.
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      44b153ca
    • Sylwester Nawrocki's avatar
      [media] m5mols: Use proper sensor mode for the controls · 0373e974
      Sylwester Nawrocki authored
      The parameters corresponding to the V4L controls can be reconfigured
      only in associated M-5MOLS operation mode. Use struct v4l2_ctrl
      priv field to assign the working mode to the controls which can be
      modified only in certain conditions.
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      0373e974
    • Sylwester Nawrocki's avatar
      [media] m5mols: Refactored controls handling · 3c5da0ba
      Sylwester Nawrocki authored
      This patch is a prerequisite for the new controls addition. It consolidates
      the control handling code, which is moved to m5mols_controls.c and
      staticized. The controls initialization is reordered to better reflect
      the control clusters and make the diffs smaller when new controls are added.
      To make the code easier to follow when more controls is added use separate
      set function for each control.
      
      Rewrite the image effect registers handling.
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      3c5da0ba