Posted by khk

Sound

There are two ways you can get sound support for the Sony notebook: An easy one that does not require you to recompile the kernel and one that’s not that easy (but also not that complicated if you know how to configure and compile kernels).

OSS

Here’s the easy one: Just get OSS and select the ESS1688 driver. That’s it. No hassle, no problems. For all the saved time the $20 is well spend in my opinion. Then again once you try it, kernel configuration is not that hard either:

Update to OSS

It looks like the support for the ES1688 driver was removed from recent versions of the OSS software. I did not notice this because when I upgraded OSS I always kept the old configuration and I found out only after a fresh install that my recipe from above does not work anymore.

You can still get it to work when you just install the file devices.cfg that I created using an old version of OSS. Copy this file to /usr/lib/oss/devices.cfg (or wherever your OSS installation lives). I tried this with the latest OSS version 3.92o for the Linux kernel version 2.2.10.

OSS also does not like the IO ports the Midi interface is using. My PCG-505FX had the ports for MPU starting on 0x320. OSS will only use 0x300 or 0x330. You can however modify this directly in the devices.cfg file. This is necessary everytime OSS modifies the file (after a new installation, a software upgrade or a manual configuration).

Here are the contents of my devices.cfg file:

/SECUREAUDIO OFF
/IRQEXCLUDE 3 4 6 7 8 9 10 11
/DMAEXCLUDE 2
-ess1688 #Generic ESS ES1688 based soundcard or motherboard
SBLAST ON P220 I5 D1
SBMPU ON P320 I5
OPL3 ON P388

Update to the Update to OSS

I reported this problem to the makers of OSS, but have not received any response. Given the relatively easy setup of ALSA I can no longer recommend OSS. Besides the actual compilation of the ALSA package, the configuration of OSS with the manual step required to update the devices.cfg file is not much different form configuring ALSA.

Here is what I did to get ALSA running:

ALSA – Advanced Linux Sound Architecture

The ALSA home page is http://www.alsa-project.org. Go to the download section and get the follwing files (or newer versions, if available):

  • alsa-driver-0.4.0.tar.gz
  • alsa-lib-0.4.0.tar.gz
  • alsa-utils-0.4.0.tar.gz

Unpack these files and perform the following steps for every package:

./configure
make
make install

For the “make install” you need to be root, otherwise the files can not be installed into the destination directories. It is important to install the packages in the order I’ve listed them: first driver, then lib and then utils.

If you are using SuSE Linux, the startup script alsasound can not be installed automatically. The software assumes that you are running a Red Hat type of Linux with the startup scripts in /etc/init.d. SuSE however uses /sbin/init.d as the home for the startup scripts. Their reasoning is that the /etc directory should not contain any executable programs.

That’s no big deal, just cd into the alsa-driver directory and install the file manually:

install -m 755 utils/alsasound /sbin/init.d

The ALSA drivers will only work if you are running a Linux kernel that has the sound support enabled. You don’t need any drivers configured, just make sure that the “Sound card support” is enabled as module in the sound configuration. This is the first choice once you enter the sound configuration submenu in either “make menuconfig” or “make xconfig”. Nothing else needs to be selected in this submenu. Also make sure that no part of the standard kernel sound system is compiled into the kernel (modules are OK, but once you have sound compiled into the kernel ALSA will have problems).

This again must be done as root. Now the only thing that still needs to be done is the configuration of ALSA. Here are the lines I added to my /etc/conf.modules file:

# ALSA native device support
alias char-major-116 snd
options snd snd_major=116 snd_cards_limit=1
alias snd-card-0 snd-card-es1688

# OSS/Lite setup
alias char-major-14  sound-core
alias snd-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm1-oss
alias sound-service-0-12 snd-pcm1-oss

… and I almost forgot: You start the sound subsystem using
/sbin/init.d/alsasound start

Of course this can be (and should be) automated by creating the links in /sbin/init.d/rc2.d and rc3.d. Consult the manual for our Linux distribution to find out when and how to start the sound subsystem.

If you came this far and are still wondering where the IRQs, DMAs and IOs are configured: The system will detect them. No need to do any configuration. Isn’t that easy?

Standard Kernel Sound Driver

According to the Linux Sound HOWTO the ESS1688 can be configured as a SB16. While doing so, use the following values:

CONFIG_SOUND=y
# CONFIG_PAS is not set
CONFIG_SB=y
# CONFIG_ADLIB is not set
# CONFIG_GUS is not set
# CONFIG_MPU401 is not set
# CONFIG_UART6850 is not set
# CONFIG_PSS is not set
# CONFIG_GUS16 is not set
# CONFIG_GUSMAX is not set
# CONFIG_MSS is not set
# CONFIG_SSCAPE is not set
# CONFIG_TRIX is not set
# CONFIG_MAD16 is not set
# CONFIG_CS4232 is not set
# CONFIG_MAUI is not set
CONFIG_AUDIO=y
# CONFIG_MIDI is not set
# CONFIG_YM3812 is not set
SBC_BASE=220
SBC_IRQ=5
SBC_DMA=1
SB_DMA2=5
SB_MPU_BASE=0
SB_MPU_IRQ=-1
DSP_BUFFSIZE=65536
# CONFIG_LOWLEVEL_SOUND is not set