Replies: 4 comments 4 replies
-
I like the idea! So here are my thoughts:
shared with all clients, IMHO it should be indistinguishable from delay coming from device from the PCM point of view. What I mean is that maybe this value should be set by the user, but user should read the "Delay" property anyway (this user adjusted delay value should be added to the "Delay").
maybe we should keep the current ALSA delay as it is right now, ALSA delay will be added to all other delays, but we can deprecate the ALSA delay anyway (it will be dropped someday)
same as the "Delay"
I'm not sure about the name, not yet, but sync suggests that we need to sync something... but in fact there is nothing to sync if there is no video...
OK with new control, not sure about the name (see the above answer)
There is one potential issue (but maybe it can be somehow addressed). The delay depends on the used codec. With my Jabra headset, I have to use one delay value for AAC and different one for SBC. Anyway, I'm not switching codecs for other things than testing, so one value is OK for me, but it might be annoying that the value set for one codec is lost when switching back to it from a different codec (which needs different delay).
I think that this manual delay should be used only in case where headset lacks delay reporting (this feature availability is reported during A2DP connection). |
Beta Was this translation helpful? Give feedback.
-
[EDIT] |
Beta Was this translation helpful? Give feedback.
-
I've gone ahead and created a draft PR #653. Please post any comments/suggestions to that PR |
Beta Was this translation helpful? Give feedback.
-
This functionality was added to |
Beta Was this translation helpful? Give feedback.
-
PCM delay reporting for audio/video synchronization came up in a recent discussion, and it got me thinking about how BlueALSA could offer better support for sink devices that do not report their delay values.
At present BlueALSA offers a single default fixed adjustment (of 0 frames) that can be overridden for a specific PCM by using its
delay
parameter. This for me is sufficient, except when using the default00:00:00:00:00:00
PCM.I would like to propose that BlueALSA could offer a persistent delay adjustment for a PCM that is remembered, so once set that same value would be used for that PCM no matter if it is opened by using its actual address or the default address.
There are a few specification details that need to be agreed, such as:
I have a proof-of-concept implementation which creates a new
org.bluealsa.PCM1
property called "DelaySync" which is an integer defaulting to 0 and is writable by clients. This value is distinct from "Delay" and so a D-Bus client can choose whether or not to apply it. The ALSA PCM plugin does apply this adjustment. The ALSA CTL plugin has a new extended control called "Sync" which can be used to modify the adjustment for a PCM. So a user can usealsamixer
to adjust the audio sync, for example while watching a video, and then that adjusted value will be remembered for that PCM, just like the last set volume is remembered. In this implementation the PCM delay parameter also updates the stored DelaySync property. The unit I have chosen for the property is 1/10 milliseconds (same as the Delay property), but the CTL plugin andbluealsa-cli
use milliseconds. The step value of the ALSA control is 25ms, with a range of -3250ms to +3250ms.Before raising a PR for review, I would be interested in the thoughts of any users on:
Beta Was this translation helpful? Give feedback.
All reactions