<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
I'm back again.  I upgraded to Ubuntu 8.04 which uses PA as the default
sound server and new hardware(AMD Athlon X2)  The PA server is version
0.9.10.  My /etc/default.pa looks
like this:<br>
<br>
.nofail<br>
load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav<br>
.fail<br>
load-module module-alsa-sink sink_name=intel_hda_out device=hw:0<br>
load-module module-alsa-source source_name=intel_hda_in device=hw:0<br>
load-module module-alsa-sink sink_name=delta_out device=hw:1
channels=10
channel_map=left,right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7<br>
load-module module-alsa-source source_name=delta_in device=hw:1
channels=12
channel_map=left,right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7,aux8,aux9<br>
set-default-sink delta_out <br>
set-default-source delta_in<br>
.ifexists module-esound-protocol-unix.so<br>
load-module module-esound-protocol-unix<br>
.endif<br>
load-module module-native-protocol-unix<br>
load-module module-volume-restore<br>
load-module module-default-device-restore<br>
load-module module-rescue-streams<br>
load-module module-suspend-on-idle<br>
.ifexists module-gconf.so<br>
.nofail<br>
load-module module-gconf<br>
.fail<br>
.endif<br>
.ifexists module-x11-publish.so<br>
.nofail<br>
load-module module-x11-publish<br>
.fail<br>
.endif<br>
<br>
To get feedback from the PA server I used paman (pulseaudio sound
manager in ubuntu) and it said that the
intel_hda_out device is the default sink.  I tried to force the default
sink to be delta_out with pacmd, but that stopped the PA server... I
didn't realize that when I exit paman, it shuts the pa server down.  I
was a little confused by that... expecting the server to stay alive.<br>
<br>
I noticed that I could "play-sample" to the delta_out and it sounded
fine.  It looked like I can get my Delta 66 card and PA to work but
only
in that "play-sample" mode.  <br>
<br>
I did not realize that I had the volume-restore enabled, and it had
quite a few settings from the past that were all related to
intel_hda_out... also my ~/.pulse/default-sink file was also set to
intel_hda_out... anyway even though the global config
file(/etc/pulse/default.pa) set the default sink to delta_out, there
are local config files in ~/.pulse/ that can also modify the defaults. 
It's probably in the literature somewhere, and it makes sense for
clients that are sharing a server.<br>
<br>
Anyway, I after changing *all* (local and global) the config files, the
system works... and pretty well.  Hope this helps someone with their
M-Audio Delta setup.<br>
<br>
R<br>
<br>
Tanu Kaskinen wrote:
<blockquote cite="mid:20080201225749.GA19648@a9a.mannikko1.tontut.fi"
 type="cite">
  <pre wrap="">On Fri, Feb 01, 2008 at 03:02:40PM -0500, Richard Geddes wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">You are correct... latest release Ubuntu 7.10 comes with PA 0.9.6.  
I'll look into getting the latest version of PA.

My goal was to use PA as a replacement for esound server...  I'd like to
be able to record/mix different sound sources (midi, analog, sound from
files (mp3, wav, ogg, etc)) and be able to create different file
formats, including sound delivered in flash (I'm not a fan of flash as
it consumes alot of cpu time, but it is in demand).  I played with jackd
for a while and was impressed with it's technical capabilities, but
unfortunately, I haven't found a way to play flash sound through
jackd... that is, flash in firefox.  I found a how-to in the Ubuntu
forum that seemed to patch together a solution the involved PA:

<a class="moz-txt-link-freetext"
 href="http://ubuntu-utah.ubuntuforums.org/showthread.php?t=548178">http://ubuntu-utah.ubuntuforums.org/showthread.php?t=548178</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
If you want to record midi and do other "pro-audio" stuff,
then jack is the way to go. If you also want to do "desktop"
stuff (like have every media player just work), then the
best solution in my experience is to run pulseaudio on top
of jack (like instructed in that link).

A summary of what you'll have to do at minimum:
- Get pulseaudio version &gt;= 0.9.7
- Remove device loading from /etc/pulse/default.pa and add
  the jack modules instead
- Edit /etc/security/limits.conf as instructed in the link
- Edit /etc/pulse/daemon.conf to enable realtime scheduling
- Run jackd with -R parameter (i.e. in realtime mode)
- Other stuff that I have forgot ;)

If you are going to record midi, that probably means that
you have some midi instrument that you want to be able to
play live. That requires quite low latency. That's
completely possible to achieve. Unfortunately it may require
extensive tuning (mostly kernel, but you may need to tweak
irq priorities as well). Vanilla kernels are AFAIK getting
better and better regarding latency, so first try with your
current kernel. The actual latency is controlled by jackd
parameters -n and -p (read man jackd). If your kernel isn't
able to provide low enough latency, you'll get drop-outs and
xruns (the former being the audible consequence of the
latter).

If you have problems with setting pulseaudio to work in
combination with jack, or anything else pulseaudio related,
then feel free to ask further questions.

If it turns out that your system needs latency-tuning, here
are a few kernel options you could try without compiling an
-rt patched kernel:
CONFIG_NO_HZ=y
CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_HIGH_RES_TIMERS=y (AFAIK this requires a rather recent kernel)

There may be others that I'm not aware of. These are
beneficial to pulseaudio regardless of what kind of setup
you need (jack or not).

If you end up needing a patched kernel, here's the wiki of
the patchset: <a class="moz-txt-link-freetext"
 href="http://rt.wiki.kernel.org/index.php/Main_Page">http://rt.wiki.kernel.org/index.php/Main_Page</a>

If you have further questions about latency stuff, I
recommend searching the <a class="moz-txt-link-abbreviated"
 href="mailto:linux-audio-user@linuxaudio.org">linux-audio-user@linuxaudio.org</a> list
archives, and if that doesn't help, then send questions
there. That's a very good list to subscribe to anyway, if
you're going to do any audio work on Linux.

And then a note on flash. Flash requires a thing called
libflashsupport due to Adobe's plugin's bugginess. AFAIK it
will be packaged eventually, but currently you have to
compile it yourself. The link you gave refers to an outdated
version of the "thing". More recent information is available
at <a class="moz-txt-link-freetext"
 href="http://www.pulseaudio.org/wiki/PerfectSetup#FlashPlayer9">http://www.pulseaudio.org/wiki/PerfectSetup#FlashPlayer9</a>.
In short: get the one that's hosted at git.0pointer.de, not
the revolutionlinux one.

An alternative to the flash plugin is <a class="moz-txt-link-freetext"
 href="http://keepvid.com">http://keepvid.com</a>,
which allows you to download the .flv files in Youtube and
several other supported services. Then just play the file on
your favourite media player. Keepvid.com is enough for me,
but YMMV. Note the white button saying "Drag this button..."
etc. It talks about a "links toolbar" but bookmarking the
script does the same thing.

  </pre>
  <blockquote type="cite">
    <pre wrap="">Question:   PA, esound, jackd, etc.. are all called sound servers,
implying that you can replace one with another... like apache vs iis....
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I'd say that being a sound server implies only that the
server is somehow capable of software mixing.

  </pre>
  <blockquote type="cite">
    <pre wrap="">is the main difference that they use different client/server
communication protocols?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
The main difference of pulseaudio and jack is their
different designs and goals. Maybe the communication
protocols somehow reflect that, I don't know. Esound's
distinctive feature is being dead, I don't know much else
about that thing.

  </pre>
</blockquote>
</body>
</html>