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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to