Dear Georg, thanks for the answers, I really like your 2nd solution. But the problem is, add a another module-loopback in front speaker path, which means I need a another pair of alsa drivers (as alsa-sink.0 and alsa-source.0 in the pic), that what I have written to the alsa device, then I can read the data back from the input alsa device. It`s not a valid solution with our current hardware. also another problem is that: we support dynamic switch the sink of the pa_stream (pa_sink_input_move_to) we have 3 way to playback current stream: 1. front speaker path only pa_stream -> alsa-sink.1 -> front-speaker 2. rear speaker path only pa_stream -> alsa-sink.0 -> alsa-source.0 -> alsa-sink.2 (within a module-loopback ) 3. front and rear speaker combine pa_stream -> combine-sink -> alsa-sink.1 -> front-speaker -> alsa-sink.0 -> alsa-source.0 -> alsa-sink.2 (within a module-loopback ) I`m not sure may be I can add a fake a module-loopback, just memory copy but wait for a while to simluate the lantency ? Thanks anyway! BR, Lixin å?¨ 2015å¹´05æ??06æ?¥ 14:05, Georg Chini å??é??: > On 06.05.2015 04:17, golden wrote: >> >> Dear PulseAudio folks, >> >> >> We are using PulseAudio in our automotive project, the progress is pretty good so far. >> I need some help for solving the sync problems between two speakers. >> The pic below is the data flow of the two speakers: >> >> >> >> >> without any syncing method, what we hear from the front-speaker >> is ahead of the rear-speaker (real-spear is slower for sure), our >> goal is that make the rear-speaker almost sync with (or catch up) the >> front speaker. >> > Hi, > > with your manipulation of the audio and with module-loopback you > introduce quite a lot of latency into the > first path. Maybe you can simply set the latency of alsa-sink.1 larger > than that of alsa-sink.0, not sure if this works. > Otherwise I would suggest to make the paths look more or less > equivalent, that would mean putting a > module-loopback into the front speaker path. > > You could also try and use my (not yet reviewed) patches for > module-loopback at > http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/22956 > which allow a better control over the latency introduced by the module. > If you use the patches and have a module-loopback in both paths you > should be able to fully synchronize > them by adjusting the latencies of the two modules. > > Regards > Georg > > > _______________________________________________ > pulseaudio-discuss mailing list > pulseaudio-discuss at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20150506/f5709d42/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 66953 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20150506/f5709d42/attachment-0001.png>