Author Topic: [SOLVED] PCLOS support for Keene USB RF Transmitter  (Read 942 times)

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 93
[SOLVED] PCLOS support for Keene USB RF Transmitter
« on: December 27, 2012, 04:55:04 PM »
I am just wondering if the Keene USB RF Transmitter (http://www.keene.co.uk/electronics/multi.php?mycode=USBFMT) is supported in PCLinuxOS. I know the website says that a linux driver for this device will appear in linux kernel 3.4. Since we still do not have a 3.4.x kernel in the repos, what does that mean for the 3.2.x kernel?
« Last Edit: January 06, 2013, 11:39:34 AM by AnotherUser »

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11064
  • MLUs Forever!
Re: PCLOS support for Keene USB RF Transmitter
« Reply #1 on: December 27, 2012, 04:56:45 PM »
I am just wondering if the Keene USB RF Transmitter (http://www.keene.co.uk/electronics/multi.php?mycode=USBFMT) is supported in PCLinuxOS. I know the website says that a linux driver for this device will appear in linux kernel 3.4. Since we still do not have a 3.4.x kernel in the repos, what does that mean for the 3.2.x kernel?


3.4.11 is in the testing section if you want to try it.

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 93
Re: PCLOS support for Keene USB RF Transmitter
« Reply #2 on: December 27, 2012, 05:06:07 PM »
3.4.11 is in the testing section if you want to try it.

And how might one go about doing that? Also, I am not sure what it means for this driver to be in the 3.4 kernel; will the correct module be automatically be loaded when I plug in this USB device? I don't have the hardware yet, so I am just trying to understand what I'm getting myself into.

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11064
  • MLUs Forever!
Re: PCLOS support for Keene USB RF Transmitter
« Reply #3 on: December 27, 2012, 05:28:00 PM »
3.4.11 is in the testing section if you want to try it.

And how might one go about doing that?

By adding   testing   to the repository sections in Synaptic

Quote
Also, I am not sure what it means for this driver to be in the 3.4 kernel; will the correct module be automatically be loaded when I plug in this USB device? I don't have the hardware yet, so I am just trying to understand what I'm getting myself into.

Quote
Your computer will see the device as another sound card

If the above is correct it would imply that you can send the sound stream from your audio application to the transmitter and so should be a simple enough procedure - if the driver is in the kernel as you said.

Probably it would be easiest to have PulseAudio installed and working first as it provides a simple GUI for managing sound streams.

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 93
Re: PCLOS support for Keene USB RF Transmitter
« Reply #4 on: December 27, 2012, 05:37:10 PM »
Quote
Your computer will see the device as another sound card

If the above is correct it would imply that you can send the sound stream from your audio application to the transmitter and so should be a simple enough procedure - if the driver is in the kernel as you said.

Probably it would be easiest to have PulseAudio installed and working first as it provides a simple GUI for managing sound streams.


I do have PulseAudio, so I'm not worried about that. I am concerned that the 3.4.11 kernel that is in testing does not have that driver built or that something else will go wrong. What will be my troubleshooting process? lsmod? modprobe? lsusb?

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11064
  • MLUs Forever!
Re: PCLOS support for Keene USB RF Transmitter
« Reply #5 on: December 27, 2012, 06:19:09 PM »
I *think* the module will need to be built .......  at least I don't see it available in PCLOS yet .....  but I hope someone who knows about this stuff will comment.

http://cateee.net/lkddb/web-lkddb/USB_KEENE.html

http://lxr.free-electrons.com/source/drivers/media/radio/radio-keene.c

https://github.com/kenchy/keene-usb-audio
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 93
Re: PCLOS support for Keene USB RF Transmitter
« Reply #6 on: December 28, 2012, 12:12:17 PM »
Thanks for that info. I have no problem building my own drivers if that's what it's going to come down to.

P.S. I checked the testing section and the only 3.4.11 kernel flavor there is a BFS build. I would want a PAE+BFS. Any ideas when that will hit either testing or the stable repos?

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3892
Re: PCLOS support for Keene USB RF Transmitter
« Reply #7 on: December 28, 2012, 02:02:09 PM »
I am working on a pae.bfs build, but it is not building yet. It´ll be ready soon, I hope. ;)

Galen

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 93
Re: PCLOS support for Keene USB RF Transmitter
« Reply #8 on: December 28, 2012, 02:30:20 PM »
I am working on a pae.bfs build, but it is not building yet. It´ll be ready soon, I hope. ;)

Galen



