<div dir="ltr"><div><div><div><div><div>If you are running a systemd service that needs pulseaudio up and running, then you need to do two things:<br><br></div>set up pulseaudio as a systemd service<br></div>declare a dependency on your pulseaudio systemd service<br><br></div>At least some of the documentation for this can be found at :<br><br><a href="https://possiblelossofprecision.net/?p=1956">https://possiblelossofprecision.net/?p=1956</a><br><br></div>Cheers,<br></div>Toby Haynes<br></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 30 Mar 2017 at 15:51 Stéphane Boucher <<a href="mailto:sboucher@d-box.com">sboucher@d-box.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">









<div style="font-size:10pt;font-family:Arial" lang="FR" link="#0563C1" vlink="#954F72" class="gmail_msg">
<p class="m_9197261044791707582ImprintUniqueID gmail_msg"></p>
<div class="m_9197261044791707582WordSection1 gmail_msg">
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg">Setup:<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg">Ubuntu Mate 16.04.1<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg">Application to run as a
<span class="m_9197261044791707582SpellE gmail_msg">systemd</span> service.<span class="gmail_msg">  </span>
It uses <span class="m_9197261044791707582SpellE gmail_msg">PortAudio</span>, which uses <span class="m_9197261044791707582SpellE gmail_msg">alsa</span>… which uses pulse audio due to plugin.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg">Due to needing timestamps, I explicitly what to use hw:1,0 and bypass
<span class="m_9197261044791707582SpellE gmail_msg">pulseaudio</span>.<span class="gmail_msg">  </span>However, it seems that
<span class="m_9197261044791707582SpellE gmail_msg">pulseaudio</span> is still required for initialisation.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg">Starting the application as a service (requiring
<span class="m_9197261044791707582SpellE gmail_msg">sound.target</span>) does not work.<span class="gmail_msg"> 
</span>Because no <span class="m_9197261044791707582SpellE gmail_msg">pulseaudio</span> is started prior to login.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg">I’m at a loss as to how to cleanly do things.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg">I see the benefits of
<span class="m_9197261044791707582SpellE gmail_msg">pulseaudio</span>, but in my present case, I need to bypass it somehow, and have the service application able to have a properly initialised
<span class="m_9197261044791707582SpellE gmail_msg">alsa</span> & hw:1,0.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-CA" class="gmail_msg">I’ve tried
<span class="m_9197261044791707582SpellE gmail_msg">pasuspender</span>, but if <span class="m_9197261044791707582SpellE gmail_msg">pulseaudio</span> is not running,
<span class="m_9197261044791707582SpellE gmail_msg">pasuspender</span> isn’t happy.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
</div>
<br class="gmail_msg">
<div style="FONT-SIZE:8pt;FONT-FAMILY:Arial;LINE-HEIGHT:22px" class="gmail_msg"><span style="FONT-SIZE:14pt;FONT-FAMILY:Arial;COLOR:#ff8900" class="gmail_msg"><font style="font-family:arial;font-size:12pt;font-weight:normal" class="gmail_msg">STÉPHANE BOUCHER</font></span><br class="gmail_msg">
<span style="FONT-SIZE:13pt;FONT-FAMILY:Arial;COLOR:#000000" class="gmail_msg"><font style="font-family:arial;font-size:9pt;font-weight:normal" class="gmail_msg">Consultant software</font><br class="gmail_msg">
</span></div>
<span style="FONT-SIZE:14pt" class="gmail_msg"> </span><br class="gmail_msg">
<span style="FONT-SIZE:10pt;FONT-FAMILY:Arial;COLOR:#808080" class="gmail_msg">D-BOX Technologies Inc.
<span style="FONT-SIZE:10pt;FONT-FAMILY:Arial;COLOR:#ff8900" class="gmail_msg">| <strong class="gmail_msg"><font color="#7d7d7d" class="gmail_msg">A.</font></strong>
<span style="FONT-SIZE:10pt;FONT-FAMILY:Arial;COLOR:#808080" class="gmail_msg">2172 de la Province, Longueuil, QC J4G 1R7 CANADA</span></span></span> <span style="FONT-SIZE:10pt;FONT-FAMILY:Arial;COLOR:#ff8900" class="gmail_msg">|</span>
<span style="FONT-SIZE:12pt;FONT-FAMILY:arial;COLOR:gray" class="gmail_msg"><font style="font-family:Arial;font-size:10pt;font-weight:bold" class="gmail_msg">T.
</font><font style="font-family:Arial;font-size:10pt" class="gmail_msg"><a href="tel:(450)%20442-3003" value="+14504423003" class="gmail_msg" target="_blank">450-442-3003</a></font><font style="font-family:Arial;font-size:10pt;color:#ff8900" class="gmail_msg"> |
</font><strong style="FONT-SIZE:10pt;FONT-FAMILY:arial" class="gmail_msg">W.</strong> <span style="font-family:Arial;font-size:10pt;color:Gray;text-decoration:none" class="gmail_msg">
<a href="http://www.d-box.com" title="" style="font-family:Arial;font-size:10pt;color:Gray;text-decoration:none" class="gmail_msg" target="_blank"><span style="font-family:Arial;font-size:10pt;color:Gray;text-decoration:none" class="gmail_msg">d-box.com</span></a></span><br class="gmail_msg">
</span><br class="gmail_msg">
<p class="gmail_msg"></p>
<p class="m_9197261044791707582ImprintUniqueID gmail_msg"><font color="#a6a6a6" class="gmail_msg"><span style="FONT-FAMILY:Arial;COLOR:#000000;FONT-SIZE:8.5pt" class="gmail_msg"><font color="#a6a6a6" class="gmail_msg">AVIS :</font></span>
</font><span style="FONT-FAMILY:Arial;COLOR:#000000;FONT-SIZE:7.5pt" class="gmail_msg"><font color="#a6a6a6" class="gmail_msg">Ce courriel contient des renseignements confidentiels. Si vous n'êtes pas le véritable destinataire, la diffusion ou l'usage de ce courriel, des renseignements qu'il
 contient ou des documents qui lui sont joints pourrait être illégal. Il est donc strictement interdit de les diffuser ou de les utiliser. Si</font>
