History log of /linux-master/drivers/media/pci/cx88/cx88.h
Revision Date Author Comments
# d76231e4 09-Mar-2022 Mauro Carvalho Chehab <mchehab@kernel.org>

media: xc2028: rename the driver from tuner-xc2028

This is the only tuner driver that has "tuner-" on its name.

Rename it, in order to match all the other tuner drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# e6f45ea2 11-Sep-2019 Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>

media: cx88: Add support for NotOnlyTV LV3H card

Add support for the PCI hybrid card NotOnlyTV LV3H. This card consists of:
- A/V Controller: Conexant CX-23883
- Tuner: Xceive XC3028L
- DVB-T Decoder: Zarlink ZL10353

This patch adds support for DVB-T, Analog TV, FM radio, composite and
S-video inputs. The IR input isn't supported.

Since the PCI subsystem ID (14f1:8852) is the same as the Geniatech
X8000-MT, but they are different boards, the card is only supported via
insmod option: options cx88xx card=91

For the record this is the eeprom dump, useful if someone wanted to
implement the card auto detection:

07 ff ff ff f1 14 52 88 04 04 32 55 f8 00 a2 02
a1 00 40 63 06 11 44 30 03 df 40 80 00 20 00 73
3c 10 00 00 00 00 ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff a0 00

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>


# 2169e6da 11-Jun-2019 Hans Verkuil <hverkuil-cisco@xs4all.nl>

media: media/pci: don't set description for ENUM_FMT

The V4L2 core sets the description for the driver in order to ensure
consistent naming.

So drop the strscpy of the description in drivers. Also remove any
description strings in driver-internal structures since those are
no longer needed.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>


# c942fddf 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157

