Steve's Blog

Multiple PCM streams on Fedora Core (rawhide) using Alsa

Alsa has been a big step forwards for multimedia in Linux over the past few years, however there are still a number of tweaks that need to be done to optimise it fully. One of the things I found today was the capability to play multiple sounds at once. This comes in great when you’re using XMMS to play MP3s and still want to hear noises from programs such as gaim.

To enable this in Fedora Core, a little bit of tweaking is required to make it work. Firstly, you need to edit /etc/asound.conf to contain the following:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
pcm.card0 {
    type hw
    card 0
}

pcm.!default {
    type plug
    slave.pcm "dmixer"
}

pcm.dmixer {
    type dmix
    ipc_key 1025
    slave {
        pcm "hw:0,0"
        period_time 0
        period_size 2048    #1024
        buffer_size 32768   #4096
        #periods 128
        rate 48000          #44100
    }

    bindings {
        0 0
        1 1
    }
}

After doing this, if you use esd in gnome to play the wonderful events such as warning beeps etc, you need to edit /etc/esd.conf to contain something like:

1
2
3
4
5
6
[esd]
auto_spawn=1
spawn_options=-terminate -nobeeps -as 2 -d default
spawn_wait_ms=100
# default options are used in spawned and non-spawned mode
default_options=

After this, reboot your PC, and away you go. Set everything such as gaim to use alsa (you may need to pick “command” and using “aplay %s” to make it work). Everything should be peachy from then on in!

Update: It seems this now works by default and was a bug in the setup for multi-soundcard systems on the particular version I was using during the Fedora 6 testing :)</body></html>

More problems with Powerbooks

Well, as if things weren’t bad enough with all the Superdrive issues that I’ve had, it’s now a possibility that my Powerbooks battery pack may explode. If you haven’t heard already, Apple is recalling around 1.8 million batteries made by Sony and used in Powerbook and iBook laptops.

This means that currently, my 1 year old G4 powerbook has: 3 dead pixels, a faulty SuperDrive, and a battery that could explode. Way to go Apple. At least they’re fixing the battery!

MWRP progress - back from the dead

I decided to start doing some long overdue work on MWRP today. For those that don’t know, MWRP (Short for Melbourne Wireless Router Project) is a package I started writing a while ago to act as a captive portal on a wireless access point. What happens is that someone associates with your access point, it won’t let them onto the net unless they authenticate (or you’ve specifically let them). This allows us to offer free internet access to Melbourne Wireless members (using the Melbourne Wireless server as an authenticaion back end).

So after re-writing the authentication backend twice, and hammering out in the low to mid double digits worth of bugs, it’s all available for everyone to consume :). You can grab the code from the webcvs, or the package or the source code from the web site. More information on what I’ve just said above is on the Melbourne Wireless wiki page. And of course there’s the instructions.

Oh, and It looks like a german wireless group have extended on some of what MWRP does and tailored it for their group. Good stuff guys! and thanks for the credit :)

Ontrak ADU support heads for the mainstream kernel

Version 0.0.13 of the adutux module has been accepted into the gregkh stream of the linux kernel. This means, starting at kernel version 2.6.19, you should see the option to add the adutux module by default in the main linux kernel. This also means that some distros will straight away have support for Ontrak ADU USB devices.

I’d like to thank Greg K-H for all of his help on this one - as there were a lot of changes required that I didn’t know how to do that were fixed by him - as well as making sure the module worked with PPC architecture (I’m a hacker, not a coder:))

The patch will show up here (called usb-adutux-driver.patch) in the next few days, and should be in the mainstream kernel by version 2.6.19. Thanks Greg!

Updated Ontrak ADU howto

It’s been a while since I’ve updated this, and as there are now newer kernels out there that break version 0.0.8 of the patch, I’ve also published v0.0.13 of adutux. It successfully works with linux kernel 2.6.17.7 - so hopefully it should work on any recent kernel. The new guide is available here.