<?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>Arun Raghavan</title>
	<atom:link href="http://arunraghavan.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://arunraghavan.net</link>
	<description>Extremely pithy tagline here</description>
	<lastBuildDate>Tue, 17 Jan 2012 07:54:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>PulseAudio vs. AudioFlinger: Fight!</title>
		<link>http://arunraghavan.net/2012/01/pulseaudio-vs-audioflinger-fight/</link>
		<comments>http://arunraghavan.net/2012/01/pulseaudio-vs-audioflinger-fight/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 12:22:30 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1189</guid>
		<description><![CDATA[I&#8217;ve been meaning to try this for a while, and we&#8217;ve heard a number of requests from the community as well. Recently, I got some time here at Collabora to give it a go &#8212; that is, to get PulseAudio running on an Android device and see how it compares with Android&#8217;s AudioFlinger. The Contenders [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been meaning to try this for a while, and we&#8217;ve heard a number of requests from the community as well. Recently, I got some time here at <a href="http://www.collabora.com/projects/pulseaudio">Collabora</a> to give it a go &#8212; that is, to get PulseAudio running on an Android device and see how it compares with Android&#8217;s AudioFlinger.</p>

<h2>The Contenders</h2>

<p>Let&#8217;s introduce our contenders first. For those who don&#8217;t know, <a href="http://pulseaudio.org/">PulseAudio</a> is pretty much a de-facto standard part of the Linux audio stack. It sits on top of <acronym title="Advanced Linux Sound Architecture">ALSA</acronym> which provides a unified way to talk to the audio hardware and provides a number of handy features that are useful on desktops and embedded devices. I won&#8217;t rehash all of these, but this includes a nice modular framework, a bunch of power saving features, flexible routing, and lots more. PulseAudio runs as a daemon, and clients usually use the <tt>libpulse</tt> library to communicate with it.</p>

<p>In the other corner, we have Android&#8217;s native audio system &#8212; AudioFlinger. AudioFlinger was written from scratch for Android. It provides an API for playback/recording as well as a control mechanism for implementing policy. It does not depend on ALSA, but instead allows for a sort of <acronym title="Hardware Abstraction Layer">HAL</acronym> that vendors can implement any way they choose. Applications generally play audio via layers built on top of AudioFlinger. Even if you write a native application, it would use <a href="http://www.khronos.org/opensles/">OpenSL ES</a> implementation which goes through AudioFlinger. The actual service runs as a thread of the <tt>mediaserver</tt> daemon, but this is merely an implementation detail.</p>

<p><em>Note: all my comments about AudioFlinger and Android in general are based on documentation and code for Android 4.0 (Ice Cream Sandwich).</em></p>

<h2>The Arena</h2>

<p>My test-bed for the tests was the <a href="http://en.wikipedia.org/wiki/Galaxy_Nexus">Galaxy Nexus</a> running Android 4.0 which we shall just abbreviate to ICS. I picked ICS since it is the current platform on which Google is building, and hopefully represents the latest and greatest in AudioFlinger development. The Galaxy Nexus runs a Texas Instruments OMAP4 processor, which is also really convenient since this chip has pretty good support for running stock Linux (read on to see how useful this was).</p>

<h2>Preparations</h2>

<p>The first step in getting PulseAudio on Android was deciding between using the Android <acronym title="Native Development Kit">NDK</acronym> like a regular application or integrate into the base Android system. I chose the latter &#8212; even though this was a little more work initially, it made more sense in the long run since PulseAudio really belongs to the base-system.</p>

<p>The next task was to get the required dependencies ported to Android. Fortunately, a lot of the ground work for this was already done by some of the awesome folks at Collabora. Derek Foreman&#8217;s <a href="http://cgit.collabora.com/git/user/derek/androgenizer.git/"><tt>androgenizer</tt></a> tool is incredibly handy for converting an <tt>autotools</tt>-based build to Android&#8211;friendly makefiles. With Reynaldo Verdejo and Alessandro Decina&#8217;s prior work on <a href="http://gstreamer.freedesktop.org/modules/gst-android.html">GStreamer for Android</a> as a reference, things got even easier.</p>

<p>The most painful bit was <tt>libltdl</tt>, which we use for dynamically loading modules. Once this was done, the other dependencies were quite straightforward to port over. As a bonus, the Android source already ships an optimised version of Speex which we use for resampling, and it was easy to reuse this as well.</p>

<p>As I mentioned earlier, vendors can choose how they implement their audio abstraction layer. On the Galaxy Nexus, this is built on top of standard ALSA drivers, and the HAL talks to the drivers via a minimalist <a href="https://github.com/tinyalsa">tinyalsa</a> library. My first hope was to use this, but there was a whole bunch of functions missing that PulseAudio needed. The next approach was to use <a href="http://www.alsa-project.org/main/index.php/SALSA-Library">salsa-lib</a>, which is a stripped down version of the ALSA library written for embedded devices. This too had some missing functions, but these were fewer and easy to implement (and are now <a href="http://git.kernel.org/?p=linux/kernel/git/tiwai/salsa-lib.git;a=commit;h=8485a2bdc725b531794f277cd3e37973a8524830">upstream</a>).</p>

<p>Now if only life were that simple. :) I got PulseAudio running on the Galaxy Nexus with <tt>salsa-lib</tt>, and even got sound out of the HDMI port. Nothing from the speakers though (they&#8217;re driven by a TI <a href="http://www.ti.com/product/twl6040">twl6040</a> codec). Just to verify, I decided to port the full <tt>alsa-lib</tt> and <tt>alsa-utils</tt> packages to debug what&#8217;s happening (by this time, I&#8217;m familiar enough with <tt>androgenizer</tt> for all this to be a breeze). Still no luck. Finally, with some pointers from the kind folks at TI (thanks Liam!), I got current <acronym title="Use Case Manager">UCM</acronym> configuration files for OMAP4 boards, and some work-in-progress patches to add UCM support to PulseAudio, and after a couple of minor fixes, wham! We have output. :)</p>

<p><em>(For those who don&#8217;t know about UCM &#8212; embedded chips are quite different from desktops and expose a huge amount of functionality via ALSA mixer controls. UCM is an effort to have a standard, meaningful way for applications and users to use these.)</em></p>

<p>In production, it might be handy to write light-weight UCM support for <tt>salsa-lib</tt> or just convert the UCM configuration into PulseAudio path/profile configuration (bonus points if it&#8217;s an automated tool). For our purposes, though, just using <tt>alsa-lib</tt> is good enough.</p>

<p>To make the comparison fair, I wrote a simple test program that reads raw PCM S16LE data from a file and plays it via the <tt>AudioTrack</tt> interface provided by AudioFlinger or the PulseAudio <a href="http://freedesktop.org/software/pulseaudio/doxygen/async.html">Asynchronous API</a>. Tests were run with the brightness fixed, wifi off, and USB port connected to my laptop (for adb shell access).</p>

<p>All tests were run with the CPU frequency pegged at 350 MHz and with 44.1 and 48 kHz samples. Five readings were recorded, and the median value was finally taken.</p>

<h2>Round 1: CPU</h2>

<p>First, let&#8217;s take a look at how the two compare in terms of CPU usage. The numbers below are the percentage CPU usage taken as the sum of all threads of the audio server process and the audio thread in the client application using <tt>top</tt> (which is why the granularity is limited to an integer percentage).</p>

<table>
<colgroup span="2"/>
<colgroup span="2"/>
<tr> <th colspan="2">44.1 kHz</th> <th colspan="2">48 kHz</th> </tr>
<tr> <th>AF</th> <th>PA</th> <th>AF</th> <th>PA</th> </tr>
<tr> <td>1%</td> <td>1%</td> <td>2%</td> <td>0%</td> </tr>
</table>

<p>At 44.1 kHz, the two are essentially the same. Both cases are causing resampling to occur (the native sample rate for the device is 48 kHz). Resampling is done using the Speex library, and we&#8217;re seeing minuscule amounts of CPU usage even at 350 MHz, so it&#8217;s clear that the NEON optimisations are really paying off here.</p>

<p>The astute reader would have noticed that since the device&#8217; native sample rate is 48 kHz, the CPU usage for 48 kHz playback should be less than for 44.1 kHz. This is true with PulseAudio, but not with AudioFlinger! The reason for this little quirk is that AudioFlinger provides 44.1 kHz samples to the HAL (which means the stream is resampled there), and then the HAL needs to resample it again to 48 kHz to bring it to the device&#8217; native rate. From what I can tell, this is a matter of convention with regards to what audio HALs should expect from AudioFlinger (do correct me if I&#8217;m mistaken about the rationale).</p>

<p>So round 1 leans slightly in favour of PulseAudio.</p>

<h2>Round 2: Memory</h2>

<p>Comparing the memory consumption of the server process is a bit meaningless, because the AudioFlinger daemon thread shares an address space with the rest of the <tt>mediaserver</tt> process. For the curious, the resident set size was: AudioFlinger &#8212; 6,796 KB, PulseAudio &#8212; 3,024 KB. Again, this doesn&#8217;t really mean much.</p>

<p>We can, however, compare the client process&#8217; memory consumption. This is <acronym title="Resident Set Size">RSS</acronym> in kilobytes, measured using <tt>top</tt>.</p>

<table>
<colgroup span="2"/>
<colgroup span="2"/>
<tr> <th colspan="2">44.1 kHz</th> <th colspan="2">48 kHz</th> </tr>
<tr> <th>AF</th> <th>PA</th> <th>AF</th> <th>PA</th> </tr>
<tr> <td>2600 kB</td> <td>3020 kB</td> <td>2604 kB</td> <td>3020 kB</td> </tr>
</table>

<p>The memory consumption is comparable between the two, but leans in favour of AudioFlinger.</p>

<h2>Round 3: Power</h2>

<p>I didn&#8217;t have access to a power monitor, so I decided to use a couple of indirect metrics to compare power utilisation. The first of these is <a href="http://www.lesswatts.org/projects/powertop/">PowerTOP</a>, which is actually a Linux desktop tool for monitoring various power metrics. Happily, someone had already <a href="https://gitorious.org/android/powertop">ported PowerTOP to Android</a>. The tool reports, among other things, the number of wakeups-from-idle per second for the processor as a whole, and on a per-process basis. Since there are multiple threads involved, and PowerTOP&#8217;s per-process measurements are somewhat cryptic to add up, I used the global wakeups-from-idle per second. The &#8220;Idle&#8221; value counts the number of wakeups when nothing is happening. The actual value is very likely so high because the device is connected to my laptop in USB debugging mode (lots of wakeups from USB, and the device is prevented from going into a full sleep).</p>

<table>
<colgroup span="1"/>
<colgroup span="2"/>
<colgroup span="2"/>
<tr> <th></th> <th colspan="2">44.1 kHz</th> <th colspan="2">48 kHz</th> </tr>
<tr> <th>Idle</th> <th>AF</th> <th>PA</th> <th>AF</th> <th>PA</th> </tr>
<tr> <td>79.6</td> <td>107.8</td> <td>87.3</td> <td>108.5</td> <td>85.7</td> </tr>
</table>

<p>The second, similar, data point is the number of interrupts per second reported by <tt>vmstat</tt>. These corroborate the numbers above:</p>

<table>
<colgroup span="1"/>
<colgroup span="2"/>
<colgroup span="2"/>
<tr> <th></th> <th colspan="2">44.1 kHz</th> <th colspan="2">48 kHz</th> </tr>
<tr> <th>Idle</th> <th>AF</th> <th>PA</th> <th>AF</th> <th>PA</th> </tr>
<tr> <td>190</td> <td>266</td> <td>215</td> <td>284</td> <td>207</td> </tr>
</table>

<p>PulseAudio&#8217;s power-saving features are clearly highlighted in this comparison. AudioFlinger causes <em>about three times the number of wakeups per second</em> that PulseAudio does. Things might actually be worse on older hardware with less optimised drivers than the Galaxy Nexus (I&#8217;d appreciate reports from running similar tests on a Nexus S or any other device with ALSA support to confirm this).</p>

<p>For those of you who aren&#8217;t familiar with PulseAudio, the reason we manage to get these savings is our timer-based scheduling mode. In this mode, we fill up the hardware buffer as much as possible and go to sleep (disabling ALSA interrupts while we&#8217;re at it, if possibe). We only wake up when the buffer is nearing empty, and fill it up again. More details can be found in this old <a href="http://0pointer.de/blog/projects/pulse-glitch-free.html">blog post by Lennart</a>.</p>

<h2>Round 4: Latency</h2>

<p>I&#8217;ve only had the Galaxy Nexus to actually try this out with, but I&#8217;m pretty certain I&#8217;m not the only person seeing <a href="http://code.google.com/p/android/issues/detail?id=3434">latency issues on Android</a>. On the Galaxy Nexus, for example, the best latency I can get appears to be 176 ms. This is pretty high for certain types of applications, particularly ones that generate tones based on user input.</p>

<p>With PulseAudio, where we dynamically adjust buffering based on what clients request, I was able to drive down the total buffering to approximately 20 ms (too much lower, and we started getting dropouts). There is likely room for improvement here, and it is something on my todo list, but even out-of-the-box, we&#8217;re doing quite well.</p>

<h2>Round 5: Features</h2>

<p>With the hard numbers out of the way, I&#8217;d like to talk a little bit about what else PulseAudio brings to the table. In addition to a playback/record API, AudioFlinger provides mechanism for enforcing various bits of policy such as volumes and setting the &#8220;active&#8221; device amongst others. PulseAudio exposes similar functionality, some as part of the client API and the rest via the core API exposed to modules.</p>

<p>From <acronym title="System-on-Chip">SoC</acronym> vendors&#8217; perspective, it is often necessary to support both Android and standard Linux on the same chip. Being able to focus only on good quality ALSA drivers and knowing that this will ensure quality on both these systems would be a definite advantage in this case.</p>

<p>The current Android system leaves power management to the audio HAL. This means that each vendor needs to implement this themselves. Letting PulseAudio manage the hardware based on requested latencies and policy gives us a single point of control, greatly simplifying the task of power-management and avoiding code duplication.</p>

<p>There are a number of features that PulseAudio provides that can be useful in the various scenarios where Android is used. For example, we support transparently streaming audio over the network, which could be a handy way of supporting playing audio from your phone on your TV completely transparently and out-of-the-box. We also support compressed formats (AC3, DTS, etc.) which the ongoing Android-on-your-TV efforts could likely take advantage of.</p>

<p><em>Edit: As someone pointed out on LWN, I missed one thing &#8212; AudioFlinger has an effect API that we do not yet have in PulseAudio. It&#8217;s something I&#8217;d definitely like to see added to PulseAudio in the future.</em></p>

<h2>Ding! Ding! Ding!</h2>

<p>That pretty much concludes the comparison of these two audio daemons. Since the Android-side code is somewhat under-documented, I&#8217;d welcome comments from readers who are familiar with the code and history of AudioFlinger.</p>

<p>I&#8217;m in the process of pushing all the patches I&#8217;ve had to write to the various upstream projects. A number of these are merely build system patches to integrate with the Android build system, and I&#8217;m hoping projects are open to these. Instructions on building this code will be available on the <a href="http://www.pulseaudio.org/wiki/Android">PulseAudio Android wiki page</a>.</p>

<p>For future work, it would be interesting to write a wrapper on top of PulseAudio that exposes the AudioFlinger audio and policy APIs &#8212; this would basically let us run PulseAudio as a drop-in AudioFlinger replacement. In addition, there are potential performance benefits that can be derived from using Android-specific infrastructure such as Binder (for <acronym title="Inter-Process Communication">IPC</acronym>) and <tt>ashmem</tt> (for transferring audio blocks as shared memory segments, something we support on desktops using the standard Linux SHM mechanism which is not available on Android).</p>

<p>If you&#8217;re an OEM who is interested in this work, you can get in touch with us &#8212; details are on the <a href="http://www.collabora.com/contact/">Collabora website</a>.</p>

<p>I hope this is useful to some of you out there!</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2012/01/pulseaudio-vs-audioflinger-fight/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>Talk video from GstConf 2011</title>
		<link>http://arunraghavan.net/2011/11/talk-video-from-gstconf-2011/</link>
		<comments>http://arunraghavan.net/2011/11/talk-video-from-gstconf-2011/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 13:50:43 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[pulseaudio]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1182</guid>
		<description><![CDATA[For those of you who were interested but couldn&#8217;t make it to the GStreamer Conference this year, the cool folks at Ubicast have got the talk videos up (can be streamed or downloaded). Among these is my talk about recent developments in the PulseAudio world.]]></description>
			<content:encoded><![CDATA[<p>For those of you who were interested but couldn&#8217;t make it to the GStreamer Conference this year, the cool folks at Ubicast have got the <a href="http://gstconf.ubicast.tv/channels/#conferences2011">talk videos up</a> (can be streamed or downloaded).</p>

<p>Among these is <a href="http://gstconf.ubicast.tv/videos/latest-developments-in-pulse-audio/">my talk</a> about recent developments in the PulseAudio world.</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/11/talk-video-from-gstconf-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>i&#8217;m in yur analog gain, controlling it</title>
		<link>http://arunraghavan.net/2011/11/im-in-yur-analog-gain-controlling-it/</link>
		<comments>http://arunraghavan.net/2011/11/im-in-yur-analog-gain-controlling-it/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 19:13:00 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1169</guid>
		<description><![CDATA[Longish day, but I did want to post something fun before going to sleep &#8212; I just pushed out patches to hook up the WebRTC folks&#8217; analog gain control to PulseAudio. So your mic will automatically adjust the input level based on how loud you&#8217;re speaking. It&#8217;s quite quick to adapt if you&#8217;re too loud, [...]]]></description>
			<content:encoded><![CDATA[<p>Longish day, but I did want to post something fun before going to sleep &#8212; I just pushed out patches to hook up the WebRTC folks&#8217; analog gain control to PulseAudio. So your mic will automatically adjust the input level based on how loud you&#8217;re speaking. It&#8217;s quite quick to adapt if you&#8217;re too loud, but a bit slow when the input signal is too soft. This isn&#8217;t bad, since the former is a much bigger problem than the latter.</p>

<p>Also, we&#8217;ve switched to the WebRTC canceller as the default canceller (you can still choose the Speex canceller manually, though). Overall, the quality is pretty good. I&#8217;d do a demo, but it&#8217;s effectively had zero learning time in my tests, so we&#8217;re not too far from a stage where this is a feature that, <em>if we&#8217;re doing it right you won&#8217;t notice it exists</em>.</p>

<p>There lot&#8217;s of things, big and small that need to be added and tweaked, but this does go some way towards bringing a hassle-free VoIP experience on Linux closer to reality. Once again, kudos to the folks at Google for the great work and for opening up this code. Also a shout-out to fellow <a href="http://www.collabora.com">Collaboran</a> <a href="http://sjoerd.luon.net/blog/">Sjoerd Simons</a> for bouncing ideas and giving me those much-needed respites from talking to myself. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/11/im-in-yur-analog-gain-controlling-it/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Notes from the Prague Audio BoFs</title>
		<link>http://arunraghavan.net/2011/11/notes-from-the-prague-audio-bofs/</link>
		<comments>http://arunraghavan.net/2011/11/notes-from-the-prague-audio-bofs/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 07:06:13 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[pulseaudio]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1123</guid>
		<description><![CDATA[As I&#8217;d blogged about last week, we had a couple of Audio BoF sessions last week. Here&#8217;s a summary of what was discussed. I&#8217;ve collected items in relevance order rather than chronological order to make for easier reading. I think I have everything covered, I&#8217;ll update this post if one of the attendees points out [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;d blogged about last week, we had a couple of Audio <acronym title="Birds of a Feather">BoF</acronym> sessions last week. Here&#8217;s a summary of what was discussed. I&#8217;ve collected items in relevance order rather than chronological order to make for easier reading. I think I have everything covered, I&#8217;ll update this post if one of the attendees points out something I missed or got wrong.</p>

<ul>
<li><p><strong>Surround</strong>: There were a number of topics that came up with regards to multichannel/surround support:</p>

<ul>
<li><p>There seems to be some lack of uniformity of channel maps, particularly in non-HDA hardware. While it was agreed that this should be fixed, we need some directed testing and bug reports to actually be able to fix this.</p></li>
<li><p>Multichannel mixers, while theoretically supported, are not actually exposed by any current drivers. It was suggested that these could be exposed without breaking existing applications by having new MC mixers exposed with device names corresponding to the surround PCM device (like &#8220;surround51&#8243;).</p></li>
<li><p>We need a way to query channel maps on a given PCM. This will be implemented as a new ALSA API which could be called after the PCM is opened. (<em>AI: Takashi</em>)</p></li>
<li><p>It would be good to have a way to configure the channel map as well (if supported by the hardware?). The suggestion was to do this as was done in PulseAudio, where an arbitrary channel map could be specified. (NB: is there hardware that supports multiple/arbitrary channel maps? If yes, how do we handle this?)</p></li>
</ul></li>
<li><p><strong>Routing</strong>: Unsurprisingly, we came back to the problem of building a simplified mixer graph for PulseAudio.</p>

<ul>
<li><p>The current status is that ALSA builds a simplified mixer for use by userspace, and PulseAudio further simplifies this by means of some name-based guessing.</p></li>
<li><p>PulseAudio would ideally like a simplified version of the original mixer graph, but something more complete than what we get now</p></li>
<li><p>However, since PulseAudio has fairly unique requirements of what information it wants, it probably makes sense to have ALSA provide the entire graph and leave the simplification task to PulseAudio (discussion on this approach continues)</p></li>
<li><p>There was no consensus on who would do this or how this should be done (creating a new serialisation format, exposing what HDA provides, adding node metadata to ALSA mixer controls, or something else altogether)</p></li>
<li><p>As an interim step, it was agreed that it would be possible to provide ordering in the simplified ALSA mixer (that is, add metadata to the control to signal what control comes &#8220;before&#8221; it and what comes &#8220;after&#8221; it). This should go some way in making the PA mixer simplification logic simpler and more robust. (<em>AI: Takashi</em>)</p></li>
</ul></li>
<li><p><strong>HDMI</strong>: A couple of things came up in discussion about the status of HDMI.</p>

<ul>
<li><p>There was a question about the reliability of <acronym title="EDID-like data">ELD</acronym> information as this will be used more in future versions of PulseAudio. There did not appear to be conclusive evidence in either direction, so we will probably assume that it is reliable and deal with reliability problems as they arise.</p></li>
<li><p>It was mentioned that it might be desirable to only expose the ALSA device if a receiver is plugged in. This had been mooted earlier as something to do in PulseAudio as an alternative. One thing to consider with this approach is dealing with a device switch on the receiver side. Doing this without a notification to userspace was generally agreed to be a bad idea.</p></li>
</ul></li>
<li><p><strong>Jack detection</strong>: The long-standing debate on exposing jacks as input devices or ALSA controls came to a conclusion, with the resolution being that jacks would be exposed as ALSA controls. This requires a change in the kernel (and potentially alsa-lib?) which should not be too complex. Actual buttons (such as volume/mute control) will continue to be input devices. Once this is done, the pending jack detection patches will be adapted to use the new interface. (<em>AI: Takashi (patches are in a branch already!), David</em>)</p></li>
<li><p><strong>UCM</strong>: Another long-standing issue was the merging of the ALSA UCM patches into PulseAudio. Most of the problems thus far had been due to an incomplete understanding of how ALSA and PA concepts mapped to each other. Some consensus was arrived at in this regard after a lengthy discussion:</p>

<ul>
<li><p>As is the case now, every ALSA PCM maps to a PA sink</p></li>
<li><p>Each UCM verb maps to a PA card profile</p></li>
<li><p>Each combination of UCM devices that can be used concurrently maps to a PA port</p></li>
<li><p>Each UCM modifier is mapped to an intended role on the corresponding sink</p></li>
</ul>

<p>The code should (as is in the patches currently submitted) be part of the PA ALSA module, and there will be changes required to use the UCM-specified mixer list instead of PA&#8217;s guessing mechanism. (<em>AI: ???</em>)</p>

<p>(NB: It was mentioned that PulseAudio needs to support multiple intended roles for a sink/source. This is actually already supported &#8212; the intended roles property is a whitespace-separated list of roles)</p>

<p>(NB2: There was further discussion with the Linaro folks this week about the UCM bits, and there&#8217;s likely going to be an IRC/phone gathering to clarify things further in the near future)</p></li>
<li><p><strong>GStreamer latency settings</strong>: We currently do not actually use PulseAudio&#8217;s power saving features from GStreamer for <a href="http://arunraghavan.net/2011/05/more-pulseaudio-power-goodness/">several reasons</a>. Suggestions to over come this were mooted. While no definite agreement was reached, one suggestion was to add a &#8220;powersave&#8221; profile to pulsesink that chose higher latency/buffer-time values. Players would need to set this if they are not using features that break when these values are raised.</p></li>
<li><p><strong>Corking</strong>: The statelessness of current the corking mechanism was discussed in one session, and between the PulseAudio developers later. The problem is that we need to be able to track cork/uncork reasons more closely. This would give us more metadata that is needed to make policy decisions without breaking streams. Particularly, for example, if PA corks a music stream due to an incoming call, then the user plays, then pauses music, and then the call ends, we must not uncork the music stream. We intend to deal with this with two changes:</p>

<ul>
<li><p>We need to add a per-cause cork/uncork request count</p></li>
<li><p>We need to associate a &#8220;generation&#8221; with cork/uncork requests, so certain conditions (such as user intervention) can bump the generation counter, and uncork requests corresponding to old cork requests will be ignored</p></li>
</ul>

<p>This will make it possible to track the various bits of state we need to do the right thing for cases like the one mentioned before.</p></li>
</ul>

<p>So that&#8217;s that &#8212; lots of things discussed, lots of things to do! Thanks to everyone who came for participating.</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/11/notes-from-the-prague-audio-bofs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PragueAudio</title>
		<link>http://arunraghavan.net/2011/10/pragueaudio/</link>
		<comments>http://arunraghavan.net/2011/10/pragueaudio/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 22:23:31 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[pulseaudio]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1117</guid>
		<description><![CDATA[For those who are in Prague for GstConf, LinuxCon, ELCE, etc. &#8212; don&#8217;t forget we&#8217;ve a couple of interesting audio-related things happening: Today (Tuesday), at 4 pm, I&#8217;ll be talking about recent developments in PulseAudio Tomorrow (Wednesday), at 11am, we&#8217;re continuing the Audio BoF that I had [mentioned earlier] (since we ran out of time [...]]]></description>
			<content:encoded><![CDATA[<p>For those who are in Prague for GstConf, LinuxCon, ELCE, etc. &#8212; don&#8217;t forget we&#8217;ve a couple of interesting audio-related things happening:</p>

<ul>
<li>Today (Tuesday), at 4 pm, I&#8217;ll be talking about <a href="http://gstreamer.freedesktop.org/conference/speakers.html#raghavan">recent developments in PulseAudio</a></li>
<li>Tomorrow (Wednesday), at 11am, we&#8217;re continuing the Audio BoF that I had <a href="http://arunraghavan.net/2011/10/more-conferences-than-you-can-shake-a-stick-at/">mentioned earlier</a> (since we ran out of time on Sunday)</li>
</ul>

<p>If you&#8217;re around and interested, do drop in!</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/10/pragueaudio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PulseAudio 1.1 (the echo release?)</title>
		<link>http://arunraghavan.net/2011/10/pulseaudio-1-1-the-echo-release/</link>
		<comments>http://arunraghavan.net/2011/10/pulseaudio-1-1-the-echo-release/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 03:22:51 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[pulseaudio]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1111</guid>
		<description><![CDATA[Yep, if we keep this up, it could even become a habit! PulseAudio 1.1 is out. It&#8217;s mostly a bunch of bug fixes on top of 1.0. Most important of these are fixes for: a libpulse dependency on libsamplerate (if enabled) which would make our LGPL license invalid, broken Skype audio capture (because we changed [...]]]></description>
			<content:encoded><![CDATA[<p>Yep, if we keep this up, it could even become a habit!</p>

<p>PulseAudio 1.1 is out. It&#8217;s mostly a bunch of bug fixes on top of 1.0. Most important of these are fixes for: a <tt>libpulse</tt> dependency on libsamplerate (if enabled) which would make our LGPL license invalid, broken Skype audio capture (because we changed from a 3 number version to 2 numbers), broken startup without a DBus session bus running, and not going crazy on USB disconnects.</p>

<p>This should be a very safe upgrade, so <a href="http://lists.freedesktop.org/archives/pulseaudio-discuss/2011-October/011898.html">grab it while it&#8217;s hot</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/10/pulseaudio-1-1-the-echo-release/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Alternate sample rates</title>
		<link>http://arunraghavan.net/2011/10/alternate-sample-rates/</link>
		<comments>http://arunraghavan.net/2011/10/alternate-sample-rates/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 04:34:35 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1101</guid>
		<description><![CDATA[I&#8217;ve just pushed a bunch of patches by Pierre-Louis Bossart that can have a pretty decent CPU/power impact. These introduce the concept of an &#8220;alternate sample rate&#8221;. Currently, PulseAudio runs all your devices at a default sample rate, which is set to 44.1 kHz on most systems (this can be configured). All streams running at [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just pushed a bunch of patches by Pierre-Louis Bossart that can have a pretty decent CPU/power impact. These introduce the concept of an &#8220;alternate sample rate&#8221;.</p>

<p>Currently, PulseAudio runs all your devices at a default sample rate, which is set to 44.1 kHz on most systems (this can be configured). All streams running at different sample rates are resampled to this sample rate. Pierre&#8217;s patches add an alternate sample rate that we try to switch to under certain circumstances if it means that we can save on resampling cost. This would happen if the stream uses exactly the alternate sample rate, or some integral-or-so multiple of it.</p>

<p>The default value for the alternate sample rate is 48 kHz. So if you&#8217;re playing a movie off a DVD where the audio track is typically a 48 kHz stream, and your card supports it, we switch to 48 kHz and avoid resampling altogether. Similarly, while making voice calls, common sample rates are 8, 16, and 32 kHz. These can be resampled to 48 kHz much faster than to 44.1 kHz.</p>

<p>Now for the big caveat &#8212; this won&#8217;t work if there&#8217;s any other stream connected to your sink/source. So if your music player is playing (or even paused) when you get that voip call, we can&#8217;t update the rate. This situation can probably be improved by at least allowing corked streams have their sample rate change (so having some random stream connected but not playing &#8212; I&#8217;m looking at you, Flash! &#8212; won&#8217;t block rate updates altogether). Hopefully we&#8217;ll get this fixed before this feature is released in PulseAudio 2.0.</p>

<p>Thanks to Pierre for all his work on this, and to my company, <a href="http://www.collabora.com/projects/pulseaudio">Collabora</a>, for giving me some time for upstream work!</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/10/alternate-sample-rates/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>More conferences than you can shake a stick at</title>
		<link>http://arunraghavan.net/2011/10/more-conferences-than-you-can-shake-a-stick-at/</link>
		<comments>http://arunraghavan.net/2011/10/more-conferences-than-you-can-shake-a-stick-at/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 04:34:26 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[pulseaudio]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1085</guid>
		<description><![CDATA[Prague is an interesting place to be at this time of the year &#8212; next week it&#8217;s playing host to the Real Time Linux Workshop. The week after that, we have the Kernel Summit, GStreamer Conference, Embedded Linux Conference Europe and LinuxCon Europe. I&#8217;m going to be at the last 3, and there&#8217;s some great [...]]]></description>
			<content:encoded><![CDATA[<p>Prague is an interesting place to be at this time of the year &#8212; next week it&#8217;s playing host to the Real Time Linux Workshop. The week after that, we have the Kernel Summit, GStreamer Conference, Embedded Linux Conference Europe and LinuxCon Europe. I&#8217;m going to be at the last 3, and there&#8217;s some great audio stuff happening!</p>

<p>On the evening of Oct 23rd, we&#8217;re having an Audio BoF to discuss pending issues that cut across the stack &#8212; ALSA, PulseAudio, GStreamer and any other similar bits that people have complaints about.</p>

<p>Then there&#8217;s <a href="http://gstreamer.freedesktop.org/conference/">GstConf</a>, where there are going to be <a href="http://gstreamer.freedesktop.org/conference/gstreamer-conference-timetable.html">a bunch of awesome talks</a>. Also included is a <a href="http://gstreamer.freedesktop.org/conference/speakers.html#raghavan">talk</a> by yours truly about recent developments in the PulseAudio world.</p>

<p>At some point during that week, possibly Oct 26th morning, plans are afoot to have an ALSA BoF to discuss the state and future of the HDA driver.</p>

<p>There are also rumours of excellent beer that will need to be scrupulously verified. ;)</p>

<p>It&#8217;s going to be a pretty exciting week!</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/10/more-conferences-than-you-can-shake-a-stick-at/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>1.w00t!</title>
		<link>http://arunraghavan.net/2011/09/1-w00t/</link>
		<comments>http://arunraghavan.net/2011/09/1-w00t/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 15:33:28 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1076</guid>
		<description><![CDATA[As Colin Guthrie reports, PulseAudio 1.0 is now out the door! There&#8217;s a lot of new things in the release, and we should be getting a much more regular release schedule going. Head over to the full release notes for more details. A lot of people have contributed to this release and thanks to them [...]]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://colin.guthr.ie/2011/09/one-point-oh/">Colin Guthrie reports</a>, PulseAudio 1.0 is now out the door! There&#8217;s a lot of new things in the release, and we should be getting a much more regular release schedule going. Head over to the <a href="http://www.freedesktop.org/wiki/Software/PulseAudio/Notes/1.0">full release notes</a> for more details.</p>

<p>A lot of people have contributed to this release and thanks to them all. Special props to Colin all the patch-herding, tireless help, and code ninjutsu!</p>

<p>p.s.: Gentoo packages are already available, of course. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/09/1-w00t/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Well done, Adobe!</title>
		<link>http://arunraghavan.net/2011/09/well-done-adobe/</link>
		<comments>http://arunraghavan.net/2011/09/well-done-adobe/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 13:23:33 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pulseaudio]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1069</guid>
		<description><![CDATA[In an unsurprising turn of events, Adobe completely fails to play well with modern Linux systems. Well done, guys. Well done, indeed. p.s.: I was quite happy to see that the Google Talk plugin has proper PulseAudio support (thanks to the WebRTC née GIPS code, it looks like).]]></description>
			<content:encoded><![CDATA[<p>In an unsurprising turn of events, Adobe completely <a href="https://bugbase.adobe.com/index.cfm?event=bug&amp;id=2968177">fails to play well</a> with modern Linux systems. Well done, guys. Well done, indeed.</p>

<p>p.s.: I was quite happy to see that the Google Talk plugin has proper PulseAudio support (thanks to the WebRTC née GIPS code, it looks like).</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/09/well-done-adobe/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>LPC ho!</title>
		<link>http://arunraghavan.net/2011/09/lpc-ho/</link>
		<comments>http://arunraghavan.net/2011/09/lpc-ho/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 06:01:35 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/2011/09/lpc-ho/</guid>
		<description><![CDATA[I&#8217;m going to be at the Linux Plumbers&#8217; Conference next week, speaking about the things we&#8217;ve been doing to make passthrough audio on Linux kick ass. If you&#8217;re around and interested, do drop by!]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to be at the <a href="http://www.linuxplumbersconf.org/2011/">Linux Plumbers&#8217; Conference</a> next week, speaking about the things we&#8217;ve been doing to make <a href="http://www.linuxplumbersconf.org/2011/ocw/sessions/117">passthrough audio on Linux</a> kick ass.</p>

<p>If you&#8217;re around and interested, do drop by!</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/09/lpc-ho/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello &#8230; hello &#8230; hello!</title>
		<link>http://arunraghavan.net/2011/08/hello-hello-hello/</link>
		<comments>http://arunraghavan.net/2011/08/hello-hello-hello/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 08:11:41 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1044</guid>
		<description><![CDATA[I have a secret to confess. I&#8217;ve spent a great deal of time over the last few months talking to myself. I can&#8217;t say I haven&#8217;t enjoyed it &#8212; it turns out my capacity to entertain myself is far greater than initially suspected. But I hear you ask &#8230; why? Here at Collabora, I&#8217;ve been [...]]]></description>
			<content:encoded><![CDATA[<p>I have a secret to confess. I&#8217;ve spent a great deal of time over the last few months talking to myself. I can&#8217;t say I haven&#8217;t enjoyed it &#8212; it turns out my capacity to entertain myself is far greater than initially suspected. But I hear you ask &#8230; why?</p>

<p>Here at <a href="http://www.collabora.com/">Collabora</a>, I&#8217;ve been building on <a href="http://blogs.gnome.org/uraeus/2010/10/07/echo-cancellation-on-linux/">Wim&#8217;s previous work</a> on adding echo cancellation to PulseAudio. Thanks go to Intel for supporting us in continuing this work. Before too long, all this work will be trickling down to your favourite Linux distribution and all your friends will stop hating you.</p>

<p>First, a quick recap on <em>what</em> acoustic echo cancellation (AEC) is. If you already know this, you might want to skip this paragraph and the next. Say you&#8217;re on your laptop, and you receive a voice call from your friend. You don&#8217;t have a pair of headphones lying around, so you&#8217;re just going to use your laptop&#8217;s built-in speakers and mic. When your friend speaks, what she says is played out the speakers, but is also captured by the microphone and she gets to hear herself speak, albeit a short while (a few hundred milliseconds or more) later. This is called acoustic echo, and can be frustrating enough to make conversation nigh impossible. There are other types of echo for phone systems, but that&#8217;s not interesting to us at the moment.</p>

<p>This problem is common on pretty much all devices that you use to make phone calls. Astute readers will ask why they don&#8217;t actually face this problem on their phone. That&#8217;s because your phone (or, if you have a cheap phone, your phone company) has special software hidden away that removes the echo before sending your signal along to the other end. On laptops, which are general-purpose hardware, the job of echo cancellation is left to either your operating system (Windows XP onwards, for example) or your chat client (Skype, for example) to provide.</p>

<p>On Linux, we implement echo cancellation as a PulseAudio module (code-ninja Wim Taymans wrote this last year). We use the Speex DSP library to perform the actual echo cancellation.  The code&#8217;s quite modular, so it&#8217;s not very hard to plug in alternate echo cancellers (we even include an <a href="http://www.andreadrian.de/intercom/">alternate implementation</a>, which isn&#8217;t quite as effective as Speex).</p>

<p>Recently, we plugged in some more bits from the Speex library to do noise suppression and digital gain control (so you can quit twiddling with your mic volume for the other end to be able to hear you). We also added a bunch of fixes to reduce CPU consumption significantly &#8212; this should be good enough to run on a netbook and reasonably recent ARM platforms.</p>

<p>While all this sounds nice, I think a demo would sound (haha!) nicer &#8230;</p>

<p>Without AEC: <!-- degradable html5 audio and video plugin --><div class="audio_wrap html5audio"><audio controls id="html5audio-0" class="html5audio"><source src="/downloads/pulseaudio/aec/call-no-aec.m4a" type="audio/mp4" /><source src="/downloads/pulseaudio/aec/call-no-aec.oga" type="audio/ogg" /><a href="http://arunraghavan.net/downloads/pulseaudio/aec/call-no-aec.mp3" title="Click to open" id="f-html5audio-0">Audio MP3</a><script type="text/javascript">AudioPlayer.embed("f-html5audio-0", {soundFile: "/downloads/pulseaudio/aec/call-no-aec.mp3"});</script></audio></div> (or download <a href="http://arunraghavan.net/downloads/pulseaudio/aec/call-no-aec.oga">ogg</a>, <a href="http://arunraghavan.net/downloads/pulseaudio/aec/call-no-aec.m4a">aac</a>)</p>

<p>With AEC: <!-- degradable html5 audio and video plugin --><div class="audio_wrap html5audio"><audio controls id="html5audio-1" class="html5audio"><source src="/downloads/pulseaudio/aec/call-with-aec.m4a" type="audio/mp4" /><source src="/downloads/pulseaudio/aec/call-with-aec.oga" type="audio/ogg" /><a href="http://arunraghavan.net/downloads/pulseaudio/aec/call-with-aec.mp3" title="Click to open" id="f-html5audio-1">Audio MP3</a><script type="text/javascript">AudioPlayer.embed("f-html5audio-1", {soundFile: "/downloads/pulseaudio/aec/call-with-aec.mp3"});</script></audio></div> (or download <a href="http://arunraghavan.net/downloads/pulseaudio/aec/call-with-aec.oga">ogg</a>, <a href="http://arunraghavan.net/downloads/pulseaudio/aec/call-with-aec.m4a">aac</a>)</p>

<p>This is a recording of a call between my laptop and N900. The laptop is playing audio out the speakers and recording with the built-in mic. What you hear is the conversation as heard on the N900.</p>

<p>All this echo cancelling goodness will come to a Linux distribution near you in the upcoming 1.0 release of PulseAudio. The next version of the GNOME IM client, Empathy (3.2), will actually make use of this functionality. In due time, we intend to make it so that all voice applications will end up using this functionality (so if you&#8217;re writing a <acronym title="Voice over IP">VoIP</acronym> application and don&#8217;t want to use this functionality, you need to set a special stream property to disable this &#8212; <tt>filter.suppress="echo-cancel"</tt>).</p>

<p>For the impatient among you, you can try all this out by getting recent testing versions of PulseAudio (I know packages are available for Ubuntu, Debian, Gentoo and Mageia at least). To force your phone streams to use echo cancellation, just run <tt>pactl load-module module-echo-cancel</tt>, and you&#8217;re done.</p>

<p>There&#8217;s still some work to be done, refining quality and using other AEC implementations (in the short-term, the WebRTC one looks promising). Things don&#8217;t work at all if you&#8217;re using different devices for playback and capture (e.g. laptop speakers and webcam mic). These are things that will be addressed in coming weeks and months.</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/08/hello-hello-hello/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Desktop Summit 2011</title>
		<link>http://arunraghavan.net/2011/08/desktop-summit-2011/</link>
		<comments>http://arunraghavan.net/2011/08/desktop-summit-2011/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 10:27:45 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[pulseaudio]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1038</guid>
		<description><![CDATA[I&#8217;m in Berlin at the Desktop Summit, so you can drop me a note and we can meet if you want to yell about PulseAudio things that annoy you (or even, y&#8217;know, things you like).]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in Berlin at the Desktop Summit, so you can drop me a note and we can meet if you want to yell about PulseAudio things that annoy you (or even, y&#8217;know, things you like).</p>

<p><a href="http://www.desktopsummit.org/"><img alt="I&#039;m at Desktop Summit 2011" src="/downloads/ds2011banner.png" title="I&#039;m at Desktop Summit 2011" class="aligncenter" width="333" height="110" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/08/desktop-summit-2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More PulseAudio power goodness</title>
		<link>http://arunraghavan.net/2011/05/more-pulseaudio-power-goodness/</link>
		<comments>http://arunraghavan.net/2011/05/more-pulseaudio-power-goodness/#comments</comments>
		<pubDate>Tue, 17 May 2011 04:20:57 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=1009</guid>
		<description><![CDATA[[tl;dr — if you're using GNOME or a GStreamer-based player, not using the Rhythmbox crossfading backend, and want to try to save ~0.5 W of power, jump to end of the post] Lennart pointed to another blog post about actually putting PulseAudio&#8217;s power-saving capabilities to use on your system. The latter provides a hack-ish way [...]]]></description>
			<content:encoded><![CDATA[<p><em>[tl;dr — if you're using GNOME or a GStreamer-based player, not using the Rhythmbox crossfading backend, and want to try to save ~0.5 W of power, jump to end of the post]</em></p>

<p>Lennart <a href="http://0pointer.de/blog/projects/pa-and-power.html">pointed</a> to another <a href="http://linux-tipps.blogspot.com/2011/04/power-performance-of-pulseaudio-alsa.html">blog post</a> about actually putting PulseAudio&#8217;s power-saving capabilities to use on your system. The latter provides a hack-ish way to increase buffering in PulseAudio to the maximum possible, reducing the number of wakeups. I&#8217;m going to talk about that a bit.</p>

<p>Summarising the basic idea, we want music players to decode a large chunk of data and give it to PA so that we can then fill up ALSA&#8217;s hardware buffer, sleep till it&#8217;s almost completely consumed, fill it again, sleep, repeat. More details in this <a href="http://0pointer.de/blog/projects/pulse-glitch-free.html">post from Lennart</a>.</p>

<p>The native GNOME audio/video players don&#8217;t talk to PulseAudio directly — they use GStreamer, which has a <tt>pulsesink</tt> element that actually talks to PulseAudio. We could configure things so that we send a large amount (say 2 seconds&#8217; worth) to PulseAudio, sleep, and then wake up periodically to push out more. Now in the audio player (say Rhythmbox), the user hits next, prev, or pause. We need to effect this change immediately, even though we&#8217;ve already sent out 2 seconds of data (it would suck if you hit pause and the actual pause happened 2 seconds later, wouldn&#8217;t it?). PulseAudio already solves because it can internally &#8220;rewind&#8221; the buffer and overwrite it if required. GStreamer can and does take advantage of this by sending pause and other control messages out of band from the data.</p>

<p>This all works well for relatively simple GStreamer pipelines. However, if you want to do something more complicated, like Rhythmbox&#8217; crossfading backend, things start to break. PulseAudio doesn&#8217;t offer an API to do fades, and since we don&#8217;t do rewinds in GStreamer, we need to apply effects such as fades with a latency equal to the amount of buffering we&#8217;re asking PulseAudio to do. This makes for unhappy users.</p>

<p>Well, all is not as bleak as it seems. There was some <a href="https://tango.0pointer.de/pipermail/pulseaudio-discuss/2011-February/008879.html">discussion</a> on the PA mailing list, and the need for a proper fade API (really, a generic effects API) is clear. There have even been attempts to <a href="https://bugzilla.gnome.org/show_bug.cgi?id=641544">solve this in GStreamer</a>.</p>

<p>But you want to save 0.5 W of power now! Okay, if you&#8217;re not using the Rhythmbox crossfading backend (or are okay with disabling it), this will make Rhythmbox, Banshee, pre-3.0 Totem (and really any GNOMEy player that uses <tt>gconfaudiosink</tt>, which will soon be replaced by <tt>gsettingsaudiosink</tt>, I guess), you can run this on the command line:</p>

<pre><code>gconftool-2 --type string \
    --set /system/gstreamer/0.10/default/musicaudiosink \
    "pulsesink latency-time=100000 buffer-time=2000000"
</code></pre>

<p>On my machine, this brings down the number of wakeups per second because of alsa-sink to ~2.7 (corresponding nicely to the ~350ms of hardware buffer that I have). With Totem 3.0, this may or may not work, depending on whether your distribution gives <tt>gconfaudiosink</tt> a higher rank than <tt>pulseaudiosink</tt>.</p>

<p>This is clearly just a stop-gap till we can get things done the Right Way™ at the system level, so really, if things break, you get to keep the pieces. If you need to, you can undo this change by running the same command without the latency-time=… and buffer-time=… bits. That said, if something does break, do leave a comment below so I can add it to the list of things that we need to test the final solution with.</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/05/more-pulseaudio-power-goodness/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>GNOME Asia 2011</title>
		<link>http://arunraghavan.net/2011/03/gnome-asia-2011/</link>
		<comments>http://arunraghavan.net/2011/03/gnome-asia-2011/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 07:24:15 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[rygel]]></category>
		<category><![CDATA[soc]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=998</guid>
		<description><![CDATA[Just a quick (and late!) heads-up for all of you who missed it &#8212; the GNOME Asia Summit 2011 is happening in Bangalore this week, with a bunch of really cool people doing hackfests through the week, and whole bunch of talks on Saturday and Sunday (April 2nd and 3rd). I&#8217;ll be presenting a talk [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick (and late!) heads-up for all of you who missed it &#8212; the <a href="http://2011.gnome.asia/">GNOME Asia Summit 2011</a> is happening in Bangalore this week, with a bunch of really cool people doing hackfests through the week, and whole bunch of talks on Saturday and Sunday (April 2nd and 3rd).</p>

<p><img alt="" src="http://live.gnome.org/GnomeAsia/2011Summit/PromoteRegistration?action=AttachFile&#038;do=get&#038;target=iamspeaking_blue_plain.png" title="I&#039;m speaking at GNOME Asia 2011" class="alignright" width="190" height="121" /></p>

<p>I&#8217;ll be presenting a talk titled <em>DLNA in a GNOME 3 World</em>, talking about Rygel and the work we&#8217;ve been doing on <tt>gupnp-dlna</tt> to make DLNA rock on GNOME.</p>

<p>If you&#8217;re in or around Bangalore and contribute to or are interested in contributing to GNOME, you really have no excuse to not attend (heck, entry&#8217;s <em>free</em>). This applies doubly to students who are looking for cool stuff to do for the Google Summer of Code this year. So, do drop by and say hello! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/03/gnome-asia-2011/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>George Orwell on literature and intellectual honesty</title>
		<link>http://arunraghavan.net/2011/03/george-orwell-on-literature-and-intellectual-honesty/</link>
		<comments>http://arunraghavan.net/2011/03/george-orwell-on-literature-and-intellectual-honesty/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 21:09:17 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[literature]]></category>
		<category><![CDATA[politics]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=987</guid>
		<description><![CDATA[If you find yourself saying tl;dr very often, you should probably stop reading now. Madhu, being the awesome cousin that she is, sent me Books v. Cigarettes, a while ago. It&#8217;s an anthology of assorted George Orwell articles and musings, amongst which is The Prevention Of Literature &#8212; a powerful essay about the function of [...]]]></description>
			<content:encoded><![CDATA[<p>If you find yourself saying <acronym title="too long, didn't read">tl;dr</acronym> very often, you should probably stop reading now.</p>

<p>Madhu, being the awesome cousin that she is, sent me <em>Books v. Cigarettes</em>, a while ago. It&#8217;s an anthology of assorted George Orwell articles and musings, amongst which is <a href="http://www.george-orwell.org/The_Prevention_of_Literature/0.html">The Prevention Of Literature</a> &#8212; a powerful essay about the function of intellectual honesty in society and its impact on literature. Makes for a brilliant read and got me wondering about how this applies today.</p>

<p>I have no idea about the state of Chinese literature, but I can&#8217;t help but believe that exactly the sort of intellectual repression that he talks about <em>must</em> be playing a large part in the killing of Indian literature as well. This is, my opinion from extremely limited reading of Indian writing in English, but I hear similar complaints from friends who read Hindi literature too.</p>

<p>The mass media are a laugh riot of dishonesty, and I know of no real reporting counter-culture, underground or otherwise (the closest that I&#8217;m aware of is <a href="http://kafila.org/">Kafila</a>, but the authors there seem to be foaming-at-the-mouth more often than not &#8230; meh).</p>

<p>So what is one to do?</p>

<p><em>Footnote: Guess what turned up <a href="http://kafila.org/2011/03/05/get-ready-for-indias-blogger-control-act/">on Kafila today</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/03/george-orwell-on-literature-and-intellectual-honesty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GNOME3 Power Settings</title>
		<link>http://arunraghavan.net/2011/02/gnome3-power-settings/</link>
		<comments>http://arunraghavan.net/2011/02/gnome3-power-settings/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 20:30:00 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=970</guid>
		<description><![CDATA[Richard Hughes recently posted about the recent GNOME3 Power Settings design that got a lot of people (myself included) hot and bothered. As I said in my comment, I think that a lot of people prefer that their laptop stay on when the lid is closed. There are clearly other who, like myself, would prefer [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.gnome.org/hughsie/">Richard Hughes</a> recently <a href="http://blogs.gnome.org/hughsie/2011/02/02/is-gnome-3-going-to-melt-your-laptop/">posted</a> about the recent <a href="http://live.gnome.org/Design/SystemSettings/Power">GNOME3 Power Settings design</a> that got a lot of people (myself included) hot and bothered. As I said in <a href="http://blogs.gnome.org/hughsie/2011/02/02/is-gnome-3-going-to-melt-your-laptop/comment-page-1/#comment-3758">my comment</a>, I think that a lot of people prefer that their laptop stay on when the lid is closed. There are clearly other who, like myself, would prefer to maintain the normal behaviour when an external monitor is plugged in.</p>

<p>So <a href="http://bheekly.blogspot.com/">Nirbheek Chauhan</a> and I designed a couple of quick mockups that I think would work well. This doesn&#8217;t address customising behaviour with an external monitor, but I don&#8217;t feel nearly as strongly about that being hidden in dconf-editor as I do about the rest.</p>

<div class="wp-caption alignnone" style="width: 510px"><img alt="" src="/downloads/gnome3-power-settings-1.png" title="My mockup" width="500" /><p class="wp-caption-text">My mockup</p></div>

<div class="wp-caption alignnone" style="width: 510px"><img alt="" src="/downloads/gnome3-power-settings-2.png" title="Nirbheek&#039;s mockup" width="500" /><p class="wp-caption-text">Nirbheek&#039;s mockup</p></div>

<p>While Nirbheek&#8217;s version looks decidedly prettier, I think the meaning of the icons is not absolutely obvious. This might be solvable by some explanatory text above and mouse-overs.</p>

<p>While doing all this, though, it&#8217;s clear that it is <em>really</em> hard to design a UI that you think will please enough people, and <em>really</em> easy to make assumptions about what &#8220;people&#8221; want and how they use their computers. So kudos to the GNOME3 UI designers for taking up this difficult job and I hope they take all the feedback flying around in a positive spirit (even if the messages are often not quite positive-sounding ;) )</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/02/gnome3-power-settings/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>A Bibliophile&#8217;s Review of the Amazon Kindle</title>
		<link>http://arunraghavan.net/2011/01/a-bibliophiles-review-of-the-amazon-kindle/</link>
		<comments>http://arunraghavan.net/2011/01/a-bibliophiles-review-of-the-amazon-kindle/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 17:31:32 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[kindle]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=945</guid>
		<description><![CDATA[When it comes to books I&#8217;m really old school. Starting from the pleasure of discovering a book you&#8217;ve been dying to find, nestled between two otherwise forgettable books in the store, to the crinkling goodness of a new book, the reflexive care to not damage the spine unduly, inscriptions from decades past in second-hand books, [...]]]></description>
			<content:encoded><![CDATA[<p>When it comes to books I&#8217;m <em>really</em> old school. Starting from the pleasure of discovering a book you&#8217;ve been dying to find, nestled between two otherwise forgettable books in the store, to the crinkling goodness of a new book, the reflexive care to not damage the spine unduly, inscriptions from decades past in second-hand books, the smell, the texture, <em>everything</em>. And don&#8217;t even get me started on <a href="http://arunraghavan.net/2007/07/dear-dr-p-k-kelkar/">the religious experience of visiting your favourite libraries</a>. Stated another way, e-books are just fundamentally incompatible with my reading experience.</p>

<p>That is, until I had to move houses last year. It is not a pleasant experience to have to cart around a few hundred books, even within the same city. This, and the fact that some Dan McGirt books that I&#8217;ve wanted to read are only really available to me in e-book form finally pushed me to actually buy the Amazon Kindle.</p>

<p><div id="attachment_946" class="wp-caption alignright" style="width: 310px"><a href="http://arunraghavan.net/wp-content/uploads/20101124_002.jpg"><img src="http://arunraghavan.net/wp-content/uploads/20101124_002-300x168.jpg" alt="My black Kindle 3G (3rd rev.)" title="My black Kindle 3G (3rd rev.)" width="300" height="168" class="size-medium wp-image-946" /></a><p class="wp-caption-text">My precioussss</p></div> About 3 months ago, I got a black Kindle 3G (the 3rd revision). Technical reviews abound, so I&#8217;m not going to talk about the technology much. I didn&#8217;t see any articles that really spoke about <em>using</em> it, which is far more relevant to potential buyers (I&#8217;m sure they&#8217;re there, I didn&#8217;t find any good ones is all). So this is my attempt at describing the bits of the Kindle experience that are relevant to others of my ilk (the ones who nodded along to the first paragraph, especially :D).</p>

<h2>The Device</h2>

<p>We&#8217;ll I&#8217;m a geek, I can&#8217;t avoid talking about the technology completely, but I&#8217;ll try to keep it to a minimum (also, it runs Linux, woohoo! :D <em>ed: and GStreamer too, as Sebastian Dröge points out!</em>).</p>

<p>I bought the Kindle with the 6&#8243; display and free wireless access throughout the world (&lt;insert caveat about coverage maps here&gt;). The device itself is really slick, the build quality is good. They keys on the keyboard feel hard to press, but this is presumably intentional, because you don&#8217;t want to randomly press keys while handling the device.</p>

<p>At first glance, the e-ink display on the new device is brilliant, the contrast in daylight is really good (more about this later). It&#8217;s light, and fairly easy to use (but I have a really high threshold for complex devices, so don&#8217;t take my word for it). The 3G coverage falls back to 2G mode in India. I&#8217;ve tried it around a bit in India, and the connectivity is pretty hit-or-miss. Maybe things will change for the better with the impending 3G rollout.</p>

<p>The battery life is either disappointing or awesome, depending on whether you&#8217;ve got wireless enabled or not. This is a bit of a nag, but you quickly get used to just switching off the wireless when you&#8217;re done shopping or browsing.</p>

<h2>Reading</h2>

<p>Obviously the meat and drink of this device is the reading experience. It is <em>not</em> the same as reading a book. There are a lot of small, niggling differences that will keep reminding you that you&#8217;re not reading a book, and this is something you&#8217;re just going to have to accept if you&#8217;re getting the device.</p>

<p>Firstly the way you <em>hold</em> the device is going to be different from holding a book. I generally hold a book along the spine with one hand, either at the top or bottom (depending on whether I&#8217;m sitting, lying down, etc.). You basically cannot hold the Kindle from above &#8212; there isn&#8217;t enough room. I alternate between holding the device on my palm (but it&#8217;s not small enough to hold comfortably like that, your mileage will vary depending on the size of your hand), grasping it between my fingers around the bottom left or right edge (this is where the hard keys on the keyboard help &#8212; you won&#8217;t press a key by mistake in this position), or I just rest the Kindle on a handy surface (table or lap while sitting, tummy while supine :) ).</p>

<p>Secondly, the light response of the device is very different from books. Paper is generally not too picky about the type of lighting (whiteness, diffused or direct, etc.) In daylight, the Kindle looks like a piece of white paper with crisp printing, which is nice. However, at night, it depends entirely on the kind of lighting you have. My house has mostly yellow-ish fluorescent lamps, so the display gets dull unless the room is very well lit. I also find that the contrast drops dramatically if the light source is not behind you (diffuse lighting might not be so great, in other words). There are some angles at which the display reflects lighting that&#8217;s behind/above you, but it&#8217;s not too bad.</p>

<p>The fonts and spacing on the Kindle are adjustable and this is one area in which it is hard to find fault with the device. Whatever your preference is in print (small fonts, large fonts, wide spacing, crammed text), you can get the same effect across all your books.</p>

<p>Flipping pages looks annoying when you see videos of the Kindle (since flipping requires a refresh of the whole screen), but in real life it&#8217;s fast enough to not annoy.</p>

<h2>The Store</h2>

<p>I&#8217;ve only used the Kindle Store from India, and in a word, it <em>sucks</em>. The number of books available is rubbish. I don&#8217;t care if they have almost(?) a million books, but if they don&#8217;t have <em>Good Omens</em>, <em>Cryptonomicon</em>, or most of Asimov&#8217;s <em>Robot</em> series, they&#8217;re fighting a losing battle as far as I&#8217;m concerned (these are all books that I&#8217;ve actually wanted to read/re-read since I got the Kindle).</p>

<p>When I do find a book I want, the pricing is inevitably ridiculous. I do not see what the publishers are smoking, but could someone please tell them that charging more than 2 times the price of a paperback for an e-book is just plain stupid? Have they learned <em>nothing</em> from the iTunes story? Speaking of which, the fact that the books I buy are locked by <acronym title="Digital Rights Management">DRM</acronym> to Kindle devices is very annoying.</p>

<p>While the reading experience is something I can get used to, this is the biggest problem I currently have. From my perspective, books have been the last bastion of purity where piracy is not the only available solution to work around the inability of various industry middlemen to find a reasonable way to deal with the Internet and it&#8217;s impact on creative content. I am really hoping that Amazon will get enough muscle soon to pull an Apple on the book industry and get the pricing to reasonable levels. And possibly go one step further and break down country-wise barriers. Otherwise, we&#8217;re just going to have to deal with another round of rampant piracy and broken systems to try to curb it.</p>

<p><em>(Editor&#8217;s note: This bit clearly bothers me a lot and deserves a blog post of its own, but let&#8217;s save that for another day)</em></p>

<h2>The Ecosystem</h2>

<p>A lot of my family and friends love reading books, and a large number of the books I buy go through many hands before finding their final resting place on my shelf. This is not just a matter of cost &#8212; there is a whole ecosystem of sharing your favourite books with like-minded people, discussing, and so on.</p>

<p>The Kindle device itself isn&#8217;t conducive to sharing (if I&#8217;m reading a book on the device, nobody else can use the device, obviously). Interestingly Amazon has recently introduced the idea of sharing books from the Kindle (something Barnes and Noble has had for a while). You can share books you&#8217;ve bought off the Kindle Store with someone else with a Kindle account, once, for a period of 2 weeks. This in itself is a really lame restriction, but even something more relaxed would be useless to me. Almost nobody I know has a device that supports the Kindle software (phones and laptops/desktops do not count as far as I am concerned).</p>

<p>So in my opinion, the complete break from the reading ecosystem is a huge negative for the Kindle experience. When I know I&#8217;m going to want to lend a book to someone, I immediately eliminate the possibility of buying it off the Kindle Store. This is true of all e-books, of course, and might become less of an issue in decades to come, but it <em>is</em> a real problem today.</p>

<h2>Other Fluff</h2>

<p>The Kindle comes with support for MP3s, browsing the Internet and some games (some noises about an app store have also been made). These are just fluff &#8212; I don&#8217;t care if my reading device has any of these things. Display technology is still quite far from getting to a point where convergence is possible without compromising the reading experience (yes, I&#8217;m including the Pixel Qi display in this assertion, but my opinion is only based on the several videos of devices using these displays).</p>

<h2>The Verdict</h2>

<p>Honestly, it&#8217;s not clear to me whether the Kindle is a keeper or not. It&#8217;s definitely a very nice device, technically. I think it&#8217;s possible for Amazon to improve the reading experience &#8212; I&#8217;m sure the display technology will get better with regards to response to different kinds of lighting. Some experimentation with design to make it work with standard reading postures would be nice too. The Kindle Store is a disaster for me, and I <em>really</em> hope Amazon and the publishing industry get their act together.</p>

<p>Maybe this article will be helpful to potential converts out there. If you&#8217;ve got questions about the Kindle or anything to add that I&#8217;ve missed, feel free to drop a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2011/01/a-bibliophiles-review-of-the-amazon-kindle/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Updates from the Rygel + DLNA world</title>
		<link>http://arunraghavan.net/2010/08/updates-from-the-rygel-dlna-world/</link>
		<comments>http://arunraghavan.net/2010/08/updates-from-the-rygel-dlna-world/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 14:30:32 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[gupnp]]></category>
		<category><![CDATA[rygel]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=926</guid>
		<description><![CDATA[Things have been awfully quiet since Zeeshan&#8217;s posted about the work we&#8217;ve been doing on DLNA support in Rygel. Since I&#8217;ve released GUPnP DLNA 0.3.0, I thought this is a good time to explain what we&#8217;ve been up to. This is also a sort of expansion of my Lightning Talk from GUADEC, since 5 minutes [...]]]></description>
			<content:encoded><![CDATA[<p>Things have been awfully quiet since <a href="http://zee-nix.blogspot.com/">Zeeshan&#8217;s</a> posted about the work we&#8217;ve been doing on <a href="http://lists.o-hand.com/gupnp/0915.html">DLNA support in Rygel</a>. Since I&#8217;ve <a href="http://lists.o-hand.com/gupnp/0984.html">released GUPnP DLNA 0.3.0</a>, I thought this is a good time to explain what we&#8217;ve been up to. This is also a sort of expansion of my Lightning Talk from GUADEC, since 5 minutes weren&#8217;t enough to establish all the background I would have liked to.</p>

<p>For those that don&#8217;t know, the <a href="http://www.dlna.org/"><acronym title="Digital Living Network Alliance">DLNA</acronym></a> is a consortium that aims to standardise how various media devices around your house communicate with each other (that is, your home theater, TV, laptop, phone, tablet, &#8230;). One piece of this problem is having a standard way of identifying the <em>type</em> of a file, and communicating this between devices. For example, say your laptop (MediaServer in DLNA parlance) is sharing the movies you&#8217;ve got with your TV (MediaPlayer), and your TV can play only upto 720p H.264-encoded video. When the MediaServer is sharing files, it needs to provide sufficient information about the file so that the MediaPlayer knows whether it can play it or not, so that it can be intelligent about what files show up in its UI.</p>

<p>How the DLNA specification achieves this is by using &#8220;profiles&#8221;. For each media format supported by the DLNA specification, a number of profiles are defined, that identify the audio/video codec used, the container, and (in a sense) the complexity of decoding the file. (for multimedia geeks, that translates to things like the codec profile, resolution, framerate/samplerate, bitrate, etc.)</p>

<p>For example, if a file is indicated to be of a DLNA profile named <tt>AAC_ISO_320</tt>, this indicates that this is an audio file encoded with the AAC codec, contained in an MP4 container (that&#8217;s &#8220;ISO&#8221;), with a bitrate of at most 320 kbps. Similarly, a file with profile <tt>AVC_MP4_MP_SD_MPEG1_L3</tt> represents a file with H.264 (a.k.a. AVC) video coded in the H.264 Main Profile at specific resolutions upto 720&#215;576, MP3 audio, in an MP4 container (there are more restrictions, but I don&#8217;t want to swamp you with details).</p>

<p>So now we have a problem statement &#8211; given a media file, we need to get the corresponding DLNA profile. It&#8217;s easiest to break this problem into 3 pieces:</p>

<ol>
<li><p><em>Discovery</em>: First we need to get all the metadata that the DLNA specification requires us to check. Using GStreamer and <a href="http://blogs.gnome.org/edwardrv">Edward&#8217;s</a> <a href="http://blogs.gnome.org/edwardrv/2009/11/30/the-result-of-the-past-few-months-of-hacking/"><tt>gst-convenience</tt></a> library, getting the metadata we needed was reasonably simple. Where the metadata wasn&#8217;t available (mostly codec profiles and bitrate), I&#8217;ve tried to expose the required data from the corresponding GStreamer plugin.</p></li>
<li><p><em>DLNA Profiles</em>: I won&#8217;t rant much about the DLNA specification, because that&#8217;s a whole series of blog posts in itself, but the spec is sometimes overly restrictive and doesn&#8217;t support a number of popular formats (Matroska, AVI, DivX, OGG, Theora). With this in mind, we decided that it would be nice to have a generic way to store the constraints specified by the DLNA specification and use them in our library. We chose to store the profile constraints in XML files. This allows non-programmers to tweak the profile data when their devices resort to non-standard methods to work around the limitations of the DLNA spec.</p></li>
<li><p><em>Matching</em>: With 1. and 2. above in place, we just need some glue code to take the metadata from discovery and match it with the profiles loaded from disk. For the GStreamer hackers in the audience, the profile storage format we chose looks suspiciously like serialized GstCaps, so matching allows us to reuse some GStreamer code. Another advantage of this will be revealed soon.</p></li>
</ol>

<p>So there you have it folks, this covers the essence of what GUPnP DLNA does. So what&#8217;s next?</p>

<ol>
<li><p><em>Frankie Says Relax</em>: Since the DLNA spec can often be too strict about what media is supported, we&#8217;ve decided to introduce a soon-to-come &#8220;relaxed mode&#8221; which should make a lot more of your media match some profile.</p></li>
<li><p><em>I Can Haz Trancoding</em>: While considering how to store the DLNA profiles loaded from the XML on disk, we chose to use <tt>GstEncodingProfile</tt>s from the <tt>gst-convenience</tt> library since the restrictions defined by the DLNA spec closely resemble the kind of restrictions you&#8217;d expect to set while encoding a file (codec, bitrate, resolution, etc. again). One nice fallout of this is that (in theory), it should be easy to reuse these to transcode media that doesn&#8217;t match any profile (the <tt>encodebin</tt> plugin from <tt>gst-convenience</tt> makes this a piece of cake). That is, if GStreamer can play your media, Rygel will be able to stream it.</p></li>
</ol>

<p>Apart from this, we&#8217;ll be adding support for more profiles, extending the API as more uses arise, adding more automated tests, and on and on. If you&#8217;re interested in the code, check out (sic) the <a href="http://gitorious.org/gupnp/gupnp-dlna">repository on Gitorious</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2010/08/updates-from-the-rygel-dlna-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GUADEC 2010 :(</title>
		<link>http://arunraghavan.net/2010/08/guadec-2010/</link>
		<comments>http://arunraghavan.net/2010/08/guadec-2010/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 07:10:05 +0000</pubDate>
		<dc:creator>Arun</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[f/oss]]></category>
		<category><![CDATA[gnome]]></category>

		<guid isPermaLink="false">http://arunraghavan.net/?p=917</guid>
		<description><![CDATA[Hopefully that title was provocative enough. ;) No, GUADEC seemed to be a smashing success. If only I had been able to attend instead of lying in bed for 2 days, ill and wondering at the general malignancy of a Universe that would do this to me. Nevertheless, I had a great time meeting all [...]]]></description>
			<content:encoded><![CDATA[<p>Hopefully that title was provocative enough. ;) No, GUADEC seemed to be a smashing success. If only I had been able to attend instead of lying in bed for 2 days, ill and wondering at the general malignancy of a Universe that would do this to me.</p>

<div id="attachment_918" class="wp-caption alignright" style="width: 310px"><a href="http://arunraghavan.net/wp-content/uploads/collabora-multimedia-the-hague.jpg"><img src="http://arunraghavan.net/wp-content/uploads/collabora-multimedia-the-hague-300x225.jpg" alt="" title="Collabora Multimedia at The Hague" width="300" height="225" class="size-medium wp-image-918" /></a><p class="wp-caption-text">Collabora Multimedians, looking for a canal</p></div>

<p>Nevertheless, I had a great time meeting all the cool folks at Collabora Multimedia at our company meeting. Managed to trundle out for my Rygel + DLNA lightning talk (more updates on this in a subsequent post). Things did get better subsequently, and I had an amazing week-long vacation in Germany, and now I&#8217;m back at home with my ninja skillz fully recharged!</p>
]]></content:encoded>
			<wfw:commentRss>http://arunraghavan.net/2010/08/guadec-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

