Technology Entrepreneur, Innovator, Author and Thought Leader

Shashank Tiwari

Subscribe to Shashank Tiwari: eMailAlertsEmail Alerts
Get Shashank Tiwari: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Blog Feed Post

Ubuntu and HP TouchSmart Sound

I upgraded my Ubuntu install on my HP TouchSmart machine to version 11.04 (Natty Narwhal). Ubuntu 11.04 Unity Desktop experience is so nice and smooth that I started using my HP TouchSmart actively again. It had been sitting gathering dust for the last many months!

The last version of Ubuntu on this machine was 10.04, which was upgraded to 11.04, via a 10.10 upgrade en route. During 10.04 days, I had trouble getting Ubuntu to work smoothly on this machine. The internal speakers did not work (only external speakers did), the wifi did not work, and the touch screen lost its touch qualities. After I upgraded to 11.04, I somehow believed many of these past woes would get corrected but that wasn’t the case. So I actively started making some effort to resolve these issues. Getting the internal speaker sound to work was the first of the things I did and surprisingly a few minutes is all I needed to solve the problem.

The fix on the TouchSmart is really a simple and 1 line addition to a configuration file. Open the terminal and type the following:

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

This will open alsa-base.conf in gedit, the official text editor on the Gnome desktop. If you like vi instead of gedit then open the file as follows:

sudo vi /etc/modprobe.d/alsa-base.conf

At the very end add the following 1 line to alsa-base.conf file:

options snd-hda-intel model=touchsmart

Now, save the file and reload alsa using:

sudo alsa force-reload

and the internal speakers are in business. That was quick and simple. Wasn’t it?

A little peek into why this fix works and how this may apply to systems other than the TouchSmart:

Find out the model of your sound card using:

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

On my TouchSmart the output is as follows:

Codec: Analog Devices AD1984A

ALSA (Advanced Linux Sound Architecture) provides audio and MIDI functionality to the Linux OS. Browse the ALSA documentation to see list of supported audio models for your card. The documentation is available in /usr/share/doc/alsa-base/driver/HD-Audio-Models.txt.gz, which is a compressed file. You can list the content of this file, without decompressing, as follows:

gunzip -c /usr/share/doc/alsa-base/driver/HD-Audio-Models.txt.gz

It  may be a good idea to page through the file using the more command like so:

gunzip -c /usr/share/doc/alsa-base/driver/HD-Audio-Models.txt.gz | more

On my machine, I see the following entries relevant to AD1984A :

AD1884A / AD1883 / AD1984A / AD1984B
desktop    3-stack desktop (default)
laptop    laptop with HP jack sensing
mobile    mobile devices with HP jack sensing
thinkpad    Lenovo Thinkpad X300
touchsmart    HP Touchsmart

(First column is the model and second one is the description)

This explains why the value of snd-hda-intel model was set to touchsmart. This hopefully also gives you a clue to find your sound card model and its supported configuration values for that model if you have a problem getting sound to work on your own Ubuntu install.

For additional reference, consider reading

Read the original blog entry...

More Stories By Shashank Tiwari

I am a technology entrepreneur, innovator, author and, as some say, a “thought leader”. I like to solve challenging computing problems, especially those that drive innovation. Being a polyglot programmer, I can program fluently in many languages, including Java, Python, C++, C, Ruby, ActionScript, JavaScript, Objective-C, Haskell, Scala, Clojure, PHP, Groovy, Lisp and Perl. I must admit that I like to learn programming languages and if there is a new interesting one coming, I wouldn’t be far behind getting to grips with it. Over the last many years I have built some cutting edge enterprise and consumer software applications, many of which have leveraged large data sets and the web based programming paradigms. This means I also know a lot about data bases and persistence. I am very conversant with relational databases, embedded databases, object databases, text based data and XML. Having leveraged web based programming paradigms, I have first hand experience with a lot of web development frameworks, including but not limited to Adobe Flex, Spring MVC, Rails, Grails and Django. Not to forget, I obviously have worked a lot with HTML, JS and CSS. My experience and interest are varied and diverse and range a wide spectrum of application development realms that include the server, the client and the middleware. Besides, programming, I am also deeply interested in mathematics and theoretical computer science. This motivates me to bring my knowledge of applied mathematics, statistical modeling, artificial intelligence and sometimes simply data structures, to good use, when I build applications. A couple of domains like financial mathematics and scientific computing seem to have been good fit for such expertise. I am an ardent supporter of open source software and try and contribute to open source code bases and causes. I like the plurality and variety that software development offers; the choice of programming languages, the abundant availability of tools and libraries, the existence of multiple operating systems and the possibility of varied software development methodologies. As a member of the technology community, I am an active contributor to the ever evolving software development languages, methodologies and standards. I am an expert group member on a number of JCP (Java Community Process) specifications, for example JSRs 274, 283, 299, 301 & 312, and have been recognized as an Adobe Flex Champion.I run and organize a few community events like Flex Camp Wall Street, Show Ramp and Polyglot World. I bring together all my expertise in terms of services and products via my primary venture, Treasury of Ideas LLC, in which I play the role of a Managing Partner. Treasury of Ideas LLC, through its focus on innovation and value optimization, offers many best of the breed services and products and has incubated many ideas to help translate them to reality. Our clients range from large enterprises, government agencies, not-for-profit organizations to promising new startups. I write regularly in many technical journals and magazines, present in seminars and mentor developers and architects. I have authored a few books, including Advanced Flex 3 (friends of Ed/APress, 2008) and Professional BlazeDS (Wrox/Wiley, 2009) , and am in the process of authoring a few more. You can learn all about my books and public talks by browsing through the Publish & Present page at