<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">Hi,<br><br>Thanks for your reply both to my message and the bug I posted.<br><br>I tried Colin's patch, but it didn't work for me.<br><br>I tried the following evil hack in alsa-sink.c:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out_frames = snd_pcm_rewind(u-&gt;pcm_handle, (snd_pcm_uframes_t) in_frames);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (out_frames &lt; 0) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; out_frames = -out_frames;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ((out_frames = snd_pcm_rewind(u-&gt;pcm_handle, (snd_pcm_uframes_t) in_frames)) &lt; 0) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pa_log("snd_pcm_rewind() failed: %s", pa_alsa_strerror((int)
 out_frames));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (try_recover(u, "process_rewind", out_frames) &lt; 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return -1;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out_frames = 0;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }*/<br><br>The sound played but very very fast in Oolite, so I would say it almost worked.<br><br>I can't find any definition of snd_pcm_rewind() in the alsa-plugins source code. Does this function call through to a function in the plugins?<br><br>I understand that there a function snd_pcm_hw_params_can_rewind which I would guess should return false for AC3 encoding - is this called by Pulseaudio?<br><br>Cheers,<br>Mike<br><div><br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size:
 13px;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Tanu Kaskinen &lt;tanuk@iki.fi&gt;<br><b><span style="font-weight: bold;">To:</span></b> pulseaudio-discuss@mail.0pointer.de<br><b><span style="font-weight: bold;">Sent:</span></b> Sat, 10 July, 2010 11:13:13<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [pulseaudio-discuss] {PATCH][RFC] AC3 passthrough support<br></font><br>On Sat, 2010-07-10 at 08:05 +0000, Michael Rans wrote:<br>&gt; Even with these "hacks", I found that sometimes I see:<br>&gt; <br>&gt; I: module.c: Unloading "module-alsa-sink" (index: #4).<br>&gt; D: module-always-sink.c: Autoloading null-sink as no other sinks<br>&gt; detected.<br>&gt; <br>&gt; <br>&gt; After I see that, the sink disappears and cannot be selected any more<br>&gt; in sound properties.<br>&gt; <br>&gt; 1. Does the ac3-iec958 profile resolve any of these issues?<br><br>What's "the ac3-iec958
 profile"? The iec958-ac3-surround-* mappings that<br>currently exist in pulseaudio use the a52 alsa plugin, which may or may<br>not work with Colin's patch[1]. (It didn't work for Colin.)<br><br>&gt; 2. Jack has ac3jack. What would be the pros and cons of doing the AC3<br>&gt; encoding in Pulseaudio instead of in Alsa?<br><br>I think it would make sense to do AC3 encoding in Pulseaudio, although<br>in theory I don't see what difference it would make. Maybe it's somehow<br>benefical to handle all the buffering inside Pulseaudio. If there are<br>timing related bugs in the a52 plugin, as Colin seems to think there<br>are, then it's also a matter of who volunteers first: a person who knows<br>how to fix the a52 plugin, or a person who knows how to hack AC3<br>encoding support into Pulseaudio.<br><br>[1] <a href="https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-June/007311.html"
 target="_blank">https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-June/007311.html</a><br><br>-- <br>Tanu Kaskinen<br><br>_______________________________________________<br>pulseaudio-discuss mailing list<br><a ymailto="mailto:pulseaudio-discuss@mail.0pointer.de" href="mailto:pulseaudio-discuss@mail.0pointer.de">pulseaudio-discuss@mail.0pointer.de</a><br><a href="https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss" target="_blank">https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss</a><br></div></div>
</div><br>



      </body></html>