Skip to contentSkip to conversation

radio-si470x: add support for kworld usb-radio

PATCH In review Alexey Klimov 3 participants 4 messages Oct 19, 2008 – Oct 21, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 radio-si470x: add support for kworld usb-radio

Hello, all

Few days ago i bought usb-radio, produced by KWorld.
It's called KWorld USB FM Radio SnapMusic Mobile 700 (FM700). Link on the site:
http://www.kworld-global.com/main/prod_in.aspx?mnuid=1306&modid=10&pcid=74&ifid=17&prodid=106
(if link isn't work may be it's better to find it on the site or google it)

There is chip in there named "silabs something", so i tried to add support in Tobias' driver radio-si470x. Have success. Works fine with kradio and gnomeradio under 2.6.27-git5 kernel. Thanks Tobias for consideration.
(Tobias, if you want that patch change version of driver just ask and i can re-make the patch)

I think it's not critical right now, i used "arecord -D hw:2,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B -" and periodically get "underrun" messages:
tux ~ # arecord -D hw:2,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B - Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo underrun!!! (at least 12480.157 ms long)
underrun!!! (at least 1009.733 ms long)
underrun!!! (at least 752.946 ms long)
underrun!!! (at least 1009.364 ms long)
underrun!!! (at least 1008.390 ms long)
underrun!!! (at least 757.369 ms long)
...

So, we have two patches. Patches attached to letter. Patch that touches HID-subsystem is created to be applied against -git tree on kernel.org.

1)
radio-si470x: add support for kworld usb radio

This patch add support for new device named KWorld USB FM Radio SnapMusic Mobile 700 (FM700).
And changes few lines in comments.

2)
HID: Don't allow KWorld radio fm700 be handled by usb hid drivers

This device is already handled by radio-si470x driver, and we therefore want usbhid to ignore it.

Signature · 1 line
Best regards, Klimov Alexey
linux/drivers/media/radio/radio-si470x.c +6 -0
diff -r 47a53673429b linux/drivers/media/radio/radio-si470x.c
@@ -4,6 +4,7 @@
  *  Driver for USB radios for the Silicon Labs Si470x FM Radio Receivers:
  *   - Silicon Labs USB FM Radio Reference Design
  *   - ADS/Tech FM Radio Receiver (formerly Instant FM Music) (RDX-155-EF)
+ *   - KWorld USB FM Radio SnapMusic Mobile 700 (FM700)
  *
  *  Copyright (c) 2008 Tobias Lorenz <[email protected]>
  *
@@ -105,6 +106,9 @@
  *		- afc indication
  *		- more safety checks, let si470x_get_freq return errno
  *		- vidioc behavior corrected according to v4l2 spec
+ * 2008-10-20	Alexey Klimov <[email protected]>
+ * 		- add support for KWorld USB FM Radio FM700
+ * 		- blacklisted KWorld radio in hid-core.c and hid-ids.h
  *
  * ToDo:
  * - add firmware download/update support
@@ -146,6 +150,8 @@
 	{ USB_DEVICE_AND_INTERFACE_INFO(0x10c4, 0x818a, USB_CLASS_HID, 0, 0) },
 	/* ADS/Tech FM Radio Receiver (formerly Instant FM Music) */
 	{ USB_DEVICE_AND_INTERFACE_INFO(0x06e1, 0xa155, USB_CLASS_HID, 0, 0) },
+	/* KWorld USB FM Radio SnapMusic Mobile 700 (FM700) */
+	{ USB_DEVICE_AND_INTERFACE_INFO(0x1b80, 0xd700, USB_CLASS_HID, 0, 0) },
 	/* Terminating entry */
 	{ }
 };
linux/drivers/hid/hid-core.c +1 -0
diff -r 47a53673429b linux/drivers/hid/hid-core.c
@@ -1264,6 +1264,7 @@
 	{ HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_SK8115) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER) },
linux/drivers/hid/hid-ids.h +3 -0
diff -r 47a53673429b linux/drivers/hid/hid-ids.h
@@ -248,6 +248,9 @@
 #define USB_VENDOR_ID_KBGEAR		0x084e
 #define USB_DEVICE_ID_KBGEAR_JAMSTUDIO	0x1001
 
+#define USB_VENDOR_ID_KWORLD		0x1b80
+#define USB_DEVICE_ID_KWORLD_RADIO_FM700	0xd700
+
 #define USB_VENDOR_ID_LABTEC		0x1020
 #define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD	0x0006
 

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#1 lore raw

Hi Alexey,

Quoted 6 lines

There is chip in there named "silabs something", so i tried to add support in Tobias' driver radio-si470x. Have success. Works fine with kradio and gnomeradio under 2.6.27-git5 kernel. Thanks Tobias for consideration.
(Tobias, if you want that patch change version of driver just ask and i can re-make the patch)

Very nice patch. Approved.

Quoted 3 lines

I think it's not critical right now, i used "arecord -D hw:2,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B -" and periodically get "underrun" messages:

I have the same problems with the usbaudio or snd-usb-audio drivers. Maybe we should get in contact with them. But I don't want to open another building site for me.

Quoted 3 lines

So, we have two patches. Patches attached to letter. Patch that touches HID-subsystem is created to be applied against -git tree on kernel.org.

Mauro can you apply the two patches in v4l-dvb?

Thanks,
Toby

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#2 lore raw
Quoted 15 lines · On Tue, 21 Oct 2008 14:45:28 +0200 Tobias Lorenz <[email protected]> wrote:

Hi Alexey,

Quoted 6 lines

There is chip in there named "silabs something", so i tried to add support in Tobias' driver radio-si470x. Have success. Works fine with kradio and gnomeradio under 2.6.27-git5 kernel. Thanks Tobias for consideration.
(Tobias, if you want that patch change version of driver just ask and i can re-make the patch)

Very nice patch. Approved.

Quoted 3 lines

I think it's not critical right now, i used "arecord -D hw:2,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B -" and periodically get "underrun" messages:

Quoted 7 lines

I have the same problems with the usbaudio or snd-usb-audio drivers. Maybe we should get in contact with them. But I don't want to open another building site for me.

Quoted 3 lines

So, we have two patches. Patches attached to letter. Patch that touches HID-subsystem is created to be applied against -git tree on kernel.org.

Mauro can you apply the two patches in v4l-dvb?

Sure. Could you send me your acked-by?

Quoted 3 lines

Thanks,
Toby

Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

Acked-by
#3 lore raw

Hi,

Quoted 11 lines
Quoted 9 lines
Quoted 7 lines

There is chip in there named "silabs something", so i tried to add support in Tobias' driver radio-si470x. Have success. Works fine with kradio and gnomeradio under 2.6.27-git5 kernel. Thanks Tobias for consideration.
So, we have two patches. Patches attached to letter. Patch that touches HID-subsystem is created to be applied against -git tree on kernel.org.

Mauro can you apply the two patches in v4l-dvb?

Sure. Could you send me your acked-by?

Bye,
Toby

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list