<?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>A better sounding world &#187; PulseAudio</title>
	<atom:link href="http://voices.canonical.com/david.henningsson/category/pulseaudio/feed/" rel="self" type="application/rss+xml" />
	<link>http://voices.canonical.com/david.henningsson</link>
	<description></description>
	<lastBuildDate>Thu, 26 Apr 2012 07:11:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Audio over HDMI and DisplayPort in Ubuntu 12.04</title>
		<link>http://voices.canonical.com/david.henningsson/2012/04/14/audio-over-hdmi-and-displayport-in-ubuntu-12-04/</link>
		<comments>http://voices.canonical.com/david.henningsson/2012/04/14/audio-over-hdmi-and-displayport-in-ubuntu-12-04/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 01:05:14 +0000</pubDate>
		<dc:creator>David Henningsson</dc:creator>
				<category><![CDATA[PulseAudio]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://voices.canonical.com/david.henningsson/?p=106</guid>
		<description><![CDATA[Ok, for those of you who just want it up and working, I&#8217;m including a quickstart section before we dive into the details: Quickstart 1) If you have an ATI/AMD or NVidia card, you need proprietary drivers. 2) You need &#8230; <a href="http://voices.canonical.com/david.henningsson/2012/04/14/audio-over-hdmi-and-displayport-in-ubuntu-12-04/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ok, for those of you who just want it up and working, I&#8217;m including a quickstart section before we dive into the details:</p>
<h3>Quickstart</h3>
<p>1) If you have an ATI/AMD or NVidia card, you need <a href="https://help.ubuntu.com/11.10/ubuntu-help/hardware-driver-proprietary.html">proprietary drivers</a>.<br />
2) You need to activate your secondary screen. For Intel, this is done in the regular &#8220;Screens&#8221; dialog, and on NVidia this is done in the nvidia-settings dialog. (I haven&#8217;t tested fglrx.)<br />
3) You need to select the HDMI/DisplayPort output in the sound settings dialog, which is quickest reachable from the sound indicator.</p>
<h3>Can&#8217;t we switch audio output automatically?</h3>
<p>Choosing whether to automatically switch to HDMI/DisplayPort &#8211; essentially, switching sound to use the HDMI/DisplayPort whenever that screen is activated &#8211; is not trivial. It is not obvious to me whether the user wants to do that, or not. And in fact, in Ubuntu 11.10, we did switch, but only for some cards. And we did not switch back when the screen was deactivated. After a <a href="http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-March/012991.html">discussion</a> where <a href="http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-March/013006.html">different</a> <a href="http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-March/013009.html">opinions</a> were voiced, I reached the <a href="http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-March/013018.html">conclusion</a> that given the current pieces of infrastructure in place, the best option would be to <b>disable automatic HDMI/DisplayPort switching</b> for Ubuntu 12.04.</p>
<h3>The problem of four devices</h3>
<p>As mentioned in an <a href="http://voices.canonical.com/david.henningsson/2011/09/06/pulseaudio-with-jack-detection/" title="PulseAudio with jack detection">earlier post</a>, much HDMI/DisplayPort hardware have phantom outputs, and there is no way we know what outputs are real until something is plugged in. With the new sound settings UI in Ubuntu 12.04, we finally have a good user experience in this scenario: Only the outputs that are actually plugged in and possible to activate will be shown.<br />
<img src="http://voices.canonical.com/david.henningsson/files/2012/04/sound-settings-ui2.png" alt="Sound settings in Ubuntu 12.04" width="75%" /><br />
<font size="-1">Sound settings in Ubuntu 12.04</font></p>
<h3>Video drivers</h3>
<p>Most of the code to activate HDMI/DisplayPort audio is in the video driver, rather than the audio driver. Therefore, if this is not working, it is more likely that the problem is within the video driver.<br />
It is also notable that the open source driver for ATI/AMD (called radeon), has experimental support for HDMI/DisplayPort audio, at least for some cards. It is <a href="https://lists.ubuntu.com/archives/kernel-team/2012-February/018898.html">disabled by default</a>, but you can activate it by adding radeon.audio=1 as a <a href="https://help.ubuntu.com/community/BootOptions#Changing_boot_options_Permanently_for_an_Existing_Installation">kernel boot parameter</a>.</p>
<h3>Upstreaming notes</h3>
<p>PulseAudio 2.0 is soon to be released (hopefully). PulseAudio 2.0 and Ubuntu 12.04 have the same feature set when it comes to HDMI/DisplayPort audio support.<br />
The new sound settings UI in Ubuntu 12.04 has not yet been upstreamed.</p>
]]></content:encoded>
			<wfw:commentRss>http://voices.canonical.com/david.henningsson/2012/04/14/audio-over-hdmi-and-displayport-in-ubuntu-12-04/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Audio debugging techniques</title>
		<link>http://voices.canonical.com/david.henningsson/2011/12/08/audio-debugging-techniques/</link>
		<comments>http://voices.canonical.com/david.henningsson/2011/12/08/audio-debugging-techniques/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 16:16:51 +0000</pubDate>
		<dc:creator>David Henningsson</dc:creator>
				<category><![CDATA[PulseAudio]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://voices.canonical.com/david.henningsson/?p=49</guid>
		<description><![CDATA[As a part of the Ubuntu Hardware Summit, I held a presentation on the topic &#8220;audio debugging techniques&#8221;, focused on HDA Intel cards. I also wrote down some notes for some of those slides. I share the slides and the &#8230; <a href="http://voices.canonical.com/david.henningsson/2011/12/08/audio-debugging-techniques/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As a part of the Ubuntu Hardware Summit, I held a presentation on the topic &#8220;audio debugging techniques&#8221;, focused on HDA Intel cards. I also wrote down some notes for some of those slides. I share the slides and the notes with the hope that you will find the information useful if you run into troubles with your audio hardware.</p>
<h3>Audio stack overview</h3>
<p><img src="http://voices.canonical.com/david.henningsson/files/2011/12/UHS2011_Audio-03.png" alt="" /><br />
The audio stack can seem a bit complex, but first look at the line all the way from the applications to the hardware. This is the optimal audio path. If the audio path is different, complexity will increase and you might run into undesired behaviour, such as one application blocking another from playing audio. There are valid exceptions though &#8211; we have a <a href="http://jackaudio.org" target="_blank" title="Jack">separate sound server for professional, low-latency audio</a>. But that&#8217;s outside the scope of this presentation.</p>
<p>Let&#8217;s start from the top. On the top we have different kinds of audio applications, which talk to <a href="http://pulseaudio.org" target="_blank">PulseAudio</a>. <a href="http://www.gstreamer.net" target="_blank">GStreamer</a> is a library to help media playback, it can for example decode ogg and mp3 files. PulseAudio mixes these audio streams and send them down to the kernel. The ALSA library and the ALSA kernel core do not do much here but send the audio pointers through. The HDA controller driver is responsible for talking directly to the hardware, and so it sets up all necessary DMA streams between the HDA controller and memory. The HDA controller driver also talks to the HDA codec driver, which is different for every codec vendor. </p>
<p>As some of you probably know, between the HDA controller &#8211; which is a part of the southbridge in most computers &#8211; and the HDA codec, a special HDA bus is used. This means that the only way we can talk to the codec is through the controller. </p>
<p>Controlling audio volume goes the same path. When you use your volume control application, it controls PulseAudio&#8217;s volume. PulseAudio in turn modifies the volume controls being exposed by the kernel, and the kernel in turn talks to the hardware to set volume control registers on the codec. There are two levels of abstraction here: first, the kernel might choose not to expose all of the hardware&#8217;s volume controls, and second, PulseAudio exposes only one big volume control which is the sum of some of the volume controls the kernel exposes. So there is filtering on two levels.</p>
<h3>Audio stack overview &#8211; codec</h3>
<p><img src="http://voices.canonical.com/david.henningsson/files/2011/12/UHS2011_Audio-04.png" alt="" /><br />
Let us have a look at the HDA codec chip and how its internals are represented to the driver. The codec is constructed as a graph, and on this slide one of the more simple HDA codec graphs is shown (just because it would fit the screen). A while ago upstream made a small program to extract this graph from the codec and make a picture of it. Thanks to Keng-Yü, who works for Canonical in Taipei, this tool is available as a package in Ubuntu 11.10. Just install the &#8220;codecgraph&#8221; package.</p>
<p>In this graph we have nodes correspondings to DACs, ADCs, mixers, and pins. In this example we can see what pins are connected to which DACs by following the solid line. The dotted line shows a connection that is possible but not currently active.</p>
<p>As the Linux codec driver code grows more intelligent, we depend more and more on this information to be accurate. This way we do not hard code as much in the driver, so we can adapt to future codecs without having to rewrite much code.<br />
The information coming from the codec is usually correct. One problem we have from time to time is though, is that sometimes chip vendors add features which they choose not to document in this graph (and not in any other way either). There is a mechanism called &#8220;processing coefficients&#8221; in the specification, where the vendor can add its own functionality without telling anyone. When that happens, and it is required to use these undocumented &#8220;processing coefficients&#8221; to enable all inputs and outputs, we usually run into difficult problems that require vendor support to resolve. </p>
<p>Also, in some cases the graph cannot describe the functionality needed, e g if some hardware is depending on special pins on the codec. We need to know about this when it happens, so we can support it in the driver. So if you are a hardware designer, my message is: Try to use the standard way of doing things as much as possible. Do this and it will work out of the box on Linux, and likely other operating systems as well. If you do anything special, you&#8217;re causing headache for driver writers, possibly causing a slower time to market.<br />
An example of this would be how you control external amplifiers: you can use the EAPD pins, which is the standard way, and you can use GPIO pins, ACPI, or anything else, that will be more problematic and require special driver support.</p>
<h3>Pin configuration default</h3>
<p><img src="http://voices.canonical.com/david.henningsson/files/2011/12/UHS2011_Audio-05.png" alt="" /><br />
We also depend on information from the writers of BIOS/UEFI, i e the computer&#8217;s firmware. As a hardware designer, you have the freedom to choose which pins of the codec that go to what physical jack. You might decide that you want a digital out, or you decide that this machine should not have that functionality, and then you leave that pin unconnected.<br />
Then the firmware engineer needs to know this, and program this into the codec when the computer boots. This is done by setting the &#8220;Pin Configuration Default&#8221; register. This register tells us not only the device type (headphone, mic, etc), but also the location (Internal, External, Docking Station), the color, and the channel mapping (to use for surround functionality).</p>
<p>Several years ago, we did not read this register much, but these days, we depend on that for all new computers for setting up the codec correctly. So what do we do if this register is wrong? Well, if we work with hardware pre-release, there might be a chance we can feed this information back to the firmware writers so they can correct the problem. If the hardware is already released, we have to create a &#8220;quirk&#8221;. This means that the driver overrides the firmware&#8217;s pin value(s) and instead uses its own value.</p>
<p>Because this value is so important, I&#8217;ve written <a href="http://voices.canonical.com/david.henningsson/2011/11/29/turn-your-mic-jack-into-a-headphone-jack/" title="Turn your mic jack into a headphone jack!" target="_blank">an application</a> where you can try out different combinations of this register.</p>
<h3>Mixer problems</h3>
<p><img src="http://voices.canonical.com/david.henningsson/files/2011/12/UHS2011_Audio-06.png" alt="" /><br />
One of the most common problems with getting audio up and running on Linux is to make sure the mixer is correct. Typical symptoms of this would be that some outputs are working where others are not, or that there is something wrong with the volume control. </p>
<p>Here are some initial checks of these problems. We do this at the two levels of mixer abstraction. First, let&#8217;s have a look at the PulseAudio volume control. You can do that in Gnome&#8217;s volume control application.</p>
<p>Also, PulseAudio controls the volume of mixers at the ALSA level. You can see how this works by starting the alsamixer program. In this program, you can also see additional sliders, which you can also use to verify that they are in the correct to enable sound. You start alsamixer from a terminal (in Ubuntu the quickest way to launch a terminal is the Ctrl-Alt-T shortcut).</p>
<h3>Mixer control names</h3>
<p><img src="http://voices.canonical.com/david.henningsson/files/2011/12/UHS2011_Audio-07.png" alt="" /><br />
So let&#8217;s look at these two abstraction levels in more detail and how you can inspect what is actually going on. First, let&#8217;s look at the codec level. If you are familiar with the codec&#8217;s nodes and how they are connected, e g by running &#8220;codecgraph&#8221;, you can also find out which ALSA level controls that are connected to which nodes on the codec. This is done by inspecting the &#8220;codec proc&#8221; file. Every codec in the system has this file, and its name is made up of the sound card name, and the codec&#8217;s address on the HDA bus. In this file, you can also see a lot of other information about the codec. </p>
<p>So next, we will also take a look at PulseAudio&#8217;s abstraction of these controls. This is done by looking at the files in /usr/share/pulseaudio/alsa-mixer. In this case, if we look at /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf, you can e g find the sections [Element Master] and [Element Headphones]. That means that the ALSA-level controls &#8220;Master&#8221; and &#8220;Headphones&#8221; are being merged in PulseAudio&#8217;s volume control when the &#8220;Headphones&#8221; port has been selected.</p>
<p>So these two places are the keys to understanding what is going on when you have mixer problems.</p>
<h3>PCM/Streaming problems</h3>
<p><img src="http://voices.canonical.com/david.henningsson/files/2011/12/UHS2011_Audio-08.png" alt="" /><br />
So up next is when you have problems with the streaming. That is usually shown as the audio is breaking up, crackling or glitching. Unfortunately these problems are typically quite hard to resolve. </p>
<p>Sometimes this can be a bug in PulseAudio, or in the driver. But more often the problem is on either the application side or the hardware side. </p>
<p>If an application is not submitting data to PulseAudio in time, the PulseAudio has no audio to play back, so therefore playback breaks up. Once some more data has reached PulseAudio, it starts playback again, and so playback is started and stopped repeatedly.</p>
<p>The other problem could be with bad position reports from the hardware. PulseAudio depends on being able to ask the hardware for its current position at all times, and this should be sample accurate. You can test this by trying to run PulseAudio with timer scheduling disabled, in this case PulseAudio will rely more on DMA interrupts and less on position reports. However, this will also make PulseAudio draw more power than necessary from the machine, so please avoid this if you can.</p>
<p>When I try to debug these problems I usually start with making a <a href="http://wiki.ubuntu.com/PulseAudio/Log" target="_blank">PulseAudio verbose log</a>. It often takes some knowledge and experience to be able to analyze this log though.</p>
<h3>Jack sensing</h3>
<p><img src="http://voices.canonical.com/david.henningsson/files/2011/12/UHS2011_Audio-09.png" alt="" /><br />
Over the last six months or so, one of the things I&#8217;ve been working with is trying to get better jack detection handling, throughout the audio stack.<br />
&#8220;Jack sensing&#8221; in this context means what to do when something has been plugged in, or unplugged. </p>
<p>When this happens, an interrupt (IRQ) is triggered and control is passed to the HDA codec driver. The driver takes the first action itself. Now, this is an area, unfortunately, when things differ a lot between different drivers, mostly between different vendors, but also between different chips of the same vendor, or even between configurations of the same chip.</p>
<p>But as a general rule, and for the most common vendors &#8211; that means Realtek, IDT and Conexant &#8211; these rules are the ones that are followed:</p>
<ul>
<li>For headphones &#8211; when you plug them in, the Internal Speakers are muted. Remember, this is still all at the kernel level. </li>
<li>For what we&#8217;re doing with Line Outs &#8211; it&#8217;s not completely standardised everywhere yet, but it seems upstream is leaning on having Headphones mute Line Outs and having Line Outs mute Internal Speakers by default. Some drivers also have a special control where the automute behaviour can be changed.</li>
<li>For Microphones &#8211; the only rule here is that if we have only one internal microphone and one external microphone, the external microphone takes over when you plug it in, and the internal microphone regains control when you unplug. Should there be any other inputs, e g two external mic jacks, or a line in jack, no autoswitching is done at the kernel level.</li>
</ul>
<p>After this has been done, a signal is sent to userspace. Hopefully &#8211; this also varies between vendors. We&#8217;ll get back to that. What&#8217;s new in Ubuntu 11.10, is that this signal is <a href="http://voices.canonical.com/david.henningsson/2011/09/06/pulseaudio-with-jack-detection/" title="PulseAudio with jack detection">being picked up by PulseAudio</a>. This is important, because it enables PulseAudio, to switch port for volume control. So this means, when you press your media keys (or use the sound menu) to control your volume, you control your headphone&#8217;s volume when you have headphones plugged in, and your speakers&#8217; volume when your headphones are unplugged.</p>
<p>So this not working properly, is one of the more common problems. I have written a small tool that helps you to debug whether this issue is in hardware or software. This tool is called &#8220;hda-jack-sense-test&#8221;. This program sends the &#8220;get pin sense&#8221; command to each codec and outputs the results. I actually had use for it earlier this week, and confirmed that it was a hardware issue: although the headphones were unplugged, the &#8220;get pin sense&#8221; command returned that the headphones were being plugged in and unplugged all the time.</p>
<p>If you can confirm that things are working at this level, you can also look in &#8220;Sound settings&#8221; to see if the port (this is known as a &#8220;connector&#8221;) is automatically switched whenever headphones &#8211; or microphone &#8211; is plugged in. If it is not, the most common cause is that kernel driver does not notify userspace correctly about that change.</p>
<h3>HDMI/DisplayPort Audio</h3>
<p><img src="http://voices.canonical.com/david.henningsson/files/2011/12/UHS2011_Audio-10.png" alt="" /><br />
One of the most common problem with HDMI these days are with newer chips supporting more than one output. These outputs could be HDMI, DisplayPort or DVI (with audio supported through a DVI to HDMI adapter). NVidia has supported four outputs for quite some time and Intel has supported three. But usually, not all of these are actually connected on the board.<br />
Now, the problem is: How do we know what pin to output to? And the answer is, that there is no good way to figure that out until something is actually plugged in. </p>
<p>If you remember me talking about the pin config default earlier, you would say that maybe the graphics chip could mark the pins not connected to anything. If this was done, it would be a great start (and if they are, we make use of it to hide the outputs that are marked as not connected), but unfortunately, more often than not, these pins are set up as all pins connected and present. So if you write firmware for internal or external graphics cards, please do set up these pins. </p>
<p>So if we don&#8217;t know, what do we do? Well, here&#8217;s also work in progress at the userspace level. First, PulseAudio has to probe how many ports there are. Then we can use the new jack detection feature, to determine what has actually been plugged in. I&#8217;m currently working on redesigning the sound settings dialog so that the ports that are not plugged in will be actually hidden from the dialog, and I hope this will land in Ubuntu 12.04 which will be released in April next year. </p>
<p>And a final note, just so you don&#8217;t forget it: For NVidia and ATI, they both require proprietary video drivers to enable HDMI and DisplayPort audio. The ATI driver used to have support for some of the cards in its open source driver, but this feature was recently removed because they had some problems with it.<br />
Intel has no proprietary drivers at all, so there it works with the standard open source driver.</p>
<p><img src="http://voices.canonical.com/david.henningsson/files/2011/12/UHS2011_Audio-11.png" alt="" /><br />
<img src="http://voices.canonical.com/david.henningsson/files/2011/12/UHS2011_Audio-12.png" alt="" /><br />
<img src="http://voices.canonical.com/david.henningsson/files/2011/12/UHS2011_Audio-13.png" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://voices.canonical.com/david.henningsson/2011/12/08/audio-debugging-techniques/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Independent volume for headphones and speakers</title>
		<link>http://voices.canonical.com/david.henningsson/2011/09/29/independent-volume-for-headphones-and-speakers/</link>
		<comments>http://voices.canonical.com/david.henningsson/2011/09/29/independent-volume-for-headphones-and-speakers/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 18:57:49 +0000</pubDate>
		<dc:creator>David Henningsson</dc:creator>
				<category><![CDATA[PulseAudio]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://voices.canonical.com/david.henningsson/?p=32</guid>
		<description><![CDATA[If you take Ubuntu Brainstorm&#8217;s word for it, one of the more popular wishes for Ubuntu, is to avoid having to adjust the volume slider up and down as you plug and unplug your headphones, but instead keep separate volumes &#8230; <a href="http://voices.canonical.com/david.henningsson/2011/09/29/independent-volume-for-headphones-and-speakers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you take <a href="http://brainstorm.ubuntu.com/idea/27275/" title="Ubuntu Brainstorm" target="_blank">Ubuntu Brainstorm&#8217;s word for it</a>, one of the more popular wishes for Ubuntu, is to avoid having to adjust the volume slider up and down as you plug and unplug your headphones, but instead keep separate volumes stored for both. </p>
<p>Long story short, it&#8217;s a desirable feature, and we&#8217;re moving in that direction, but slowly, as the feature is more complex than it seems like at first glance.</p>
<p>The good news: in the upcoming Ubuntu Oneiric (11.10), this is actually working. The bad news: it isn&#8217;t working for everyone. </p>
<p>For external stuff, mainly USB and Bluetooth devices, this has been working for a quite a few releases now (although you might have to manually switch to your new card when you plug it in). So let&#8217;s restrict the discussion to internal sound cards, that on a typical laptop would control your internal speaker and your 3.5mm headphone jack. Here&#8217;s where Oneiric will make a positive difference for many of you (although, still far from all of you).</p>
<p>PulseAudio has the concept of &#8220;ports&#8221; (in your Gnome &#8220;Sound settings&#8221;, this is what&#8217;s labeled a &#8220;Connector&#8221;), and headphones and speakers would be different ports of the same card. As of Oneiric, every port has its volume stored independently, so when you switch ports, the volume will automatically change.<br />
Now, this does not become really useful until this port can automatically switch back and forth when you plug and unplug your headphones. This feature is also now implemented in Oneiric, as you can read about in my previous blog post, <a href="http://voices.canonical.com/david.henningsson/2011/09/06/pulseaudio-with-jack-detection/" title="PulseAudio with jack detection" target="_blank">PulseAudio with jack detection</a>. </p>
<p>Things are not always that easy. Not everyone has just internal speakers and headphones, some have line outs instead, or all three. On the input side, some have internal mics, microphone jacks (often more than one), line ins, or any combination of those. In addition, people are different: some want headphones to automatically mute line outs, others don&#8217;t. That&#8217;s a typical case where different drivers expose very different behaviour: some do, some don&#8217;t, some have a setting you can control in alsamixer. Some drivers enable the user to have different volumes for different outputs, others don&#8217;t. Drivers label volume controls and jacks differently. Not every driver actually exposes the current jack sense state to userspace, either.</p>
<p>The bottom line: Is this working for you? Great! Is it not? You&#8217;re not alone. I&#8217;ll try to fix some of that up for Ubuntu 12.04, but there will &#8211; no doubt &#8211; be users who won&#8217;t have this functionality for a long time. At this point, the best you can do is to file a bug using the &#8220;ubuntu-bug audio&#8221; command, and hope for the best. Even if it might be too late for your hardware to be supported in 11.10, filing the bug sooner rather than later might help to get it into 12.04. However, manpower is always an issue, so even better would be if you could write a kernel patch yourself to fix it. <img src='http://voices.canonical.com/david.henningsson/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://voices.canonical.com/david.henningsson/2011/09/29/independent-volume-for-headphones-and-speakers/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>PulseAudio with jack detection</title>
		<link>http://voices.canonical.com/david.henningsson/2011/09/06/pulseaudio-with-jack-detection/</link>
		<comments>http://voices.canonical.com/david.henningsson/2011/09/06/pulseaudio-with-jack-detection/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 08:51:33 +0000</pubDate>
		<dc:creator>David Henningsson</dc:creator>
				<category><![CDATA[PulseAudio]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://voices.canonical.com/david.henningsson/?p=15</guid>
		<description><![CDATA[Jack detection in PulseAudio is now in Ubuntu 11.10. This means that PulseAudio will know whether you have plugged in your headphones, mic or HDMI cable, and be able to use that information. Most computers have automute already (i e, &#8230; <a href="http://voices.canonical.com/david.henningsson/2011/09/06/pulseaudio-with-jack-detection/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Jack detection in PulseAudio is now in Ubuntu 11.10. This means that PulseAudio will know whether you have plugged in your headphones, mic or HDMI cable, and be able to use that information. Most computers have automute already (i e, speakers mute when you plug in headphones), but this functionality is done entirely in the kernel. With PulseAudio now knowing about this, it can decide that your main volume control will adjust the headphones volume when you have headphones plugged in, and the speaker volume when you don&#8217;t. </p>
<p>HDMI adds one more twist to it. Due to hardware design, there are often several &#8220;false&#8221; ports accompanying the real one(s). And there is no way of knowing which one is right, except through jack detection. So you might see four different HDMI&#8217;s in the user interface, but only one is right, and with the jack detection, the right HDMI output will automatically be selected when you activate the HDMI device.<br />
Speaking of the &#8220;Sound Preferences&#8221; user interface, I hope that we will have an improved user interface for Ubuntu 12.04, that can hide the HDMI devices that are unavailable.<br />
(Also note that for NVidia and ATI cards, binary drivers are often needed to enable HDMI audio, as well as activating the display, through nvidia-settings or the &#8220;Displays&#8221; settings dialog.) </p>
<p>All of this won&#8217;t work for everyone from the start, as it will need support from the ALSA driver. However, for those who don&#8217;t have that support, things will not regress compared to the current handling. Hopefully I will be able to improve that situation for some of you in the 12.04 cycle.</p>
<p>Finally, a note on the upstream status of the patches needed for this functionality:
<ul>
<li>The PulseAudio patches will hopefully be merged into PulseAudio, once PulseAudio 1.0 is out. Until then, you can grab the latest patch set <a href="http://bazaar.launchpad.net/~ubuntu-audio-dev/pulseaudio/ubuntu.oneiric/files/head:/debian/patches/" title="patches" target="_blank">here</a>.
</li>
<li>A <a href="http://bazaar.launchpad.net/~ubuntu-core-dev/ubuntu/oneiric/udev/ubuntu/view/head:/debian/patches/jack-detection.patch" title="udev patch" target="_blank">udev patch</a> required to enable PulseAudio to read the input devices was <a href="http://comments.gmane.org/gmane.linux.hotplug.devel/16908" title="discussion" target="_blank">rejected</a> upstream. </li>
<li>A <a href="http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-oneiric.git;a=commitdiff;h=fe2d089edfadd33bc9133f471fec39c4f8f7caf7" title="kernel patch" target="_blank">kernel patch</a> used to identify HDMI input devices is pending upstream review/approval.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://voices.canonical.com/david.henningsson/2011/09/06/pulseaudio-with-jack-detection/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

