PulseAudio and Ubuntu 8.04

Evening people!

I have been running ubuntu 8.04 on my main system since the alpha releases (And what a stable alpha it was to be fair). It was quite fun to watch your OS develop around you day by day, with sometimes hundreds of package updates from one day to the next..

Anyway, today is the day, Ubuntu 8.04 has been released, and since I had no new packages to install (Running on the dev update repository had already updated me last night :P) I decided to have a quick look into one feature I really like in 8.04, PulseAudio.

PulseAudio is a new sound management layer For linux, It sits above the physical sound card and alsa driver, but below the high end codec stacks such as gstreamer, it replaces (in the case of a gnome system) the englightened sound daemon (ESD) and so any app that uses ESD (most) will automatically get routed through PulseAudio without knowing.

Pulse audio then allows some very cool new features, which has been holding the audio side of linux back for a long time.

For example, you can: (and I must mention, VERY easily)

  • Control each program’s sound output (volume / route) individually
  • Move audio to a different output card without having to stop / re-open the application.
  • Duplicate audio out of numerous soundcards
  • Even send a particular audio stream to another machine running pulse audio on your network with two clicks of a mouse.

All in all, very impressive. Ubuntu uses PulseAudio as default in 8.04, so not much to do on the setup side, you will however, want to apt-get ‘paman’ ‘paprefs’ ‘pavucontrol’ and ‘pavumeter’:

sudo apt-get install paman paprefs pavucontrol pavumeter

This will give you some decent gui’s to control these pulseaudio advance features (like re-routing audio streams and controlling volume levels per application).

(Before the ‘ewww… GUI’s’ argument starts.. this is meant to be a DESKTOP system remember!)

Anyway.. does it work… Damn right it does, here is a screenshot of pulseaudio instantly detecting three different audio streams and what applications they are from, and letting me control the volumes of each independently.

PulseAudio rocks!

(click for larger image)

Next task on the list is moving audio streams from one desktop to another on the same network, the pulseaudio servers can be setup to detect each other in paprefs.. I doubt this is going to take very long or be very hard! Rock on!


EDIT: plugged USB headset in, right-clicked an audio stream in pavucontrol, and clicked the USB soundcard. Instantly audio came to my headphone and not a bean to the speakers. Then I tried ‘simultanious output’ and this worked perfectly too, allowing volume control over the master streams and each substream (one too each output device)

EDIT2: Installed paprefs and pavucontrol on laptop (also running ubuntu 8.04) (Still one of the beta builds… and it’s fixed my laptops suspend to RAM too!!) and ticked ‘make devices network descoverable’ in paprefs…. I now have a movie on my desktop playing through my laptop speakers… and a IP radio station on my laptop playing through my desktop..

No Typing ip addresses, no specifying soundcard port numbers for the sound daemon.. just works!
I’m a *little* paranoid when it comes to net security, so I have my own subnet.. so in this case i’m happy for the sound server to be open.. but looks like it supports auth too!

This is seriously good stuff!


Sun Spots!

A while ago, our boss Paul ordered some ‘Sun Spots’, Tiny little programmable devices running java off a 180Mhz ARM Processor with 4M of flash memory.

They arrived today! and are damn cool! None of us have had a real play with them yet, but it seems you get two full sun spots in one pack, with one ‘base station’ which is basically a sunspot without the top layer of sensors (just the USB port, processor, memory and radio equipment) and can be used to wirelessly control / interact with the other two.

They use IEEE 802.15.4 (2.4Ghz Unlicensed band) as the radio comms link.

The default sunspot’s come built with:

* 2G/6G 3-axis accelerometer
* Temperature sensor
* Light sensor
* 8 tri-color LEDs
* 6 analog inputs
* 2 momentary switches
* 5 general purpose I/O pins
* 4 high current output pins

I have been looking for a way to control the server’s I am going to have to put into the universities data center for my final project next year (As I pretty much need to simulate a whole enterprise network using VM’s) and so these will be perfect!
As I can:
Monitor the server temperature
Have some basic tamper detection via the accelerometer
Use the general purpose IO pins for power on/off/reset of the servers

I also wonder whether I could use the I/O pins to create a serial port via the sunspot for console…

And hopefully all wirelessly with the ‘base station’ on a management host on the other side of the room!

Coding java suddenly became fun 😛



I have wheels again!!!

Back in the south now, with a damn nice metallic black 1.8 focus zetec.
Just been to halfords to pick up a couple of bits to mend some minor niggles:

  • Whoever installed the sony cd/mp3 player didnt have the ford antenna converter, and so used a crappy peice of wire instead, got the correct connector at halfords and the radio quality is now amazing.
  • Ford steering column radio control did not work with sony cd/mp3 player. Sniped a converter off ebay that sit’s in the radio wireing loom behind the radio and converts the signals and makes it all work.. it does, damn well!
  • Back windscreen washer pipe had come off nozzle, was spraying water into the boot door, got some star keys at halfords and took off the rear break light assembly, couple of tie wraps later and we are sorted.

Could not be happier with this car, looks good, drives damn nicley, decent amount of power, and the aircon works!!

Have a gander:
New car!

More photo’s on flickr at www.flickr.com/photos/trxuk


Placement Presnetation

Placement Presnetation

Originally uploaded by TrX07

Hello from the sunny north! Came home for a few days to do a placement presentation to first and second year students on my course.
The student’s and tutors then mark these presentations (Done by every student within computer science that is on a placement this year) and this mark then counts towards our degree.

Sam was also down from swindon to do his presentation, and then it was off to the NEW PUB! on campus to meet concons and joejoe!

One more uni related use of my time out of the way!

Dynamically routed snow

Once again, many days have gone by, and no posts. There is still a LOT of stuff i need to blogify, but with current coursework, work, placement presentations and other such joyous stuff, I just have not had the time..

This however, required a mention!
On saturday, Martin was telling me about the features of the switch he has bought (L3 Gigabit, 3com, pretty nice)  and mentioned it supported OSPF. As mine, Martins and Daves crazy LAN topologies are linked using VPN’s, I have been wanting to impliment some dynamic routing for a while (As having to add eachothers routes when someone decides they need a new subnet is VERY tedious)

So out came quagga (emerge quagga) an implimentation of OSPF2 (and rip2, ospf3, ripng, bgp) for *nix.
Martin would also have to run this on his debian tunnel endpoint, however the OSPF area could then be extended to the switch, allowing his L3 switch to become his default gateway for his lan, and dynamically know where all our subnets were, even if one of us added a new one without telling anyone else.

The config started out slow, with me printing the quagga docs (hate reading on a screen), but these turned out to be more a command reference than a guide, and so we busked it.

A couple of minor routing loops later:

  • One because we had not removed the static routes for each other before enabling OSPF.
  • The second because OSPF was distributing my locally terminated public IP that martin’s VPN connected down, and so OpenVPN at his end saw this local route to my public IP, and tried to send the tunnel establishing UDP packets down it’s own tunnel interface.. which soon collapsed in on itself :P.
    I soon noticed this with wireshark and masked OSPF from advertising that route.

After this, everything worked! and many repetitions of ‘epic win’ were enjoyed.

Today, we contacted dave and got him quagga’d up.. This time the whole process took maybe 10 mins, including firewall rules for daves OSPF traffic (i’m a little paranoid)

Updates of subnets accross the whole atonomous system are sub second. This rocks!

If anyone wants my notes on ospf quagga setup please let me know.
It works!!

In other news today, it snowed here in fleet. Looky:
Front - Over hedge

That’s all for now, off to do some more coursework 🙁