<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: TIP: Switching Soundcards In Ubuntu</title>
	<atom:link href="http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html/feed" rel="self" type="application/rss+xml" />
	<link>http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html</link>
	<description>Shantanu's Gadgets, Gizmos, Hacks, Tips, Tricks, Technology...and your kitchen sink</description>
	<lastBuildDate>Wed, 08 Feb 2012 20:40:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: kortas</title>
		<link>http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-24562</link>
		<dc:creator>kortas</dc:creator>
		<pubDate>Tue, 22 Mar 2011 11:07:36 +0000</pubDate>
		<guid isPermaLink="false">http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-24562</guid>
		<description>a way to change in pulseaudio:

$ pacmd list-sinks &#124; less
$ pacmd set-default-sink [index number]</description>
		<content:encoded><![CDATA[<p>a way to change in pulseaudio:</p>
<p>$ pacmd list-sinks | less<br />
$ pacmd set-default-sink [index number]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shantanu Goel</title>
		<link>http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-6382</link>
		<dc:creator>Shantanu Goel</dc:creator>
		<pubDate>Fri, 05 Dec 2008 00:22:15 +0000</pubDate>
		<guid isPermaLink="false">http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-6382</guid>
		<description>@Little Birdie: Actually the sound card that I have (Creative Audigy 2 ZS Notebook) can detect whether the speakers are connected or not. Creative gives a utility for windows that automatically switches to using the internal soundcard/speakers of my laptop if I don&#039;t connect the speakers to the creative sound card. So, I&#039;m guessing hw wise it is possible but would need some support in the drivers.</description>
		<content:encoded><![CDATA[<p>@Little Birdie: Actually the sound card that I have (Creative Audigy 2 ZS Notebook) can detect whether the speakers are connected or not. Creative gives a utility for windows that automatically switches to using the internal soundcard/speakers of my laptop if I don&#8217;t connect the speakers to the creative sound card. So, I&#8217;m guessing hw wise it is possible but would need some support in the drivers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Little Birdie</title>
		<link>http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-6380</link>
		<dc:creator>Little Birdie</dc:creator>
		<pubDate>Thu, 04 Dec 2008 23:47:31 +0000</pubDate>
		<guid isPermaLink="false">http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-6380</guid>
		<description>No, you cannot detect when the speakers are plugged in.  It has nothing to do with the operating system, the sound card simply does not detect what is plugged in, so there is no way for the operating system to know.  Every operating system requires you to tell it what sound card you want to use for output.</description>
		<content:encoded><![CDATA[<p>No, you cannot detect when the speakers are plugged in.  It has nothing to do with the operating system, the sound card simply does not detect what is plugged in, so there is no way for the operating system to know.  Every operating system requires you to tell it what sound card you want to use for output.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Williamson</title>
		<link>http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-6379</link>
		<dc:creator>Adam Williamson</dc:creator>
		<pubDate>Thu, 04 Dec 2008 23:36:46 +0000</pubDate>
		<guid isPermaLink="false">http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-6379</guid>
		<description>An auxiliary note for anyone who just wants to set one card as default *all the time*, on a non-PulseAudio system: you can /etc/modprobe.conf and use the index= option, which all ALSA drivers respect.

If you have one card handled by snd-hda-intel and one handled by snd-ice1724 , and you wanted the snd-ice1724 card to be default, you&#039;d add these lines:

options snd-ice1724 index=0
options snd-hda-intel index=1

and that sorts it.

If you&#039;re using any modern distribution with PulseAudio (and you don&#039;t have any problems with it...), you can both set a default device and move playing streams on-the-fly from one device to another in &#039;pavucontrol&#039;.</description>
		<content:encoded><![CDATA[<p>An auxiliary note for anyone who just wants to set one card as default *all the time*, on a non-PulseAudio system: you can /etc/modprobe.conf and use the index= option, which all ALSA drivers respect.</p>
<p>If you have one card handled by snd-hda-intel and one handled by snd-ice1724 , and you wanted the snd-ice1724 card to be default, you&#8217;d add these lines:</p>
<p>options snd-ice1724 index=0<br />
options snd-hda-intel index=1</p>
<p>and that sorts it.</p>
<p>If you&#8217;re using any modern distribution with PulseAudio (and you don&#8217;t have any problems with it&#8230;), you can both set a default device and move playing streams on-the-fly from one device to another in &#8216;pavucontrol&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy</title>
		<link>http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-6353</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Thu, 04 Dec 2008 11:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-6353</guid>
		<description>Thanks - should be useful in other distros too

Shantanu, to solve your hardware issue, see if you can make or get made a &#039;y&#039; connection that connects both soundcards to the speakers.</description>
		<content:encoded><![CDATA[<p>Thanks &#8211; should be useful in other distros too</p>
<p>Shantanu, to solve your hardware issue, see if you can make or get made a &#8216;y&#8217; connection that connects both soundcards to the speakers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shantanu Goel</title>
		<link>http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-3545</link>
		<dc:creator>Shantanu Goel</dc:creator>
		<pubDate>Wed, 17 Sep 2008 04:39:29 +0000</pubDate>
		<guid isPermaLink="false">http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-3545</guid>
		<description>Thanks Rojo, but actually the problem here is that with this script the sound card will always be set to Audigy2 because the sound card itself is always plugged into my PCMCIA slot, the speakers might or might not be, so need to switch the sound cards manually..I&#039;m trying to find out if there is some indication when the speakers cables are plugged into the sound card, etc..maybe I can look at the driver source code and log something which can be used to trigger the script..</description>
		<content:encoded><![CDATA[<p>Thanks Rojo, but actually the problem here is that with this script the sound card will always be set to Audigy2 because the sound card itself is always plugged into my PCMCIA slot, the speakers might or might not be, so need to switch the sound cards manually..I&#8217;m trying to find out if there is some indication when the speakers cables are plugged into the sound card, etc..maybe I can look at the driver source code and log something which can be used to trigger the script..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rojo</title>
		<link>http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-3542</link>
		<dc:creator>rojo</dc:creator>
		<pubDate>Wed, 17 Sep 2008 02:26:07 +0000</pubDate>
		<guid isPermaLink="false">http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-3542</guid>
		<description>For a simpler (albeit less impressive) solution, you could also add a small script to your System --&gt; Preferences --&gt; Sessions --&gt; Startup Programs as follows:

#!/bin/bash
AUD=`asoundconf list &#124; grep &#039;AUDIGY2&#039;`
if [ &quot;$AUD&quot; = &quot;AUDIGY2&quot; ]; then asoundconf set-default-card AUDIGY2;
else asoundconf set-default-card IXP; fi

There&#039;s probably a way to call this from Udev whenever the device is hot plugged, but I don&#039;t know how.  As-is, you could either manually run the script or log off and back on to activate the appropriate sound device.</description>
		<content:encoded><![CDATA[<p>For a simpler (albeit less impressive) solution, you could also add a small script to your System &#8211;&gt; Preferences &#8211;&gt; Sessions &#8211;&gt; Startup Programs as follows:</p>
<p>#!/bin/bash<br />
AUD=`asoundconf list | grep &#8216;AUDIGY2&#8242;`<br />
if [ "$AUD" = "AUDIGY2" ]; then asoundconf set-default-card AUDIGY2;<br />
else asoundconf set-default-card IXP; fi</p>
<p>There&#8217;s probably a way to call this from Udev whenever the device is hot plugged, but I don&#8217;t know how.  As-is, you could either manually run the script or log off and back on to activate the appropriate sound device.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shantanu Goel</title>
		<link>http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-48</link>
		<dc:creator>Shantanu Goel</dc:creator>
		<pubDate>Mon, 18 Feb 2008 06:50:50 +0000</pubDate>
		<guid isPermaLink="false">http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-48</guid>
		<description>Yeah, that&#039;d be a good and generic approach. But it&#039;d take a click and some typing :). It can be used as it is by someone who just doesn&#039;t want to make his own script. 
But, a bit of extra effort (pre-determining the soundcards available) would make it much easier and faster later on (single click switching).</description>
		<content:encoded><![CDATA[<p>Yeah, that&#8217;d be a good and generic approach. But it&#8217;d take a click and some typing <img src='http://tech.shantanugoel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . It can be used as it is by someone who just doesn&#8217;t want to make his own script.<br />
But, a bit of extra effort (pre-determining the soundcards available) would make it much easier and faster later on (single click switching).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rahul Gupta</title>
		<link>http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-47</link>
		<dc:creator>Rahul Gupta</dc:creator>
		<pubDate>Mon, 18 Feb 2008 06:37:37 +0000</pubDate>
		<guid isPermaLink="false">http://tech.shantanugoel.com/2008/02/12/tip-switching-soundcards-in-ubuntu.html#comment-47</guid>
		<description>An alternative way to do the same in a single script (without prior knowledge of installed cards) would be

#!/bin/bash

oldIFS=${IFS}
IFS=$&#039;\n&#039;
cardList=($(asoundconf list &#124; grep -v &quot;Names of available sound cards&quot;))
IFS=${oldIFS}

if [ ${#cardList[@]} -eq 1 ]
then
        echo &quot;The system detedted only 1 audio card&quot;
        echo &quot;Press enter to exit&quot;
        read
        exit 0
fi

echo &quot;Select the AUDIO card to be selected as default&quot;
select card in &quot;${cardList[@]}&quot;
do
        if [ -n &quot;${card}&quot; ]
        then
                echo &quot;Changing default-card to: ${card}&quot;
                asoundconf set-default-card ${card}
                echo &quot;Press enter to exit&quot;
                read
                exit $?
        else
                echo &quot;Please select a valid entry&quot;
        fi
done</description>
		<content:encoded><![CDATA[<p>An alternative way to do the same in a single script (without prior knowledge of installed cards) would be</p>
<p>#!/bin/bash</p>
<p>oldIFS=${IFS}<br />
IFS=$&#8217;\n&#8217;<br />
cardList=($(asoundconf list | grep -v &#8220;Names of available sound cards&#8221;))<br />
IFS=${oldIFS}</p>
<p>if [ ${#cardList[@]} -eq 1 ]<br />
then<br />
        echo &#8220;The system detedted only 1 audio card&#8221;<br />
        echo &#8220;Press enter to exit&#8221;<br />
        read<br />
        exit 0<br />
fi</p>
<p>echo &#8220;Select the AUDIO card to be selected as default&#8221;<br />
select card in &#8220;${cardList[@]}&#8221;<br />
do<br />
        if [ -n "${card}" ]<br />
        then<br />
                echo &#8220;Changing default-card to: ${card}&#8221;<br />
                asoundconf set-default-card ${card}<br />
                echo &#8220;Press enter to exit&#8221;<br />
                read<br />
                exit $?<br />
        else<br />
                echo &#8220;Please select a valid entry&#8221;<br />
        fi<br />
done</p>
]]></content:encoded>
	</item>
</channel>
</rss>

