Commit Graph

474 Commits

Author SHA1 Message Date
Hans de Goede be0c44fb48 [media] radio-shark2: Only compile led support when CONFIG_LED_CLASS is set
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-12 13:50:09 -03:00
Hans de Goede 3e3b92cac5 [media] radio-shark: Only compile led support when CONFIG_LED_CLASS is set
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-12 13:50:00 -03:00
Hans de Goede cfc1b2a06f [media] radio-shark*: Call cancel_work_sync from disconnect rather then release
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>
2012-08-12 13:49:44 -03:00
Hans de Goede 820ddfa6ca [media] radio-shark*: Remove work-around for dangling pointer in usb intfdata
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>
2012-08-12 13:49:19 -03:00
Hans Verkuil 3273781068 [media] si470x: v4l2-compliance fixes
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>
2012-08-11 15:41:25 -03:00
Mauro Carvalho Chehab adfe1560de [media] radio-tea5777: use library for 64bits div
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>
2012-07-31 18:24:44 -03:00
Hans de Goede f140612d02 [media] radio-si470x: Add support for the new band APIs
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:23:14 -03:00
Hans de Goede 8d8c1b375c [media] radio-si470x: Fix band selection
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>
2012-07-30 20:23:13 -03:00
Hans de Goede c1af23c4f7 [media] radio-si470x: restore ctrl settings after suspend/resume
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:23:12 -03:00
Hans Verkuil 6652c716a5 [media] radio-cadet: implement frequency band enumeration
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:23:10 -03:00
Hans Verkuil cc0d32665f [media] radio-cadet: fix RDS handling
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>
2012-07-30 20:23:09 -03:00
Hans Verkuil b54c97db7f [media] radio-cadet: upgrade to latest frameworks
- 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>
2012-07-30 20:23:08 -03:00
Hans de Goede db3912c073 [media] radio-si470x: Lower firmware version requirements
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>
2012-07-30 20:22:35 -03:00
Hans de Goede 4faba767c6 [media] shark2: New driver for the Griffin radioSHARK v2 USB radio receiver
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 18:46:17 -03:00
Hans de Goede d9264a0b46 [media] radio-si470x: Lower firmware version requirements
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>
2012-07-30 18:12:12 -03:00
Hans de Goede b966425951 [media] radio-si470x: Lower hardware freq seek signal treshold
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>
2012-07-30 18:11:48 -03:00
Hans de Goede 779471110c [media] radio-si470x: Always use interrupt to wait for tune/seek completion
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>
2012-07-30 18:11:28 -03:00
Hans de Goede 86ef3f78b8 [media] radio-si470x: Don't unnecesarily read registers on G_TUNER
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>
2012-07-30 18:03:14 -03:00
Hans de Goede 8e2ce73e93 [media] radio-shark: New driver for the Griffin radioSHARK USB radio receiver
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:00:32 -03:00
Mauro Carvalho Chehab 724f4a321f [media] media: only show V4L devices based on device type selection
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-07-05 18:22:53 -03:00
Mauro Carvalho Chehab a99817ca60 Merge branch 'v4l_for_linus' into staging/for_v3.6
* v4l_for_linus: (44 commits)
  [media] smia: Fix compile failures
  [media]  Fix VIDIOC_DQEVENT docbook entry
  [media] s5p-fimc: Fix control creation function
  [media] s5p-mfc: Fix checkpatch error in s5p_mfc_shm.h file
  [media] s5p-mfc: Fix setting controls
  [media] v4l/s5p-mfc: added image size align in VIDIOC_TRY_FMT
  [media] v4l/s5p-mfc: corrected encoder v4l control definitions
  [media] v4l: mem2mem_testdev: Fix race conditions in driver
  [media] s5p-mfc: Bug fix of timestamp/timecode copy mechanism
  [media] cxd2820r: Fix an incorrect modulation type bitmask
  [media] em28xx: Show a warning if the board does not support remote controls
  [media] em28xx: Add remote control support for Terratec's Cinergy HTC Stick HD
  [media] USB: Staging: media: lirc: initialize spinlocks before usage
  [media] Revert "[media] media: mx2_camera: Fix mbus format handling"
  [media] bw-qcam: driver and pixfmt documentation fixes
  [media] cx88: fix firmware load on big-endian systems
  [media] cx18: support big-endian systems
  [media] ivtv: fix support for big-endian systems
  [media] tuner-core: return the frequency range of the correct tuner
  [media] v4l2-dev.c: fix g_parm regression in determine_valid_ioctls()
  ...

