1. 04 May, 2018 1 commit
  2. 21 Mar, 2018 1 commit
    • Hans Verkuil's avatar
      media: add tuner standby op, use where needed · 3aab15af
      Hans Verkuil authored
      The v4l2_subdev core s_power op was used for two different things: power on/off
      sensors or video decoders/encoders and to put a tuner in standby (and only the
      tuner!). There is no 'tuner wakeup' op, that's done automatically when the tuner
      is accessed.
      The danger with calling (s_power, 0) to put a tuner into standby is that it is
      usually broadcast for all subdevs. So a video receiver subdev that supports
      s_power will also be powered off, and since there is no corresponding (s_power, 1)
      they will never be powered on again.
      In addition, this is specifically meant for tuners only since they draw the most
      This patch adds a new tuner op called 'standby' and replaces all calls to
      (core, s_power, 0) by (tuner, standby). This prevents confusion between the two
      uses of s_power. Note that there is no overlap: bridge drivers either just want
      to put the tuner into standby, or they deal with powering on/off sensors. Never
      This also makes it easier to replace s_power for the remaining bridge drivers
      with some PM code later.
      Whether we want something cleaner for tuners in the future is a separate topic.
      There is a lot of legacy code surrounding tuners, and I am very hesitant about
      making changes there.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
  3. 06 Mar, 2018 3 commits
  4. 22 Feb, 2018 1 commit
  5. 07 Nov, 2017 1 commit
  6. 17 Apr, 2017 3 commits
  7. 12 Dec, 2016 2 commits
  8. 18 Nov, 2016 1 commit
  9. 21 Oct, 2016 3 commits
  10. 19 Sep, 2016 1 commit
  11. 08 Jul, 2016 1 commit
  12. 03 Mar, 2016 1 commit
    • Arnd Bergmann's avatar
      [media] em28xx: restore lost #ifdef · 0d37ba62
      Arnd Bergmann authored
      The cleanup that changed the em28xx driver to use v4l2_mc_create_media_graph
      instead of its own implementation causes a build error when CONFIG_MEDIA_CONTROLLER
      is disabled:
      drivers/media/usb/em28xx/em28xx-video.c: In function 'em28xx_v4l2_init':
      drivers/media/usb/em28xx/em28xx-video.c:2717:38: error: 'struct em28xx' has no member named 'media_dev'
      This puts the new code inside the same #ifdef that controls the presence
      of the 'media_dev' member, and that the old code was in.
      Fixes: de390787 ("[media] em2xx: use v4l2_mc_create_media_graph()")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
  13. 16 Feb, 2016 1 commit
  14. 10 Feb, 2016 1 commit
  15. 01 Feb, 2016 4 commits
    • Mauro Carvalho Chehab's avatar
      [media] em28xx: add media controller support · 37ecc7b1
      Mauro Carvalho Chehab authored
      Add the needed bits to make em28xx to create a media
      controller graph.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
    • Mauro Carvalho Chehab's avatar
      [media] em28xx: avoid divide by zero error · 0962a763
      Mauro Carvalho Chehab authored
      [ 1841.243670] divide error: 0000 [#1] SMP KASAN
      [ 1841.243994] Modules linked in: em28xx_rc rc_core tda18271 drxk em28xx_dvb dvb_core em28xx_alsa mt9v011 em28xx_v4l videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core em28xx tveeprom v4l2_common videodev media cpufreq_powersave cpufreq_conservative cpufreq_userspace cpufreq_stats parport_pc ppdev lp parport snd_hda_codec_hdmi intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm iTCO_wdt iTCO_vendor_support irqbypass crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel sha256_ssse3 sha256_generic hmac drbg i915 snd_hda_codec_realtek snd_hda_codec_generic aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd btusb i2c_algo_bit snd_hda_intel btrtl drm_kms_helper btbcm evdev snd_hda_codec btintel psmouse bluetooth pcspkr snd_hwdep sg drm serio_raw
      [ 1841.244845]  snd_hda_core snd_pcm mei_me rfkill snd_timer mei snd lpc_ich soundcore shpchp i2c_i801 mfd_core battery dw_dmac i2c_designware_platform i2c_designware_core dw_dmac_core video acpi_pad button tpm_tis tpm ext4 crc16 mbcache jbd2 dm_mod hid_generic usbhid sd_mod ahci libahci libata ehci_pci e1000e xhci_pci ptp scsi_mod ehci_hcd xhci_hcd pps_core fan thermal sdhci_acpi sdhci mmc_core i2c_hid hid [last unloaded: tveeprom]
      [ 1841.245342] CPU: 2 PID: 38 Comm: kworker/2:1 Tainted: G        W       4.5.0-rc1+ #43
      [ 1841.245413] Hardware name:                  /NUC5i7RYB, BIOS RYBDWi35.86A.0350.2015.0812.1722 08/12/2015
      [ 1841.245503] Workqueue: events request_module_async [em28xx]
      [ 1841.245557] task: ffff88009df10000 ti: ffff88009df18000 task.ti: ffff88009df18000
      [ 1841.245626] RIP: 0010:[<ffffffffa135a0ad>]  [<ffffffffa135a0ad>] size_to_scale+0xed/0x2c0 [em28xx_v4l]
      [ 1841.245714] RSP: 0018:ffff88009df1faa8  EFLAGS: 00010246
      [ 1841.245756] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8803bb933b38
      [ 1841.245815] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8803bb933b00
      [ 1841.245879] RBP: ffff88009df1fad8 R08: ffff8803bb933b3c R09: 1ffff10077726760
      [ 1841.245944] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
      [ 1841.246006] R13: 0000000000000000 R14: dffffc0000000000 R15: ffff8803b391a130
      [ 1841.246071] FS:  0000000000000000(0000) GS:ffff8803c6900000(0000) knlGS:0000000000000000
      [ 1841.246141] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 1841.246194] CR2: 0000000001d97008 CR3: 00000003bdd85000 CR4: 00000000003406e0
      [ 1841.246256] Stack:
      [ 1841.246278]  0000000000000246 ffff8803bb9321f0 ffff8803bb932270 ffffffffa136f7a0
      [ 1841.246359]  0000000000000000 ffff8803bb932130 ffff88009df1fb20 ffffffffa13646a0
      [ 1841.246439]  ffffffffa127f206 ffff8803bb932130 ffff8803bb932130 ffff8803b391a130
      [ 1841.246517] Call Trace:
      [ 1841.246548]  [<ffffffffa13646a0>] em28xx_set_video_format+0x140/0x1e0 [em28xx_v4l]
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
    • Mauro Carvalho Chehab's avatar
      [media] em28xx: unregister devices in case of failure · 56a7f515
      Mauro Carvalho Chehab authored
      If something bad happens during device registration, unregister
      the already registered devices.
      Without that, it will have lots of KASAN errors when udev
      would try to open the devices.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
    • Mauro Carvalho Chehab's avatar
      [media] em28xx: remove unused input types · d83a96a5
      Mauro Carvalho Chehab authored
      The em28xx driver have lots of different input types but
      only 4 of such types are actually used. The others are bogus.
      Remove them, in order to cleanup the driver.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
  16. 26 Jan, 2016 1 commit
    • Mauro Carvalho Chehab's avatar
      [media] em28xx: fix implementation of s_stream · 13d52fe4
      Mauro Carvalho Chehab authored
      On em28xx driver, s_stream subdev ops was not implemented
      properly. It was used only to disable stream, never enabling it.
      That was the root cause of the regression when we added support
      for s_stream on tvp5150 driver.
      With that, we can get rid of the changes on tvp5150 side,
      e. g. changeset 47de9bf8 ('[media] tvp5150: Fix breakage for serial usage').
      Tested video output on em2820+tvp5150 on WinTV USB2 and
      video and/or vbi output on em288x+tvp5150 on HVR 950.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
  17. 18 Dec, 2015 2 commits
  18. 17 Nov, 2015 1 commit
    • Mauro Carvalho Chehab's avatar
      [media] include/media: move driver interface headers to a separate dir · d647f0b7
      Mauro Carvalho Chehab authored
      Let's not mix headers used by the core with those headers that
      are needed by some driver-specific interface header.
      The headers used on drivers were manually moved using:
          mkdir include/media/drv-intf/
          git mv include/media/cx2341x.h include/media/cx25840.h \
      	include/media/exynos-fimc.h include/media/msp3400.h \
      	include/media/s3c_camif.h include/media/saa7146.h \
      	include/media/saa7146_vv.h  include/media/sh_mobile_ceu.h \
      	include/media/sh_mobile_csi2.h include/media/sh_vou.h \
      	include/media/si476x.h include/media/soc_mediabus.h \
      	include/media/tea575x.h include/media/drv-intf/
      And the references for those headers were corrected using:
          echo "Checking affected files" >&2
          for i in $DIRS; do
      	for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
      		 n=`basename $j`
      		git grep -l $n
          done|sort|uniq >files && (
      	echo "Handling files..." >&2;
      	echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
      		cd include/$MAIN_DIR;
      		for j in $DIRS; do
      			for i in $(ls $j); do
      				echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
      		echo "cat > a && mv a \$i; done";
      	echo "Handling documentation..." >&2;
      	echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
      		cd include/$MAIN_DIR;
      		for j in $DIRS; do
      			for i in $(ls $j); do
      				echo "  perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
      		echo "cat > a && mv a \$i; done"
          ) >script && . ./script
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
  19. 20 Oct, 2015 1 commit
  20. 01 Oct, 2015 1 commit
  21. 05 Jun, 2015 1 commit
  22. 08 Apr, 2015 1 commit
  23. 23 Dec, 2014 3 commits
  24. 04 Dec, 2014 1 commit
  25. 26 Sep, 2014 1 commit
  26. 23 Sep, 2014 1 commit
    • Frank Schaefer's avatar
      [media] em28xx: get rid of field has_audio in struct em28xx_audio_mode · 920f1e4a
      Frank Schaefer authored
      Field has_audio in struct em28xx_audio_mode is used together with value
      EM28XX_NO_AC97 of field ac97 to determine the internal type of audio
      (none/i2s/ac97). This makes the code difficult to understand:
        !audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => no audio
        !audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => BUG
        audio_mode.has_audio  && audio_mode.ac97 == EM28XX_NO_AC97 => AC97 audio
        audio_mode.has_audio  && audio_mode.ac97 != EM28XX_NO_AC97 => I2S audio
      Simplify the whole thing by introducing an enum em28xx_int_audio_type
      which describes the internal audio type (none, ac97, i2s) and is hooked
      directly to the device struct. Then get rid of field has_audio in struct
      A follow-up patch will then remove struct em28xx_ac97_mode and finally
      the whole struct em28xx_audio_mode.
      Signed-off-by: default avatarFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
  27. 22 Sep, 2014 1 commit