Commit graph

523 commits

Author SHA1 Message Date
Brad Love 2f53370991 media: em28xx: Demote several dev_err to dev_info
These two statements are not errors, reduce to appropriate level.

Signed-off-by: Brad Love <brad@nextdimension.cc>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-11 11:30:38 -04:00
Mauro Carvalho Chehab 901b9dd5e3 media: update/fix my e-mail on some places
There are two places pointing to an unexisting "m.chehab@kernel.org"
email. I never had such email, so, I'm unsure how it ends there.
Anyway, it is plain wrong.

While here, use my canonical e-mail on a bunch of places that
are pointing to another e-mail. The idea is that, from now on,
all places will be pointing to the same SMTP server.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-10 07:27:15 -04:00
Mauro Carvalho Chehab 71db1cd7ff Linux 4.17-rc4
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAlrvwLAeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGEX4H/iRAefubpMXptH55
 ru/Mr7hsbKtKQOCmH3LuYP2SwSEHclX+kxHfiaIMsBN9iOGWpRJkZVLuOG0Vl0sZ
 d68I5UTEJHPY0FZqOvfXY1sLTfG9jlhQ/SyppVyuL+QbH+cecnWqvkMkwo2p99MJ
 7OZ3wZjSObaJGXEoLUbZrEbTf8PsT8eT7MWMkmOJHO/J8rnnoDKaOiB5fBxhck0M
 xd/FdOYNZhqOfzIMUuLPWPE3THjfJuIQOYsTvEq0lcuAD2ZOesbV5hsGLC1AG6jd
 GaJJKy80mRvPXSLv7GTigBG9zZbs0mszDJeeh0FCjSlc3sjMDZn7A12N1c8AcQ52
 rLmzSQ8=
 =Nmna
 -----END PGP SIGNATURE-----

Merge tag 'v4.17-rc4' into patchwork

Linux 4.17-rc4

* tag 'v4.17-rc4': (920 commits)
  Linux 4.17-rc4
  KVM: x86: remove APIC Timer periodic/oneshot spikes
  genksyms: fix typo in parse.tab.{c,h} generation rules
  kbuild: replace hardcoded bison in cmd_bison_h with $(YACC)
  gcc-plugins: fix build condition of SANCOV plugin
  MAINTAINERS: Update Kbuild entry with a few paths
  Revert "usb: host: ehci: Use dma_pool_zalloc()"
  platform/x86: Kconfig: Fix dell-laptop dependency chain.
  platform/x86: asus-wireless: Fix NULL pointer dereference
  arm64: vgic-v2: Fix proxying of cpuif access
  KVM: arm/arm64: vgic_init: Cleanup reference to process_maintenance
  KVM: arm64: Fix order of vcpu_write_sys_reg() arguments
  MAINTAINERS & files: Canonize the e-mails I use at files
  media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR
  tools: power/acpi, revert to LD = gcc
  bdi: Fix oops in wb_workfn()
  RDMA/cma: Do not query GID during QP state transition to RTR
  IB/mlx4: Fix integer overflow when calculating optimal MTT size
  IB/hfi1: Fix memory leak in exception path in get_irq_affinity()
  IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure
  ...
2018-05-10 07:19:23 -04:00
Brad Love 01affb000e media: em28xx: Fix DualHD broken second tuner
The use of a hard coded i2c address breaks the creation of the
second tuner in DualHD 01595 models. The issue is compounded
by lack of any error message stating that a driver failed
initialization. Use addr, which contains the correct address
for each tuner.

Fixes: ad32495b15 ("media: em28xx-dvb: simplify DVB module probing logic")

Signed-off-by: Brad Love <brad@nextdimension.cc>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-09 16:25:40 -04:00
Marcel Stork acf43845d1 media: em28xx: Add new dvb-t board ":Zolid Hybrid Tv Stick"
Extra code to be able to use this stick, only digital, not analog
nor remote-control.

Signed-off-by: Marcel Stork <mjstork@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05 10:34:09 -04:00
Marcel Stork 76757e434a media: em28xx: merge two identical cases inside a switch()
A cosmetic change by combining two sets of boards into one set because
having the same arguments.

Signed-off-by: Marcel Stork <mjstork@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05 10:32:28 -04:00
Chris Mayo 0a8b9993df media: em28xx-cards: output regular messages as info
Messages expected during device probe were being marked as errors.

