<?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>Netflow Developments &#187; alsa</title>
	<atom:link href="http://blog.netflowdevelopments.com/tag/alsa/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.netflowdevelopments.com</link>
	<description>The latest and greatest happenings in the world of Science, Technology and everything else Geek</description>
	<lastBuildDate>Sat, 04 Feb 2012 08:53:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Update headers in Debian 6 and now no sound card</title>
		<link>http://blog.netflowdevelopments.com/2011/11/25/update-headers-in-debian-6-and-now-no-sound-card/</link>
		<comments>http://blog.netflowdevelopments.com/2011/11/25/update-headers-in-debian-6-and-now-no-sound-card/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 11:34:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux / Freebsd]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dummy]]></category>
		<category><![CDATA[manual]]></category>
		<category><![CDATA[no sound card]]></category>
		<category><![CDATA[upgrade]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/?p=770</guid>
		<description><![CDATA[So I recently updated my headers and upon reboot was greeted with no sound.  Heh, now this is linux remember so when you boot up with no sound you don&#8217;t really panic because it happens every week and it&#8217;s usually the same thing.. so I checked on the regular culprits and saw nothing out of [...]]]></description>
			<content:encoded><![CDATA[<p>So I recently updated my headers and upon reboot was greeted with no sound.  Heh, now this is linux remember so when you boot up with no sound you don&#8217;t really panic because it happens every week and it&#8217;s usually the same thing.. so I checked on the regular culprits and saw nothing out of place  Then realized that instead of it just being a &#8216;no sound&#8217; problem it had been escalated to a &#8216;no sound card&#8217; problem.  Ugh, when alsa doesn&#8217;t even see the card that&#8217;s when I know it&#8217;s going ot be something new <img src='http://blog.netflowdevelopments.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So I&#8217;m not sure what it was in the end, but the solution was to manually upgrade alsa to 1.24(at the time of this writing).   I used the instructions found here to do the install: http://monespaceperso.org/blog-en/2010/05/02/upgrade-alsa-1-0-23-on-ubuntu-lucid-lynx-10-04/</p>
<p>&nbsp;</p>
<p>But for convenience sake I&#8217;ll post the instructions below:</p>
<blockquote><p><strong>Installation :</strong></p>
<p>To do this, we must begin by determining our version of alsa as follows :</p>
<p><code>cat /proc/asound/version<br />
Advanced Linux Sound Architecture Driver Version 1.0.21.</code></p>
<p>To avoid problems during the upgrade of Alsa-utils, we need to stop it with the following command :</p>
<p><code>sudo /sbin/alsa-utils stop</code></p>
<div id="result_box" dir="ltr">We must then install the necessary tools to compile along with the kernel headers :</div>
<p><code>sudo apt-get -y install build-essential ncurses-dev gettext xmlto libasound2-dev<br />
sudo apt-get -y install linux-headers-`uname -r` libncursesw5-dev</code></p>
<p>Then, we go in our personal folder and download alsa-driver, alsa-lib and alsa-utils :</p>
<p><code>cd ~<br />
rm -rf ~/alsa* ~/.pulse*<br />
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.24.tar.bz2<br />
wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.24.1.tar.bz2<br />
wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.24.2.tar.bz2</code></p>
<p>After that, we create a new folder for the compilation and installation of the 3 files. Then, we move the 3 tar files that we just downloaded in this folder :</p>
<p><code>sudo rm -rf /usr/src/alsa<br />
sudo mkdir -p /usr/src/alsa<br />
cd /usr/src/alsa<br />
sudo cp ~/alsa* .</code></p>
<p>Unpack the 3 tar files :</p>
<p><code>sudo tar xjf alsa-driver*<br />
sudo tar xjf alsa-lib*<br />
sudo tar xjf alsa-utils*</code></p>
<p>We compile and install alsa-driver :</p>
<p><code>cd alsa-driver*<br />
sudo ./configure<br />
sudo make<br />
sudo make install</code></p>
<p>We compile and install alsa-lib :</p>
<p><code>cd ../alsa-lib*<br />
sudo ./configure<br />
sudo make<br />
sudo make install</code></p>
<p>We compile and install alsa-utils :</p>
<p><code>cd ../alsa-utils*<br />
sudo ./configure<br />
sudo make<br />
sudo make install</code></p>
<p>Then, we remove the 3 tar files in our personal folder that are not anymore necessary :</p>
<p><code>rm -f ~/alsa-driver*<br />
rm -f ~/alsa-lib*<br />
rm -f ~/alsa-utils*</code></p>
<p>Then, just restart your computer and your alsa version should be 1.0.23!</p>
<p>You can verify that you have now indeed have this version of alsa :</p>
<p><code>cat /proc/asound/version<br />
Advanced Linux Sound Architecture Driver Version 1.0.24.<br />
Compiled on May 2 2010 for kernel 2.6.32-21-generic (SMP).</code></p>
<p>Just to be sure everything is well configured, execute this command :</p>
<p><code>sudo alsaconf</code></p>
<p>and reboot again!</p>
<p>&nbsp;</p></blockquote>
<p>Again a big thanks to<a href="http://monespaceperso.org/blog-en/"> <span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">Stéphane Gaudreault</span></a> for his tips on that even though it was for an older version of Ubuntu and for a different version of Alsa.. still did the trick!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2011/11/25/update-headers-in-debian-6-and-now-no-sound-card/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switch from Ubuntu to Debian and now Jacksense doesn&#8217;t work</title>
		<link>http://blog.netflowdevelopments.com/2011/11/19/switch-from-ubuntu-to-debian-and-now-jacksense-doesnt-work/</link>
		<comments>http://blog.netflowdevelopments.com/2011/11/19/switch-from-ubuntu-to-debian-and-now-jacksense-doesnt-work/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 10:22:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux / Freebsd]]></category>
		<category><![CDATA[acer]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[aspire]]></category>
		<category><![CDATA[asus]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[headphones]]></category>
		<category><![CDATA[muting]]></category>
		<category><![CDATA[no jacksense]]></category>
		<category><![CDATA[upgrade]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/?p=752</guid>
		<description><![CDATA[For those of you that don&#8217;t know jacksense is when your computer detects when headphones have been plugged in.. Meaning that it should mute the main speakers automatically so the audio is coming out of the headphones only.  When this doesn&#8217;t work audio will come out of both the headphones and the speakers.. Annoying as [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you that don&#8217;t know jacksense is when your computer detects when headphones have been plugged in.. Meaning that it should mute the main speakers automatically so the audio is coming out of the headphones only.  When this doesn&#8217;t work audio will come out of both the headphones and the speakers.. Annoying as hell and probably my biggest issue this year with linux since Ubuntu 10.10.</p>
<p>After about a year of no jacksense on my Acer-aspire 5253 with Ubuntu 10.10 I finally fixed it when I upgraded to 11.10 and added this to my alsa-base.conf: <strong>options snd-hda-intel model=,asus</strong> (and yes that , is supposed to be infront of asus).</p>
<p>Now while that was a major victory in it&#8217;s own right it was overshadowed by the absolute nightmare that was Ubuntu 11.10.  Let&#8217;s put it this way, 11.10 was so incredibly offensive that after nearly 3 years with Ubuntu, the OS that I completely ditched Windows for, the OS with which my true love and appreciation for linux as a whole blossomed out of, I threw it in the can and moved onto Debian.</p>
<p>So here I am with Debian Squeeze 64 and lo and behold the bloody jacksense reverts back to it&#8217;s old non-workign state.  UGH!  So tonight was the night, I had some major issues to fix with my sound card and this was the big one.. Putting that line in my alsa-base.conf didn&#8217;t work and neither did about 100 other solutions and then I started thinking.  What the hell could be different about this Debian release and Ubuntu 11? I mean they are so close in almost every way, what could be different enough to cause this and likewise what could be different from 10.10 where jacksense didn&#8217;t work to 11.10 where it did work.  What changes with a distro upgrade like that?  Well if they upgraded the distro, what if they upgraded alsa?  So I checked the Debian version of alsa and sure enough it was 1.012 or something old like that and the latest version of alsa is 1.024.  I had a hopeful ah HA moment and begun to upgrade alsa(after uninstalling it first).  Got 1.024 installed, made sure that line: (options snd-hda-intel model=,asus was in the alsa-base.conf), rebooted and VIOLA! it works.. Works like a bloody charm!</p>
<p>I got my upgrading instructions from here: <a href="http://monespaceperso.org/blog-en/2010/05/02/upgrade-alsa-1-0-23-on-ubuntu-lucid-lynx-10-04/">http://monespaceperso.org/blog-en/2010/05/02/upgrade-alsa-1-0-23-on-ubuntu-lucid-lynx-10-04/</a> but I&#8217;ll paste them below for convenience(<em>It should be noted that I couldn&#8217;t get alsa-utils to install but it didn&#8217;t seem to make a difference</em>):</p>
<p>&nbsp;</p>
<p><strong>Installation :</strong></p>
<p>To do this, we must begin by determining our version of alsa as follows :</p>
<p><code>cat /proc/asound/version<br />
Advanced Linux Sound Architecture Driver Version 1.0.21.</code></p>
<p>To avoid problems during the upgrade of Alsa-utils, we need to stop it with the following command :</p>
<p><code>sudo /sbin/alsa-utils stop</code></p>
<div id="result_box" dir="ltr">We must then install the necessary tools to compile along with the kernel headers :</div>
<p><code>sudo apt-get -y install build-essential ncurses-dev gettext xmlto libasound2-dev<br />
sudo apt-get -y install linux-headers-`uname -r` libncursesw5-dev</code></p>
<p>Then, we go in our personal folder and download alsa-driver, alsa-lib and alsa-utils :</p>
<p><code>cd ~<br />
rm -rf ~/alsa* ~/.pulse*<br />
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.23.tar.bz2<br />
wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.23.tar.bz2<br />
wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.23.tar.bz2</code></p>
<p>After that, we create a new folder for the compilation and installation of the 3 files. Then, we move the 3 tar files that we just downloaded in this folder :</p>
<p><code>sudo rm -rf /usr/src/alsa<br />
sudo mkdir -p /usr/src/alsa<br />
cd /usr/src/alsa<br />
sudo cp ~/alsa* .</code></p>
<p>Unpack the 3 tar files :</p>
<p><code>sudo tar xjf alsa-driver*<br />
sudo tar xjf alsa-lib*<br />
sudo tar xjf alsa-utils*</code></p>
<p>We compile and install alsa-driver :</p>
<p><code>cd alsa-driver*<br />
sudo ./configure<br />
sudo make<br />
sudo make install</code></p>
<p>We compile and install alsa-lib :</p>
<p><code>cd ../alsa-lib*<br />
sudo ./configure<br />
sudo make<br />
sudo make install</code></p>
<p>We compile and install alsa-utils :</p>
<p><code>cd ../alsa-utils*<br />
sudo ./configure<br />
sudo make<br />
sudo make install</code></p>
<p>Then, we remove the 3 tar files in our personal folder that are not anymore necessary :</p>
<p><code>rm -f ~/alsa-driver*<br />
rm -f ~/alsa-lib*<br />
rm -f ~/alsa-utils*</code></p>
<p>Then, just restart your computer and your alsa version should be 1.0.23!</p>
<p>You can verify that you have now indeed have this version of alsa :</p>
<p><code>cat /proc/asound/version<br />
Advanced Linux Sound Architecture Driver Version 1.0.23.<br />
Compiled on May 2 2010 for kernel 2.6.32-21-generic (SMP).</code></p>
<p>Just to be sure everything is well configured, execute this command :</p>
<p><code>sudo alsaconf</code></p>
<p>and reboot again!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2011/11/19/switch-from-ubuntu-to-debian-and-now-jacksense-doesnt-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No sound in any browser with Debian Squeeze 64bit</title>
		<link>http://blog.netflowdevelopments.com/2011/11/19/no-sound-in-any-browser-with-debian-squeeze-64bit/</link>
		<comments>http://blog.netflowdevelopments.com/2011/11/19/no-sound-in-any-browser-with-debian-squeeze-64bit/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 08:06:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux / Freebsd]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[no sound]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[pulse]]></category>
		<category><![CDATA[volume control]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/?p=750</guid>
		<description><![CDATA[Wow, this is one of those problems that is so stupid you have to laugh in disbelief when you solve it.  So my problem ever since I tossed Ubuntu 11.10 in the trash where it belongs(post detailing that to follow) and switched to Debian is that I had no sound in any of my browsers. [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, this is one of those problems that is so stupid you have to laugh in disbelief when you solve it.  So my problem ever since I tossed Ubuntu 11.10 in the trash where it belongs(post detailing that to follow) and switched to Debian is that I had no sound in any of my browsers.  Now the sound worked on everything else, just not the browsers.  I couldn&#8217;t tried loading a straight mp3 to see if that wuold work in the browser and it didn&#8217;t, so that told me it wasn&#8217;t just a flash thing.  I tried reloading alsa, I tried editing the all sorts of files and nothing worked.  From what I could tell it wasn&#8217;t alsa, it wasn&#8217;t pulse and it wasn&#8217;t flash.  That really narrows down the options for troubleshooting.</p>
<p>Finally, after reading a forum post from someone else with similar problems I decided to have a flash video playing and then opened up my volume control and check out the playback section where it shows yuo the volume per application.  Now you need to have something playing while you do this and you will have to do this for ever browser separately but as soon as I did that I could see that, for whatever reason as it was like this from the install, chrome&#8217;s output device was set to the HDMI port on my laptop.  I just selected it and switched it to the internal audio device and viola, midstream the sound came back on.  Loaded up firefox and sure enough no sound, checked it out in the volume control and what do ya know the sound device was set to the HDMI port for firefox.  Put that back and up came the sound.</p>
<p>Laughably stupid but thankfully a fixed problem.  Now if only I could get the jacksense to work like it finally did in ubuntu.  ugh</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2011/11/19/no-sound-in-any-browser-with-debian-squeeze-64bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing ALSA underrun erorrs associated with PulseAudio (and typically Skype) in Ubuntu</title>
		<link>http://blog.netflowdevelopments.com/2009/05/10/fixing-alsa-underrun-erorrs-associated-with-pulseaudio-and-typically-skype-in-ubuntu/</link>
		<comments>http://blog.netflowdevelopments.com/2009/05/10/fixing-alsa-underrun-erorrs-associated-with-pulseaudio-and-typically-skype-in-ubuntu/#comments</comments>
		<pubDate>Sun, 10 May 2009 19:08:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux / Freebsd]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[9.04]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[alsa underrun detected]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[highpriority]]></category>
		<category><![CDATA[nice-level]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[real-time priority]]></category>
		<category><![CDATA[realtime-scheduling]]></category>
		<category><![CDATA[skype alsa underrun]]></category>
		<category><![CDATA[sound cutting out]]></category>
		<category><![CDATA[sound not working]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[underrun]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/?p=256</guid>
		<description><![CDATA[So after running into this problem suddently and for no &#8216;apparent&#8217; reason(although it became apparent later) I noticed the complete lack of real support docs online in regards to the ALSA underrun problem.  Hopefully I can rememdy this a little bit and help some people out. Last week I noticed skype audio was getting really [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="ubuntu" src="http://medya.gh.googlepages.com/ubuntu-tux.png" alt="" width="165" height="197" /></p>
<p>So after running into this problem suddently and for no &#8216;apparent&#8217; reason(although it became apparent later) I noticed the complete lack of real support docs online in regards to the ALSA underrun problem.  Hopefully I can rememdy this a little bit and help some people out.</p>
<p>Last week I noticed skype audio was getting really choppy, it was the equivalent of seeing the conversation through a strobe light.  Odd I thought but didn&#8217;t pay it too much heed, that was until the end of the week when the audio simply stopped all together and skype refused to close down normally.  I would have to manually kill the process in terminal after the sound cut out.  This problem was exclusive to skype, which made it even more frustrating as I could have youtube and/or music playing in <a href="http://www.exaile.org" target="_blank">exaile </a>while skype was screwing the pooch.</p>
<p>It occured to me today that something indeed had been changed recently right before this problem started and that was me fiddling with pulse&#8217;s daemon.conf and enabling real-time scheduling.  I can&#8217;t remember what for but this was part of the problem.  In fact there is even a mention in pulseaudio&#8217;s man page in regards to the possibility of real-time scheduling causing problems which I&#8217;ll quote here:</p>
<blockquote><p><em> Alternatively,  if the risk of locking up the machine is considered too<br />
big to enable real-time scheduling,  high-priority  scheduling  can  be<br />
enabled  instead  (i.e.  negative  nice  level). This can be enabled by<br />
passing &#8211;high-priority (see above) when starting  PulseAudio  and  may<br />
also  be  enabled  with  the approriate option in daemon.conf. Negative<br />
nice levels can only be enabled when  the  appropriate  resource  limit</em></p>
<p><em> RLIMIT_NICE  is  set  (see setrlimit(2) for more information), possibly<br />
configured in /etc/security/limits.conf. A resource limit of 31 (corre‐<br />
sponding with nice level -11) is recommended.</em></p>
<p><img class="alignright" title="skype" src="http://cultofmac.com/wp-content/uploads/skype-logo.jpg" alt="" width="137" height="137" /></p></blockquote>
<p>At this point I got a little excited as the solution seemed within reach.  I hashed out real-time schedule and implemented high-priority scheduling, restarted pulseaudio and loaded up skype.  It started fine but when I made a test call I was once again plagued by ALSA underruns.</p>
<p>They key here was to adjust the nice level.  I incrementally went down from -11 all the way to 3 (as in <strong>plus</strong> 3 <strong>not</strong> -3), restarted pulseaudio, loaded skype and viola!  Problem solved.  The nice level might be different for you so maybe experiment with that a little bit.</p>
<p><strong>Summary:</strong></p>
<ul>
<li>edit ~/.pulse/daemon.conf (or /etc/pulse/daemon.conf if you run as system)</li>
<li>Hash out realtime-scheduling and realtime-priority</li>
<li>Unhash high-priority and nice-level</li>
<li>set nice level to 3 (not -3 or -11 for that matter)</li>
</ul>
<p>Update:  Bah, I am still seeing these under runs.  The severity of them has gone down as skype doesn&#8217;t completely cut out now and lock up but I am getting audio cutting in and out every 2-3 seconds when making a call via skypeout.</p>
<p>Searching around the <a href="http://forum.skype.com/index.php?showtopic=306381" target="_blank">skype forums</a> I found this and this actually seems to have done the trick completely:</p>
<p>Edit your ~/.asoundrc file</p>
<p># Part I directly from ALSA Dmix Wiki</p>
<p>pcm.skype {<br />
type dmix<br />
ipc_key 1024<br />
slave {<br />
pcm &#8220;hw:0,0&#8243;<br />
period_time 0<br />
period_size 1024<br />
buffer_size 8192<br />
#format &#8220;S32_LE&#8221;<br />
#periods 128<br />
rate 44100<br />
}<br />
}</p>
<p>pcm.dsp0 {<br />
type plug<br />
slave.pcm &#8220;skype&#8221;<br />
}</p>
<p># This following device can fool some applications into using pulseaudio<br />
pcm.dsp1 {<br />
type plug<br />
slave.pcm &#8220;pulse&#8221;<br />
}</p>
<p>ctl.mixer0 {<br />
type hw<br />
card 0<br />
}</p>
<p>pcm.pulse { type pulse }<br />
ctl.pulse { type pulse }<br />
pcm.!default {<br />
type pulse<br />
}</p>
<p>ctl.!default {<br />
type pulse<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2009/05/10/fixing-alsa-underrun-erorrs-associated-with-pulseaudio-and-typically-skype-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sound quality with PulseAudio FINALLY restored.  No more slightly grainy music</title>
		<link>http://blog.netflowdevelopments.com/2009/05/07/sound-quality-with-pulseaudio-finally-restored-no-more-slightly-grainy-music/</link>
		<comments>http://blog.netflowdevelopments.com/2009/05/07/sound-quality-with-pulseaudio-finally-restored-no-more-slightly-grainy-music/#comments</comments>
		<pubDate>Fri, 08 May 2009 05:17:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[/etc/pulse]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[audio quality]]></category>
		<category><![CDATA[bad quality]]></category>
		<category><![CDATA[daemon.conf]]></category>
		<category><![CDATA[improve quality]]></category>
		<category><![CDATA[Linux / Freebsd]]></category>
		<category><![CDATA[poor quality]]></category>
		<category><![CDATA[pulse]]></category>
		<category><![CDATA[pulse audio]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[sound quality]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/2009/05/07/sound-quality-with-pulseaudio-finally-restored-no-more-slightly-grainy-music/</guid>
		<description><![CDATA[When I finally solve the problem I nearly broke down.  The effect that hearing crystal clear music for the first time in months, especially the likes of Bear Mcreary, is an emotional experience.  For a LONG time I have been plagued with this extremely subtle but in Ubuntu where my music would have this very [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" title="pulse" src="http://www.pulseaudio.org/chrome/site/patitle.png" alt="" width="345" height="70" /></p>
<p>When I finally solve the problem I nearly broke down.  The effect that hearing crystal clear music for the first time in months, especially the likes of Bear Mcreary, is an emotional experience.  For a LONG time I have been plagued with this extremely subtle but in Ubuntu where my music would have this very slight graininess to it.  It is even hard to describe what it was because it was so sublte, the best analogy I can think of would be looking through glasses that were covered in dust, or a jpeg image that has 5-10% too much compression on it.  It really isn&#8217;t enough to notice most of the time, especially with loud progressive trance.  Over time you simply get used to it, your brain adjusts but in the back of my mind I knew this was happening, especially when I would put on classical music where this graininess would be more pronounced with the delicate sounds of a violin.  I searched and <img class="alignright" title="ubuntu" src="http://www.linuxnewbieguide.org/userfiles/image/ubuntu-logo.png" alt="" width="217" height="223" />searched for a solution to no avail and every time I heard the heart wrenching compositions of Bear Mcreary it is like a part of my soul just died in defeat.</p>
<p>I had found a few days back while going through the hellish experience that is Amarok 2 that if I was running pulse as root the audio quality would resume.  But I never really put two and two together as my settings in /etc/pulse/daemon.conf were identical to those in ~/.pulse/daemon.conf .  In fact I even deleted the latter and replaced it with the former.  What as most perplexing is that I would adjust the resampler method from something like speex-float-1 all the way to src-best-quality without any change in CPU usage or any change in quality.</p>
<p>But today I went one step further as I noticed that in my ~/.pulse/ directory I was missing 3 files:  &#8220;client.conf , default.pa, and system.pa&#8221; .  I am not sure why these were missing, pulse loaded fine without them but they were.  This was the only difference now between my /etc/pulse and ~/.pulse so I went and deleted everything from ~/.pulse and replaced it with what was in /etc/pulse  and VIOLA!!  I now have perfectly crystal clear sound and what a bloody relief.</p>
<p style="text-align: center;">So if this is you I hope this helps</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2009/05/07/sound-quality-with-pulseaudio-finally-restored-no-more-slightly-grainy-music/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Setting up a USB mic to work with Ubuntu, and specifically Teamspeak</title>
		<link>http://blog.netflowdevelopments.com/2009/02/25/setting-up-a-usb-mic-to-work-with-ubuntu-and-specifically-teamspeak/</link>
		<comments>http://blog.netflowdevelopments.com/2009/02/25/setting-up-a-usb-mic-to-work-with-ubuntu-and-specifically-teamspeak/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 01:12:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Random Musings]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[Linux / Freebsd]]></category>
		<category><![CDATA[microphone]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[teamspeak]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[usb mic]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/2009/02/25/setting-up-a-usb-mic-to-work-with-ubuntu-and-specifically-teamspeak/</guid>
		<description><![CDATA[Alright so you have a USB mic and Ubuntu is being a bitch about it.  Meaning it probably is thinking that your primary input device is in your soudn card somewhere as apposed to a USB port.. How on earth do we tell get Ubuntu to use the USB port instead of the Soundcard?  We&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="ubuntu" src="http://i.iinfo.cz/urs/UbuntuLogo-114916011278920.png" alt="" width="287" height="289" />Alright so you have a USB mic and Ubuntu is being a bitch about it.  Meaning it probably is thinking that your primary input device is in your soudn card somewhere as apposed to a USB port.. How on earth do we tell get Ubuntu to use the USB port instead of the Soundcard?  We&#8217;ll I&#8217;m glad you asked because coincidentally that is what I&#8217;ll be going over today <img src='http://blog.netflowdevelopments.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>First thing first, for most all applications with the exception of those running in WINE, you can to get your butt over to this thread: <a href="http://ubuntuforums.org/showthread.php?t=789578">http://ubuntuforums.org/showthread.php?t=789578</a> and get PulseAudio installed.. Pulse is the key to running a proper sound server in Ubuntu(as long as you can get it running properly &#8211; something that took me weeks)</p>
<p>The key I found to making sure that pulse works properly in skype with multiple options for inputs is to make sure that in /system/preferences/sound you have everything on auto detect except for the Sound Capture &#8211; which is set to Pulse and that your Mixer track is set to ALSA PCM on dmix via DMA PulseAudio Mixer.</p>
<p>The other thing I found was that you NEED to make sure that your ~/.asoundrc file is blank.  This will become key as in the latter part of this post I will show you that you need to fill that same file with a bunch of good stuff if you want to run a USB mic in WINE appz.</p>
<p>So for a lot of you that probably does it for USB mics and Ubuntu.</p>
<p>Now for the rest of you running games and appz in WINE the story is a little different.  This is where my struggles with learning how to get audio properly working in a linux environment when from taxing to hellish.  First a word of advice to all of you wanting to use TeamSpeak and ubuntu with a USB mic or headset &#8211; USE WINE and the Windows version.  don&#8217;t even bother with the linux version as you will have days and weeks of your life sucked away.  It just doesn&#8217;t work</p>
<p>For some reason, at least for me WINE and pulse do NOT mix very well when it comes to the input side of things.  So when I want to use an ingame chat or Teamspeak the first thing I need to do is to shut down Pulse and rely soley on ALSA.  Now this means that a lot of the nice convenient mixer stuff that pulse does needs to be done manually. I posted all this up in the<a href="http://forum.teamspeak.com/showthread.php?t=43236" target="_blank"> Teamspeak discussion forums</a> and but I&#8217;ll save you the trouble of going there and copy it here as well</p>
<p>Now from this point onwards I am going to assume you are using ALSA , if not then you have your own google adventure to go on.</p>
<p>So:</p>
<p>go into your home directory (cd ~) and create a file called &#8220;.asoundrc&#8221; minus the quotations of course with your favorite editor ( vi ./.asoundrc ) if it doesn&#8217;t exist already.. If it does you need to make a backup of it and clear it all to start fresh<br />
The .asoundrc file in your home directory acts as kind of a configuration file that is used to override default settings<br />
Our goal here is to make our default capture device our USB mic and NOT our sound card, this is accomplished by inserting the following text into the .asoundrc file:</p>
<pre>pcm.!default {
        type asym
        playback.pcm {
                type plug
                slave.pcm "hw:0,0"
        }
        capture.pcm {
                type plug
                slave.pcm "hw:1,0"
        }
}</pre>
<p>***Something to note: &#8220;hw:0,0&#8243; and &#8220;hw:2,0&#8243; are MY card locations for my soundblaster and my usb mic.  <strong>Yours might be different.</strong> ***</p>
<p>In order to find out what your desired output device is you type the following in terminal:</p>
<p><strong>&#8220;aplay -l&#8221;</strong> and you should receive and output something like this:</p>
<p>**** List of PLAYBACK Hardware Devices ****<br />
card 0: CA0106 [CA0106], device 0: ca0106 [CA0106]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: CA0106 [CA0106], device 1: ca0106 [CA0106]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: CA0106 [CA0106], device 2: ca0106 [CA0106]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: CA0106 [CA0106], device 3: ca0106 [CA0106]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</p>
<p>Obviously My card is 0 as that is the only one that shows up, so I use <strong>&#8220;hw:0,0&#8243;</strong> you need to make extra sure what yours is and use that.</p>
<p>now to find my capture device I type:<br />
<strong>&#8220;arecord -l&#8221;</strong> and my output should be something like this:</p>
<p>**** List of CAPTURE Hardware Devices ****<br />
card 0: CA0106 [CA0106], device 0: ca0106 [CA0106]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: CA0106 [CA0106], device 1: ca0106 [CA0106]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: CA0106 [CA0106], device 2: ca0106 [CA0106]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: CA0106 [CA0106], device 3: ca0106 [CA0106]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 2: default [AK5370 ], device 0: USB Audio [USB Audio]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</p>
<p>Now we already know that Card 0 is my soundblaster, which I don&#8217;t want to use, so we can rule that out.. The only other option(which is conveniently labeled USB Audio) is Card 2 so that means I used <strong>&#8220;hw:2,0&#8243;</strong> . <strong>Yours could be different</strong> so edit your .asoundrc file accodingly.</p>
<p>I quickly check to make sure WINE was seeing my usb mic by running the command <strong>&#8216;winecfg&#8217;</strong> and going into Audio and making sure that the <strong>ALSA WAVE IN</strong> device show up as <strong>USB Audio.</strong></p>
<p>I have Hardware Acceleration set to <strong>Emulation</strong> as well as <strong>Driver Emulation checked on</strong>, not sure if it matters but it is on for me and works.</p>
<p>So there you have it, easy peasy!  Well it is easy to do but figuring this out with next to no documentation on this specific subject was a bitch..Hope this helped <img src='http://blog.netflowdevelopments.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>After going through the same problem again and the above solution wasn&#8217;t working all that hot for whatever reason.</p>
<p>pcm.!default {<br />
type plug<br />
slave.pcm &#8220;combined&#8221;<br />
}</p>
<p>pcm.combined {<br />
type asym<br />
playback.pcm &#8220;playback&#8221;<br />
capture.pcm &#8220;hw:1,0&#8243;<br />
}</p>
<p>pcm.playback {<br />
type dmix<br />
ipc_key 1024<br />
slave {<br />
pcm &#8220;hw:1,0&#8243;<br />
period_time 0<br />
period_size 1024<br />
buffer_size 4096<br />
rate 44100<br />
}<br />
bindings {<br />
0 0<br />
1 1<br />
}<br />
}</p>
<p>ctl.dmixer {<br />
type hw<br />
card 1<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2009/02/25/setting-up-a-usb-mic-to-work-with-ubuntu-and-specifically-teamspeak/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

