Dolby Surround Sound

December 31, 2008 § 19 Comments

UPDATE 10/22/10: I wrote this article TWO YEARS ago. A lot of things have changed since then. This post is horribly out of date, anything in this post probably doesn’t work anymore, and I can no longer help you with getting your surround sound to work. I stopped using Ubuntu more than a year ago, and I no longer keep up with how Ubuntu does things. I am really sorry, but I cannot answer your questions. Check the Ubuntu forums for more up to date information.

Got the Dolby Surround Sound working. A big thanks to the people over at the Ubuntu forums, especially wyth. I followed his instructions, but with a few modifications, so I will repost what I did. If you have any questions, feel free to comment. WordPress has a bad habit of changing my formating of the code, like putting curly quotes instead of straight and making a double dash into a long dash. So yeah.

Open a terminal. You will need to install the following:

sudo aptitude install build-essential libncurses-dev gettext \
libasound2 xmlto xmltoman linux-headers-`uname -r`

Next get the latest ALSA drivers. Make sure you don’t get a release candidate, it will have rc in the name. The release candidate for alsa-utils did not make properly for me. For example, get alsa-utils-1.0.18.tar.bz2, not alsa-utils-1.0.18rc3.tar.bz2.

These were downloaded to my desktop. It may be different for you. You need to know where these files were downloaded, because we will be moving them in the next step.

Now create a folder for these files. I created it in my home folder, so ~/src/alsa. If you do it like this, instead of the way wyth did it, then you will not have to use sudo except to make install. Make sure when you copy the files (cp) that you don’t forget that space and period “.” at the end of that line. I did.

mkdir -p ~/src/alsa
cd ~/src/alsa
cp ~/Desktop/alsa* .
tar xjf alsa-driver*.bz2
tar xjf alsa-lib*.tar.bz2
tar xjf alsa-utils*.tar.bz2

Compile and install alsa-driver. Before “with card options” there is a double dash. Again, wordpress is messing with my formating.

cd alsa-driver* 
./configure --with-card-options=hda-codec-realtek,hda-codec-analog,\
hda-codec-sigmatel,hda-codec-via,hda-codec-atihdmi,\
hda-codec-conexant,hda-codec-cmedia,hda-codec-si3054,hda-generic
make
sudo make install

Compile and install alsa-lib

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

Compile and install alsa-utils

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

Next find out what sound card you’re using:

cat /proc/asound/card0/codec#* | grep Codec

I am using the same sound card that wyth is, RealTek ALC888. In the next step, you will be editing the alsa-base file. There are different models that you can assign in the alsa-base file depending on what sound card you are using. I used “lenovo-sky.”

Open the alsa-base file in an editor. gedit is the editor I used, but wyth used nano. You need to check to see which one you have installed, or install one. If you use a different editor, just replace “gedit” with the name of the editor you wish to use.

sudo gedit /etc/modprobe.d/alsa-base

Once in the editor, add this line at the very end. Replace “lenovo-sky” if you want to use a different model.

options snd-hda-intel model=lenovo-sky

Restart, and everything should work. If you don’t have alsamixer installed, go to your package manager or terminal and install it. Then you will have to run it and turn on your front speakers and sub woofer. The sub woofer is the LFE channel. If you had a problem with the speakers not turning off when you plugged in head phones, this should fix that also.

Tagged: , , , ,