Conflicts:
	Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
	drivers/media/video/em28xx/em28xx-cards.c
2012-06-27 08:57:09 -03:00
Ondrej Zary 6b39023a36 [media] radio-sf16fmi: Use LM7000 driver
Convert radio-sf16fmi to use generic LM7000 driver.
Tested with SF16-FMI, SF16-FMP and SF16-FMD.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25 11:08:33 -03:00
Ondrej Zary 39cca6b821 [media] radio-aimslab: Use LM7000 driver
Convert radio-aimslab to use generic LM7000 driver.
Tested with Reveal RA300.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25 11:07:50 -03:00
Ondrej Zary 72a770c94d [media] radio: Add Sanyo LM7000 tuner driver
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-06-25 11:07:27 -03:00
Mauro Carvalho Chehab f6d1b15c15 Revert "[media] radio: Add Sanyo LM7000 tuner driver"
This reverts commit 4ecbb69414.

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-25 11:06:59 -03:00
Mauro Carvalho Chehab 8f7fa3c801 Revert "[media] radio-aimslab: Use LM7000 driver"
This reverts commit bece083a6b.

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-25 11:06:54 -03:00
Mauro Carvalho Chehab 6d642d2606 Revert "[media] radio-sf16fmi: Use LM7000 driver"
This reverts commit 1e70a6cf7e.

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-25 11:05:15 -03:00
Ondrej Zary 1e70a6cf7e [media] radio-sf16fmi: Use LM7000 driver
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 12:12:40 -03:00
Ondrej Zary bece083a6b [media] radio-aimslab: Use LM7000 driver
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 12:12:13 -03:00
Ondrej Zary 4ecbb69414 [media] radio: Add Sanyo LM7000 tuner driver
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-06-21 12:12:03 -03:00
Hans Verkuil 54f6019b58 [media] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of EAGAIN
Set the new capability flags in G_TUNER and return ENODATA if no channels
were found.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-18 20:52:51 -03:00
Hans de Goede 5daf53a6eb [media] snd_tea575x: Make the module using snd_tea575x the fops owner
Before this patch the owner field of the /dev/radio# device fops was set to
the snd-tea575x-tuner module itself. Meaning that the module which was using
it could be rmmod-ed while the device is open, and then BAD things happen.

I know, as I found out the hard way :)

Note that there is no need to also somehow increase the refcount of the
snd-tea575x-tuner module itself, since any drivers using it will have
symbolic references to it.

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>
2012-06-11 16:02:54 -03:00
Hans de Goede 110301833d [media] radio/si470x: Add support for the Axentia ALERT FM USB Receiver
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:02:05 -03:00
Ondrej Zary abed623ca5 [media] radio-sf16fmi: add support for SF16-FMD
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 16:10:05 -03:00
Ondrej Zary 3491a88ea0 [media] [resend] radio-sf16fmr2: add PnP support for SF16-FMD2
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-05-20 13:16:00 -03:00
Arnd Bergmann cd624c7b7c [media] drivers/media: add missing __devexit_p() annotations
Drivers that refer to a __devexit function in an operations
structure need to annotate that pointer with __devexit_p so
replace it with a NULL pointer when the section gets discarded.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 07:53:51 -03:00
Hans Verkuil 6fd522a6d1 [media] radio-si470x-usb: remove autosuspend, implement suspend/resume
The radio-si470x-usb driver supported both autosuspend and it stopped the
radio the moment the last user of the radio device closed it. However, that
was very confusing since if you play the audio from the device (e.g. through
arecord -D ... | aplay) then no sound would play unless you had the radio
device open at the same time, even though there is no need to do anything
with that node.

On the other hand, the actual suspend/resume functions didn't do anything,
which would fail if you *did* have the radio node open at that time.

So:

- remove autosuspend (bad idea in general for USB radio devices)
- move the start/stop out of the open/release functions into the resume/suspend
  functions.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14 13:45:44 -03:00
