Showing posts with label esd. Show all posts
Showing posts with label esd. Show all posts

Sunday, October 23, 2005

Hoary Is History

Last week I got a new 80GB hard drive. It's nothing special, just an older Maxtor model, but it doubles my internal storage space. GParted allowed me to copy all my data directly from the original HDD to the new one. I planned to resize the Linux partition to take advantage of the freed space, so I booted from the Ubuntu 5.10 Live CD. Yet, even when running from the CD, GParted insisted the Linux swap partition was active. I didn't want to waste time figuring out why and was sufficiently impressed with 5.10 that I decided to simply delete the Linux partition and its swap and install the new version of Ubuntu.

Declaring myself done with 5.04 Hoary, I initiated the 5.10 Breezy installer. I'm impressed. Almost everything worked perfectly from the get-go. ESD continues to cause problems because it monopolizes the sound card, but disabling sounds for events (System -> Preferences -> Sound) seems to be an effective solution. Alternately, you could killall esd before running certain applications or playing Flash (.swf) files; but you would have to restart the ESD process afterward if you wanted sound events for the remainder of your session. Ubuntu has made steps in the right direction—for example, processes can now share the mixer without custom configuration—but I hope the sound issues will be completely resolved in a future release.

I get a kick out of this new Nautilus message:

Monday, August 01, 2005

ALSA sprach Zarathustra

Technically it's no longer the weekend, so I hope you'll forgive me for bringing you the secret of Advanced Linux Sound Architecture (ALSA) a few hours later than promised. Believe me, it will be worth the wait. ALSA makes Ubuntu a platform truly ready for multimedia.

Before we can use ALSA, we need a particular library called libesd-alsa0. I found and installed the package using Synaptic. As usual, you could also use the terminal.

sudo apt-get install libesd-alsa0

ALSA requires a set of instructions to function properly. Luckily we have one that works on most hardware. First I created the configuration file.

sudo gedit /etc/asound.conf

Then I copied and pasted the following lines into the file and saved it.

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
}
}

We need to do something similar for the ESD configuration file. We'll use the mv command to rename the existing file first.

sudo mv /etc/esound/esd.conf /etc/esound/esd.conf.bak
sudo gedit /etc/esound/esd.conf


Please note that the .bak extension that I use for my backup files is actually a Windows file extension. I doubt it will cause any problems for my system, since Linux and Windows run on different file systems and thus my faux backup files are unlikely to ever cross paths with their Windows counterparts. If you have any doubts, you can use the filename.conf_backup convention for yours. But I digress. The new ESD configuration should read as follows.

[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=

Finally we need to tell GNOME to use ALSA. Go to System -> Preferences -> Multimedia Systems Selector or enter gstreamer-properties in the Terminal. I changed the audio input and output to ALSA. After I rebooted, everything worked beautifully. My thanks go out to all the Ubuntu Forums members who helped gather the above information.