Based on 3 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version [author] [kishon] [vijay] [abraham]
[i] [kishon]@[ti] [com] this program is distributed in the hope that
it will be useful but without any warranty without even the implied
warranty of merchantability or fitness for a particular purpose see
the gnu general public license for more details

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version [author] [graeme] [gregory]
[gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
[kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
[hk] [hemahk]@[ti] [com] this program is distributed in the hope
that it will be useful but without any warranty without even the
implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1105 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 4839c58f 28-Sep-2017 Mauro Carvalho Chehab <mchehab@kernel.org>

media: v4l2-dev: convert VFL_TYPE_* into an enum

Using enums makes easier to document, as it can use kernel-doc
markups. It also allows cross-referencing, with increases the
kAPI readability.

Please notice that now cx88_querycap() has to have a default for
the VFL type, as there are more types than supported by the driver.

Acked-By: Mike Isely <isely@pobox.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# a8d8e38a 06-Mar-2017 Elena Reshetova <elena.reshetova@intel.com>

[media] cx88: convert struct cx88_core.refcount from atomic_t to refcount_t

refcount_t is better suitable for counting references than atomic_t.

Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David Windsor <dwindsor@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# 399426ca 19-Nov-2016 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] cx88: make checkpatch.pl happy

Usually, I don't like fixing coding style issues on non-staging
drivers, as it could be a mess pretty easy, and could become like
a snow ball. That's the case of recent changes on two changesets:
they disalign some statements. Yet, a care a lot with cx88 driver,
as it was the first driver I touched at the Kernel, and I've been
maintaining it since 2005. So, several of the coding style issues
were due to my code.

Per Andrey's suggestion, I ran checkpatch.pl in strict mode, with
fixed several other issues, did some function alinments, but broke
other alinments.

So, I had to manually apply another round of manual fixes to make
sure that everything is ok, and to make checkpatch happy with
this patch.

With this patch, checkpatch.pl is now happy when called with:
./scripts/checkpatch.pl -f --max-line-length=998 --ignore PREFER_PR_LEVEL

Also, the 80-cols violations that made sense were fixed.

Checkpatch would be happier if we convert it to use dev_foo(),
but this is a more complex change.

NOTE: there are some places with msleep(1). As this driver was
written at the time that the default was to sleep at least 10ms
on such calls (e. g. CONFIG_HZ=100), I replaced those calls by
usleep_range(10000, 20000), with should be safe to avoid breakages.

Fixes: 65bc2fe86e66 ("[media] cx88: convert it to use pr_foo() macros")
Fixes: 7b61ba8ff838 ("[media] cx88: make checkpatch happier")

Suggested-by: Andrey Utkin <andrey_utkin@fastmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Reviewed-by: Andrey Utkin <andrey_utkin@fastmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# 7b61ba8f 16-Nov-2016 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] cx88: make checkpatch happier

This driver is old, and have lots of checkpatch violations.
As we're touching a lot on this driver due to the printk
conversions, let's run checkpatch --fix on it, in order to
solve some of those issues.

Also, do a few manual adjustments:
- remove the FSF address and use the usual coding style
for the initial comments;
- use WARN_ON() instead of BUG_ON();
- remove an unused typedef;
- break a few long lines.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# 65bc2fe8 13-Nov-2016 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] cx88: convert it to use pr_foo() macros

Instead of calling printk() directly, use pr_foo()
macros, as suggested at the Kernel's coding style.

Please notice that a conversion to dev_foo() is not trivial,
as several parts on this driver uses pr_cont().

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# 2bc46b3a 14-Feb-2016 Hans Verkuil <hans.verkuil@cisco.com>

[media] media/pci: convert drivers to use the new vb2_queue dev field

Stop using alloc_ctx and just fill in the device pointer.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# d647f0b7 13-Nov-2015 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] include/media: move driver interface headers to a separate dir

Let's not mix headers used by the core with those headers that
are needed by some driver-specific interface header.

The headers used on drivers were manually moved using:
mkdir include/media/drv-intf/
git mv include/media/cx2341x.h include/media/cx25840.h \
include/media/exynos-fimc.h include/media/msp3400.h \
include/media/s3c_camif.h include/media/saa7146.h \
include/media/saa7146_vv.h include/media/sh_mobile_ceu.h \
include/media/sh_mobile_csi2.h include/media/sh_vou.h \
include/media/si476x.h include/media/soc_mediabus.h \
include/media/tea575x.h include/media/drv-intf/

And the references for those headers were corrected using:

MAIN_DIR="media/"
PREV_DIR="media/"
DIRS="drv-intf/"

echo "Checking affected files" >&2
for i in $DIRS; do
for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
n=`basename $j`
git grep -l $n
done
done|sort|uniq >files && (
echo "Handling files..." >&2;
echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
(
cd include/$MAIN_DIR;
for j in $DIRS; do
for i in $(ls $j); do
echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
done;
done;
echo "cat > a && mv a \$i; done";
);
echo "Handling documentation..." >&2;
echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
(
cd include/$MAIN_DIR;
for j in $DIRS; do
for i in $(ls $j); do
echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
done;
done;
echo "cat > a && mv a \$i; done"
);
) >script && . ./script

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>


# b5dcee22 09-Nov-2015 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] include/media: split I2C headers from V4L2 core

Currently, include/media is messy, as it contains both the V4L2 core
headers and some driver-specific headers on the same place. That makes
harder to identify what core headers should be documented and what
headers belong to I2C drivers that are included only by bridge/main
drivers that would require the functions provided by them.

Let's move those i2c specific files to its own subdirectory.

The files to move were produced via the following script:
mkdir include/media/i2c
(cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
(cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/*/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
for i in include/media/*.h; do n=`basename $i`; (for j in $(git grep -l $n); do dirname $j; done)|sort|uniq|grep -ve '^.$' > list; num=$(wc -l list|cut -d' ' -f1); if [ $num == 1 ]; then if [ "`grep i2c list`" != "" ]; then git mv $i include/media/i2c; fi; fi; done

And the references corrected via this script:
MAIN_DIR="media/"
PREV_DIR="media/"
DIRS="i2c/"

echo "Checking affected files" >&2
for i in $DIRS; do
for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
n=`basename $j`
git grep -l $n
done
done|sort|uniq >files && (
echo "Handling files..." >&2;
echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
(
cd include/$MAIN_DIR;
for j in $DIRS; do
for i in $(ls $j); do
echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
done;
done;
echo "cat > a && mv a \$i; done";
);
echo "Handling documentation..." >&2;
echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
(
cd include/$MAIN_DIR;
for j in $DIRS; do
for i in $(ls $j); do
echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
done;
done;
echo "cat > a && mv a \$i; done"
);
) >script && . ./script

Merged Sakari Ailus patch that moves smiapp.h to include/media/i2c.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>


# 2d700715 22-Sep-2015 Junghak Sung <jh1009.sung@samsung.com>

[media] media: videobuf2: Restructure vb2_buffer

Remove v4l2 stuff - v4l2_buf, v4l2_plane - from struct vb2_buffer.

Add new member variables - bytesused, length, offset, userptr, fd,
data_offset - to struct vb2_plane in order to cover all information
of v4l2_plane.
struct vb2_plane {
<snip>
unsigned int bytesused;
unsigned int length;
union {
unsigned int offset;
unsigned long userptr;
int fd;
} m;
unsigned int data_offset;
}

Replace v4l2_buf with new member variables - index, type, memory - which
are common fields for buffer management.
struct vb2_buffer {
<snip>
unsigned int index;
unsigned int type;
unsigned int memory;
unsigned int num_planes;
struct vb2_plane planes[VIDEO_MAX_PLANES];
<snip>
};

v4l2 specific fields - flags, field, timestamp, timecode,
sequence - are moved to vb2_v4l2_buffer in videobuf2-v4l2.c
struct vb2_v4l2_buffer {
struct vb2_buffer vb2_buf;

__u32 flags;
__u32 field;
struct timeval timestamp;
struct v4l2_timecode timecode;
__u32 sequence;
};

Signed-off-by: Junghak Sung <jh1009.sung@samsung.com>
Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 0df289a2 07-Jun-2015 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] dvb: Get rid of typedev usage for enums

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/*


# 9450684b 03-Apr-2015 Hans Verkuil <hverkuil@xs4all.nl>

[media] cx88: v4l2-compliance fixes

Fix three v4l2-compliance failures:

- the colorspace wasn't set in vidioc_try_fmt_vid_cap().
- the field wasn't set in v4l2_buffer when vb2_buffer_done() was called.
- the sequence wasn't set in v4l2_buffer when vb2_buffer_done() was called.
This fix also removes the unused buf->count field and starts the count
at 0 instead of 1.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 34080bc2 09-Mar-2015 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 165d0043 08-Dec-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: add missing alloc_ctx support

The cx88 vb2 conversion and the vb2 dma_sg improvements were developed separately and
were merged separately. Unfortunately, the patch updating drivers to the dma_sg
improvements didn't take the updated cx88 driver into account. Basically two ships
passing in the night, unaware of one another even though both ships have the same
owner, i.e. me :-)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Chris Lee <updatelee@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# c0d5b5fb 20-Sep-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: fix VBI support

Now works with both NTSC and PAL. Tested with CC/XDS for NTSC and
teletext/WSS for PAL. The start lines were wrong, the WSS signal
wasn't captured and there was no difference between NTSC and PAL
w.r.t. the count[] values so NTSC returned way too many lines.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 078859a3 29-Aug-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: don't allow changes while vb2_is_busy

Make sure that changing the standard or format is not allowed while
one or more of the video, vbi or mpeg vb2 queues are busy.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# fb37ab3e 29-Aug-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: drop mpeg_active field

The vb2 framework knows if streaming is in progress, no need to use
a separate field for that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# ccd6f1d4 20-Sep-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: move width, height and field to core struct

The width, height and field values are core fields since both vbi, video
and blackbird use the same video input.

Move those fields to the correct struct.

Also fix the field checks in the try_fmt functions: add V4L2_FIELD_SEQ_BT/TB
support and map incorrect field values to a correct field value instead of
returning an error.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 5e7045e3 29-Aug-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: remove dependency on btcx-risc

btcx-risc is for the bt8xx driver and other drivers shouldn't depend
on it. There is no benefit to use that module just to do a
pci_zalloc_consistent.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 999b3ceb 29-Aug-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: drop cx88_free_buffer

Remove this function. This makes all vb2 queues behave the same, which
simplifies comparing the various vb2 queue op implementations.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 0b6b6302 20-Sep-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: convert to vb2

As usual, this patch is very large due to the fact that half a vb2 conversion
isn't possible. And since this affects blackbird, alsa, core, dvb, vbi and
video the changes are all over.

What made this more difficult was the peculiar way the risc program was setup.
The driver allowed for running out of buffers in which case the DMA would stop
and restart when the next buffer was queued. There was also a complicated
timeout system for when buffers weren't filled. This was replaced by a much
simpler scheme where there is always one buffer around and the DMA will just
cycle that buffer until a new buffer is queued. In that case the previous
buffer will be chained to the new buffer. An interrupt is generated at the
start of the new buffer telling the driver that the previous buffer can be
passed on to userspace.

Much simpler and more robust.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 6f11adc6 10-Aug-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: drop the bogus 'queue' list in dmaqueue

This list is only used if the width, height and/or format of a buffer has
changed, but that can never happen. Remove it and all associated code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 637bc207 29-Aug-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: remove fmt from the buffer struct

This is a duplicate of dev->fmt and can be removed. As a consequence a
lot of tests that check if the format has changed midstream can be
removed as well: the format cannot change midstream, so this is a bogus
check.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# f66b2a1c 27-Aug-2013 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: Fix regression: CX88_AUDIO_WM8775 can't be 0

Cards using the wm8775 specify that in their card struct. Those that do not
use it leave the audio_chip field to 0. Unfortunately, the CX88_AUDIO_WM8775
enum is 0 as well, so boards that do not have the wm8775 still try to load
and use that driver. Change it to 1 to fix this.
This regression was introduced in commit facd23664f1d63c33fbc6da52261c8548ed3fbd4.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Knut Petersen <Knut_Petersen@t-online.de>
Tested-by: Knut Petersen <Knut_Petersen@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: stable@vger.kernel.org


# facd2366 26-May-2013 Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: remove g_chip_ident

Remove g_chip_ident from cx88. Also remove the v4l2-chip-ident.h include.
The board code used defines from v4l2-chip-ident.h to tell the driver which
audio chip is used. Replace this with a cx88-specific enum.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# 02615ed5 28-Apr-2013 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] cx88: make core less verbose

Along the time, several debug messages were added at cx88-cards.
While those are still useful to track some troubles with
tuners, they're too verbose:
[ 5768.281801] cx88[0]: Calling XC2028/3028 callback
[ 5768.287388] cx88[0]: Calling XC2028/3028 callback
[ 5768.292575] cx88[0]: Calling XC2028/3028 callback
[ 5768.299408] cx88[0]: Calling XC2028/3028 callback
[ 5768.306244] cx88[0]: Calling XC2028/3028 callback
...

and, most of the time, useless.

So, disable them, except if core_debug modprobe parameter
is used.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# 48a8a03b 04-Apr-2013 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] cx88: kernel bz#9476: Fix tone setting for Nova-S+ model 92001

Hauppauge Nova-S-Plus DVB-S model 92001 does not lock on horizontal
polarisation. According with the info provided at the BZ, model
92002 does.

The difference is that, on model 92001, the tone select is done via
isl6421, while, on other devices, this is done via cx24123 code.
This patch adds a way to override the demod's set_tone at isl6421
driver. In order to avoid regressions, the override is enabled
only for cx88 Nova S plus model 92001. For all other models and
devices, the set_tone is provided by the demod driver.

Patch originally proposed at bz@9476[1] by Michel Meyers and
John Donoghue but applying the original patch would break support
for all other devices based on isl6421.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=9476

Tested-by: Adam Sampson <ats@offog.org>
Tested-by: Hans-Peter Jansen <hpj@urpla.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# b530a447 19-Mar-2013 Hans Verkuil <hans.verkuil@cisco.com>

[media] v4l2: add const to argument of write-only s_frequency ioctl

This ioctl is defined as IOW, so pass the argument as const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# 8268979a 19-Jan-2013 Peter Senna Tschudin <peter.senna@gmail.com>

[media] [V2,01/24] pci/cx88/cx88.h: use IS_ENABLED() macro

replace:
#if defined(CONFIG_VIDEO_CX88_DVB) || \
defined(CONFIG_VIDEO_CX88_DVB_MODULE)
with:
#if IS_ENABLED(CONFIG_VIDEO_CX88_DVB)
This change was made for: CONFIG_VIDEO_CX88_DVB,
CONFIG_VIDEO_CX88_BLACKBIRD, CONFIG_VIDEO_CX88_VP3054

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# 34206439 27-Oct-2012 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] cx88: reorder inline to prevent a gcc warning

drivers/media/pci/cx88/cx88.h:97:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88.h:103:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88-core.c:649:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88-core.c:654:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88-core.c:659:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88-core.c:664:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88-core.c:684:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
drivers/media/pci/cx88/cx88-core.c:695:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# b285192a 13-Aug-2012 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] rename most media/video pci drivers to media/pci

Rename all PCI drivers with their own directory under
drivers/media/video into drivers/media/pci and update the
building system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>