-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delay adjustment #653
Delay adjustment #653
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #653 +/- ##
==========================================
- Coverage 71.08% 70.27% -0.81%
==========================================
Files 47 48 +1
Lines 9010 9239 +229
==========================================
+ Hits 6405 6493 +88
- Misses 2605 2746 +141
☔ View full report in Codecov by Sentry. |
8e99ee4
to
7dfeb1d
Compare
I've had second thoughts about the non-blocking D-Bus calls, because amixer does not wait for the update to complete and therefore does not report the updated value. So I've now reverted that commit and instead invoke the D-Bus event handling code explicitly after codec and sync updates. This approach seems to keep both amixer and alsamixer happy. I plan to rebase against master this weekend to pull in the revised EXT argument code, and at the same same squash some of these commits to make each logical change a single commit. I will then mark this PR as ready for review. BTW I've been searching through dictionaries and thesauruses to find better names for the delay adjustment control, but given there is only room for 4 characters I still haven't found anything better than "Sync". |
OK, I think that we can go with "Sync" then. For audio only usage it's a little bit cryptic name, but since this control element will not be visible by default it's OK. And for A/V usage, I guess that someone who will need to adjust sync issue the "Sync" word in the manual/wiki will help to find the answer :) |
8d721b4
to
63747e6
Compare
I've just reviewed commits for CTL plugin and for Now, I need to find some free time to review the core part of this PR... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the core change looks good as well!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just white-reviewed the code and it looks OK.
I've added InvalidArguments
error to the SetDelayAdjustment
, so now the call like this will return proper D-Bus error:
gdbus call --system --dest org.bluealsa \
--object-path /org/bluealsa/hci0/dev_04_5D_4B_ED_D7_00/a2dpsrc/sink \
--method org.bluealsa.PCM1.SetDelayAdjustment xxx 33
I will perform few runtime tests and I think that we are ready to go :)
Also, I like very much the idea of "mutable" from C++! I'll try to adopt that in the whole project. Maybe with a bit different semantic. I thought about adding define just for mutexes (I don't see any other ba-structs member that can be "mutable"), something like #define MUTABLE_MUTEX(mtx) ...
.
Allows D-Bus clients to set a fixed delay adjustment per codec per PCM to improve the ability to synchronize Bluetooth audio streams with other (video, etc) streams. The adjustments are stored in the BlueALSA persistent state so that they are remembered between sessions.
See discussion #650 for rationale. Extends the D-Bus API org.bluealsa.PCM1 to allow setting a persistent adjustment that is applied to the Delay property of the PCM. Each codec supported by the PCM has its own delay adjustment.
The choice of control name for the CTL plugin is not yet agreed, and in this initial draft the name "Sync" is used.