<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Adrian's Thoughts &#187; audio</title>
	<atom:link href="http://blog.frith.co.za/tag/audio/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.frith.co.za</link>
	<description>Ramblings about life, university, mathematics, computing, Linux, open source, etc.</description>
	<lastBuildDate>Thu, 19 Mar 2009 10:23:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ubuntu on an HP Compaq dx2300 Microtower</title>
		<link>http://blog.frith.co.za/2009/03/19/ubuntu-on-an-hp-compaq-dx2300-microtower/</link>
		<comments>http://blog.frith.co.za/2009/03/19/ubuntu-on-an-hp-compaq-dx2300-microtower/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 10:23:21 +0000</pubDate>
		<dc:creator>adrian</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[Compaq]]></category>
		<category><![CDATA[dx2300]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Microtower]]></category>
		<category><![CDATA[soundcard]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.frith.co.za/?p=77</guid>
		<description><![CDATA[My new desktop at varsity is, as described in the title, an HP Compaq dx2300 Microtower. First thing I did when I got access to it was, of course, to install Linux &#8211; Ubuntu 8.10 in this case. It&#8217;s a pretty nice machine (although not particularly high-spec) and pretty much everything worked straight away from [...]]]></description>
			<content:encoded><![CDATA[<p>My new desktop at varsity is, as described in the title, an HP Compaq dx2300 Microtower. First thing I did when I got access to it was, of course, to install Linux &#8211; Ubuntu 8.10 in this case. It&#8217;s a pretty nice machine (although not particularly high-spec) and pretty much everything worked straight away from install. The graphics card is Intel, so I&#8217;m not going to be doing any serious gameplaying (<em>this is a work computer, anyway</em>) but it runs Compiz pretty well. Being a desktop, suspend and hibernate aren&#8217;t terribly important, but as it happens they work fine.</p>
<p>The only problem &#8211; and this is the main point of this post &#8211; was with the soundcard (an Intel HDA). The box has three audio outputs: headphone plugs front and back, and a tinny built-in speaker. Under Ubuntu all three outputs were switched on all the time, and it wasn&#8217;t possible to adjust them separately. The purpose of headphones in a shared lab environment is entirely defeated if the built-in speaker is always on! I tried fiddling with all of the multitude of ALSA settings, but nothing worked. It couldn&#8217;t have been a hardware problem, because it did the right thing under Windows.</p>
<p>So, the problem was narrowed down to the audio driver, <code>snd-hda-intel</code> to be specific. Some googling established that changing the <code>model</code> parameter to the module might have some effect on the output selection behaviour. Further searching established that the possible values are listed in <code><a href="http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt">Documentation/sound/alsa/HD-Audio-Models.txt</a></code> in the kernel source.</p>
<p>To find out what the possible values are, you have to know which codec your card uses. This you can do by running </p>
<blockquote><p><code>cat /proc/asound/card0/codec#0 | grep Codec</code></p></blockquote>
<p>For the dx2300 the result was <code>Realtek ALC888</code>. Indeed, under the list of models for the ALC888, there is one called &#8220;<code>3stack-hp</code>&#8221; for &#8220;HP machines with 3stack&#8221;. Guessing that this was the correct one, I added to <code>/etc/modprobe.d/alsa-base</code> the line </p>
<blockquote><p><code>options snd-hda-intel model=3stack-hp</code></p></blockquote>
<p> and rebooted. Hey presto, suddenly the internal speaker switches off when headphones are plugged in.</p>
<p>tl;dr summary: If you have a dx2300 and you&#8217;re having problems with the audio under Linux, then add the line <code>options snd-hda-intel model=3stack-hp</code> to the file <code>/etc/modprobe.d/alsa-base</code> (at least in Ubuntu; your distro might put module options in a different file).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.frith.co.za/2009/03/19/ubuntu-on-an-hp-compaq-dx2300-microtower/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