Thanks! Since you are building the kernel, can you please build it with CONFIG_USB_KEENE (see http://cateee.net/lkddb/web-lkddb/USB_KEENE.html)? That will save me some headaches to build that driver myself :-)

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3892
Re: PCLOS support for Keene USB RF Transmitter
« Reply #9 on: December 28, 2012, 05:17:11 PM »
I probably need to build the driver before that option is available. I´ll take a look at it.

Galen

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 93
[SOLVED]: PCLOS support for Keene USB RF Transmitter
« Reply #10 on: January 06, 2013, 11:39:13 AM »
In part for my own documentation, and in part for others' benefit, I wanted to document how I got everything working. In short, it's actually rather easy.

The first step is to simply plug in the Keene FM Transmitter into a USB port. The device is automatically detected as a USB sound device. If you start PulseAudio Volume Control (from terminal, run pavucontrol), you will now see a new Output Device called B-LINK USB Audio.  However, this will not give you any controls for the FM Transmitter. Getting access to that differs depending on which kernel version you have.

(don't know minimum, but 3.2.18 works) <= Kernel Version < 3.4.x
  • In Synaptic, make sure you have libusb-compat-devel (the appropriate version).
  • Get the Keene Controls program from http://mister-muffin.de/keene/ (all you need is Makefile and keenectl.c)
  • Compile Keene Control program by running make. Compilation is very fast. When done, you should have a keenectl executable. This is a command line only tool. Unfortunately, the only documentation for how to use this tool is only the developer's webpage (http://blog.mister-muffin.de/2011/03/14/keene-fm-transmitter/). I used the default settings to transmit on 88.1 FM using ./keenectl 0 50us stereo 88.1f 120 enable unmute

3.4.x<= Kernel Version < 3.7.1
  • The kernel source code comes with a proper v4l2 based driver for Keene FM Transmitter. It is located in drivers/media/radio/radio-keene.c and can be enabled in the kernel build as a module using CONFIG_USB_KEENE which can be accessed from Device Drivers --> Multimedia Support --> AM/FM Radio receivers/transmitters support and then enabling the Radio Adapters --> Keene FM transmitter.
  • Plug in the Keene FM Transmitter into a USB port. From a terminal, run lsmod | grep keene and you should see the presence of the radio_keene module.
  • At this point, you can run dmesg | grep keene to confirm that v4l2 has indeed create a device for you. In my case, I get radio-keene 3-1:1.2: V4L2 device registered as radio0 and therefore, I also see /dev/radio0.
  • Knowing this, I can now control the FM transmitter settings using the standard v4l2-ctl program
    • To set the transmitter frequency, simply run v4l2-ctl -d /dev/radio0 --set-freq=88.1
    • To be able to control other settings, you first have to find out their names. Do this by running v4l2-ctl -d /dev/radio0 --all -L. Then to change the desired control, run v4l2-ctl -d /dev/radio0 -c controlName=controlValue, where controlName and controlValue correspond to whatever control you are trying to tweak (i.e. mute=1)

3.7.1 <= Kernel Version < (when will the patch be incorporated)?
It turns out that 3.7.1 changed its V4L2 interface just a bit. Unfortunately, the Keene driver still compiles, but you cannot change the transmitter frequency without first applying a patch. (see http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/58934 for more detail, see below for actual patch).
Code: [Select]
diff --git a/drivers/media/radio/radio-keene.c b/drivers/media/radio/radio-keene.c
index e10e525..296941a 100644
--- a/drivers/media/radio/radio-keene.c
+++ b/drivers/media/radio/radio-keene.c
@@ -374,6 +374,7 @@ static int usb_keene_probe(struct usb_interface *intf,
        radio->vdev.ioctl_ops = &usb_keene_ioctl_ops;
        radio->vdev.lock = &radio->lock;
        radio->vdev.release = video_device_release_empty;
+       radio->vdev.vfl_dir = VFL_DIR_TX;
 
        radio->usbdev = interface_to_usbdev(intf);
        radio->intf = intf;
After applying this patch, the rest of the process is identical to the 3.4.x kernel flow.
« Last Edit: January 06, 2013, 11:43:38 AM by AnotherUser »

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11064
  • MLUs Forever!
Re: [SOLVED] PCLOS support for Keene USB RF Transmitter
« Reply #11 on: January 06, 2013, 12:19:04 PM »
Thanks for posting the details  ;)

....  and glad to see you got it all working  :D

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3892
Re: [SOLVED] PCLOS support for Keene USB RF Transmitter
« Reply #12 on: January 13, 2013, 03:30:22 PM »
The next test kernel with have the keene driver built as a module. Look for kernel-3.4.25-1, .bfs, .pae, pae.bfs, etc.

Galen

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 93
Re: [SOLVED] PCLOS support for Keene USB RF Transmitter
« Reply #13 on: January 13, 2013, 03:37:00 PM »
The next test kernel with have the keene driver built as a module. Look for kernel-3.4.25-1, .bfs, .pae, pae.bfs, etc.

Galen

Much obliged! I will try it after I install the new kernel from testing.