Python subprocess.Popen audio issues
<p>I'm using a Raspberry Pi (running Jessie) and I have a USB audio adapter.  When I just type pianobar in the console, audio comes out of the USB audio adapter perfectly.  However when I do the following:</p>

<pre><code>pianobar = subprocess.Popen("sudo -u pi pianobar", shell=True) 
</code></pre>

<p>No audio comes out at all.  I'm not sure what I'm doing wrong.  I have in my /etc/asound.conf file:</p>

<pre><code>pcm.!default { 
  type hw
  card 1
}

ctl.!default {
  type hw
  card 1
}
</code></pre>

<p>and also in the /usr/share/alsa/alsa.conf file I have modified:</p>

<pre><code>defaults.ctl.card 0
defaults.pcm.card 0
</code></pre>

<p>to:</p>

<pre><code>defaults.ctl.card 1
defaults.pcm.card 1
</code></pre>

<p>Any ideas?</p>