The tuner sub-device isn't going to work very well unless we tell it
the correct tuner type to use...
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The sub-device update mechanism relies on various "dirty" bits in the
driver in order to know what pieces of state need to be propagated out
to the various sub-devices. But that won't work if the dirty bits are
cleared before the update gets a chance to run. This change ensures
that the update takes place before the dirty bits are cleared.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
A sub-device won't successfully attach to our I2C adapter if its class
isn't set to zero. Right the class is still set to
I2C_CLASS_TV_ANALOG in order to allow the old mechanism to still
work. This change temporarily sets the class to zero during the
interval when the sub-device attaches. This code will get removed
when the old i2c layer is finally removed from the driver.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The pvrusb2 driver had previously been using i2c module specific calls
to set the sample rate (a long long time ago this was needed). These
days it is safe to use a broadcast so let's just broadcast this when
communicating audio sample rate to sub-devices.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Lay down a foundation whereby it becomes possible to send customized
updates to specific sub-devices. (This becomes useful for routing
configuration, which is a very sub-device specific operation.)
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The pvrusb2 driver has a function that reports internal state. It can
be accessed from either the debug interface or as the result of a v4l
log status request. This change adds information listing sub-devices
to the report.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Other code may need to treat the video decoder sub-device in a special
manner, so this change implements code to recognize when such a
sub-device is connected to the driver, does any special processing for
it, and notes who the device is for future reference.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This is another step in the v42l-subdev assimilation. This implements
various call-outs to sub-devices based on state changes within the
pvrusb2 driver.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Implement status fetching operations in terms of calling out to
sub-device(s).
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Implement tie-in for v4l2 debug register access such that the
appropriate attached sub-device is handled.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Trigger a broadcast to attached sub-devices when a logging request is made.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
These changes set up the spot where we'll check for and set general
updates to any attached sub-devices.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tie up loose ends with v4l2-subdev setup. Set attached module's group
ID to match our internal ID, emit a few useful messages when
sub-devices are dealt with, implement better error legs, and fix an
error in the old i2c layer (caused by changes related to the
v4l2-subdev work here).
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
In order to keep a sub-device from promiscuously attaching to the
pvrusb2 driver, the i2c adapter's class must be cleared. This change
clears that class by default.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This implements a temporary mechanism to "untrack" an i2c module from
the old i2c layer. The v4l2-subdev related code in the driver will
use this to remove a sub-device from the old i2c layer. In the end,
once the old i2c layer is removed, this will also eventually go away.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Set up new mechanism for declaring and loading appropriate sub-devices
when driver initializes. This is another part of the v4l2-subdev
adoption.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This introduces some additional isolation in the pvrusb2 from the old
i2c layer, a step along the way to separate the driver from that layer
and to make it easier to introduce the common v4l2-subdev framework as
the eventual replacement.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Define a v4l2_device instance in the pvrusb2 driver and initialize /
tear it down appropriately. This is a step in the v4l2-subdev
adoption effort.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This is the first step in the effort to move the pvrusb2 driver over
to using the v4l2-subdev framework. This commit involves mainly
splitting apart pvrusb2-i2c-core - part of it is the driver's I2C
adapter driver and the rest is the old i2c module handling logic. The
i2c module handling junk is moved out to pvrusb2-i2c-track and various
header references are correspondingly updated. Yes, this patch has a
huge pile of checkpatch complaints, but I'm NOT going to fix any of
it. Why? First, I'm moving a large chunk of existing code and I'm
not going to spend time adjusting it to match someone's idea of coding
style. Second, in the end I expect all that moved code to go away by
the time the rework is done so wasting time on it now to adhere to the
standard is in the end a large waste of time.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add missing URB_NO_TRANSFER_DMA_MAP flag, since the use of consistent memory
is not permitted for DMA on the ARM platform.
Thanks to Paul Thomas <pthomas8589@gmail.com> for providing sample ARM
hardware that was experiencing the oops (tested on the at91rm9200 based
LinuxStamp).
Thanks to David Brownell <david-b@pacbell.net> for providing insight into the
ARM memory architecture.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add missing URB_NO_TRANSFER_DMA_MAP flag, since the use of consistent memory
is not permitted for DMA on the ARM platform.
Thanks to Paul Thomas <pthomas8589@gmail.com> for providing sample ARM
hardware that was experiencing the oops (tested on the at91rm9200 based
LinuxStamp).
Thanks to David Brownell <david-b@pacbell.net> for providing insight into the
ARM memory architecture.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add missing URB_NO_TRANSFER_DMA_MAP flag, since the use of consistent memory
is not permitted for DMA on the ARM platform.
Thanks to Paul Thomas <pthomas8589@gmail.com> for providing sample ARM hardware
that was experiencing the oops (tested on the at91rm9200 based LinuxStamp).
Thanks to David Brownell <david-b@pacbell.net> for providing insight into the
ARM memory architecture.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The HVR-900 did not have a remote control defined, so it would not work. Add
the line for both versions of the product.
Thanks to Jens-Michael Hoffmann (#linuxtv user "jmho") for pointing out the
issue and testing the patch.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There are several Kconfig items using CUSTOMIZE. Yet, most use the English
writing CUSTOMISE. This generates lots of trouble, because people sometimes type
the Kbuild item different.
Let's standardise every occurrence using the same syntax.
The changes were generated by this small shell script:
for i in `find linux -type f`; do sed s,CUSTOMIZE,CUSTOMISE,g $i >/tmp/a && mv /tmp/a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add support for ProVideo PV-183 to bttv
This patch adds support for the ProVideo PV-183 card to the bttv
device driver. The PV-183 is a PCI card with 8 BT878 devices plus a Hint
Corp HiNT HB4 PCI-PCI Bridge. Each BT878 has two composite input channels
available. There are no tuners on this card.
Signed-off-by: Alan McIvor <alan.mcivor@reveal.co.nz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Due to lack of hardware this conversion to v4l2_device/v4l2_subdev is
untested. If all goes well I should be able to test it in about a month,
but just in case I can't manage that it should be made clear in the code
that this isn't tested.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Using VIDIOC_DBG_S/G_REGISTER is the standard way of reading/writing register
for advanced debugging under v4l2. In addition, using this means that the
cafe_ccic driver doesn't need to have knowledge about the used sensor: the
debug ioctl can be passed on to the sensor if it isn't for the host.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
v4l2-i2c-drv-legacy.h and ov7670_command are no longer needed after the
cafe driver is converted to use v4l2_subdev.
Rather than using a large ov7670_control array, just call the handlers
via a simple switch and use v4l2_ctrl_query_fill() to handle queryctrl.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Convert this driver to v4l2_device and removed the unnecessary cafe_dev_list.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
These ops are used by the ov7670 driver, so these need to be added.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
As reported by Randy Dunlap <randy.dunlap@oracle.com>:
ERROR: "dvb_dummy_fe_ofdm_attach" [drivers/media/video/cx231xx/cx231xx-dvb.ko] undefined!
This happens since cx231xx DVB part still misses the frontend modules.
So, the dummy frontend were used for development. The proper fix is to
implement the DVB modules there, as they will be required.
While this won't happen, lets allow the compilation with or without the
dummy FE testing module.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
au8522 is now dependent of V4L2, as reported by Randy Dunlap
<randy.dunlap@oracle.com>:
au8522_decoder.c:(.text+0x199898): undefined reference to `v4l2_ctrl_query_fill'
au8522_decoder.c:(.text+0x1998b3): undefined reference to `v4l2_ctrl_query_fill'
au8522_decoder.c:(.text+0x199944): undefined reference to `v4l2_device_unregister_subdev'
au8522_decoder.c:(.text+0x19997c): undefined reference to `v4l2_chip_ident_i2c_client'
au8522_decoder.c:(.text+0x199f1e): undefined reference to `v4l2_i2c_subdev_init'
Cc: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
As reported by Kyle McMartin and Randy Dunlap:
drivers/media/video/au0828/au0828-video.c:1438: error: 'const struct v4l2_subdev_core_ops' has no member named 'g_register'
drivers/media/video/au0828/au0828-video.c:1453: error: 'const struct v4l2_subdev_core_ops' has no member named 's_register'
This patch properly implements those two API ioctls only when debug is
enabled.
Cc: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
normal_i2c and I2C_CLIENT_INSMOD are only necessary for kernels < 2.6.22.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
v4l2-common doesn't have to be a module for it to call request_module().
Just remove that test.
Thanks-to: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The encoder commands ioctls are available in v4l2_ioctl_ops. Use them
and get rid of the custom ioctl handler and use video_ioctl2.
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The device encodes component video up to 1080i to a MPEG-TS stream with
H.264 video and stereo AAC audio. Newer firmwares accept also AC3
(up to 5.1) audio over optical SPDIF without reencoding.
Firmware upgrade is unimplemeted but rather unimportant since
the firmware sits on a flash chip.
The I2C adapter to drive the integrated infrared receiver/sender is
currently disabled due to a conflict with cx18-based devices.
Tested-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Removed some unnecessary memcpy()'s by reworking the compress_*_vbi_buf()
functions.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The sliced VBI payloads that cx18 and ivtv would insert in the MPEG stream
did not have consistent endianess for the linemasks in the payload (a big
endian platform would write them out big endian). This change ensures the
linemasks are always stored as little-endian in the MPEG stream to ensure
cross platform consistency in parsing the generated MPEG stream.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Per Hans Verkuil <hverkuil@xs4all.nl> instruction, remove the au8522_command
and replace v4l2-i2c-drv-legacy.h with v4l2-i2c-drv.h
Thanks to Hans Verkuil <hverkuil@xs4all.nl> for reviewing the au8522 analog
support.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Per Hans Verkuil <hverkuil@xs4all.nl> instruction, remove the deprecated
attach_inform/detach_inform routines, and convert over the i2c calls to
subdev calls.
Thanks to Hans Verkuil <hverkuil@xs4all.nl> for providing feedback on the
au0828 analog support.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The VBI support or the au0828 has the framework written but it does not yet
work. Rename the macro per Mauro's request.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Take a pass over all of the au0828/au8522 files and cleanup all the codingstyle
issues. This patch does not make *any* functional change to the code.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
For the sake of completeness, include the "undefined" input type enumeration,
even though there is no path that can actually call it.
Thanks to Mauro Carvalho Chehab <mchehab@infradead.org> for pointing this out.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There were some braces left behind from when there was more code in the block.
Remove it.
Thanks to Mauro Carvalho Chehab <mchehab@infradead.org> for pointing this out.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The userland callers are responsible for clearing the output buffers, so
remove the unneeded memset calls.
Thanks to Mauro Carvalho Chehab <mchehab@infradead.org> for pointing this out.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Make sure newly created v4l2 devices have a unique name, modeling the logic
after the cx18 driver.
Thanks to Andy Walls <awalls@radix.net> for pointing out the issue.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Convert over to using the new subdev framework for the au0828 bridge. This
includes using the new i2c probing mechanism.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
If the analog initialization failed to create the video device, we never
actually add the entry to the au0828_devlist. Therefore a panic occurs when
unregistering the analog subsystem.
Make it so we only remove the entry from the list if we added it to the list
in the first place.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
It is not valid to look for dev->board.input == NULL to detect an undefined
analog configuration section, since it is a member of the struct and not a
pointer (hence it will *always* be non-NULL). Do the check based on whether
the first input is actually a valid input type instead.
Thanks to Michael Krufky <mkrufky@linuxtv.org> for providing sample hardware
of various configurations to test with.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Move the setup of the analog isoc handler into au0828-video.c, so it does not
occur if there is not an .input section defined for the board. Also fixes a
case where if there is an input section but the board does not actually have
analog support, the digital support will continue to work as expected.
Thanks to Michael Krufky <mkrufky@linuxtv.org> for providing sample hardware
of various configurations to test with.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Make the g_chip_ident call work for the au0828/au8522. Discovered when testing
with the v4l2_compliance tool
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
[mchehab@redhat.com: fix merge conflict, due to a path change for analog demod]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Make it a little easier to read the debug messages for register read/write
operations
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There was a bug where enumerating the i2c for devices would result in false
positives. The root of the issue was the scanning was using SMBUS_QUICK
messages, which are zero length write requests (which our i2c adapter
implementation didn't handle). Because we never strobed any bytes onto the
bus, the status register would still contain the value from the previous
request.
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Since the VBI support is not yet working for the au0828, don't advertise the
capability or create the /dev/vbi device.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
We don't now how to make any variant of NTSC work other than NTSC-M, so don't
advertise that we support the other variants.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Prior to now, we never relied on the Hauppauge tveeprom to identify which
tuner is associated with the board. Now that the HVR-950q determines what
the tuner is based on the eeprom, set the tuner ID appropriately.
Thanks to Michael Krufky <mkrufky@linuxtv.org> for providing information on
the tveeprom organization.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Rework the way boards are managed so that we can change the board description
based on the Hauppauge eeprom (modeled after cx88-cards.c).
Also, make sure that we don't load the analog stack if there are no analog
inputs defined in the board profile.
Thanks to Michael Krufky <mkrufky@linuxtv.org> for providing information on
the various ways different Hauppauge boards can be configured.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Access using the hybrid state framework requires the list to be protected by
a mutex.
Thanks to Michael Krufky <mkrufky@linuxtv.org> for reporting this during a
code review.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add the analog parameters to the device profile for the HVR-850
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There is an issue related to the i2c clock for addressing the xc5000. The
au0828 chip does not support clock stretching, which the xc5000 makes use of.
This results in cases where we silently get back garbage in i2c read
operations. To work around this issue until we slow down the i2c clock when
talking with that specific device.
This was not an issue before we had analog support because we never needed to
enumerate the i2c bus, and digital tuning never actually needed to perform
read operations against the xc5000.
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add support for the analog functionality found in the au0828 bridge
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
[mchehab@redhat.com: fix compilation by adding linux/version.h]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add support for the analog functionality in the au8522 analog/digital
demodulator
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
[mchehab: renamed drivers/media/video/au8522_decoder.c as drivers/media/dvb/frontends/au8522_decoder.c to avoid breaking bisect]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Make use of the hybrid tuner framework so the analog and digital parts of the
au8522 demodulator can make use of the same shared state.
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
When the au8522 is idle, put the chip into a low power mode (reduces power
consumption from 450ma to 346ma)
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
For the i2c messages to read and write registers, the two high order bits
of the first byte dictates whether it is a read or a write operation.
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Move the au8522 state structure, as well as exposing functions needed by the
analog side of the demodulator into a common header file.
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Rename the au8522.c file to au8522_dig.c so that more source files can be
added to the driver while preserving the original name of au8522.ko
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The xc5000 driver has a bug where the IF is always set to whatever the first
caller to dvb_attach() provides. This fails when the device requires an IF
other than 5380 and the analog driver is loaded first through tuner-core
(which always supplies the hard-coded value of 5380).
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
It appears TS discontinuity about one per 10 hrs if CAM used.
Patch to fix it.
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
CI high address lines disappears due to wrong data type used.
Patch to fix it.
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The v4l2_dev field of video_device wasn't initialized. The parent field
is derived from v4l2_dev, so that doesn't need to be set anymore.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Call v4l2_device_disconnect when the parent of a hotpluggable device
disconnects. This ensures that you do not have a pointer to a device that
is no longer present.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The JPEG quality of the images (quantization tables) is now settable by the
VIDIOC_S_JPEGCOMP ioctl.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
- The video device is not allocated when mt9t031_init() is called, don't use
it in debug printk.
- The clock polarity is inverted in mt9t031_set_bus_param(), use the correct
one.
Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch removes the phytec specific setting of the bus width
and switches to the more generic query_bus_param/set_bus_param
hooks
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch removes the phytec specific setting of the bus width
and switches to the more generic query_bus_param/set_bus_param
hooks
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Make sure videobuf_waiton() is used before freeing a buffer.
Without this fix we may return the buffer to the allocator
before the bus mastering operation is finished.
Reported-by: Matthieu CASTET <matthieu.castet@parrot.com>
Tested-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Currently soc-camera doesn't set up any image format without an explicit
S_FMT. According to the API this should be supported, for example,
capture-example.c from v4l2-apps by default doesn't issue an S_FMT. This
patch moves negotiating of available host-camera format translations to
probe() time, and restores the state from the last close() on the next
open(). This is needed for some drivers, which power down or reset
hardware after the last user closes the interface. This patch also has a
nice side-effect of avoiding multiple allocation anf freeing of format
translation tables.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
For the case, that we have to capture with a default format, i.e., when the
user doesn't call S_FMT, we have to use the field value according to the
default, configured at open() time.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Currently soc-camera doesn't set up any image format without an explicit S_FMT.
It seems this should be supported, since, for example, capture-example.c from
v4l2-apps by default doesn't issue an S_FMT. This patch configures a default
image format on open().
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
As host and camera drivers become more complex, differences between S_FMT and
S_CROP functionality grow, this patch separates them.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Bt819 needs the parent driver to drive a GPIO pin low and high in order to
reset its fifo. Use the new notify callback for this.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Normally the parent device of v4l2_device is used as the video device
node's parent. But if it was not set, then use the parent field in the
video_device struct.
This is needed in the cx88 driver, which has one core v4l2_device but
creates multiple pci devices (one each for raw and mpeg video).
So you cannot associate the core v4l2_device with a particular PCI device,
but you can do that for each video_device.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The new support for the CX23885_BOARD_NETUP_DUAL_DVBS2_CI board broke the
existing boards. Interrupts for the netup part were enabled and handled
without testing whether the current board actually had a netup -> instant
and fatal crash.
I've added tests to do this only for the CX23885_BOARD_NETUP_DUAL_DVBS2_CI
board.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Fix a bug where all frame headers were being discarded, instead of being part of the
stream output, on MR97310A cameras.
The frame headers contain information which may be useful in processing
the video output and therefore should be kept and not discarded.
A corresponding patch to the decompression algorithm in
libv4lconvert/mr97310a.c corrects the change in frame offset.
Signed-off-by: Theodore Kilgore <kilgota@auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Setting state->frontend.demodulator_priv to NULL in the event of
a kzalloc error will result in an OOPS. Just remove that line.
Thanks to Matthias Schwarzott for pointing this out.
Cc: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
If the i2c sub-device cannot be found, then we must unregister the i2c_client.
Otherwise this will prevent a possible probe for a different device on that same
address.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
We'll start off with MODULE_VERSION("0.1")
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
small whitespace cleanup - space missing after the *
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The vfl_type field is set by the core, so anything you fill in here will
be overwritten. And it will be set to a VFL_TYPE_ value, not a VID_TYPE_
value which is an obsolete V4L1 type.
Since these V4L1 types have been made unavailable for V4L2 drivers, this
driver stopped compiling.
In this case the fix is just removing this assignment.
Cc: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This include isn't needed and so can be removed.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch adds support for Terratec Cinergy HT PCI MKII with card id 79.
Its more or less a copy of Pinnacle Hybrid PCTV.
Thanks to k1ngf1sher on forum.ubuntuusers.de for the idea to copy that card.
Signed-off-by: Stephan Wienczny <stephan@wienczny.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Print a message in case the new software IRQ watchdog detects a problem.
I choose the info message category, this can be changed if not appropriate.
Cc: Patrick Boettcher <patrick.boettcher@desy.de>
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The videodev module is missing the char-major-81-* alias that would
cause it to be auto-loaded when a device of that type is opened. This
patch adds the alias.
Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Call pwc_construct before trying to talk to device to obtain vc interface so
that LED and power setup works the first time the video device is opened.
Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
When unloading the cx8800 driver I sometimes get a general protection
fault. Analysis revealed a race in cx88_ir_stop(). It can be solved by
using a delayed work instead of a timer for infrared input polling.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The removal of the timer which polls the infrared input is racy.
Replacing the timer with a delayed work solves the problem.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The removal of the timer which polls the infrared input is racy.
Replacing the timer with a delayed work solves the problem.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The removal of the timer which polls the infrared input is racy.
Replacing the timer with a delayed work solves the problem.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
It reduces the size of the driver over all, and the function names in
strings need to be manually kept up to date while __func__ doesn't.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Many functions had a struct file pointer argument, but all they wants is
the struct zoran_fh pointer from the file's private data. Since every
caller of those functions already has the zoran_fh, just pass the that
instead. This saves a dereference in each function change.
While I'm at it, change the code formatting of affected functions to be
kernel standard style.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
kmalloc() can fail for large video buffers. By default the kernel
complains loudly about allocation failures, but we don't want to
frighten the user, so ask kmalloc() to keep quiet on such failures.
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The lock_norm module parameter doesn't look terribly useful. If you
don't want to change the norm, just don't change it. As a matter of
fact, no other v4l driver has such a parameter.
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The zoran driver had two kinds of buffer descriptors, one for jpg buffers
and one for raw buffers. They were mostly the same with only a couple
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
replace occurances of "HVR1150" with "HVR1120" - this was a typo.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There are no drivers left that call msp3400 with V4L1 commands. Remove it
from this driver.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The code to optimize the usercopy only checked the ioctl NR field. However,
this code is also called for non-V4L2 ioctls (either private or ioctls from
linux/dvb/audio.h and linux/dvb/video.h for decoder drivers like ivtv).
If such an ioctl has the same NR as a V4L2 ioctl, then disaster strikes.
Modified the code to check on the full command ID.
Thanks to Martin Dauskardt for tracing the ivtv breakage to this particular
change.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This driver isn't used in any legacy mode, so no need for v4l2-i2c-drv-legacy.h.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
As announced VIDIOC_G_CHIP_IDENT_OLD is now removed for 2.6.30.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
changeset 04934e44e3784a1b969582e2d59afcec278470c6 removed the last implementation
that were still using the V4L1 obsoleted header.
Now, video_decoder.h is not used anymore by any driver.
Let's remove it and all references for it in Kernel.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There was never any build-time dependency of the dib0700 usb module on the
dib0070 tuner module. Now that the build-time dependencies of dib0700 on
dib3000mc, dib7000p and dib7000m have been removed in the previous changesets,
we can enable DVB_FE_CUSTOMISE for these modules under config DVB_USB_DIB0700
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This function prototype is defined but the function itself does not exist.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
It's much nicer if the log message tells you which io ports are possible,
rather than having to run modinfo or look it up in the source or manual.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The tda827x driver supports a feature that the tda18271 driver was lacking
until now. This patch adds support for device-level configuration via the
tuner callback configuration interface.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The V4L1 obsoleted header video_decoder.h is not used anymore by any driver. Only
a name decoding function at v4l2-ioctl still implements it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The cx18 private packet insertion code only expects to operate on an MPEG PS
when inserting private packets of sliced VBI data. This patch keeps the cx18
driver from corrupting the MPEG TS or other non-PS stream types, in case the
user enables sliced VBI insertion for these MPEG stream types.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Based on a documentation clarification from Conexant, fix the register code
used for sliced VBI VPS service.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
My s-parse builds never griped about be32_to_cpu() casting to __be32, but Hans'
builds did. This change explictly declares the pointer into the VBI buffer
header as __be32, which is the correct thing to do as the data is always
big endian when we go to fetch it. Hopefully this will quiet s-parse warnings.
Also corrected a misplaced parenthesis logic error in checking for the VBI
header magic number.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Fix a scaling check that was failing, due to a magic number I missed fixing
during previous slice VBI changes. Now
$ v4l2-ctl -v width=480,height=480,pixelformat=MPEG
yields proper visual results again.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
It was a struct file *, but all that function wants is the struct zoran_fh
from the file's private data. Since every caller already has this, just
pass the zoran_fh instead.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Fix dvb frontend debug variable to be static, to avoid linker
errors:
drivers/built-in.o:(.data+0xf4b0): multiple definition of `debug'
arch/x86/kernel/built-in.o:(.kprobes.text+0x90): first defined here
ld: Warning: size of symbol `debug' changed from 85 in arch/x86/kernel/built-in.o to 4 in drivers/built-in.o
It would also be Good if arch/x86/kernel/entry_32.S didn't have a
non-static 'debug' symbol. OTOH, it helps catch things like this one.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Instead of asking a lot of questions for the poor users, let's just hide
the frontend customise menu, if the user doesn't want to customise.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The name of the option is DVB_FE_CUSTOMISE. However, on a few places, a wrong
name were used, due to a typo (DVB_FE_CUSTOMIZE).
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Compro VideoMate uses an external audio DSP chip, controlled via tvaudio
module (tda9874a). This patch improves em28xx infrastructure to support
an external audio processor and fixes the Compro VideoMate entry to work
with it.
Signed-off-by: Vitaly Wool <vital@embeddedalley.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
dm1105 uses the ir_*() functions, so it needs to select VIDEO_IR
to avoid build errors:
dm1105.c:(.text+0x26b7ac): undefined reference to `ir_input_keydown'
dm1105.c:(.text+0x26b7bc): undefined reference to `ir_input_nokey'
(.devinit.text+0x29982): undefined reference to `ir_codes_dm1105_nec'
(.devinit.text+0x2998a): undefined reference to `ir_input_init'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add support for the alternate resolutions offered by SQ-905 based cameras. As
well as 320x240 all cameras can do 160x120 and some can do 640x480.
Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Theodore Kilgore <kilgota@auburn.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
I have a GeoVision GV-800(S) card, it has 4 CONEXANT BT878A chips.
It has 16 video inputs and 4 audio inputs, and it is almost identical
to the GV-800, as seen on http://bttv-gallery.de .
The only difference appears to be the analog mux, it has a CD22M3494
in place of the MT8816AP. The card has a blue PCB, as seen in this
picture: http://www.gsbr.com.br/imagem/kits/GeoVision%20GV%20800.jpg .
This card wasn't originally supported, and it was detected as
UNKNOWN/GENERIC. The video inputs weren't working, so I tried
"forcing" a few cards like the GeoVision GV-600, but there was still
no video. So I made a patch to support this card, based on the Kodicom
4400r.
The GV-800(S) is identified as follows:
...
02:00.0 Multimedia video controller: Brooktree Corporation Bt878 Video
Capture (rev 11)
02:00.1 Multimedia controller: Brooktree Corporation Bt878 Audio
Capture (rev 11)
02:04.0 Multimedia video controller: Brooktree Corporation Bt878 Video
Capture (rev 11)
02:04.1 Multimedia controller: Brooktree Corporation Bt878 Audio
Capture (rev 11)
02:08.0 Multimedia video controller: Brooktree Corporation Bt878 Video
Capture (rev 11)
02:08.1 Multimedia controller: Brooktree Corporation Bt878 Audio
Capture (rev 11)
02:0c.0 Multimedia video controller: Brooktree Corporation Bt878 Video
Capture (rev 11)
02:0c.1 Multimedia controller: Brooktree Corporation Bt878 Audio
Capture (rev 11)
...
02:00.0 0400: 109e:036e (rev 11)
Subsystem: 800a:763d
Flags: bus master, medium devsel, latency 32, IRQ 10
Memory at cdfff000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
Kernel modules: bttv
02:00.1 0480: 109e:0878 (rev 11)
Subsystem: 800a:763d
Flags: bus master, medium devsel, latency 32, IRQ 10
Memory at cdffe000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
02:04.0 0400: 109e:036e (rev 11)
Subsystem: 800b:763d
Flags: bus master, medium devsel, latency 32, IRQ 10
Memory at cdffd000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
Kernel modules: bttv
02:04.1 0480: 109e:0878 (rev 11)
Subsystem: 800b:763d
Flags: bus master, medium devsel, latency 32, IRQ 10
Memory at cdffc000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
02:08.0 0400: 109e:036e (rev 11)
Subsystem: 800c:763d
Flags: bus master, medium devsel, latency 32, IRQ 10
Memory at cdffb000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
Kernel modules: bttv
02:08.1 0480: 109e:0878 (rev 11)
Subsystem: 800c:763d
Flags: bus master, medium devsel, latency 32, IRQ 10
Memory at cdffa000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
02:0c.0 0400: 109e:036e (rev 11)
Subsystem: 800d:763d
Flags: bus master, medium devsel, latency 32, IRQ 10
Memory at cdff9000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
Kernel modules: bttv
02:0c.1 0480: 109e:0878 (rev 11)
Subsystem: 800d:763d
Flags: bus master, medium devsel, latency 32, IRQ 10
Memory at cdff8000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
As you can see, the GV-800(S) card is almost identical to the GV-800
on bttv-gallery, so this patch might also work for that card. If not,
only a few changes should be required on the gv800s_write() function.
After this patch, the video inputs work correctly on linux 2.6.24 and
2.6.27 using the software 'motion'. The input order may seem a little
odd, but it's the order the original software/driver uses, and I decided
to keep that order to get the most out of the card.
I tried to get the audio working with the snd-bt87x module, but I only
get noise from every audio input, even after selecting a different mux
with alsamixer. Also, after trying to play sound from those sources, I
randomly get a RISC error about an invalid RISC opcode, and then that
output stops working. I also can't change the sampling rate when
recording. Any pointers to adding audio support are welcome.
Signed-off-by: Bruno Christo <bchristo@inf.ufsm.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch introduces support for DVB-T for the following dibcom based card:
Sony PlayTV (USB-ID: 1415:0003)
Signed-off-by: Sebastián Blanes <sebastian.blanes@gmail.com>
Cc: Patrick Boettcher <patrick.boettcher@desy.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add DVB support for Avermedia DVB-S Pro and
Avermedia DVB-S Hybrid+FM card both labled A700.
They use zl10313 demod (driver mt312) and zl10036 tuner.
[mchehab@redhat.com: change __FUNCTION__ into __func__]
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This driver is based on initial work by Tino Reichardt and was heavily changed.
The datasheet of the zl10036 can be found here and on other places on the net:
http://www.mcmilk.de/projects/dvb-card/datasheets/ZL10036.pdf
The zl10038 is similar to the zl10036, so it is maybe possible to write a common
driver of necessary.
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The v4l2 core code in v4l2_ioctl will zero out the structure the driver is
supposed to fill in for read-only ioctls. For read/write ioctls, all the
fields which aren't supplied from userspace will be zeroed out.
Zeroing code is removed from querycap, enum_input, enum_fmt_vid_cap, and
g_fmt_vid_cap.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The v4l2 core code in v4l2_ioctl will zero out the structure the driver is
supposed to fill in for read-only ioctls. For read/write ioctls, all the
fields which aren't supplied from userspace will be zeroed out.
Zeroing code is removed from g_audio, enum_input, g_parm and gmbuf.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The v4l2 core code in v4l2_ioctl will zero out the structure the driver is
supposed to fill in for read-only ioctls. For read/write ioctls, all the
fields which aren't supplied from userspace will be zeroed out.
Zeroing code is removed from g_audio, queryctrl, and enum_fmt_vid_cap.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The v4l2 core code in v4l2_ioctl will zero out the structure the driver is
supposed to fill in for read-only ioctls. For read/write ioctls, all the
fields which aren't supplied from userspace will be zeroed out.
Zeroing code is removed from enum_fmt_vid_cap, g_fmt_vid_cap, and g_parm.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The v4l2 core code in v4l2_ioctl will zero out the structure the driver is
supposed to fill in for read-only ioctls. For read/write ioctls, all the
fields which aren't supplied from userspace will be zeroed out.
Zeroing code is removed from enum_input and g_tuner.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The v4l2 core code in v4l2_ioctl will zero out the structure the driver is
supposed to fill in for read-only ioctls. For read/write ioctls, all the
fields which aren't supplied from userspace will be zeroed out.
Zeroing code is removed from enum_input and g_tuner.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
vidioc_enum_fmt_vid_overlay() did nothing but call
vidioc_enum_fmt_vid_cap(), so just make
saa7146_video_ioctl_ops.vidioc_enum_fmt_vid_overlay point to
vidioc_enum_fmt_vid_cap() and get ride of vidioc_enum_fmt_vid_overlay().
Have gparm use v4l2_video_std_frame_period to fill in the frame period
instead of just assuming PAL.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Some code was calling v4l2_video_std_construct() when all it cared about
was the frame period. So make a function that just returns that and have
v4l2_video_std_construct() use it.
At this point there are no users of v4l2_video_std_construct() left outside
of v4l2-ioctl, so it could be un-exported and made static.
Change v4l2_video_std_construct() so that it doesn't zero out the struct
v4l2_standard passed in. It's already been zeroed out in the common ioctl
code.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
If an ioctl is read-only then the driver fills in all the fields. Lots of
times drivers only care about some fields so it's best if video_ioctl2
takes care of zeroing out the entire structure before handing it to the
driver. This saves code in each driver to do it and driver authors often
forget.
The existing memset code in some of the read-only ioctl handlers
can be deleted.
Convert a case statement to a single if statement.
Deleted a debug line from ENUMAUDOUT that was copy-and-pasted to G_AUDOUT
by mistake.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There are many RW ioctls() in v4l2 where userspace only supplies one or two
of the first fields in the structure passed to the ioctl. The driver then
fills in the rest of the fields.
Instead of copying the entire structure from userspace to the kernel we
only need to copy those fields that userspace is actually supposed to
supply.
What's more, the fields that are meant to be only be output from the driver
can be zeroed out in the videodev code, in case the driver doesn't fill
them all in. Many of the ioctl handlers in v4l2_ioctl do this already, but
my patch does this at one common point and so all the memsets for each
ioctl can be deleted.
For VIDIOC_G_SLICED_VBI_CAP, which has one input field ('type') and other
output-only fields, the input field is near the end of the structure
instead of at the beginning. So there is still a memset in it's ioctl
handler to zero out the beginning of the struct.
There were a couple mistakes with the existing code:
For VIDIOC_G_AUDIO the index field was preserved, but G_AUDIO is a read
only ioctl so nothing is copied from userspace to preserve.
For VIDIOC_G_FREQUENCY the tuner field was not preserved like it should
have been. This would be a problem if there was any hardware with more
than one tuner/modulator.
For VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS, none of the
fields were preserved even though each ioctl has several field that are
supposed to be inputs to the driver! Obviously these ioctls don't get
used much. The index field is needed if the driver has multiple
discrete sizes/rates and other fields can be used too, e.g. if the size
depends on pixel format or frame rate depends on image size for
example.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
It was a typo in the function
name, it should be lnbh24_attach, and not lnbp24_attach.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>