how to solve audio problem in dell optilex 380 desktop on ubuntu 10.04 – Part 2

This post is related to the previous post “how to solve the audio problem in dell optiplex 380 desktop on ubuntu 10.04” and describes another optional method of solving the problem in case the solution described in previous post does not work. On my system, the previous method didn’t work. But, the method being described below worked. This solution is simple. Upgrade from your old ALSA driver (not working already) to the latest stable ALSA driver (It works). On my system, the installed version of ALSA driver was 1.0.23 which was not working and I updraded it to version 1.0.24 which is the current version. The steps to be performed are described below:

1. Determining current version of ALSA:

…$cat /proc/asound/version

Advanced Linux Sound Architecture Driver Version 1.0.23. (As appeared on my system, although installed version may differ on different system.)

2. Stopping alsa-utils: This is necessary to avoid porblems duirng the upgrade.

…$sudo /sbin/alsa-utils stop

3. Installing pre-requisite tools: Following pre-requisites may be requied before upgrading to new version of ALSA in order to compile it. These are:-

a. build-essential: This package contains an informational list of packages which are considered essential for building Debian packages.

b. ncurses-dev: This package contains the header files, static libraries and symbolic links that developers using ncurses will need.

c. gettext: This package is a set of tools that provides a framework to help other GNU packages produce multi-lingual messages.

d. xmlto: xmlto is a front-end to an XSL toolchain.

e. libasound2-dev: This package contains files required for developing software that makes use of libasound2, the ALSA library.

f. linux-headers-`uname -r`: This package relates to Linux headers belonging to particular kernel. ‘uname -r’ returns the current release level of  Linux kernel.

g. libncursesw5-dev: This package contains the header files, static libraries and symbolic links that developers using ncursesw will need.

It may be that these packages are already installed, hence it is good to check whether a package is already installed or not. Command for it is (in ubuntu or debian-like systems):

…$dpkg -s <package-name> or optionally

…$<package-name> –version (as per GNU standards)

However, the above said packages can be installed in the following way:

…$sudo apt-get -y install build-essential ncurses-dev gettext xmlto libasound2-dev

…$sudo apt-get -y install linux-headers-`uname -r` libncursesw5-dev

4. Downloading tars of alsa-driver, alsa-libs and alsa-utils: Next step is to download alsa-driver, alsa-lib and alsa-utils tars from alsa project website. Although, these tars can be downloaded to any desired location, it is good if they are downloaed in user’s own home directory. The commands for this step are as follows:

…$cd <home-directory>

…$rm -rf  alsa* .pulse*        (remove if any previous alsa related material is there.)

…$wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.24.tar.bz2

…$wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.24.1.tar.bz2

…$wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.24.2.tar.bz2

5. Compiling and iinstalling alsa-driver, alsa-lib and alsa-utils: Next step is to create necessary folders, compiling and installing the downloaded packages. This can be done as following:

a. Creating necessary folders:

...$sudo rm -rf /usr/src/alsa
...$sudo mkdir -p /usr/src/alsa
...$cd /usr/src/alsa
...$sudo cp <home-directory>/alsa* .

b. Unpack tar files:

...$sudo tar xjf alsa-driver*
...$sudo tar xjf alsa-lib*
...$sudo tar xjf alsa-utils*

c. Compile and install alss-driver:

...$cd alsa-driver*
...$sudo ./configure
...$sudo make
...$sudo make install

d. Compile and install alss-lib:

...$cd ../alsa-lib*
...$sudo ./configure
...$sudo make
...$sudo make install

e. Compiling and installing alsa-utils:

...$cd ../alsa-utils*
...$sudo ./configure
...$sudo make
...$sudo make install

(It is to be noted that compiling the package may take some time.)

Once, installation is over, computer might need to be restarted so that the new settings may take effect. Now, new version of alsa can be determined by using the command specified in the beginning. It is good to be sure that everything is configured properly by using the following command:

...$sudo alsaconf (This command tries to detect the sound card on the system and creates a configuration file for ALSA.)

Once, the configuration is complete, system restart may be required again.

Note: This post is based on the process described at http://monespaceperso.org/blog-en/2010/05/02/upgrade-alsa-1-0-23-on-ubuntu-lucid-lynx-10-04/

how to solve audio problem in dell optilex 380 desktop on ubuntu 10.04

Taken from link http://en.community.dell.com/support-forums/desktop/f/3513/p/19333189/19699905.aspx

Follow the instructions:
1) Make sure the package “build-essentials” is installed
2) In your terminal:
    $ wget -c ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/misc/hda-verb/hda-verb-0.3.tar.gz
    $ tar vxzf hda-verb-0.3.tar.gz
    $ cd hda-verb-0.3/
    $ make
    gcc -Wall -O2 -g -c -o hda-verb.o hda-verb.c
    gcc -o hda-verb hda-verb.o
3) run your “hda-verb”:
    $ ./hda-verb /dev/snd/hwC0D0 0x1a 0x701 0
    $ ./hda-verb /dev/snd/hwC0D0 0x1b 0x701 0
    if you’re lucky, your system can play sound now
4) add two lines in /etc/rc.local, so that they’ll be automatically applied when booting:
    /path/to/hda-verb /dev/snd/hwC0D0 0x1a 0x701 0
    /path/to/hda-verb /dev/snd/hwC0D0 0x1b 0x701 0
    Remember to replace “/path/to/hda-verb” with the actual full path of your “hda-verb”.
 
More details: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/582199

As informed by: Mr. Safeer