Skip to content
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

Bluetooth: BAP: Shell: Minor refactor of LC3 encoder #68810

Merged

Conversation

Thalley
Copy link
Collaborator

@Thalley Thalley commented Feb 9, 2024

This commit renames a few variables and changes the type and adds some additional checks.

It moves stream specific data to the shell stream
struct, but still keeps the global values that were used to initialize the LC3 encoder

The purpose of this is to better allow for a future LC3 decoder without any clashes in names or the like.

This commit renames a few variables and changes the
type and adds some additional checks.

It moves stream specific data to the shell stream
struct, but still keeps the global values that were used
to initialize the LC3 encoder

The purpose of this is to better allow for a future LC3 decoder
without any clashes in names or the like.

Signed-off-by: Emil Gydesen <[email protected]>
@Thalley Thalley force-pushed the bap_shell_lc3_cleanup branch from 2c58152 to f83add6 Compare February 12, 2024 12:53
return false;
}

err = bt_bap_ep_get_info(bap_stream->ep, &info);
if (err != 0) {
bap_stream = &sh_stream->stream.bap_stream;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are guaranteed that bap_stream is non-NULL since the unicast_stream gets initialised in the function cmd_init and so we do not need to check for NULL.
Is that correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No: We are guaranteed that bap_stream is non NULL because it's the address of a field :) (Notice the &)

@fabiobaltieri fabiobaltieri added this to the v3.7.0 milestone Feb 15, 2024
Copy link
Contributor

@cvinayak cvinayak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QUICK-ACK

@fabiobaltieri fabiobaltieri merged commit f4c8020 into zephyrproject-rtos:main Feb 26, 2024
19 checks passed
@Thalley Thalley deleted the bap_shell_lc3_cleanup branch February 26, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants