aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio
Commit message (Collapse)AuthorAge
* Patched in Tegra support.Jonathan Herman2013-01-17
|
* Drivers: media: remove __dev* attributes.Greg Kroah-Hartman2013-01-03
| | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* [media] drivers/media/radio/radio-cadet.c: fix error return codePeter Senna Tschudin2012-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* radio tea5764, si4713: get rid of warning: no previous prototypeMauro Carvalho Chehab2012-10-28
| | | | | | | | drivers/media/radio/radio-tea5764.c:148:5: warning: no previous prototype for 'tea5764_i2c_read' [-Wmissing-prototypes] drivers/media/radio/radio-tea5764.c:168:5: warning: no previous prototype for 'tea5764_i2c_write' [-Wmissing-prototypes] drivers/media/radio/si4713-i2c.c:1772:6: warning: no previous prototype for 'si4713_ioctl' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fmdrv: Don't check if unsigned are below zeroMauro Carvalho Chehab2012-10-28
| | | | | | | drivers/media/radio/wl128x/fmdrv_common.c:745:3: warning: comparison is always false due to limited range of data type [-Wtype-limits] drivers/media/radio/wl128x/fmdrv_rx.c:308:2: warning: comparison is always false due to limited range of data type [-Wtype-limits] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fmdrv: better define fmdbg() macro to avoid warningsMauro Carvalho Chehab2012-10-28
| | | | | | drivers/media/radio/wl128x/fmdrv_common.c:1619:47: warning: suggest braces around empty body in an 'else' statement [-Wempty-body] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-sf16fmi: get rid of warning: no previous prototypeMauro Carvalho Chehab2012-10-27
| | | | | | drivers/media/radio/radio-sf16fmi.c:67:6: warning: no previous prototype for 'fmi_set_pins' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-isa: get rid of warning: no previous prototypeMauro Carvalho Chehab2012-10-27
| | | | | | | | drivers/media/radio/radio-isa.c:194:24: warning: no previous prototype for 'radio_isa_alloc' [-Wmissing-prototypes] drivers/media/radio/radio-isa.c:210:5: warning: no previous prototype for 'radio_isa_common_probe' [-Wmissing-prototypes] drivers/media/radio/radio-isa.c:290:5: warning: no previous prototype for 'radio_isa_common_remove' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-aimslab.c: get rid of warning: no previous prototypeMauro Carvalho Chehab2012-10-27
| | | | | | drivers/media/radio/radio-aimslab.c:85:6: warning: no previous prototype for 'rtrack_set_pins' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drivers/media: Remove unnecessary semicolonPeter Senna Tschudin2012-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p << r1.p; p1 << r1.p1; @@ if p[0].line != p1[0].line_end: cocci.include_match(False) @@ position r1.p; @@ -;@p // </smpl> [mchehab@redhat.com: some hunks got bitroted; applied only the ones that succeeds] Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> [crope@iki.fi: For my drivers a8293, af9013, af9015, af9035] Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drivers/media/radio/si4713-i2c.c: removes unnecessary semicolonPeter Senna Tschudin2012-10-06
| | | | | | | | removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-si470x: convert struct i2c_msg initialization to C99 formatShubhrajyoti D2012-09-27
| | | | | | | | | Convert the struct i2c_msg initialization to C99 format. This makes maintaining and editing the code simpler. Also helps once other fields like transferred are added in future. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7706h: convert struct i2c_msg initialization to C99 formatShubhrajyoti D2012-09-27
| | | | | | | | | Convert the struct i2c_msg initialization to C99 format. This makes maintaining and editing the code simpler. Also helps once other fields like transferred are added in future. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-tea5764: convert struct i2c_msg initialization to C99 formatShubhrajyoti D2012-09-27
| | | | | | | | | Convert the struct i2c_msg initialization to C99 format. This makes maintaining and editing the code simpler. Also helps once other fields like transferred are added in future. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio drivers: in non-blocking mode return EAGAIN in hwseekHans Verkuil2012-09-26
| | | | | | | | | VIDIOC_S_HW_FREQ_SEEK should return EAGAIN when called in non-blocking mode. This might change in the future if we add support for this in the future, but right now this is not supported. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: make vidioc_s_modulator constHans Verkuil2012-09-26
| | | | | | | | | Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_modulator. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: make vidioc_s_audout constHans Verkuil2012-09-26
| | | | | | | | | Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_audout. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: make vidioc_s_audio constHans Verkuil2012-09-26
| | | | | | | | | Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_audio. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: make vidioc_s_freq_hw_seek constHans Verkuil2012-09-26
| | | | | | | | | Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_freq_hw_seek. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] shark,shark2: declare resume/suspend functions as staticMauro Carvalho Chehab2012-09-13
| | | | | | | | | | | drivers/media/radio/shark2.o: In function `_GLOBAL__sub_I_65535_0_usb_shark_suspend': drivers/media/radio/radio-shark2.c:344: multiple definition of `usb_shark_suspend' drivers/media/radio/radio-shark.o:/home/v4l/v4l/patchwork/drivers/media/radio/radio-shark.c:379: first defined here drivers/media/radio/shark2.o: In function `usb_shark_resume': drivers/media/radio/radio-shark2.c:349: multiple definition of `usb_shark_resume' drivers/media/radio/radio-shark.o:/home/v4l/v4l/patchwork/drivers/media/radio/radio-shark.c:384: first defined here Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-shark: Add support for suspend & resumeHans de Goede2012-09-13
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-shark2: Add support for suspend & resumeHans de Goede2012-09-13
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-tea5777: Add support for tuning AMHans de Goede2012-09-13
| | | | | | | | | This completes my work on the Griffin radioSHARK2 driver, let me use this opportunity to thank Hisaaki Shibata for his generous donation of a Griffin radioSHARK2 to me, which has made this driver possible. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-tea5777.c: Get rid of do_div usageHans de Goede2012-09-13
| | | | | | | | | | freq fits easily into 32 bits until it gets shifted, so make it 32 bits, and cast it to 64 bits before shifting. [mchehab@redhat.com: also remove asm/div64.h header, as this is not needed anymore] Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] snd_tea575x: Add support for tuning AMHans de Goede2012-09-13
| | | | | | | | | | Add support for tuning AM (on devices with the necessary additional hardware components), and advertise the available bands using the new VIDIOC_ENUM_FREQ_BANDS ioctl. Signed-off-by: Hans de Goede <hdegoede@redhat.com> CC: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Merge tag 'v3.6-rc3' into staging/for_v3.7Mauro Carvalho Chehab2012-08-24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux 3.6-rc3 * tag 'v3.6-rc3': (764 commits) Linux 3.6-rc3 task_work: add a scheduling point in task_work_run() fs: fix fs/namei.c kernel-doc warnings eventpoll: use-after-possible-free in epoll_create1() vfio: grab vfio_device reference *before* exposing the sucker via fd_install() vfio: get rid of vfio_device_put()/vfio_group_get_device* races vfio: get rid of open-coding kref_put_mutex introduce kref_put_mutex() vfio: don't dereference after kfree... fbcon: fix race condition between console lock and cursor timer (v1.1) mm: compaction: Abort async compaction if locks are contended or taking too long mm: have order > 0 compaction start near a pageblock with free pages rapidio/tsi721: fix unused variable compiler warning rapidio/tsi721: fix inbound doorbell interrupt handling drivers/rtc/rtc-rs5c348.c: fix hour decoding in 12-hour mode mm: correct page->pfmemalloc to fix deactivate_slab regression drivers/rtc/rtc-pcf2123.c: initialize dynamic sysfs attributes mm/compaction.c: fix deferring compaction mistake drivers/misc/sgi-xp/xpc_uv.c: SGI XPC fails to load when cpu 0 is out of IRQ resources string: do not export memweight() to userspace ...
| * [media] radio-shark2: Only compile led support when CONFIG_LED_CLASS is setHans de Goede2012-08-12
| | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] radio-shark: Only compile led support when CONFIG_LED_CLASS is setHans de Goede2012-08-12
| | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] radio-shark*: Call cancel_work_sync from disconnect rather then releaseHans de Goede2012-08-12
| | | | | | | | | | | | | | This removes the need for shark_led_work to take the v4l2 lock. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] radio-shark*: Remove work-around for dangling pointer in usb intfdataHans de Goede2012-08-12
| | | | | | | | | | | | | | | | | | Recent kernels properly clear the usb intfdata pointer when another driver fails to bind (in the radio-shark* case the usbhid driver would try to bind first. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] si470x: v4l2-compliance fixesHans Verkuil2012-08-11
| | | | | | | | | | | | | | | | | | | | | | Just a few fixes for problems found after updating v4l2-compliance to check the frequency band enumeration. Note that the i2c driver doesn't fill in bus_info, but since I can't test that driver I've decided not to fix that. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] radio-tea5777: use library for 64bits divMauro Carvalho Chehab2012-07-31
| | | | | | | | | | | | | | | | | | | | drivers/built-in.o: In function `radio_tea5777_set_freq': radio-tea5777.c:(.text+0x4d8704): undefined reference to `__udivdi3' Reported-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Hans de Goede <hdegoede@redhat.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] radio-shark2: use %*ph to print small buffersAndy Shevchenko2012-08-13
| | | | | | | | | | Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] drivers/media/radio/radio-si4713.c: use devm_ functionsJulia Lawall2012-08-13
| | | | | | | | | | | | | | | | | | | | The various devm_ functions allocate memory that is released when a driver detaches. This patch uses these functions for data that is allocated in the probe function of a platform device and is only freed in the remove function. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] drivers/media/radio/radio-wl1273.c: use devm_ functionsJulia Lawall2012-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | The various devm_ functions allocate memory that is released when a driver detaches. This patch uses these functions for data that is allocated in the probe function of a platform device and is only freed in the remove function. In two cases, the original memory allocation function was kmalloc, which has been changed to a zeroing allocation to benefit from the devm function. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] drivers/media/radio/radio-timb.c: use devm_ functionsJulia Lawall2012-08-13
| | | | | | | | | | | | | | | | | | | | The various devm_ functions allocate memory that is released when a driver detaches. This patch uses these functions for data that is allocated in the probe function of a platform device and is only freed in the remove function. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] wl128x: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil2012-08-09
| | | | | | | | | | | | | | | | Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] radio-tea5777: use library for 64bits divMauro Carvalho Chehab2012-07-31
|/ | | | | | | | | | drivers/built-in.o: In function `radio_tea5777_set_freq': radio-tea5777.c:(.text+0x4d8704): undefined reference to `__udivdi3' Reported-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Hans de Goede <hdegoede@redhat.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-si470x: Add support for the new band APIsHans de Goede2012-07-30
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-si470x: Fix band selectionHans de Goede2012-07-30
| | | | | | | | The mask was wrong resulting in band 0 and 1 always ending up as band 0 in the register. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-si470x: restore ctrl settings after suspend/resumeHans de Goede2012-07-30
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-cadet: implement frequency band enumerationHans Verkuil2012-07-30
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-cadet: fix RDS handlingHans Verkuil2012-07-30
| | | | | | | The current RDS code suffered from bit rot. Clean it up and make it work again. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-cadet: upgrade to latest frameworksHans Verkuil2012-07-30
| | | | | | | | | | - add control framework - use core locking - use V4L2_TUNER_CAP_LOW - remove volume support: there is no hardware volume control Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-si470x: Lower firmware version requirementsHans de Goede2012-07-30
| | | | | | | | | Testing with a firmware version 12 usb radio stick has shown version 12 to work fine too. Reported-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] shark2: New driver for the Griffin radioSHARK v2 USB radio receiverHans de Goede2012-07-30
| | | | | | | | | | | | 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>
* [media] radio-si470x: Lower firmware version requirementsHans de Goede2012-07-30
| | | | | | | | With the changes from the previous patches device firmware version 14 + usb microcontroller software version 1 works fine too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-si470x: Lower hardware freq seek signal tresholdHans de Goede2012-07-30
| | | | | | | | The previous value made hardware freq seek not work for me, despite having good reception of almost all Dutch radio stations. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-si470x: Always use interrupt to wait for tune/seek completionHans de Goede2012-07-30
| | | | | | | | | | | | Since USB receives STATUS_RSSI updates through the interrupt endpoint, there is no need to poll with USB, so get rid of the polling. Note this also changes the order in which the probing of USB devices is done, to avoid si470x_set_chan getting called before the interrupt endpoint is being monitored. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-si470x: Don't unnecesarily read registers on G_TUNERHans de Goede2012-07-30
| | | | | | | | | | | | | | | | | | | | | | Reading registers from the pcear USB dongles with the si470x causes a loud pop (and an alsa buffer overrun). Since most radio apps periodically call G_TUNER to update mono/stereo, signal and afc status this leads to the music . pop . music . pop . music -> not good. On the internet there is an howto for flashing the pcear with a newer firmware from the silabs reference boardto fix this, but: 1) This howto relies on a special version of the driver which allows firmware flashing 2) We should try to avoid the answer to a bug report being upgrade your firmware, if at all possible 3) Windows does not suffer from the pop sounds After a quick look at the driver I found at that the register reads are not necessary at all, as the device gives us the necessary status through usb interrupt packets, and the driver already uses these! Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>