summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-mr800.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] [RFC] radio-mr800: locking fixesHans Verkuil2010-10-221-3/+14
| | | | | | | | | | | - serialize the suspend and resume functions using the global lock. - do not call usb_autopm_put_interface after a disconnect. - fix a race when disconnecting the device. Reported-by: David Ellingsworth <david@identd.dyndns.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: David Ellingsworth<david@identd.dyndns.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-mr800: fix locking orderHans Verkuil2010-10-211-1/+1
| | | | | | | | | | | | | | Don't hold the lock before unregistering the device, since when the device is unregistered the datastruct containing the lock may be freed (if the refcount went to 0). Also fixed the framework documentation that erroneously suggested the wrong locking order as well. Reported-by: David Ellingsworth <david@identd.dyndns.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: David Ellingsworth <david@identd.dyndns.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: radio-mr800: remove BKLHans Verkuil2010-10-211-64/+10
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: radio-am800: let v4l2_device_(un)register handle usb_get/set_intfdataHans Verkuil2010-05-191-10/+9
| | | | | | | | v4l2_device_register already sets the usb intfdata to v4l2_dev. So use that instead. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13547): radio: add trivial checks on the tuner and type args.Hans Verkuil2009-12-161-0/+4
| | | | | | | | Many radio drivers did not check the tuner and type field correctly for g/s_frequency. These checks have now been added. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Merge branch 'for_linus' of ↵Linus Torvalds2009-12-091-191/+167
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (345 commits) V4L/DVB (13542): ir-keytable: Allow dynamic table change V4L/DVB (13541): atbm8830: replace 64-bit division and floating point usage V4L/DVB (13540): ir-common: Cleanup get key evdev code V4L/DVB (13539): ir-common: add __func__ for debug messages V4L/DVB (13538): ir-common: Use a dynamic keycode table V4L/DVB (13537): ir: Prepare the code for dynamic keycode table allocation V4L/DVB (13536): em28xx: Use the full RC5 code on HVR-950 Remote Controller V4L/DVB (13535): ir-common: Add a hauppauge new table with the complete RC5 code V4L/DVB (13534): ir-common: Remove some unused fields/structs V4L/DVB (13533): ir: use dynamic tables, instead of static ones V4L/DVB (13532): ir-common: Add infrastructure to use a dynamic keycode table V4L/DVB (13531): ir-common: rename the debug routine to allow exporting it V4L/DVB (13458): go7007: subdev conversion V4L/DVB (13457): s2250: subdev conversion V4L/DVB (13456): s2250: Change module structure V4L/DVB (13528): em28xx: add support for em2800 VC211A card em28xx: don't reduce scale to half size for em2800 em28xx: don't load audio modules when AC97 is mis-detected em28xx: em2800 chips support max width of 640 V4L/DVB (13523): dvb-bt8xx: fix compile warning ... Fix up trivial conflicts due to spelling fixes from the trivial tree in Documentation/video4linux/gspca.txt drivers/media/video/cx18/cx18-mailbox.h
| * V4L/DVB (13402): radio-mr800 - autosuspend for radio-mr800 driverOliver Neukum2009-12-051-2/+12
| | | | | | | | | | | | | | | | Patch adds autosuspend support for mr800 radio driver. Signed-off-by: Oliver Neukum <oliver@neukum.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13073): radio-mr800: set radio frequency only upon successDavid Ellingsworth2009-12-051-6/+2
| | | | | | | | | | | | | | | | | | Set radio frequency only upon success. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13072): radio-mr800: simplify device warningsDavid Ellingsworth2009-12-051-52/+26
| | | | | | | | | | | | | | | | | | Simplify device warnings. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13071): radio-mr800: preserve radio state during suspend/resumeDavid Ellingsworth2009-12-051-5/+28
| | | | | | | | | | | | | | | | | | Preserve radio state during suspend/resume. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13070): radio-mr800: fix behavior of set_stereo functionDavid Ellingsworth2009-12-051-4/+5
| | | | | | | | | | | | | | | | | | Fix behavior of set_stereo function. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13069): radio-mr800: ensure the radio is initialized to a ↵David Ellingsworth2009-12-051-2/+32
| | | | | | | | | | | | | | | | | | | | | | consistent state Ensure the radio is initialized to a consistent state. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13068): radio-mr800: remove device initialization from open/closeDavid Ellingsworth2009-12-051-33/+2
| | | | | | | | | | | | | | | | | | Remove device initialization from open/close. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13067): radio-mr800: fix potential use after freeDavid Ellingsworth2009-12-051-1/+1
| | | | | | | | | | | | | | | | | | Fix portential use after free. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13066): radio-mr800: remove device removed indicatorDavid Ellingsworth2009-12-051-12/+8
| | | | | | | | | | | | | | | | | | Remove device removed indicator Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13065): radio-mr800: simplify locking in ioctl callbacksDavid Ellingsworth2009-12-051-79/+30
| | | | | | | | | | | | | | | | | | Simplify locking in ioctl callbacks. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13064): radio-mr800: simplify access to amradio_deviceDavid Ellingsworth2009-12-051-10/+13
| | | | | | | | | | | | | | | | | | Simplify access to amradio_device. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13063): radio-mr800: remove unnecessary local variableDavid Ellingsworth2009-12-051-6/+4
| | | | | | | | | | | | | | | | | | Remove unnecessary local variable. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13062): radio-mr800: simplify error paths in usb probe callbackDavid Ellingsworth2009-12-051-11/+16
| | | | | | | | | | | | | | | | | | Simplify error paths in usb probe callback. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13061): radio-mr800: simplify video_device allocationDavid Ellingsworth2009-12-051-32/+21
| | | | | | | | | | | | | | | | | | simplify video_device allocation Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (13060): radio-mr800: implement proper lockingDavid Ellingsworth2009-12-051-75/+106
| | | | | | | | | | | | | | | | | | Implement proper locking Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | tree-wide: fix assorted typos all over the placeAndré Goddard Rosa2009-12-041-1/+1
|/ | | | | | | | | | That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* trivial: fix typos "man[ae]g?ment" -> "management"Uwe Kleine-Koenig2009-09-211-1/+1
| | | | | Signed-off-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* headers: smp_lock.h reduxAlexey Dobriyan2009-07-121-0/+1
| | | | | | | | | | | | | * Remove smp_lock.h from files which don't need it (including some headers!) * Add smp_lock.h to files which do need it * Make smp_lock.h include conditional in hardirq.h It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT This will make hardirq.h inclusion cheaper for every PREEMPT=n config (which includes allmodconfig/allyesconfig, BTW) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* V4L/DVB (11842): radio-mr800.c: missing mutex includeAlessio Igor Bogani2009-06-161-0/+1
| | | | | | | | | | | radio-mr800.c uses struct mutex, so while <linux/mutex.h> seems to be pulled in indirectly by one of the headers it already includes, the right thing is to include it directly. Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11436): radio-mr800: convert to to v4l2_deviceAlexey Klimov2009-04-061-54/+31
| | | | | | | radio-mr800: convert to to v4l2_device. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10463): radio-mr800: fix checking of retval after usb_bulk_msgAlexey Klimov2009-03-301-3/+3
| | | | | | | | | Patch corrects checking of returned value after usb_bulk_msg. Now we also check if number of transferred bytes equals to BUFFER_LENGTH. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10462): radio-mr800: increase version and add commentsAlexey Klimov2009-03-301-15/+17
| | | | | | | | Increase driver version to 0.10, remove old and add new useful comments. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10461): radio-mr800: add few lost mutex locksAlexey Klimov2009-03-301-0/+5
| | | | | | | | Patch adds two lost mutex locks. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10460): radio-mr800: add stereo supportAlexey Klimov2009-03-301-2/+79
| | | | | | | | | | Patch introduces new amradio_set_stereo function. Driver calls this func to make stereo radio reception. Corrects checking of returned value after usb_bulk_msg. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10459): radio-mr800: fix amradio_set_freqAlexey Klimov2009-03-301-2/+3
| | | | | | | | | Fixing frequency adjustment to provide better diapason(band?) fit. Also, add AMRADIO_SET_FREQ to the list of commands. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10458): radio-mr800: move radio start and stop in one functionAlexey Klimov2009-03-301-43/+21
| | | | | | | | | | Patch introduces new amradio_set_mute function. Amradio_start and amradio_stop removed. This makes driver more flexible and it's useful for next changes. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10457): radio-mr800: add more dev_err messages in probeAlexey Klimov2009-03-301-3/+7
| | | | | | | | Patch adds 3 dev_err messages in usb_amradio_probe() function. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10456): radio-mr800: place dev_err instead of dev_warnAlexey Klimov2009-03-301-1/+1
| | | | | | | | | There should be dev_err message if video_register_device() fails. Correct this situation. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10455): radio-mr800: codingstyle cleanupsAlexey Klimov2009-03-301-11/+25
| | | | | | | | Cleanups of many if-check constructions. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10316): v4l/dvb: use usb_make_path in usb-radio driversAlexey Klimov2009-03-301-1/+3
| | | | | | | | | Place usb_make_path in dsbr100.c, radio-mr800.c, radio-si470x.c that used when reporting bus_info information in vidioc_querycap. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10317): radio-mr800: fix radio->muted and radio->stereoAlexey Klimov2009-01-291-6/+6
| | | | | | | | | | | Move radio->muted and radio->stereo in section where radio mutex is locked to avoid possible race condition problems or access to memory. Thanks to David Ellingsworth <david@identd.dyndns.org> for pointing to this weak place in driver. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10135): v4l2: introduce v4l2_file_operations.Hans Verkuil2009-01-021-9/+5
| | | | | | | | | | | | | | | | Introduce a struct v4l2_file_operations for v4l2 drivers. Remove the unnecessary inode argument. Move compat32 handling (and llseek) into the v4l2-dev core: this is now handled in the v4l2 core and no longer in the drivers themselves. Note that this changeset reverts an earlier patch that changed the return type of__video_ioctl2 from int to long. This change will be reinstated later in a much improved version. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10053): radio-mr800: disable autosuspend supportAlexey Klimov2008-12-301-1/+1
| | | | | | | | | | Because this device doesn't provide any powermanagment capabilities(may be they exist but unknown to me yet, so they are not implemented), we should turn them off. Patch sets support_autosuspend equal to 0. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10052): radio-mr800: correct unplug, fix to previous patchAlexey Klimov2008-12-301-19/+19
| | | | | | | | | | This patch corrects unplug procedure, that was implemented wrong in previous patch. New function usb_amradio_device_release added. Disconnect lock removed. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9655): radio-mr800: fix unplugAlexey Klimov2008-12-301-8/+54
| | | | | | | | | | This patch fixes problems(kernel oopses) with unplug of device while it's working. Patch adds disconnect_lock mutex, changes usb_amradio_close and usb_amradio_disconnect functions and adds a lot of safety checks. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9518): radio-mr800: remove warn, info and err messagesAlexey Klimov2008-12-291-15/+28
| | | | | | | | | | | | | | | Patch removes warn(), err() and info() statements in drivers/media/radio/radio-mr800.c, and place dev_warn, dev_info in right places. Printk changed on pr_info and pr_err macro. Also new macro amradio_dev_warn defined. Name in usb driver struct changed on MR800_DRIVER_NAME. -- Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Acked-by: David Ellingsworth <david@identd.dyndns.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9305): radio-mr800: Add BKL for usb_amradio_open()Alexey Klimov2008-10-211-0/+5
| | | | | | | | Added BKL for usb_amradio_open() Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9101): radio-mr800: Add driver for AverMedia MR 800 USB FM radio ↵Alexey Klimov2008-10-121-0/+628
devices This patch creates a new usb-radio driver, radio-mr800.c, that supports the AverMedia MR 800 USB FM radio devices. This device plugs into both the USB and an analog audio input, so this thing only deals with initialization and frequency setting, the audio data has to be handled by a sound driver. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud