Age | Commit message (Collapse) | Author |
|
Use I2C client binding for demod and SEC.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Add support for the Terratec Grabby with USB ID 0ccd:00a6.
Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Some USB drivers have a logic at the VB buffer handling like:
if (in_interrupt())
BUG();
Use, instead:
BUG_ON(in_interrupt());
Btw, this logic looks weird on my eyes. We should convert them
to use VB2, in order to avoid those crappy things.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
The DVB API was originally defined using typedefs. This is against
Kernel CodingStyle, and there's no good usage here. While we can't
remove its usage on userspace, we can avoid its usage in Kernelspace.
So, let's do it.
This patch was generated by this shell script:
for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f); do sed "s,${j}_t,enum $j," <$i >a && mv a $i; done; done
While here, make CodingStyle fixes on the affected lines.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> # for drivers/media/firewire/*
|
|
Fix this compiler warning by allocating a structure to read the eeprom instead
of doing it on the stack and worse: the eeprom array is static, so that can
cause problems if there are multiple cx231xx instances.
cx231xx-cards.c: In function 'cx231xx_card_setup':
cx231xx-cards.c:1110:1: warning: the frame size of 2064 bytes is larger than 2048 bytes [-Wframe-larger-than=]
}
^
I did consider removing the code altogether since the result is actually
not used at the moment, but I decided against it since it is used in other
drivers and someone might want to start using it in this driver as well. And
then it is useful that the code is already there.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Implement DMABUF exporting and importing.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Load PCTV 460e tda10071 demod and a8293 SEC using I2C client bindings.
Remove old unused tda10071 config struct. We are using I2C platform
data now.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Add support for DVB SEC (satellite equipment controller) I2C client.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
There's a dead code on usbvision that makes it harder to read
and produces a smatch warning about bad identation.
Improve the code readability and add a FIXME to warn about
the current hack there.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Smatch reports a warning:
drivers/media/usb/tm6000/tm6000-video.c:646 tm6000_prepare_isoc() error: we previously assumed 'dev->urb_buffer' could be null (see line 624)
This is not really a problem, but it actually shows that the check
if urb_buffer is NULL is being done twice: at the if and at
tm6000_alloc_urb_buffers().
We don't need to do it twice. So, remove the extra check. The code
become cleaner, and, as a collateral effect, smatch becomes happy.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
As reported by smatch:
drivers/media/usb/em28xx/em28xx-video.c:842 get_ressource() info: ignoring unreachable code.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
The UVC_DEV_DISCONNECTED flag is set when the USB device is
disconnected, and checked in the open() handler to refuse opening a
device that has been disconnected.
This is inherently racy, but the race condition is taken care of in the
V4L2 core, which also fails open() calls when the V4L2 device node has
been unregistered. As the uvcvideo USB disconnect handler unregisters
all its video device nodes, the UVC_DEV_DISCONNECTED flag doesn't serve
any purpose anymore and can be removed.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
The "TOSHIBA Web Camera - 5M" Chicony device (04f2:b50b) seems to
compute the bandwidth on 16 bits and erroneously sign-extend it to
32 bits, resulting in a huge bandwidth value. Detect and fix that
condition by setting the 16 MSBs to 0 when they're all equal to 1.
Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Now that videobuf2-vmalloc supports exporting buffers, add support for
the DMABUF exporter role by plugging in the videobuf2 ioctl helper.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
It is AF9035 + MxL5007T.
Driver reports:
prechip_version=00 chip_version=03 chip_type=3802
Not sure if that USB ID is reserved only for HP brand or if it is
common, but the stick I have is branded as HP part no. 580715-001
rmn A867.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Autogain algorithm is very simple, if average luminance is low - increase gain,
if it's high - decrease gain. Gain granularity is low enough for this algo to
stabilize quickly.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
This cam seems to return different values on long commands, so make status check
in sn9c2028_long_command() more tolerant. Anyway, read value isn't used anywhere
later.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Load rtl2832_sdr driver for devices having fc2580 tuner.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
rtl2832 demod driver has support for FC2580 tuner config, no need to
abuse FC0012 settings anymore.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Change tua9001 driver from media binding to I2C client binding.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Change tua9001 driver from media binding to I2C client binding.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Driver supports multiple chipset versions. Devices are ordered to
ID table per used chipset type. "ITE 9303 Generic" device uses IT9303
chipset and was added mistakenly between IT9135 IDs.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Change fc2580 driver from media binding to I2C client binding.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Change fc2580 driver from media binding to I2C client binding.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
For every frontend entry, we need to add the adapter's size. There
are already two patches fixing it. So, it doesn't seem trivial to
keep it there at the right place.
Also, currently, the indentation is wrong on all places.
So, it seems that keeping it right is not too trivial.
Better to use a macro that would do it for us, at least while
this is not converted to dvb-usb-v2.
Compile-tested only.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Rename state to dev.
Correct some indentations.
Remove FSF address.
Fix some style issues reported by checkpatch.pl.
Correct some style issues I liked.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Update synthesizer calculation to model I prefer nowadays. It is mostly
just renaming some variables, but also minor functionality change how
integer and fractional part are divided (using div_u64_rem()). Also, add
'schematic' of synthesizer following my current understanding.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Fix an oops during device initialization by correctly setting size_of_priv
instead of leaving it 0.
The regression was introduced by 8abe4a0a3f6d4217b16a ("[media] dib7000:
export just one symbol") and only fixed for one type of dib0700 based
devices in 9e334c75642b6e5bfb95 ("[media] Fix regression in some dib0700
based devices").
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=92301
Fixes: 8abe4a0a3f6d4217b16a ("[media] dib7000: export just one symbol")
Cc: stable@vger.kernel.org # for version 3.17+
Signed-off-by: Thomas Reitmayr <treitmayr@devbase.at>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
If the streaming_ctrl is called to enable TS before demod has locked
the TS will be empty. Copied the solution from the dvbsky driver for the
TechnoTrend S2-4600 device: when the state changes from unlock to
lock, call su3000_streaming_ctrl again.
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
While reading the MAC address for SU3000-based devices the system was
printing excessive debug information in the logs:
Output before the patch:
[ 1515.780692] bc 00 00 00 00 00
[ 1515.781440] bc ea 00 00 00 00
[ 1515.782251] bc ea 2b 00 00 00
[ 1515.783094] bc ea 2b 46 00 00
[ 1515.783816] bc ea 2b 46 12 00
[ 1515.784565] bc ea 2b 46 12 92
[ 1515.784571] dvb-usb: MAC address: bc:ea:2b:46:12:92
Output after the patch:
[ 3803.495706] dvb-usb: MAC address: bc:ea:2b:46:12:92
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
commit af3a4a9bbeb0 ("[media] dib0700: NEC scancode cleanup") cleaned
up the NEC scancode logic but overlooked the RC5 case.
This patch brings the RC5 case in line with the NEC code and makes
the struct self-documenting.
Signed-off-by: David Härdeman <david@hardeman.nu>
Reported-by: David Cimbůrek <david.cimburek@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
In case of error, the function platform_device_register_data() returns
ERR_PTR() and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
GoTView MasterHD 3 is a DVB-T2/C USB 2.0 tuner.
It's based on the following components:
- USB bridge: RTL2832P (contains also DVB-T demodulator)
- Demodulator: Si2168-A30
- Tuner: Si2148-A20
The demodulator and the tuner will need firmwares. The Si2148 uses Si2158
firmware. Antti has the firmwares available for download:
http://palosaari.fi/linux/v4l-dvb/firmware/
Do note that for DVB-T either of the demodulators can be used. DVB-C and
DVB-T2 are only supported by the Si2168 demodulator. The driver will
register 2 frontends for the same adapter. Frontend 0 will be the RTL2832
demodulator and frontend 1 will be the Si2168 demodulator. The same
tuner is used for both.
As a consequence of the above, it's recommended to use application that
does implement proper DVBv5 support.
For some reason, the old I2C write method sporadically fails. Thus the
need for an option to only use the new I2C write method supported by the
RTL2832.
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Add support for I2C read operation without a preceeding write.
While here, change the error code to EOPNOTSUPP in case an
unsupported I2C operation is attempted.
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
The chips supported by the si2157 driver have two IF outputs (either
pins 12+13 or pins 9+11). Instead of hardcoding the output to be used
add an option to choose which output shall be used.
As this patch changes the default behaviour, the IF interface is
specified in each driver currently using si2157 driver. This is to
keep bisectability.
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Change the dvbsky driver to support gapped clock instead of the current
hack.
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
TeVii S482 is a PCIe device with two tuners that actually contains two
USB devices. The devices are visible in the lsusb printout.
Bus 006 Device 002: ID 9022:d483 TeVii Technology Ltd.
Bus 007 Device 002: ID 9022:d484 TeVii Technology Ltd.
The device itself works exactly with the same settings as TechnoTrend
TT-connect S2-4600. Firmware for DS3103 demodulator is required:
http://palosaari.fi/linux/v4l-dvb/firmware/M88DS3103/
This patch should be applied on top of the TT S2-4600 patch:
https://patchwork.linuxtv.org/patch/28818/
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Replace all calls to s_mbus_fmt in bridge drivers by calls to the
set_fmt pad op.
Remove the old try/s_mbus_fmt video ops since they are now no longer used.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
The s_mbus_fmt video op is a duplicate of the pad op. Replace all uses
in sub-devices by the set_fmt() pad op.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Running v4l2-compliance on my usbtv stick revealed two failures:
1) Correct handling of CREATE_BUFS in usbtv_queue_setup was missing. Added this.
2) The sequence counter wasn't reset to 0 when starting streaming.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
Return a negative error code on failure.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
drivers/media/usb/gspca/xirlink_cit.c:1776 cit_start_model2() info: ignoring unreachable code.
drivers/media/usb/gspca/xirlink_cit.c:1858 cit_start_model2() info: ignoring unreachable code.
drivers/media/usb/gspca/xirlink_cit.c:1910 cit_start_model2() info: ignoring unreachable code.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
drivers/media/usb/dvb-usb/dw2102.c:440 dw2104_i2c_transfer() warn: inconsistent indenting
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
drivers/media/usb/dvb-usb/af9005-fe.c:484 af9005_fe_read_status() warn: inconsistent indenting
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
drivers/media/usb/dvb-usb/dib0700_devices.c:864 dib7770_set_param_override() warn: inconsistent indenting
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
drivers/media/usb/usbvision/usbvision-core.c:2395 usbvision_init_isoc() warn: inconsistent indenting
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
drivers/media/usb/ttusb-dec/ttusb_dec.c:1434 ttusb_dec_init_stb() warn: inconsistent indenting
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
smatch complains about multiple issues here:
drivers/media/usb/pvrusb2/pvrusb2-context.c:402 pvr2_channel_claim_stream() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-ioread.c:240 pvr2_ioread_setup() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-ioread.c:255 pvr2_ioread_set_enabled() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-ioread.c:485 pvr2_ioread_read() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-io.c:522 pvr2_stream_set_callback() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-io.c:561 pvr2_stream_set_buffer_count() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-io.c:640 pvr2_buffer_queue() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-io.c:667 pvr2_buffer_set_buffer() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-io.c:668 pvr2_buffer_set_buffer() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2614 pvr2_hdw_create() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2740 pvr2_hdw_destroy() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3353 pvr2_hdw_trigger_module_log() warn: inconsistent indenting
Let's get rid of those, in order to cleanup as much as possible the smatch error log.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
drivers/media/usb/gspca/stk014.c:279 sd_start() warn: inconsistent indenting
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
|
drivers/media/usb/gspca/sonixj.c:1792 expo_adjust() warn: inconsistent indenting
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|