Pulseaudio 2 cartes son pour surround = décalage

Bonjour à tous,

je suis en train de faire une config multimédia pour ma mère. Comme la vieille bécane n’avait pas de sortie HDMI je lui ai ajouté une carte nvidia et du coup je me retrouve avec 2 cartes son (hdmi + interne). Comme ma mère a des supers enceintes bang olupsen qui lui servent à rien je suis en train de tenter de les utiliser en plus des hauts parleurs du téléviseur pour faire du surround 4.0.
J’ai donc ajouté les lignes suivantes à /etc/pulse/default.pa

[code]load-module module-remap-sink sink_name=rear-speaker master=alsa_output.pci-0000_00_14.2.analog-stereo channels=2 channel_map=rear-left,rear-right master_channel_map=left,right
load-module module-remap-sink sink_name=front-speaker master=alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1 channels=2 channel_map=left,right master_channel_map=left,right

load-module module-combine-sink sink_name=surround_combined slaves=front-speaker,rear-speaker channel_map=left,right,rear-left,rear-right channels=4[/code]

ainsi que celles-ci dans /etc/pulse/daemon.conf

enable-lfe-remixing = yes default-sample-channels = 4 default-channel-map = left,right,rear-left,rear-right

Et ça marche! Seul problème: la carte interne (configurée pour les speakers arrières) donne le son trop tôt. Cela crée un décalage avec les canaux avants, comme un echo (environ 1 sec). J’ai fait plein de recherches, pas moyen de trouver comment régler ça… Une idée?

merci d’avance :slightly_smiling:

Quelques idées sans garantie.

freedesktop.org/wiki/Softwar … #index10h3

« In equidistant intervals the sample rates of the output sinks is recalculated»

adjust_time
Time in seconds when to readjust the sample rate of all sinks

Essayer avec un délai moindre en adjust_time comme 5 secondes au lieu de Default: 10.

resample_method
Resampling algorithm
Renvoie vers
$ man pulse-daemon.conf

resample-method= The resampling algorithm to use. Use one of src-sinc-best-quality, src-sinc-medium-quality, src-sinc-fastest, src- zero-order-hold, src-linear, trivial, speex-float-N, speex-fixed-N, ffmpeg. See the documentation of libsamplerate and speex for explanations of the different src- and speex- methods, respectively. The method trivial is the most basic algorithm implemented. If you're tight on CPU consider using this. On the other hand it has the worst quality of them all. The Speex resamplers take an inte‐ ger quality setting in the range 0..10 (bad...good). They exist in two flavours: fixed and float. The former uses fixed point num‐ bers, the latter relies on floating point numbers. On most desktop CPUs the float point resampler is a lot faster, and it also offers slightly better quality. See the output of dump-resample-methods for a complete list of all available resamplers. Defaults to speex-float-1. The available resamplers. Defaults to speex-float-1 on most achitectures and speex-fixed-1 on ARM. The --resam‐ ple-method command line option takes precedence. Note that some modules overwrite or allow overwriting of the resampler to use.

Ce dernier renvoie vers
See the output of dump-resample-methods for a complete list of all available resamplers …

Exemple chez moi.
$ pulseaudio --dump-resample-methods

src-sinc-best-quality
src-sinc-medium-quality
src-sinc-fastest
src-zero-order-hold
src-linear
trivial
speex-float-0
speex-float-1
speex-float-2
speex-float-3
speex-float-4
speex-float-5
speex-float-6
speex-float-7
speex-float-8
speex-float-9
speex-float-10
speex-fixed-0
speex-fixed-1
speex-fixed-2
speex-fixed-3
speex-fixed-4
speex-fixed-5
speex-fixed-6
speex-fixed-7
speex-fixed-8
speex-fixed-9
speex-fixed-10
ffmpeg
auto
copy
peaks

Ce qui représente un bon nombre de resamplers à tester…