<font color="#a6a6a6" class="gmail_msg">vous avez reçu ce courriel par erreur, nous vous saurions gré d’en aviser l'expéditeur immédiatement et de le supprimer sans le lire, l'imprimer, le sauvegarder ou le diffuser. Nous vous remercions de votre aimable collaboration.</font></span><br class="gmail_msg">
<font color="#a6a6a6" class="gmail_msg"><span style="FONT-SIZE:6pt" class="gmail_msg"> </span><br class="gmail_msg">
<span style="FONT-FAMILY:Arial;COLOR:#000000;FONT-SIZE:8.5pt" class="gmail_msg"><font color="#a6a6a6" class="gmail_msg">NOTICE:</font></span>
</font><span style="FONT-FAMILY:Arial;COLOR:#000000;FONT-SIZE:7.5pt" class="gmail_msg"><font color="#a6a6a6" class="gmail_msg">This e-mail contains confidential information. If you are not the intended recipient, any disclosure or other use of this e-mail or the information contained herein
 or attached hereto may be unlawful and is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately and delete this e-mail without reading, printing, copying or forwarding it to anyone. Thank you</font>
<font color="#a6a6a6" class="gmail_msg">for your kind cooperation</font>.</span><br class="gmail_msg">
</p>
</div>

_______________________________________________<br class="gmail_msg">
pulseaudio-discuss mailing list<br class="gmail_msg">
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org" class="gmail_msg" target="_blank">pulseaudio-discuss@lists.freedesktop.org</a><br class="gmail_msg">
<a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br class="gmail_msg">
</blockquote></div>