Linux S-video output on Mobility Radeon 7500

25 September 2008

For ages, I have been trying to get S-video output on my Mobility Radeon 7500 (driver radeon) in Linux with no success.

From some initial Googling, I nearly died when I found out I’d have to compile some GATOS driver to get some form of TV-out. Today, however, I stumbled across a set of three commands that worked for me with no such recompiling necessary:

xrandr --addmode S-video 800x600
xrandr --output S-video --mode 800x600
xrandr --output S-video --set tv_standard pal 

Those instructions only apply to RandR 1.2–powered boxes (i.e. Ubuntu 8.04 and above) — if you have an earlier version, I have no idea what to do. Upgrade.

The above code will set your TV-out to 800⨯600. For some reason, 640⨯480 does not work for me.

BlueAnt X5 Bluetooth dongle easter egg

14 September 2008

In January, I wrote about my BlueAnt X5 Bluetooth headset, which I’ve been very happy with.

The headset comes with an “audio streamer” dongle, which comes with an audio jack you can plug into your PC or MP3 player, and it will stream the audio from the jack over Bluetooth to the headset, which means you can use your headset with devices that don’t support Bluetooth. The audio streamer dongle comes with a USB port on the side, which is used for charging the built-in battery.

Well, today, I plugged in my audio streamer into my PC to charge it as usual. However, I also accidentally held the button on the side of the dongle for a long time while plugging it in. Interestingly, the LED status light blinked quite rapidly, and a Bluetooth popup on my computer came up: “Device rillian has been made connectable.”

Excitedly, I checked lsusb, and indeed, the audio streamer was acting as an ordinary Bluetooth dongle!

jeremy@rillian:~$ lsusb
Bus 001 Device 016: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

When I had plugged it in other times, it had never shown up as a dongle, i.e. it was only ever in a “charging” mode with no functionality.

So, if you have a BlueAnt X5, and want a free Bluetooth dongle, here’s all you have to do:

  1. Make sure the audio streamer is turned off. (Remove the battery to be sure.)
  2. Hold down the button on the side while plugging the dongle (the audio streamer, not the actual headset) into your PC (not into the standalone wall charger).
  3. When the lights stop flashing, let go of the button. You should now see your Bluetooth dongle pop up on your computer. (Windows users may need drivers.)

That’s all there is! Free Bluetooth dongle!

Wiring the virtual to the physical

30 January 2008

Just saw a great talk by Jonathan Oxer, titled Hardware / Software Hacking: Joining Second Life to the Real World. Jonathan went along the lines of last year’s talk, where he did some wiring of switches to his parallel port, and read the values with scripts written in languages such as Perl, C, and even PHP.

This year, he has wired up those devices to Second Life, and allowed virtual people to interact with those physical devices.

Awesome talk, and if you missed it, it’s highly recommended you see the video (part A, part B — Ogg Theora).

Unwired

25 January 2008

A couple of weeks ago, I bought a Bluetooth headset: the BlueAnt X5.

I’ve been very happy with it — audio quality is clear, and the headset has very good battery life. Also, the headset has a detachable microphone, which allows me once again to use Skype and other VoIP stuff. (I’ve been trying to compile Mumble with not much success. I suspect they’re not properly supporting the amd64 architecture.)

The headset comes with an “audio streamer”, which is basically a small device that can stream audio from a cable to the Bluetooth headset. This means you can use the X5 headset with not just Bluetooth-enabled computers, but anything that has an audio cable coming out of it. The advantage of this is that you can use it with a computer without having to fiddle with configuration on the operating system. You just plug your speaker cable into the streamer. I haven’t tried it, but I suspect the audio streamer will be happy to stream audio to other headsets, not just the X5.

Today, Dad brought home a no-name USB Bluetooth dongle (lsusb reports it as 0e5e:6622) that works beautifully out-of-the-box in Ubuntu Hardy. I’ve been working on getting the headset communicating directly to the computer without the use of the audio streamer. I installed the bluetooth-alsa package, which contains some useful documentation at /usr/share/doc/bluetooth-alsa. It’s highly recommended you have a read of the documentation if you want to get A2DP working in Ubuntu. It basically involves a bit of copy-and-pasting into config files.

For getting PulseAudio working with A2DP, first you will want to get the a2dpd daemon running. Depending on how you’ve set up your ~/.asoundrc, you should have an ALSA device called a2dpd. To get PulseAudio to see this device, you’ll need to enter this into the terminal:

$ pactl load-module module-alsa-sink sink_name=a2dpd device=a2dpd

I tried to get this working automatically by putting it in /etc/pulse/default.pa, but PulseAudio segfaulted on startup. I tried asking on #pulseaudio, but they’re always asleep whenever I ask. That’s the trouble with living in Australia. My mistake. You have to make sure you load module-hal-detect before module-alsa-sink. Works beautifully now.

If anyone has any tips for Bluetooth in PulseAudio, I’d be glad to hear it.

GL Performance on XRandR

22 January 2008

Dear LazyWeb, can you tell me why when I run glxgears, I get around 10000fps, but when I rotate the screen with XRandR, this performance drops to around 1000fps. Additionally, I get lots of tearing when dragging windows around and scrolling.