<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>Hi,<br><br>Further to my previous message, I tried:<br>// pa_sink_set_max_rewind(u->sink, u->hwbuf_size);<br> pa_sink_set_max_rewind(u->sink, 0);<br><br>That seemed to fix it, although I fear it will break any other Alsa sinks. Is there a better way to implement this?<br><br>Interestingly, I then no longer need tiemout=0 here:<br>load-module module-suspend-on-idle<br><br>But I still need to go via the rate converter to the a52 encoder in asoundrc.<br><br>Cheers,<br>Mike<br><br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Michael Rans
<mcarans@yahoo.co.uk><br><b><span style="font-weight: bold;">To:</span></b> General PulseAudio Discussion <pulseaudio-discuss@mail.0pointer.de><br><b><span style="font-weight: bold;">Sent:</span></b> Sat, 10 July, 2010 14:24:02<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [pulseaudio-discuss] {PATCH][RFC] AC3 passthrough support<br></font><br><meta http-equiv="x-dns-prefetch-control" content="off"><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> out_frames = snd_pcm_rewind(u->pcm_handle, (snd_pcm_uframes_t) in_frames);<br> if (out_frames < 0) {<br> out_frames =
-out_frames;<br> }<br>/* if ((out_frames = snd_pcm_rewind(u->pcm_handle, (snd_pcm_uframes_t) in_frames)) < 0) {<br> pa_log("snd_pcm_rewind() failed: %s", pa_alsa_strerror((int)
out_frames));<br> if (try_recover(u, "process_rewind", out_frames) < 0)<br> return -1;<br> out_frames = 0;<br> }*/<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 <tanuk@iki.fi><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>> Even with these "hacks", I found that sometimes I see:<br>> <br>> I: module.c: Unloading "module-alsa-sink" (index: #4).<br>> D: module-always-sink.c: Autoloading null-sink as no other sinks<br>> detected.<br>> <br>> <br>> After I see that, the sink disappears and cannot be selected any more<br>> in sound properties.<br>> <br>> 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>> 2. Jack has ac3jack. What would be the pros and cons of doing the AC3<br>> 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 rel="nofollow" target="_blank"
href="https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-June/007311.html">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 rel="nofollow" ymailto="mailto:pulseaudio-discuss@mail.0pointer.de" target="_blank" href="mailto:pulseaudio-discuss@mail.0pointer.de">pulseaudio-discuss@mail.0pointer.de</a><br><a rel="nofollow" target="_blank" href="https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss">https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss</a><br></div></div>
</div><br>
<meta http-equiv="x-dns-prefetch-control" content="on"></div></div>
</div><br>
</body></html>