1. 14 May, 2012 40 commits
    • 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
    • Sylwester Nawrocki's avatar
      [media] m5mols: Convert macros to inline functions · 91f4eb0a
      Sylwester Nawrocki authored
      Make to_sd and to_m5mols macros static inline functions
      for better type safety.
      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>
      91f4eb0a
    • Sylwester Nawrocki's avatar
      [media] V4L: Add camera auto focus controls · 2272ab65
      Sylwester Nawrocki authored
      Add following auto focus controls:
      
       - V4L2_CID_AUTO_FOCUS_START - single-shot auto focus start
       - V4L2_CID_AUTO_FOCUS_STOP -  single-shot auto focus stop
       - V4L2_CID_AUTO_FOCUS_STATUS - automatic focus status
       - V4L2_CID_AUTO_FOCUS_RANGE - automatic focus scan range selection
      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>
      2272ab65
    • Sylwester Nawrocki's avatar
      [media] V4L: Add camera 3A lock control · fc162a09
      Sylwester Nawrocki authored
      The V4L2_CID_3A_LOCK bitmask control allows applications to pause
      or resume the automatic exposure, focus and wite balance adjustments.
      It can be used, for example, to lock the 3A adjustments right before
      a still image is captured, for pre-focus, etc.
      The applications can control each of the algorithms independently,
      through a corresponding control bit, if driver allows that.
      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>
      fc162a09
    • Sylwester Nawrocki's avatar
      [media] V4L: Add camera scene mode control · 0bf6b7dc
      Sylwester Nawrocki authored
      Add control for the scene mode feature available in image sensor
      with more advanced ISP firmware. The V4L2_CID_SCENE_MODE menu
      control allows to select a set of parameters or a specific image
      processing and capture control algorithm optimized for common
      image capture conditions.
      Signed-off-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>
      0bf6b7dc
    • Sylwester Nawrocki's avatar
      [media] V4L: Add camera exposure metering control · cf072139
      Sylwester Nawrocki authored
      The V4L2_CID_EXPOSURE_METERING control allows to determine
      a method used by the camera for measuring the amount of light
      available for automatic exposure.
      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>
      cf072139
    • Sylwester Nawrocki's avatar
      [media] V4L: Add camera ISO sensitivity controls · 7f84ad8b
      Sylwester Nawrocki authored
      Add ISO sensitivity and ISO auto/manual controls. The sensitivity
      values are related to level of amplification of the analog signal
      between image sensor and ADC. These controls allow to support sensors
      exposing an interface to accept the ISO values directly.
      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>
      7f84ad8b
    • Sylwester Nawrocki's avatar
      [media] V4L: Add camera image stabilization control · 82b3056c
      Sylwester Nawrocki authored
      Add V4L2_CID_IMAGE_STABILIZATION control for the camera image
      stabilization feature. This control can be used to enable/disable
      image stabilization. It might get converted to a menu control
      in future if more options are needed.
      Signed-off-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>
      82b3056c
    • Sylwester Nawrocki's avatar
      [media] V4L: Add camera wide dynamic range control · 44d44a1a
      Sylwester Nawrocki authored
      Add V4L2_CID_WIDE_DYNAMIC_RANGE camera class control for the
      camera wide dynamic range (WDR, HDR) feature. This control
      can be used to enable/disable wide dynamic range. It might
      get converted to a menu control in future if more options
      are needed.
      Signed-off-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>
      44d44a1a
    • Sylwester Nawrocki's avatar
      [media] V4L: Add an extended camera white balance control · e40a0573
      Sylwester Nawrocki authored
      This patch adds V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE control which is
      an extended version of the V4L2_CID_AUTO_WHITE_BALANCE control,
      including white balance presets. The following presets are defined:
      
       - V4L2_WHITE_BALANCE_INCANDESCENT,
       - V4L2_WHITE_BALANCE_FLUORESCENT,
       - V4L2_WHITE_BALANCE_FLUORESCENT_H,
       - V4L2_WHITE_BALANCE_HORIZON,
       - V4L2_WHITE_BALANCE_DAYLIGHT,
       - V4L2_WHITE_BALANCE_FLASH,
       - V4L2_WHITE_BALANCE_CLOUDY,
       - V4L2_WHITE_BALANCE_SHADE.
      Signed-off-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>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      e40a0573
    • Sylwester Nawrocki's avatar
      [media] V4L: Add camera exposure bias control · d58083c9
      Sylwester Nawrocki authored
      The camera may in some conditions incorrectly determine the exposure,
      and a manual automatic exposure correction may be needed. This patch
      adds V4L2_CID_AUTO_EXPOSURE_BIAS control which allows to add some
      offset in the automatic exposure control loop, to compensate for
      frame under- or over-exposure.
      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>
      d58083c9
    • Sylwester Nawrocki's avatar
      [media] V4L: Add helper function for standard integer menu controls · 515f3287
      Sylwester Nawrocki authored
      This patch adds v4l2_ctrl_new_int_menu() helper function which can be used
      in drivers for creating standard integer menu control with driver-specific
      menu item list. It is similar to v4l2_ctrl_new_std_menu(), except it doesn't
      have a mask parameter and an additional qmenu parameter allows passing
      an array of signed 64-bit integers as the menu item list.
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Acked-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
      Tested-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      515f3287
    • Sylwester Nawrocki's avatar
      [media] V4L: Extend V4L2_CID_COLORFX with more image effects · 6491d1ad
      Sylwester Nawrocki authored
      This patch adds definition of additional color effects:
      
       - V4L2_COLORFX_AQUA,
       - V4L2_COLORFX_ART_FREEZE,
       - V4L2_COLORFX_SILHOUETTE,
       - V4L2_COLORFX_SOLARIZATION,
       - V4L2_COLORFX_ANTIQUE,
       - V4L2_COLORFX_SET_CBCR.
      
      The new V4L2_COLORFX_CBCR control is added to allow setting
      the fixed Cb, Cr values that replace chroma Cb/Cr coefficients
      in case of V4L2_COLORFX_SET_CBCR effect.
      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>
      6491d1ad
    • Hans Verkuil's avatar
      [media] radio-si470x-usb: remove autosuspend, implement suspend/resume · 6fd522a6
      Hans Verkuil authored
      The radio-si470x-usb driver supported both autosuspend and it stopped the
      radio the moment the last user of the radio device closed it. However, that
      was very confusing since if you play the audio from the device (e.g. through
      arecord -D ... | aplay) then no sound would play unless you had the radio
      device open at the same time, even though there is no need to do anything
      with that node.
      
      On the other hand, the actual suspend/resume functions didn't do anything,
      which would fail if you *did* have the radio node open at that time.
      
      So:
      
      - remove autosuspend (bad idea in general for USB radio devices)
      - move the start/stop out of the open/release functions into the resume/suspend
        functions.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Acked-by: default avatarTobias Lorenz <tobias.lorenz@gmx.net>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      6fd522a6
    • Hans Verkuil's avatar
      [media] radio-si470x-common.c: remove unnecessary kernel log spam · 340bd4c1
      Hans Verkuil authored
      There is no need to report an error in the log, you are already returning
      that error to userspace after all.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Acked-by: default avatarTobias Lorenz <tobias.lorenz@gmx.net>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      340bd4c1
    • Hans Verkuil's avatar
    • Hans Verkuil's avatar
      [media] si470x: Clean up, introduce the control framework · 4967d53d
      Hans Verkuil authored
      This cleans up the code and si470x now uses the proper v4l2 frameworks
      and passes most of the v4l2-compliance tests.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Acked-by: default avatarTobias Lorenz <tobias.lorenz@gmx.net>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      4967d53d
    • Laurent Pinchart's avatar
      [media] v4l: v4l2-ctrls: moves the forward declaration of struct file · 528f0f78
      Laurent Pinchart authored
      This fixes the following warning:
      
      In file included from drivers/media/video/v4l2-subdev.c:29:
      include/media/v4l2-ctrls.h:501: warning: 'struct file' declared inside
      parameter list
      include/media/v4l2-ctrls.h:501: warning: its scope is only this
      definition or declaration, which is probably not what you want
      include/media/v4l2-ctrls.h:509: warning: 'struct file' declared inside
      parameter list
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      528f0f78
    • Kartik Mohta's avatar
      [media] mt9v032: Correct the logic for the auto-exposure setting · 5c375981
      Kartik Mohta authored
      The driver uses the ctrl value passed in as a bool to determine whether
      to enable auto-exposure, but the auto-exposure setting is defined as an
      enum where AUTO has a value of 0 and MANUAL has a value of 1. This leads
      to a reversed logic where if you send in AUTO, it actually sets manual
      exposure and vice-versa.
      Signed-off-by: default avatarKartik Mohta <kartikmohta@gmail.com>
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      5c375981