-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
samples: Bluetooth: Few fixups for USB data for broadcast audio sink #69086
samples: Bluetooth: Few fixups for USB data for broadcast audio sink #69086
Conversation
b170f70
to
5a71ab5
Compare
Adding DNM until review/approval from @fredrikdanebjer :) |
5a71ab5
to
38a3ad2
Compare
Fixed a minor copy-size issue that caused only half of the decoded data to reach USB, so now it works (again) :) |
38a3ad2
to
d5efa1d
Compare
This commit does several but minor changes to the USB handling of the broadcast audio sink, such as improving logging, removing a few unncessary pieces of code and some minor performance improvements. It removes some uses of the ring buffers, which effectively clears up around 30KB of RAM, while also reducing how much memory is being copied, improving performance. Some of this removes the existing code for partial support for stereo, but that code did not work in the first place. Proper stereo support will be added in a later commit. Signed-off-by: Emil Gydesen <[email protected]>
d5efa1d
to
9764d00
Compare
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 don't know Bluetooth and therefore I cannot really review it properly. The only thing, that is not modified by this PR, is the fact that there will inevitably be buffer underruns or overflows because the sink and source are not synchronized (the old USB stack claims synchronous synchronization, which means that 1 SOF = reference 1 ms, but this is false because Bluetooth is running on independent clock).
It seems to me that what you mean with this is that you removed the (non-working) support for Beside this, LGTM |
@fredrikdanebjer CONFIG_TARGET_BROADCAST_CHANNEL still works as that is either LEFT or RIGHT or MONO, so it is still capable of getting the right BIS for that and mixing that one channel into a stereo USB stream. There are 2 followup PRs:
|
But you are saying that it can take the right channel, assuming that the stream received is a one channel stream. This removes support where you have two channels on a single BIS, and then only want to listen to one channel? (but admittedly it wasn't working with 2-channel BIS to only use the Right channel). But that this is handled in some part in: |
That part was never working anyways, as it never took the frame blocks into account (fixed by #69340). As mentioned, this PR does actually not remove any actual functionality, as the functionality it does remove was never working correctly in the first place. So this is a cleanup PR, then followed by #69340 which then adds proper support for decoding a single channel with LC3 in a single BIS, and then #69341 which adds stereo support (either from 1 or 2 BIS) |
This commit does several but minor changes to the USB handling of
the broadcast audio sink, such as improving logging, removing a few
unncessary pieces of code and some minor performance improvements.
It removes some uses of the ring buffers, which effectively clears
up around 30KB of RAM, while also reducing how much memory is being
copied, improving performance.
Some of this removes the existing code for partial support for
stereo, but that code did not work in the first place. Proper stereo
support will be added in a later commit.