Hans Verkuil 340bd4c16c [media] radio-si470x-common.c: remove unnecessary kernel log spam
There is no need to report an error in the log, you are already returning
that error to userspace after all.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14 13:44:56 -03:00
Hans Verkuil eae63ae007 [media] si470x: add control event support and more v4l2 compliancy fixes
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14 13:44:35 -03:00
Hans Verkuil 4967d53dbb [media] si470x: Clean up, introduce the control framework
This cleans up the code and si470x now uses the proper v4l2 frameworks
and passes most of the v4l2-compliance tests.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14 13:44:02 -03:00
Hans Verkuil 5126f2590b [media] v4l2-dev: add flag to have the core lock all file operations
This used to be the default if the lock pointer was set, but now that lock is by
default only used for ioctl serialization. Those drivers that already used
core locking have this flag set explicitly, except for some drivers where
it was obvious that there was no need to serialize any file operations other
than ioctl.

The drivers that didn't need this flag were:

drivers/media/radio/dsbr100.c
drivers/media/radio/radio-isa.c
drivers/media/radio/radio-keene.c
drivers/media/radio/radio-miropcm20.c
drivers/media/radio/radio-mr800.c
drivers/media/radio/radio-tea5764.c
drivers/media/radio/radio-timb.c
drivers/media/video/vivi.c
sound/i2c/other/tea575x-tuner.c

The other drivers that use core locking and where it was not immediately
obvious that this flag wasn't needed were changed so that the flag is set
together with a comment that that driver needs work to avoid having to
set that flag. This will often involve taking the core lock in the fops
themselves.

Eventually this flag should go and it should not be used in new drivers.

There are a few reasons why we want to avoid core locking of non-ioctl
fops: in the case of mmap this can lead to a deadlock in rare situations
since when mmap is called the mmap_sem is held and it is possible for
other parts of the code to take that lock as well (copy_from_user()/copy_to_user()
perform a down_read(&mm->mmap_sem) when a page fault occurs).

It is very unlikely that that happens since the core lock serializes all
fops, but the kernel warns about it if lock validation is turned on.

For poll it is also undesirable to take the core lock as that can introduce
increased latency. The same is true for read/write.

While it was possible to make flags or something to turn on/off taking the
core lock for each file operation, in practice it is much simpler to just
not take it at all except for ioctl and leave it to the driver to take the
lock. There are only a handful fops compared to the zillion ioctls we have.

I also wanted to make it obvious which drivers still take the lock for all
fops, so that's why I chose to have drivers set it explicitly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14 09:19:38 -03:00
Hans de Goede a22d85fea8 [media] media/radio: use v4l2_ctrl_subscribe_event where possible
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-07 16:26:32 -03:00
Hans Verkuil 4bd9ff1970 [media] radio-mr800: add hardware seek support
Added hardware seek support based on information gleaned from the
GPLv2 driver available here:
http://sourceforge.net/projects/av-usbradio/

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-07 15:29:40 -03:00
Hans Verkuil 77cf393434 [media] radio-mr800: add support for stereo and signal detection
Thanks to an older driver by Faidon Liambotis <paravoid@debian.org> (as noted
in the radio-mr800 comment block at the start) for figuring out how to get the
signal/stereo state.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-07 15:29:10 -03:00
Hans Verkuil 85578b0fdc [media] radio-mr800: cleanup and have it comply to the V4L2 API
Implement the control framework and update to the latest V4L2 framework.
The v4l2-compliance tool now runs without errors.
Fixed bad g/s_tuner handling with respect to mono/stereo.
Support control events.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-07 15:28:45 -03:00
Hans Verkuil f61861fa56 [media] radio-isa: fix memory leak
If there is an error when creating controls the v4l2_ctrl_handler_free
function must be called.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-07 15:23:31 -03:00
Hans Verkuil ff27cda340 [media] radio-keene: support suspend/resume
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-07 15:23:17 -03:00
Hans Verkuil 5d778648ed [media] dsbr100: clean up and update to the latest v4l2 framework
This driver now complies with the v4l2-compliance tests and uses the v4l2
frameworks correctly.

It has been tested with the radio-keene FM transmitter as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-04 15:01:14 -03:00
Hans Verkuil ee71e7b3ae [media] V4L: fix incorrect refcounting
Both radio-keene and dsbr100 did one v4l2_device_get too many. Thus the refcount
never became 0 and that causes a memory leak.

Also updated the V4L2 framework documentation accordingly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-19 17:23:38 -03:00
Marcos Paulo de Souza af22b83ab8 [media] drivers: media: radio: radio-keene.c: Remove unneeded include of version.h
The output of "make versioncheck" told us that:

drivers/media/radio/radio-keene.c: 31 linux/version.h not needed.

After take a look in the code, we can agree to remove it.

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: <linux-media@vger.kernel.org>
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-19 16:54:16 -03:00