Signed-off-by: Chris Mayo <aklhfex@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04 14:32:46 -04:00
Rainer Keller 5b1a270d22 media: dvb: add alternative USB PID for Hauppauge WinTV-soloHD
Newer DVB receivers of this type have a different USB PID.

Signed-off-by: Rainer Keller <mail@rainerkeller.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04 14:20:55 -04:00
Mauro Carvalho Chehab 23ba635d45 media: lgdt330x: convert it to the new I2C binding way
Convert the driver to allow its usage with the new I2C
binding way.

Please notice that this patch doesn't convert the
callers to bind to it using the new way.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04 11:09:26 -04:00
Mauro Carvalho Chehab 509f89652f media: em28xx: fix a regression with HVR-950
Commit be7fd3c3a8 ("media: em28xx: Hauppauge DualHD second tuner
functionality") removed the logic with sets the alternate for the DVB
device. Without setting the right alternate, the device won't be
able to submit URBs, and userspace fails with -EMSGSIZE:

	ERROR     DMX_SET_PES_FILTER failed (PID = 0x2000): 90 Message too long

Tested with Hauppauge HVR-950 model A1C0.

Fixes: be7fd3c3a8 ("media: em28xx: Hauppauge DualHD second tuner functionality")

Cc: Brad Love <brad@nextdimension.cc>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04 11:00:54 -04:00
Mauro Carvalho Chehab fd901b6e81 media: em28xx: Don't use ops->resume if NULL
Changeset  be7fd3c3a8 ("media: em28xx: Hauppauge DualHD
second tuner functionality") introduced a potential NULL pointer
dereference, as pointed by Coverity:

CID 1434731 (#1 of 1): Dereference after null check (FORWARD_NULL)16. var_deref_op: Dereferencing null pointer ops->resume.

var_compare_op: Comparing ops->resume to null implies that ops->resume might be null.
1174                if (ops->resume)
1175                        ops->resume(dev);
1176                if (dev->dev_next)
1177                        ops->resume(dev->dev_next);

Fixes: be7fd3c3a8 ("media: em28xx: Hauppauge DualHD second tuner functionality")

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04 08:59:02 -04:00
Mauro Carvalho Chehab 3259081991 MAINTAINERS & files: Canonize the e-mails I use at files
From now on, I'll start using my @kernel.org as my development e-mail.

As such, let's remove the entries that point to the old
mchehab@s-opensource.com at MAINTAINERS file.

For the files written with a copyright with mchehab@s-opensource,
let's keep Samsung on their names, using mchehab+samsung@kernel.org,
in order to keep pointing to my employer, with sponsors the work.

For the files written before I join Samsung (on July, 4 2013),
let's just use mchehab@kernel.org.

For bug reports, we can simply point to just kernel.org, as
this will reach my mchehab+samsung inbox anyway.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Brian Warner <brian.warner@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04 06:21:06 -04:00
Mauro Carvalho Chehab 728d9fd9f1 media: em28xx-input: improve error handling code
The current I2C error handling logic makes static analyzers
confused:

	drivers/media/usb/em28xx/em28xx-input.c:96 em28xx_get_key_terratec() error: uninitialized symbol 'b'.

Change it to match the coding style we're using elsewhere.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23 07:33:22 -04:00
Hans Verkuil 3aab15af9a media: add tuner standby op, use where needed
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
current.

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
both.

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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-21 12:05:39 -04:00
Dan Carpenter 3f127ce113 media: em28xx-cards: fix em28xx_duplicate_dev()
There is a double sizeof() typo here so we don't duplicate the struct
properly.

Fixes: be7fd3c3a8 ("media: em28xx: Hauppauge DualHD second tuner functionality")

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
2018-03-08 06:06:51 -05:00
Brad Love 6b234c98f7 media: em28xx: Change hex to lower case
Coding style fix.

Signed-off-by: Brad Love <brad@nextdimension.cc>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-07 03:59:18 -05:00
Brad Love 309d4c4cc9 media: em28xx: Enable inversion for Solo/Dual HD DVB models
Hauppauge Solo/Dual HD DVB models use a si2157 tuner, which is set to
produce inverted spectrum. This configures the si2168 DVB demod for
inverted spectrum on both affected models.

[mchehab@s-opensource.com: rebased on the top of upstream]
Signed-off-by: Brad Love <brad@nextdimension.cc>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 07:47:30 -05:00
Mauro Carvalho Chehab f9fe90a46d media: em28xx-video: fix most coding style issues
There are a number of coding style issues at em28xx-video.
Fix most of them, by using checkpatch in strict mode to point
for it.

Automatic fixes were made with --fix-inplace, but those
were complemented by manual work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:54:56 -05:00
Mauro Carvalho Chehab 08cc05e4e7 media: em28xx-input: fix most coding style issues
There are a number of coding style issues at em28xx-input.
Fix most of them, by using checkpatch in strict mode to point
for it.

Automatic fixes were made with --fix-inplace, but those
were complemented by manual work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:54:56 -05:00
Mauro Carvalho Chehab 8adbc7d68a media: em28xx-i2c: fix most coding style issues
There are a number of coding style issues at em28xx-i2c.
Fix most of them, by using checkpatch in strict mode to point
for it.

Automatic fixes were made with --fix-inplace, but those
were complemented by manual work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:54:55 -05:00
Mauro Carvalho Chehab 349ac5bba1 media: em28xx-core: fix most coding style issues
There are a number of coding style issues at em28xx-core.
Fix most of them, by using checkpatch in strict mode to point
for it.

Automatic fixes were made with --fix-inplace, but those
were complemented by manual work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:54:55 -05:00
Mauro Carvalho Chehab 4a089668ef media: em28xx-cards: rework the em28xx probing code
There is a complex loop there with identifies the em28xx
endpoints. It has lots of identations inside, and big names,
making harder to understand.

Simplify it by moving the main logic into a static function.

While here, rename "interface" var to "intf".

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:54:54 -05:00
Mauro Carvalho Chehab 0086085b30 media: em28xx-cards: fix most coding style issues
There are a number of coding style issues, pointed by checkpatch
on strict mode.

Fix the ones that don't require code refactor here.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:54:54 -05:00
Mauro Carvalho Chehab 04964eb0eb media: em28xx-camera: fix coding style issues
There are some coding style issues at em28xx-camera.

Fix them, by using checkpatch in strict mode to point for it.
Automatic fixes with --fix-inplace were complemented by manual
work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:54:53 -05:00
Mauro Carvalho Chehab 9f90f5371f media: em28xx-audio: fix coding style issues
There are a number of coding style issues at em28xx-audio.
Fix them, by using checkpatch in strict mode to point for it.
Automatic fixes with --fix-inplace were complemented by manual
work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:54:53 -05:00
Mauro Carvalho Chehab 2e1e84c587 media: em28xx-reg.h: Fix coding style issues
Use BIT() macros and fix one comment that is not following
the Kernel coding style.

It should be noticed that the registers bit masks should be
casted to unsigned char, as, otherwise, it would produce
warnings like:

	drivers/media/usb/em28xx/em28xx-cards.c:81:33: warning: large integer implicitly truncated to unsigned type [-Woverflow]
	  {EM2820_R08_GPIO_CTRL, 0x6d,   ~EM_GPIO_4, 10},
	                                 ^

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:54:52 -05:00
Mauro Carvalho Chehab c69ce61563 media: em28xx.h: Fix most coding style issues
There used to have a lot of coding style issues there. The
ones detected by checkpatch, in strict mode, got fixed.

Still, we need to work more on it, in order to document all
struct fields using kernel-doc macros, but this will be done
on some future patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:54:52 -05:00
Mauro Carvalho Chehab f22e9e7133 media: em28xx: Add SPDX license tags where needed
Most of the files there are missing a SPDX license tag. Add.

While here fix some DRIVER_LICENSE macro in order to reflect
the source file license, as some of the headers are GPL v2
only.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:54:52 -05:00
Mauro Carvalho Chehab fe8d54f0e9 media: em28xx-dvb: do some coding style improvements
As we're touching a lot on this file, let's solve several
Coding Style issues there using checkpatch --fix-inline --strict,
and manually adjusting the results.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:54:51 -05:00
Mauro Carvalho Chehab ad05ff091f media: s5h14*.h: fix typos for CONTINUOUS
There is a typo at the several s5h14*.h headers: continuous were
spelled incorrectly.

Fix it with this script:

for i in $(git grep -l S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK); do
	sed s,S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,S5H1409_MPEGTIMING_CONTINUOUS_NONINVERTING_CLOCK,g -i $i
done
for i in $(git grep -l -i continous drivers/media); do sed s,CONTINOUS,CONTINUOUS,g -i $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:15:02 -05:00
Mauro Carvalho Chehab ad32495b15 media: em28xx-dvb: simplify DVB module probing logic
The module probing logic there is a way more complex than
it should be, and requires some special magic to avoid
stack overflows when KASAN is enabled.

Solve it by creating ancillary functions to setup the
platform data and request module.

Now, the probing functions are cleaner and easier to understand.

As a side effect, the size of the module was reduced by
about 9.7% on x86_64:

Before this patch:
   text	   data	    bss	    dec	    hex	filename
  51090	  14192	     96	  65378	   ff62	drivers/media/usb/em28xx/em28xx-dvb.o

After this patch:
   text	   data	    bss	    dec	    hex	filename
  44743	  14192	     96	  59031	   e697	drivers/media/usb/em28xx/em28xx-dvb.o

Tested with a PCTV 461e device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 05:08:43 -05:00
Arnd Bergmann f410b4093f media: em28xx: split up em28xx_dvb_init to reduce stack size
With CONFIG_KASAN, the init function uses a large amount of kernel stack:

drivers/media/usb/em28xx/em28xx-dvb.c: In function 'em28xx_dvb_init.part.4':
drivers/media/usb/em28xx/em28xx-dvb.c:2061:1: error: the frame size of 3232 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

Using gcc-7 with -fsanitize-address-use-after-scope makes this even worse:

drivers/media/usb/em28xx/em28xx-dvb.c: In function 'em28xx_dvb_init':
drivers/media/usb/em28xx/em28xx-dvb.c:2069:1: error: the frame size of 4280 bytes is larger than 3072 bytes [-Werror=frame-larger-than=]

By splitting out each part of the switch/case statement that has its own local
variables into a separate function, no single one of them uses more than 500 bytes,
and with a noinline_for_stack annotation we can ensure that they are not merged
back together.

[mchehab@s-opensource.com: fix conflict with changeset
 be7fd3c3a8 ("media: em28xx: Hauppauge DualHD second tuner functionality")]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:59:57 -05:00
Mauro Carvalho Chehab cf68c22f10 media: em28xx: adjust I2C timeout according with I2C speed
If the I2C speed is too slow, it should wait more for an
answer.

While here, change disconnected type from char to unsigned
int, just like all other bitmask fields there at em28xx
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:50:41 -05:00
Mauro Carvalho Chehab 0108ae7fd2 media: em28xx: constify most static structs
There are several em28xx static structs that can now be constified.

That caused a significant reduction at data segment:

Before:
   text	   data	    bss	    dec	    hex	filename
  85017	  59588	    576	 145181	  2371d	drivers/media/usb/em28xx/em28xx.o

After:
   text	   data	    bss	    dec	    hex	filename
 112345	  32292	    576	 145213	  2373d	drivers/media/usb/em28xx/em28xx.o

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:49:18 -05:00
Mauro Carvalho Chehab aa62980be4 media: em28xx: stop rewriting device's struct
Writing at the device's struct is evil, as two em28xx devices
may be using it. So, stop abusing it, storing the values
inside struct em28xx_dev.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:48:40 -05:00
Mauro Carvalho Chehab 6cda90b63e media: em28xx: improve the logic with sets Xclk and I2C speed
The logic there should be called on two places. Also,
ideally, it should not be modifying the device struct.

So, change the logic accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:41:58 -05:00
Mauro Carvalho Chehab d571b592c6 media: em28xx: don't use coherent buffer for DMA transfers
While coherent memory is cheap on x86, it may cause performance
impacts on other archs. As we don't have any good reason to
use it, let's change the logic by allocating memory via kmalloc()
and letting the USB core to do the DMA mapping and memory free
for us.

While here, also fixes an issue that it was not de-allocating
memories if something gets wrong during memory block
allocation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:41:34 -05:00
Brad Love cc4406d919 media: em28xx: Enable Hauppauge SoloHD rebranded 292e SE
Add a missing device to the driver table.

Signed-off-by: Brad Love <brad@nextdimension.cc>
Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:35:02 -05:00
Brad Love f2a326c928 media: em28xx: Add Hauppauge SoloHD/DualHD bulk models
Add additional pids to driver list

Signed-off-by: Brad Love <brad@nextdimension.cc>
Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:34:44 -05:00
Brad Love 48efbc370e media: em28xx: Increase max em28xx boards to max dvb adapters
Maximum 4 em28xx boards is too low, this can be maxed out by two devices.
This allows all the dvb adapters in the system to be em28xx if so desired.

Signed-off-by: Brad Love <brad@nextdimension.cc>
Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:33:54 -05:00
Brad Love c7c7e8d780 media: em28xx: USB bulk packet size fix
Hauppauge em28xx bulk devices exhibit continuity errors and corrupted
packets, when run in VMWare virtual machines. Unknown if other
manufacturers bulk models exhibit the same issue. KVM/Qemu is unaffected.

According to documentation the maximum packet multiplier for em28xx in bulk
transfer mode is 256 * 188 bytes. This changes the size of bulk transfers
to maximum supported value and have a bonus beneficial alignment.

Before:

After:

This sets up USB to expect just as many bytes as the em28xx is set to emit.

Successful usage under load afterwards natively and in both VMWare
and KVM/Qemu virtual machines.

Signed-off-by: Brad Love <brad@nextdimension.cc>
Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:33:22 -05:00
Brad Love 1b5f69f5b9 media: em28xx: Bulk transfer implementation fix
Set appropriate bulk/ISOC transfer multiplier on capture start.
This sets ISOC transfer to USB endpoint configuration
This sets bulk transfer to 48128 bytes (188 * 256)

The bulk multiplier is maximum allowed according to Empia.

Signed-off-by: Brad Love <brad@nextdimension.cc>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:32:13 -05:00
Mauro Carvalho Chehab 0eeb232f5a media: em28xx: constify a new function
em28xx_duplicate_dev() is static. This were supposed to be
merged on the last patch, but somehow, I forgot "-a" when
I called git commit --amend.

Fixes: be7fd3c3a8 ("media: em28xx: Hauppauge DualHD second tuner functionality")
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:30:22 -05:00
Brad Love be7fd3c3a8 media: em28xx: Hauppauge DualHD second tuner functionality
Implement use of secondary TS port on em28xx.
Adds has_dual_ts field, allows secondary demod/tuner to be
added to a single em28xx device.

Hauppauge DualHD models are configured to use this feature.

[mchehab@s-opensource.com: em28xx_duplicate_dev() should be static]
Signed-off-by: Brad Love <brad@nextdimension.cc>
Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-06 04:19:38 -05:00
Antonio Cardace 290ef7d846 media: em28xx: use %*phC to print small buffers
Use %*phC format to print small buffers as hex strings

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Antonio Cardace <anto.cardace@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-02-26 08:13:37 -05:00
Hans Verkuil 4471109e38 media: convert g/s_parm to g/s_frame_interval in subdevs
Convert all g/s_parm calls to g/s_frame_interval. This allows us
to remove the g/s_parm ops since those are a duplicate of
g/s_frame_interval.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-02-22 12:27:35 -05:00
Mauro Carvalho Chehab 4a3fad709b media: fix usage of whitespaces and on indentation
On several places, whitespaces are being used for indentation,
or even at the end of the line.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-01-04 13:12:01 -05:00
Mauro Carvalho Chehab ada795551a media: don't include drivers/media/i2c at cflags
Most of the I2C headers got moved a long time ago to
include/media/i2c. Stop including them at the patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-12-28 14:14:09 -05:00
Mauro Carvalho Chehab fada193559 media: move dvb kAPI headers to include/media
Except for DVB, all media kAPI headers are at include/media.

Move the headers to it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-12-28 13:16:01 -05:00
Mauro Carvalho Chehab 1ac051631a media: get rid of i2c-addr.h
In the past, the same I2C address were used on multiple places.
After I2C rebinding changes, this is no longer needed. So, we
can just get rid of this header, placing the I2C address where
they belong, e. g. either at bttv driver or at tvtuner.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-12-18 11:52:24 -05:00