§ 19 Responses to Dolby Surround Sound

  • max says:

    What about hibernate/suspend? Is it working now?

  • Benalene says:

    No, it is not. To be honest, I got a little tired of going to countless forums and seeing hundreds of other people having the same problem, but no answers. At some point, turning my computer on and off completely at least twice a day is going to bug me enough to try to get this working again, but right now, I am just trying to get other stuff done. I still don’t even know if this is an Ubuntu thing, a hardware thing, or a Linux in general thing. It seems to be a combination of all three!

  • qwe says:

    Try tuxonice. I get hibernate working with this.

    • Benalene says:

      @qwe: I have looked into doing this, however, doesn’t it involve compiling the kernel? I don’t feel confident enough to tackle that yet. It is on my list of things to do, eventually. Though, secretly, I am hoping that someone will come up with an easier way to do it!

  • Jeff says:

    Thanks for taking the time to write this up. I followed your install using the alsa 1.0.19 drivers on my Lenovo Y530 laptop w/ built-in Dolby running Ubuntu 8.10. All five speakers including the subwoofer work great now! Plugging in headphones automatically mutes speakers too. Thanks again!

  • qwe says:

    @Benalene it’s only way now. It’s a kernel fault so only future updates in kernel may do this working. Now only tuxonice works (hibernate only because it only patches hibernate feature). But compiling isn’t so hard.

  • JJS says:

    Hey, I came across this guide with hopes of getting all the speakers on my lenovo y530 working properly in ubuntu 9.04. I’m pretty new to linux, so sorry if this is lame, but I’m running into errors when trying to compile and install. Here’s the error section of the output:

    checking for which soundcards to compile driver for… configure: error: Unknown option hda-codec-realtek
    justinandbrin@ubuntu:~/src/alsa/alsa-driver-1.0.9$ sudo make installrm -f /snd*.*o /persist.o /isapnp.o
    make[1]: Entering directory `/home/justinandbrin/src/alsa/alsa-driver-1.0.9/acore’
    Makefile:6: /home/justinandbrin/src/alsa/alsa-driver-1.0.9/Makefile.conf: No such file or directory
    make[1]: *** No rule to make target `/home/justinandbrin/src/alsa/alsa-driver-1.0.9/Makefile.conf’. Stop.
    make[1]: Leaving directory `/home/justinandbrin/src/alsa/alsa-driver-1.0.9/acore’
    make: *** [install-modules] Error 1

    I’m probably making a noob syntax error or something, but, like I said, I have little idea of what I’m doing. Any help would be GREATLY appreciated.

    Thanks

    • Benalene says:

      @JJS
      It looks like you are using older versions of the alsa drivers. The version numbers are a little confusing, I had the same problem at first, too. 1.0.18 (version 18) is a later release than 1.0.9 (version 9). If you are confused, look at the release date. 1.0.19 is the most recent version. Try a later version, and let me know if you are still having problems.

  • cg says:

    What ubuntu version did you use for this solution?

    I have ubuntu 8.04 and was not successful…help

    I get no sound at all

    Same laptop model

  • cg says:

    Nevermind I saw a previous post

    I think I’m gonna try it with Ubuntu 9

  • Santhosh says:

    I installed the latest Alsa drivers 1.0.19 in ubuntu 9.10 .. After following the whole installation procedure given above. But after rebooting Ubuntu is not detecting any sound cards.
    I was unable do the last step..
    i.e
    sudo gedit /etc/modprobe.d/alsa-base
    But i get a new file which is empty. I am not able to detect any of the sound cards/ audio hardware
    If i used ‘alsaconf’
    it detects my soundcards, but at the end nothing happens, still there are no soundcards.

  • Sebastian says:

    I get this error while make:
    info.c:1003: error: ‘struct proc_dir_entry’ has no member named ‘owner’

  • Jeff says:

    I get the following error:
    checking for which soundcards to compile driver for… configure: error: Unknown option hda-codec-realtek

    And I can’t run make. Using Linux Mint 9, any idea what’s up? I got it working once before on this exact install, but it randomly stopped working.

  • Samoth says:

    It dosn’t work in Ubuntu 10.10. Any solutions?

  • fhr93 says:

    well, i’m using Ubuntu 10.04
    i have done everithing above. and my Codec is Realtek ALC269
    should i change this
    ————————————–
    options snd-hda-intel model=lenovo-sky
    ————————————–
    with Realtek ALC269??

    before, there is sound when i played music. but after i did what you said in the articles, there isn’t any sound out from my speaker. what’s the problem??

  • Jan says:

    Thank you so much for this walkthrough!! Helped me out a lot!

    For everyone who’s wondering if this guide still works:
    it does with a few minor variations!

    First of all, make sure you get the newest versions of the alsa files (http://www.alsa-project.org/main/index.php/Download) (in the “Stable Release” Column).

    Follow the guide step by step using the newest releases.

    You may run into an error while running ./configure on alsa-utils, saying “panelw library not found”.

    If that is the case, install the missing library from repository using:
    apt-get install libncursesw5-dev

    After that everything should work out fine!
    (It did for me, anyway ;))

    P.S.: I’m on a Lenovo IdeaPad Y530

Leave a comment

What’s this?

You are currently reading Dolby Surround Sound at I <3 Linux.

meta