summaryrefslogtreecommitdiff
path: root/linux/drivers/media/radio
AgeCommit message (Collapse)Author
2008-07-17backport commit cad84238056babf4e4e6b0de183238224aab8177Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 20 19:16:12 2008 +0200 media-radio-miropcm20-rds: BKL pushdown kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-17btaudio/tvmixer/miropcm20-rds: fix 2.6.16 compilationHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Missed a few warnings, this patch fixes them. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.16Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 4 removes the compatibility support for kernels < 2.6.16. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-05-31 si470x: hardware frequency seek supportMauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> this patch brings the following changes: - this now finally adds hardware frequency seek support Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-31 si470x: afc indicationMauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> this patch brings the following changes: - afc indication: device has no indication whether freq is too low or too high therefore afc always return 1, when freq is wrong Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-31 si470x: a lot of small code cleanupsMauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> this patch brings the following changes: - comment on how to listen to an usb audio device   (i get so many questions about that...) - code cleanup (error handling, more warnings, spacing, ...) Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-31 si470x: let si470x_get_freq return errnoMauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> Hi Mauro, this patch brings the following changes: - version bumped to 1.0.8 for all the following patches - si470x_get_freq now returns errno Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-31 si470x: move global lock to device structureMauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> this patch brings the following changes: - move the global disconnect lock into the device structure - code cleanup (spaces to tabs, long line splits, ...) Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-26backport commit d3135846f6c1858dbad6ccb780a42e6c98953e6dMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Author: Matthew Wilcox <matthew@wil.cx> drivers: Remove unnecessary inclusions of asm/semaphore.h None of these files use any of the functionality promised by asm/semaphore.h. It's possible that they rely on it dragging in some unrelated header file, but I can't build all these files, so we'll have fix any build failures as they come up. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-15 radio: use get/put_unaligned_* helpersMauro Carvalho Chehab
From: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-10 proc: switch /proc/driver/radio-typhoon to seq_file interfaceMauro Carvalho Chehab
From: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-31 radio-cadet: wrap PNP probe code in #ifdef CONFIG_PNPMauro Carvalho Chehab
From: Bjorn Helgaas <bjorn.helgaas@hp.com> Wrap PNP probe code in #ifdef CONFIG_PNP. Without this change, we'll have unresolved references to pnp_get_resource() function when CONFIG_PNP=n. (This is a new interface that's not in mainline yet.) Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-27Fix blank lines to match in-kernel versionMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-24merge: http://linuxtv.org/hg/~dougsland/v4l-compat/Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-23[PATCH] add macro validation for v4l_compat_ioctl32.Douglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> Added macro CONFIG_COMPAT for v4l_compat_ioctl32. Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2008-03-23 radio-si470x: unplugging fixedMauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> this patch fixes several kernel oops, when unplugging device while it is in use: Basically the patch delays freeing of the internal variables in si470x_usb_driver_disconnect, until the the last user closed the device in si470x_fops_release. This was implemented a while ago with the help of Oliver Neukum. I tested the patch five times (unplugging while in use) without oops coming from the radio-si470x driver anymore. A remaining oops was coming from the usbaudio driver, but this is someone else task. Hopefully this fixed all unplugging issues. Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-17radio-sf16fmr2.c: fix volume handlingMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> As reported by Roel Kluin <12o3l@tiscali.nl>: in drivers/media/radio/radio-sf16fmr2.c:319: for (i = 0; i < ARRAY_SIZE(radio_qctrl); i++) { if ((fmr2->card_type != 11) && V4L2_CID_AUDIO_VOLUME) radio_qctrl[i].step = 65535; ... I don't understand this '&& V4L2_CID_AUDIO_VOLUME' While fixing this issue, I've revisited the volume control code and fixed CodingStyle on the changed procedures. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-14radio-si470x: Add kernel validation to work queueDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> Added kernel validation to support work_struct/delayed_work. (kernel < 2.6.20) Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2008-02-13radio-si470x: Add kernel validation to mutexDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> Added kernel validation to support mutex/semaphore. (kernel < 2.6.16) Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2008-02-09 autosuspend supportMauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> Together with Oliver Neukum from Novell, USB autosuspend support was added. Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-04 radio-si470x version 1.0.6Mauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> This patch combines all the finished discussions and its resulting patches from the mailing list. The version 1.0.6 is mainly influenced by Oliver Neukum. He found a lot of small issues, that are fixed with this patch now. For me the most interesting thing is, that it's now safer to use it on other architectures. The history for version 1.0.6 is: - fixed coverity checker warnings in *_usb_driver_disconnect - probe()/open() race by correct ordering in probe() - DMA coherency rules by separate allocation of all buffers - use of endianness macros - abuse of spinlock, replaced by mutex - racy handling of timer in disconnect, replaced by delayed_work - racy interruptible_sleep_on(), replaced with wait_event_interruptible() - handle signals in read() The driver is tested with all Debian/testing radio programs and rdsd. The patch is tested against checkpatch.pl v1.12. Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-10radio-si470x: fix build warningMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> fix the following build warning: radio-si470x.c: In function 'si470x_get_rds_registers': radio-si470x.c:562: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int' Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-02-02Fix Kconfig dependenciesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> As pointed by Adrian Bunk, with I2C=m and VIDEO_DEV=y, videodev brokes. This patch moves the functions that videodev needs from v4l2-common. It also fixes some Kconfig changes. After this patch, I2C=m / VIDEO_DEV=y will make v4l2 core statically linked into kernel. v4l2-common will be m, and all V4L drivers will also be m. This approach is very conservative, since it is possible to have V4L drivers that don't need I2C or v4l2-common. The better is to map what drivers really need v4l2-common, making them to select v4l2-common, and allowing the others to be 'y', 'm' and 'n'. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-28 Trivial printf warning fix (radio-si470)Mauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> Thanks to Darren Salt <linux@youmustbejoking.demon.co.uk> for pointing this issue. Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-28 radio-si470x.c: check-after-useMauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> Adrian used the coverity checker against radio-si470x and found this: > The Coverity checker spotted the following check-after-use in > drivers/media/radio/radio-si470x.c: > > <-- snip --> > static void si470x_usb_driver_disconnect(struct usb_interface *intf) > { > struct si470x_device *radio = usb_get_intfdata(intf); > > del_timer_sync(&radio->timer); <------------------ > flush_scheduled_work(); > > usb_set_intfdata(intf, NULL); > if (radio) { <------------------ > video_unregister_device(radio->videodev); > kfree(radio->buffer); > kfree(radio); > } > } > <-- snip --> > > Either "radio" can be NULL and this case has to be properly handled or > the NULL check is not required. These two lines should indeed better be inside the if statement. Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-27merge: http://linuxtv.org/hg/~dougsland/v4lMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-27[PATCH] static memoryDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> - Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2008-01-27 radio-si470x improvements and seldom problem fixed in tuning functionsMauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> I updated the radio-si470x driver another time. Here are the commented history entries: - number of seek_retries changed to tune_timeout The last versions checked for the end of frequency tuning by polling a si470x register. Therefore polling depended on the usb utilization. This was changed to have a constant timeout now. - fixed problem with incomplete tune operations by own buffers The last version used a shared buffer to assembly the USB HID reports. It sometimes happened, that multiple functions were modifing this buffer simultanuously. When sending such reports, the hardware returned USB stalls (-EPIPE). Now buffers of the correct size (smaller than before) are allocated as local variables. - optimization of variables The size of some variables has been reduced to allow the compiler to generate more optimized code. - improved error logging At some important location, error checking was improved. Especially the usb transfers to access si470x registers and the tuning functions were modified. Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-27Fix bugzilla 9699Douglas Schilling Landgraf
From: Mauro Carvalho Chehab <mchehab@infradead.org> isapnp_fmi_probe attaches device. However, if request_region() fails, the device isn't disattached. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2008-01-27Fix bugzilla 9699Douglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> Changed request_region() validation to avoid crash. Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2008-01-23 radio: fix sf16fmi section mismatchMauro Carvalho Chehab
From: Randy Dunlap <randy.dunlap@oracle.com> isapnp_fmi_probe() is only called by fmi_init(), which is __init, so isapnp_fmi_probe() can also be __init. media/radio/radio-sf16fmi.c: Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25radio-si570x: Some fixes and new USB ID additionMauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> - avoid poss. locking when doing copy_to_user which may sleep - RDS is automatically activated on read now - code cleaned of unnecessary rds_commands - USB Vendor/Product ID for ADS/Tech FM Radio Receiver verified (thanks to Guillaume RAMOUSSE) Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25radio-si470x: Some cleanupsMauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> - code reordered to avoid function prototypes - switch/case defaults are now more user-friendly - unified comment style - applied all checkpatch.pl v1.12 suggestions except the warning about the too long lines with bit comments - renamed FMRADIO to RADIO to cut line length (checkpatch.pl) Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-17fix broken build when CONFIG_USB_SI470X is setMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-01-15Adds the proper compatibility code for radio-si470x and stk-webcamMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Make radio-si470x and stk-webcam backward compatible with older kernels. This patch adds compat.h header for those files, reorder include order and adds USB_DEVICE_AND_INTERFACE_INFO macro. Thiw way, stk-webcam is backward compatible with 2.6.22, and radio-si470x with kernel 2.6.20. The backports weren't tested, but compile fine. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-14USB radio driver for Silicon Labs Si470x FM Radio ReceiversMauro Carvalho Chehab
From: Tobias Lorenz <tobias.lorenz@gmx.net> this patch adds a new driver for the Silicon Labs Si470x FM Radio Receiver. It should also work for the identical ADS/Tech FM Radio Receiver (formerly Instant FM Music) as soon as I find out the USB Vendor and Product ID. The driver is inspired by several other USB and radio drivers, but mainly from the D-Link DSB-R100 USB radio (dsbr100.c). The USB stick currently has an Si4701 FM RDS radio receiver. But the other Si470x devices are pin and register compatible, so that in the future the driver can easily be patched to support these too. Therefore I named the driver radio-si470x and the configuration option usb-si470x. The driver itself just provides the control function over the radio. For getting audio back, the device support the USB audio class, which is implemented in the already existing driver. I tested the driver in the last days, until it now satisfies all my functionality and robustness requirements. The application I used for testing was kradio. Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-01 radio: Use video_device_release rather than kfreeMauro Carvalho Chehab
From: Julia Lawall <julia@diku.dk> The file drivers/media/video/videodev.c defines both video_device_alloc and video_device_release. These are essentially just kzmalloc and kfree, respectively, but it seems better to use video_device_release, as done in the other media files, rather than kfree, in case the implementation some day changes. The problem was found using the following semantic match. (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T,T1,T2; identifier E; statement S; expression x1,x2,x3; int ret; @@ T E; ... * E = video_device_alloc(...); if (E == NULL) S ... when != video_device_release(...,(T1)E,...) when != if (E != NULL) { ... video_device_release(...,(T1)E,...); ...} when != x1 = (T1)E when != E = x3; when any if (...) { ... when != video_device_release(...,(T2)E,...) when != if (E != NULL) { ... video_device_release(...,(T2)E,...); ...} when != x2 = (T2)E ( * return; | * return ret; ) } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-07drivers/media/radio/radio-sf16fmr2.c: fix error handlingMauro Carvalho Chehab
From: Andrew Morton <akpm@linux-foundation.org> video_register_device() returns -EFOO on errr, not -1. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9699 Reported-By: <devzero@web.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-03 dsbr100 violates DMA coherency rulesMauro Carvalho Chehab
From: Oliver Neukum <oliver@neukum.org> Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-19drivers/media/radio: Add missing "space"Mauro Carvalho Chehab
From: Joe Perches <joe@perches.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-28radio-gemtek: make file_operations constDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> make file_operations const Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2007-10-15v4l core: remove the unused .hardware V4L1 fieldMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> struct video_device used to define a .hardware field. While initialized on severl drivers, this field is never used inside V4L. However, drivers using it need to include the old V4L1 header. This seems to cause compilation troubles with some random configs. Better just to remove it from all drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-15radio-gemtek: fix 'VID_HARDWARE_GEMTEK' undeclaredMauro Carvalho Chehab
From: Pekka Seppänen <pexu@kapsi.fi> Remove obsolete V4L v1 reference. Thanks to Ingo Molnar for pointing this issue. Signed-off-by: Pekka Seppänen <pexu@kapsi.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-01[PATCH] GemTek Radio card - Control WordDouglas Schilling Landgraf
From: Trent Piepho <xyzzy@speakeasy.org> Redoes the way the control word is stored and set. The existing code was a lot more complicated than it needed to be. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2007-10-01[PATCH] GemTek Radio card - frequency calculationDouglas Schilling Landgraf
From: Trent Piepho <xyzzy@speakeasy.org> Frequency calculation to use better math. It's still the same IF offset and step size (which are not the same as the datasheet says) as the code was before. It's just more efficient and accurate. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2007-10-01[PATCH 1/2] GemTek Radio cardDouglas Schilling Landgraf
From: Pekka Seppanen <pexu@kapsi.fi> Code cleanup for GemTek Radio card driver. Removed unnecessary / invalid I/O commands and rewrote code for tuning on-board BU2614FS chip. Adds several new module params for power users. Includes automatic device probing. Signed-off-by: Pekka Seppanen <pexu@kapsi.fi> Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Reviewed-by: Trent Piepho <xyzzy@speakeasy.org>
2007-09-30[PATCH 2/2] GemTek Radio cardDouglas Schilling Landgraf
From: Pekka Seppanen <pexu@kapsi.fi> Details now match with radio-gemtek.c, eg. no more different ports. Included a short note about cards that should be compatible with radio-gemtek module. Signed-off-by: Pekka Seppanen <pexu@kapsi.fi> Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Reviewed-by: Trent Piepho <xyzzy@speakeasy.org>
2007-08-27whitespace cleanup: replace leading spaces with tabsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> There were many instances of 7-space indents spread throughout the v4l-dvb tree. This patch replaces the 7-space indents with tabs. The whitespace cleaner script doesn't catch these, because it assumes that all indents are 8-space. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-07-20compat: keep printing pci revision on older kernelsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> In 2.6.23, there is a new struct pci_dev->revision field to get the pci revision. A couple drivers now use this to print the revision and on old kernels don't print it anymore. This patch adds a simple function to get the revision to compat.h to make it easy for the backward compay code to keep printing the revision like is used too. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-07-20radio-gemtek-pci: remove unused structure memberTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The drivers reads the PCI subsystem ID into its state structure, but it's never used anywhere. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>