summaryrefslogtreecommitdiff
path: root/drivers/media/radio/Kconfig
AgeCommit message (Collapse)Author
2023-06-28media: add HAS_IOPORT dependenciesNiklas Schnelle
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends not being declared. We thus need to add HAS_IOPORT as dependency for those drivers using them. Link: https://lore.kernel.org/linux-media/20230522105049.1467313-19-schnelle@linux.ibm.com Reviewed-by: Sean Young <sean@mess.org> # media/rc Co-developed-by: Arnd Bergmann <arnd@kernel.org> Signed-off-by: Arnd Bergmann <arnd@kernel.org> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-05-13media: make RADIO_ADAPTERS tristateRandy Dunlap
Fix build errors when RADIO_TEA575X=y, VIDEO_BT848=m, and VIDEO_DEV=m. The build errors occur due to [in drivers/media/Makefile]: obj-$(CONFIG_VIDEO_DEV) += radio/ so the (would be) builtin tea575x.o is not being built. This is also due to drivers/media/radio/Kconfig declaring a bool Kconfig symbol (RADIO_ADAPTERS) that depends on a tristate (VIDEO_DEV), so when VIDEO_DEV=m, RADIO_ADAPTERS becomes =y, and then the drivers that depend on RADIO_ADPATERS can be configured as builtin (=y) or as loadable modules (=m). Fix this by converting RADIO_ADAPTERS to a tristate symbol instead of a bool symbol. Fixes these build errors: ERROR: modpost: "snd_tea575x_hw_init" [drivers/media/pci/bt8xx/bttv.ko] undefined! ERROR: modpost: "snd_tea575x_set_freq" [drivers/media/pci/bt8xx/bttv.ko] undefined! ERROR: modpost: "snd_tea575x_s_hw_freq_seek" [drivers/media/pci/bt8xx/bttv.ko] undefined! ERROR: modpost: "snd_tea575x_enum_freq_bands" [drivers/media/pci/bt8xx/bttv.ko] undefined! ERROR: modpost: "snd_tea575x_g_tuner" [drivers/media/pci/bt8xx/bttv.ko] undefined! Link: lore.kernel.org/r/202204191711.IKJJFjgU-lkp@intel.com Fixes: 9958d30f38b9 ("media: Kconfig: cleanup VIDEO_DEV dependencies") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-18media: media/*/Kconfig: sort entriesMauro Carvalho Chehab
Currently, the idems inside media Kconfig are out of order. Sort them using the script below: <script> use strict; use warnings; my %config; my @source; my $out; sub flush_config() { if (scalar %config) { for my $c (sort keys %config) { $out .= $config{$c} . "\n"; } %config = (); } return if (!scalar @source); $out .= "\n"; for my $s (sort @source) { $out .= $s; } $out .= "\n"; @source = (); } sub sort_kconfig($) { my $fname = shift; my $cur_config = ""; @source = (); $out = ""; %config = (); open IN, $fname or die; while (<IN>) { if (m/^config\s+(.*)/) { $cur_config = $1; $config{$cur_config} .= $_; } elsif (m/^source\s+(.*)/) { push @source, $_; } elsif (m/^\s+/) { if ($cur_config eq "") { $out .= $_; } else { $config{$cur_config} .= $_; } } else { flush_config(); $cur_config = ""; $out .= $_; } } close IN or die; flush_config(); $out =~ s/\n\n+/\n\n/g; $out =~ s/\n+$/\n/; open OUT, ">$fname"; print OUT $out; close OUT; } for my $fname(@ARGV) { sort_kconfig $fname } </script> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-18media: Kconfig: cleanup VIDEO_DEV dependenciesMauro Carvalho Chehab
media Kconfig has two entries associated to V4L API: VIDEO_DEV and VIDEO_V4L2. On Kernel 2.6.x, there were two V4L APIs, each one with its own flag. VIDEO_DEV were meant to: 1) enable Video4Linux and make its Kconfig options to appear; 2) it makes the Kernel build the V4L core. while VIDEO_V4L2 where used to distinguish between drivers that implement the newer API and drivers that implemented the former one. With time, such meaning changed, specially after the removal of all V4L version 1 drivers. At the current implementation, VIDEO_DEV only does (1): it enables the media options related to V4L, that now has: menu "Video4Linux options" visible if VIDEO_DEV source "drivers/media/v4l2-core/Kconfig" endmenu but it doesn't affect anymore the V4L core drivers. The rationale is that the V4L2 core has a "soft" dependency at the I2C bus, and now requires to select a number of other Kconfig options: config VIDEO_V4L2 tristate depends on (I2C || I2C=n) && VIDEO_DEV select RATIONAL select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE default (I2C || I2C=n) && VIDEO_DEV In the past, merging them would be tricky, but it seems that it is now possible to merge those symbols, in order to simplify V4L dependencies. Let's keep VIDEO_DEV, as this one is used on some make *defconfig configurations. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> # for meson-vdec & meson-ge2d Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> Acked-by: Łukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2020-04-14media: docs: move driver-specific info to driver-apiMauro Carvalho Chehab
Those documents don't really describe the driver API. Instead, they contain development-specific information. Yet, as the main index file describes the content of it as: "how specific kernel subsystems work from the point of view of a kernel developer" It seems to be the better fit. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-04-14media: docs: move uAPI book to userspace-api/mediaMauro Carvalho Chehab
Since 2017, there is an space reserved for userspace API, created by changeset 1d596dee3862 ("docs: Create a user-space API guide"). As the media subsystem was one of the first subsystems to use Sphinx, until this patch, we were keeping things on a separate place. Let's just use the new location, as having all uAPI altogether will likely make things easier for developers. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-05-28Merge tag 'v5.2-rc2' into patchworkMauro Carvalho Chehab
Merge back from upstream into media tree, as there are some patches merged upstream that has pontential of causing conflicts (one actually rised a conflict already). Linux 5.2-rc2 * tag 'v5.2-rc2': (377 commits) Linux 5.2-rc2 random: fix soft lockup when trying to read from an uninitialized blocking pool tracing: Silence GCC 9 array bounds warning ext4: fix dcache lookup of !casefolded directories locking/lock_events: Use this_cpu_add() when necessary KVM: x86: fix return value for reserved EFER tools/kvm_stat: fix fields filter for child events KVM: selftests: Wrap vcpu_nested_state_get/set functions with x86 guard kvm: selftests: aarch64: compile with warnings on kvm: selftests: aarch64: fix default vm mode kvm: selftests: aarch64: dirty_log_test: fix unaligned memslot size KVM: s390: fix memory slot handling for KVM_SET_USER_MEMORY_REGION KVM: x86/pmu: do not mask the value that is written to fixed PMUs KVM: x86/pmu: mask the result of rdpmc according to the width of the counters x86/kvm/pmu: Set AMD's virt PMU version to 1 KVM: x86: do not spam dmesg with VMCS/VMCB dumps kvm: Check irqchip mode before assign irqfd kvm: svm/avic: fix off-by-one in checking host APIC ID KVM: selftests: do not blindly clobber registers in guest asm KVM: selftests: Remove duplicated TEST_ASSERT in hyperv_cpuid.c ...
2019-05-24media: remove redundant 'default n' from Kconfig-sBartlomiej Zolnierkiewicz
'default n' is the default value for any bool or tristate Kconfig setting so there is no need to write it explicitly. Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO is not set' for visible symbols") the Kconfig behavior is the same regardless of 'default n' being present or not: ... One side effect of (and the main motivation for) this change is making the following two definitions behave exactly the same: config FOO bool config FOO bool default n With this change, neither of these will generate a '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied). That might make it clearer to people that a bare 'default n' is redundant. ... Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner
Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-20media: Kconfig files: use the right help coding styleMauro Carvalho Chehab
Checkpatch wants to use 'help' instead of '---help---': WARNING: prefer 'help' over '---help---' for new help texts Let's change it globally at the media subsystem, as otherwise people would keep using the old way. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-06-15media: v4l: fix broken video4linux docs locationsMauro Carvalho Chehab
There are several places pointing to old documentation files: Documentation/video4linux/API.html Documentation/video4linux/bttv/ Documentation/video4linux/cx2341x/fw-encoder-api.txt Documentation/video4linux/m5602.txt Documentation/video4linux/v4l2-framework.txt Documentation/video4linux/videobuf Documentation/video4linux/Zoran Make them point to the new location where available, removing otherwise. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: Jonathan Corbet <corbet@lwn.net>
2018-06-15docs: Fix some broken referencesMauro Carvalho Chehab
As we move stuff around, some doc references are broken. Fix some of them via this script: ./scripts/documentation-file-ref-check --fix Manually checked if the produced result is valid, removing a few false-positives. Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Stephen Boyd <sboyd@kernel.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Coly Li <colyli@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: Jonathan Corbet <corbet@lwn.net>
2018-06-05media: media/radio/Kconfig: add back RADIO_ISAHans Verkuil
Patch 258c524bdaab inadvertently removed the 'select RADIO_ISA' line for the RADIO_RTRACK. Fixes: 258c524bdaab ("radio: allow building ISA drivers with COMPILE_TEST") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04media: radio: allow building ISA drivers with COMPILE_TESTMauro Carvalho Chehab
Several radio devices only build on i386, because they depend on ISA. Allow them to build on other archs by adding a COMPILE_TEST check. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-04-20media: sound, media: allow building ISA drivers it with COMPILE_TESTMauro Carvalho Chehab
All sound drivers that don't depend on PNP can be safelly build with COMPILE_TEST, as ISA provides function stubs to be used for such purposes. As a side effect, with this change, the radio-miropcm20 can now be built outside i386 with COMPILE_TEST. It should be noticed that ISAPNP currently depends on ISA. So, on drivers that depend on it, we need to add an explicit dependency on ISA, at least until another patch removes it. Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: si470x: allow build both USB and I2C at the same timeMauro Carvalho Chehab
Currently, either USB or I2C is built. Change it to allow having both enabled at the same time. The main reason is that COMPILE_TEST all[yes/mod]builds will now contain all drivers under drivers/media. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2013-12-18[media] radio-raremono: add support for 'Thanko's Raremono' AM/FM/SW USB deviceHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Dinesh Ram <dinesh.ram@cern.ch> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] si4713: Reorganized drivers/media/radio directoryDinesh Ram
Added a new si4713 directory which will contain all si4713 related files. Also updated Makefile and Kconfig Signed-off-by: Dinesh Ram <dinesh.ram@cern.ch> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-09-13Remove GENERIC_HARDIRQ config optionMartin Schwidefsky
After the last architecture switched to generic hard irqs the config options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code for !CONFIG_GENERIC_HARDIRQS can be removed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-08-18[media] tea575x: Move from sound to mediaOndrej Zary
Move tea575x from sound/i2c/other to drivers/media/radio Includes Kconfig changes by Hans Verkuil. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-05-21[media] radio-si476x: depend on SND_SOCArnd Bergmann
It is not possible to select SND_SOC_SI476X if we have not also enabled SND_SOC. warning: (RADIO_SI476X) selects SND_SOC_SI476X which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC) Signed-off-by: Arnd Bergmann <arnd@arndb.de> [hans.verkuil@cisco.com: fixed wrong driver name in subject] Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-18[media] v4l2: Add a V4L2 driver for SI476X MFDAndrey Smirnov
This commit adds a driver that exposes all the radio related functionality of the Si476x series of chips via the V4L2 subsystem. [mchehab@redhat.com: change it to depends on MFD_SI476X_CORE instead of selecting it; vidioc_s_register now uses const struct] Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-17Revert "[media] v4l2: Add a V4L2 driver for SI476X MFD"Mauro Carvalho Chehab
As requested by Andrey Smirnov <andrew.smirnov@gmail.com>, revert this patch. This reverts commit 30bac9110455402fa8888740c6819dd3daa2666f. Conflicts: drivers/media/radio/Kconfig drivers/media/radio/radio-si476x.c Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-31[media] si476x: Fix some config dependencies and a compile warningsHans Verkuil
radio-si476x depends on SND and SND_SOC, the mfd driver should select REGMAP_I2C. Also fix a small compile warning in a debug message: drivers/mfd/si476x-i2c.c: In function ‘si476x_core_drain_rds_fifo’: drivers/mfd/si476x-i2c.c:391:4: warning: field width specifier ‘*’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] v4l2: Add a V4L2 driver for SI476X MFDAndrey Smirnov
This commit adds a driver that exposes all the radio related functionality of the Si476x series of chips via the V4L2 subsystem. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-24Merge branch 'v4l_for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Some cleanups at V4L2 documentation - new drivers: ts2020 frontend, ov9650 sensor, s5c73m3 sensor, sh-mobile veu mem2mem driver, radio-ma901, davinci_vpfe staging driver - Lots of missing MAINTAINERS entries added - several em28xx driver improvements, including its conversion to videobuf2 - several fixups on drivers to make them to better comply with the API - DVB core: add support for DVBv5 stats, allowing the implementation of statistics for new standards like ISDB - mb86a20s: add statistics to the driver - lots of new board additions, cleanups, and driver improvements. * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (596 commits) [media] media: Add 0x3009 USB PID to ttusb2 driver (fixed diff) [media] rtl28xxu: Add USB IDs for Compro VideoMate U620F [media] em28xx: add usb id for terratec h5 rev. 3 [media] media: rc: gpio-ir-recv: add support for device tree parsing [media] mceusb: move check earlier to make smatch happy [media] radio-si470x doc: add info about v4l2-ctl and sox+alsa [media] staging: media: Remove unnecessary OOM messages [media] sh_vou: Use vou_dev instead of vou_file wherever possible [media] sh_vou: Use video_drvdata() [media] drivers/media/platform/soc_camera/pxa_camera.c: use devm_ functions [media] mt9t112: mt9t111 format set up differs from mt9t112 [media] sh-mobile-ceu-camera: fix SHARPNESS control default Revert "[media] fc0011: Return early, if the frequency is already tuned" [media] cx18/ivtv: fix regression: remove __init from a non-init function [media] em28xx: fix analog streaming with USB bulk transfers [media] stv0900: remove unnecessary null pointer check [media] fc0011: Return early, if the frequency is already tuned [media] fc0011: Add some sanity checks and cleanups [media] fc0011: Fix xin value clamping Revert "[media] [PATH,1/2] mxl5007 move reset to attach" ...
2013-02-14drivers/media: add missing GENERIC_HARDIRQS dependencyHeiko Carstens
Texas Instruments WL1273 I2C FM Radio (RADIO_WL1273) selects MFD_CORE, which itself depends on GENERIC_HARDIRQS. So add the dependency to the TI driver as well. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-12-28[media] media: add driver for Masterkit MA901 usb radioAlexey Klimov
This patch creates a new usb-radio driver, radio-ma901.c, that supports Masterkit MA 901 USB FM radio devices. This device plugs into both the USB and an analog audio input or headphones, so this thing only deals with initialization and frequency setting. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] shark2: New driver for the Griffin radioSHARK v2 USB radio receiverHans de Goede
This driver consists of 2 parts, a generic tea5777 driver and a driver for the Griffin radioSHARK v2 USB radio receiver, which is the only driver using the generic tea5777 for now. This first version only implements FM support, once the the new VIDIOC_ENUM_FREQ_BANDS API is upstream I'll also add AM support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] radio-shark: New driver for the Griffin radioSHARK USB radio receiverHans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-05[media] media: only show V4L devices based on device type selectionMauro Carvalho Chehab
After this patch, the MEDIA*_SUPPORT will be used as a filter, exposing only devices that are pertinent to one of the 3 V4L types: webcam/grabber, radio, analog TV. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25Revert "[media] radio: Add Sanyo LM7000 tuner driver"Mauro Carvalho Chehab
This reverts commit 4ecbb69414c61af3594209e081d6e834ea68a16d. As requested by Hans Verkuil: > You accidentally merged the wrong first version of the lm7000 patch series. > > These are the correct second version patches: > > http://patchwork.linuxtv.org/patch/11689/ > http://patchwork.linuxtv.org/patch/11690/ > http://patchwork.linuxtv.org/patch/11691/ > > The second version is much simpler and doesn't require the creation of a whole > new driver. Requested-by: Hans Verkuil <hverkuil@xs4all.nl> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25Revert "[media] radio-aimslab: Use LM7000 driver"Mauro Carvalho Chehab
This reverts commit bece083a6b2b242c7ab74117640396e1bd851e49. As requested by Hans Verkuil: > You accidentally merged the wrong first version of the lm7000 patch series. > > These are the correct second version patches: > > http://patchwork.linuxtv.org/patch/11689/ > http://patchwork.linuxtv.org/patch/11690/ > http://patchwork.linuxtv.org/patch/11691/ > > The second version is much simpler and doesn't require the creation of a whole > new driver. Requested-by: Hans Verkuil <hverkuil@xs4all.nl> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25Revert "[media] radio-sf16fmi: Use LM7000 driver"Mauro Carvalho Chehab
This reverts commit 1e70a6cf7e965bafd89bf363772eb1a4b8e35934. As requested by Hans Verkuil: > You accidentally merged the wrong first version of the lm7000 patch series. > > These are the correct second version patches: > > http://patchwork.linuxtv.org/patch/11689/ > http://patchwork.linuxtv.org/patch/11690/ > http://patchwork.linuxtv.org/patch/11691/ > > The second version is much simpler and doesn't require the creation of a whole > new driver. Requested-by: Hans Verkuil <hverkuil@xs4all.nl> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] radio-sf16fmi: Use LM7000 driverOndrej Zary
Convert radio-sf16fmi to use generic LM7000 driver. Tested with SF16-FMI, SF16-FMP and SF16-FMD. radio."); @@ -48,37 +50,40 @@ struct fmi bool mute; unsigned long curfreq; /* freq in kHz */ struct mutex lock; + struct lm7000 lm; }; static struct fmi fmi_card; static struct pnp_dev *dev; bool pnp_attached; -/* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */ -/* It is only useful to give freq in interval of 800 (=0.05Mhz), - * other bits will be truncated, e.g 92.7400016 -> 92.7, but - * 92.7400017 -> 92.75 - */ -#define RSF16_ENCODE(x) ((x) / 800 + 214) #define RSF16_MINFREQ (87 * 16000) #define RSF16_MAXFREQ (108 * 16000) -static void outbits(int bits, unsigned int data, int io) +#define FMI_BIT_TUN_CE (1 << 0) +#define FMI_BIT_TUN_CLK (1 << 1) +#define FMI_BIT_TUN_DATA (1 << 2) +#define FMI_BIT_VOL_SW (1 << 3) +#define FMI_BIT_TUN_STRQ (1 << 4) + +void fmi_set_pins(struct lm7000 *lm, u8 pins) { - while (bits--) { - if (data & 1) { - outb(5, io); - udelay(6); - outb(7, io); - udelay(6); - } else { - outb(1, io); - udelay(6); - outb(3, io); - udelay(6); - } - data >>= 1; - } Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] radio-aimslab: Use LM7000 driverOndrej Zary
Convert radio-aimslab to use generic LM7000 driver. Tested with Reveal RA300. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-21[media] radio: Add Sanyo LM7000 tuner driverOndrej Zary
Add very simple driver for Sanyo LM7000 AM/FM tuner chip. Only FM is supported as there is no known HW with AM implemented. This will be used by radio-aimslab and radio-sf16fmi. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20[media] radio-sf16fmi: add support for SF16-FMDOndrej Zary
Add support for SF16-FMD card to radio-sf16fmi driver. Only new PnP ID is added and texts changed. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20[media] [resend] radio-sf16fmr2: add PnP support for SF16-FMD2Ondrej Zary
Add PnP support to radio-sf16fmr2 driver to support SF16-FMD2 card (SB16 + TEA5757). The driver can now handle two cards (FMR2 is hardwired to 0x384, FMD2 can be put at 0x384 or 0x284 by PnP). Tested with both SF16-FMR2 and SF16-FMD2 (the can work at the same time by using kernel parameter "pnp_reserve_io=0x384,2" so the FMD2 is put at 0x284). Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] radio-maxiradio: use the tea575x frameworkHans Verkuil
This card is based on the tea575x receiver. Use the tea575x-tuner framework instead of reinventing the wheel. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] radio/Kconfig: cleanupHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] radio-zoltrix: Convert to radio-isaHans Verkuil
Tested with v4l2-compliance, but not with actual hardware. Contact the linux-media mailinglist if you have this card! Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] radio-typhoon: Convert to radio-isaHans Verkuil
Tested with v4l2-compliance, but not with actual hardware. Contact the linux-media mailinglist if you have this card! Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] radio-trust: Convert to radio-isaHans Verkuil
Tested with v4l2-compliance, but not with actual hardware. Contact the linux-media mailinglist if you have this card! Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] radio-terratec: Convert to radio-isaHans Verkuil
Tested with v4l2-compliance, but not with actual hardware. Contact the linux-media mailinglist if you have this card! Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] radio-rtrack2: Convert to radio-isaHans Verkuil
Tested with v4l2-compliance, but not with actual hardware. Contact the linux-media mailinglist if you have this card! Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] radio-gemtek: Convert to radio-isaHans Verkuil
Tested with actual hardware (up to two cards) and the Keene USB FM Transmitter. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] radio-aztech: Convert to radio-isaHans Verkuil
Tested with actual hardware and the Keene USB FM Transmitter. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] radio-aimslab: Convert to radio-isaHans Verkuil
Tested with actual hardware and the Keene USB FM Transmitter. Improved the volume handling delays through trial and error. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] radio-isa: add framework for ISA radio driversHans Verkuil
We have quite a few ISA radio drivers, which are all very similar. This framework makes it possible to reduce the code size of those drivers and makes it much easier to keep them up to date with the latest V4L2 API developments. Drivers rewritten to use this framework fully pass the v4l2-compliance tests and are properly using the ISA bus (so they can be found under /sys/bus/isa). It is now also possible to support multiple cards using the same driver (tested with two radio-gemtek cards). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>