<?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>Technicalities &#187; alsa</title>
	<atom:link href="http://www.sirena.org.uk/log/tag/alsa/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sirena.org.uk/log</link>
	<description>Just another random blog</description>
	<lastBuildDate>Fri, 16 Jul 2010 17:24:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>In-kernel audio mixing</title>
		<link>http://www.sirena.org.uk/log/2009/08/15/in-kernel-audio-mixing/</link>
		<comments>http://www.sirena.org.uk/log/2009/08/15/in-kernel-audio-mixing/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 17:31:16 +0000</pubDate>
		<dc:creator>Mark Brown</dc:creator>
				<category><![CDATA[ASoC]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Planet Debian]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[DSP]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[PulseAudio]]></category>

		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=171</guid>
		<description><![CDATA[Ever since PulseAudio started to be deployed by distributions the most common complaint I&#8217;ve seen about ALSA is that unlike current versions of OSS it doesn&#8217;t provide mixing of audio from multiple applications inside the kernel. Of course what it really comes down to is that people want the system to transparently allow multiple applications [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since <a href="http://www.pulseaudio.org/">PulseAudio</a> started to be deployed by distributions the most common complaint I&#8217;ve seen about ALSA is that unlike current versions of <a href="http://www.opensound.com/">OSS</a> it doesn&#8217;t provide mixing of audio from multiple applications inside the kernel. Of course what it really comes down to is that people want the system to transparently allow multiple applications to play audio simultaneously.</p>
<p>The reason <a href="http://alsa-project.org/">ALSA</a> does things the way it does is that the ALSA APIs that applications interact with are actually implemented by a library. This library provides a plugin based way of defining sound cards, one of the options for which is that the audio can be routed to or from some hardware, but sound can also be routed to other places like networked speakers. This architecture also allows plugins to provide signal processing &#8211; mixing is the example most people notice but things like soft volume controls (not all sound hardware provides volume control) or EQ are also possible.</p>
<p>This could all be implemented in kernel space but there&#8217;s some serious drawbacks in doing so. There are some substantial restrictions on what kernel space code is allowed to do, one of the most relevant being the fact that floating point instructions can&#8217;t be used. It&#8217;s harder to develop kernel code, if for no other reason than the fact that kernel code can crash the system. The main benefit that people expect from pushing things into the kernel is performance but with the facilities available in Linux there&#8217;s no real reason why performance would be better with a kernel mode implementation, kernel and user threads are both scheduled together and shared memory is available.</p>
<p>So why are people running into issues with PulseAudio? Obviously some of them are just bugs in PulseAudio &#8211; the much wider deployment that cones with being used as standard in distributions means much wider testing &#8211; but that&#8217;s not all of it, especially now PulseAudio has been in distributions for a while. The other major source of issues is that due to the need to adapt to the different needs of the applications that it is mixing together PulseAudio is a very demanding user of drivers. This means that switching to PulseAudio can expose bugs in the drivers, often bugs that have existed for years. There&#8217;s a natural tendency to blame PluseAudio when this happens but the fixes that are needed are in the drivers.</p>
<p>None of this is terribly helpful if you&#8217;ve been bitten by one of the bugs of course, but hopefully it goes some way towards explaining why this implementation has been chosen and why there have been problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sirena.org.uk/log/2009/08/15/in-kernel-audio-mixing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>If we build it they will come</title>
		<link>http://www.sirena.org.uk/log/2008/10/16/if-we-build-it-they-will-come/</link>
		<comments>http://www.sirena.org.uk/log/2008/10/16/if-we-build-it-they-will-come/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 09:20:37 +0000</pubDate>
		<dc:creator>Mark Brown</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Planet Debian]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[alsa]]></category>

		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=136</guid>
		<description><![CDATA[It looks like the jack reporting API for ALSA which just got merged into the mainline kernel for inclusion in 2.6.28 already has its first user &#8211; code from Matthew Ranostay supporting the jack detection in Sigmatel HDA codecs was just queued for merge in the next merge window. Admittedly, the jack reporting API has [...]]]></description>
			<content:encoded><![CDATA[<p>It looks like the <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=include/sound/jack.h;hb=master">jack reporting API</a> for ALSA which just got merged into the mainline kernel for inclusion in 2.6.28 already has its first user &#8211; code from Matthew Ranostay supporting the jack detection in <a href="http://mailman.alsa-project.org/pipermail/alsa-devel/2008-October/thread.html">Sigmatel HDA codecs</a> was just queued for merge in the next merge window. Admittedly, the jack reporting API has been available in ALSA git since July but it does look like it is just impressively fast adoption after the mainline merge.</p>
<p>Still, a long way to go before user space can start to rely on knowing if things are plugged in or not.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sirena.org.uk/log/2008/10/16/if-we-build-it-they-will-come/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What&#8217;s the standard Linux audio API?</title>
		<link>http://www.sirena.org.uk/log/2008/09/26/whats-the-standard-linux-audio-api/</link>
		<comments>http://www.sirena.org.uk/log/2008/09/26/whats-the-standard-linux-audio-api/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 11:39:38 +0000</pubDate>
		<dc:creator>Mark Brown</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Planet Debian]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[oss]]></category>

		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=133</guid>
		<description><![CDATA[Lennart Pottering&#8217;s post about the sound APIs available for Linux appears to have caused some consternation from people working with the modern out of tree OSS drivers who feel that the current, out of tree, OSS drivers are being unfairly maligned. This rather misses the point of his post. The fact that there are improved [...]]]></description>
			<content:encoded><![CDATA[<p>Lennart Pottering&#8217;s post about the <a href="http://0pointer.de/blog/projects/guide-to-sound-apis.html">sound APIs available for Linux</a> appears to have caused some <a href="http://blog.rastageeks.org/spip.php?article14">consternation from people working with the modern out of tree OSS drivers</a> who feel that the current, out of tree, OSS drivers are being unfairly maligned. This rather misses the point of his post. The fact that there are improved versions of the OSS code doesn&#8217;t really help developers who are trying to target current Linux distributions which only ship the old OSS drivers. From this point of view the new OSS drivers are probably best looked at as a completely different product.</p>
<p>Joss is right, though &#8211; <a href="http://np237.livejournal.com/19554.html">most applications should be working with a higher level user space API</a> than either ALSA or OSS. One of the most obvious examples of this is in the embedded space where there are often vast numbers of controls that need to be exported in order to support the complex audio routing that devices like phones can have. Most of these should only be touched very occasionally when changing use case and should therefore be hidden from normal applications where they&#8217;re at best irrelevant and at worst confuse end users. They do, however, need to be exposed by the kernel in order to allow user space the flexibility to manage the audio configuration of the system at run time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sirena.org.uk/log/2008/09/26/whats-the-standard-linux-audio-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
