-
Notifications
You must be signed in to change notification settings - Fork 8.2k
tests: Bluetooth: Audio: Remove uses of K_FOREVER in syswg for TX #80691
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
Conversation
8107b66 to
2df922c
Compare
2df922c to
ee52081
Compare
c653fb7 to
ab69d4d
Compare
ab69d4d to
0f74ed0
Compare
42f79c9 to
b8e1ff9
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.
Why is it can_send, not is_send or is_conf_send.
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.
To follow the stream_tx prefit it sounds weird to have stream_tx_is_send or stream_tx_is_conf_send as stream_tx refers to the module, and not the stream
33f39e6 to
48528a2
Compare
48528a2 to
975c37c
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.
The FAIL macro does not add a CR-LF, so I don't think you want to do this change
We should probably fix this at other places 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.
| LOG_MODULE_REGISTER(stream_rx, LOG_LEVEL_INF); | |
| LOG_MODULE_REGISTER(bap_stream_rx, LOG_LEVEL_INF); |
Not a required change but the other modules use the complete module-name when registering with the logging system.
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.
question: Do I understand it correctly that when stream_tx_can_send is false we do not actually start streaming for this stream?
If my understanding is correct then probably we shouldn't set the flag_stream_started
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.
Streams are unidirectional. For RX-only streams stream_tx_can_send will return false, but the stream is still started in the sense that the ASE is in the streaming state
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.e. "started" here does not refer to the TXing state
975c37c to
4baf9ed
Compare
4baf9ed to
23f5f7c
Compare
|
@Thalley needs a rebase |
Several tests were using K_FOREVER when allocating the buffer for TX in the system workqueue, which is illegal behavior. The solution chosen was to create a TX thread to handle TX, similar to the solution used in the audio shell and some sample applications. This way we can continue to use K_FOREVER when allocting buffers and it will always be done in a round-robin fashion while TXing as much as possible, by always enqueuing all the buffers with mock data. Since this works for all streams (both broadcast and unicast), it was obvious to use the same implementation for all tests, and thus cleaning up the tests a bit and more them more similar. Signed-off-by: Emil Gydesen <[email protected]>
23f5f7c to
89bfb01
Compare
Several tests were using K_FOREVER when allocating the buffer for TX in the system workqueue, which is illegal behavior.
The solution chosen was to create a TX thread to handle TX, similar to the solution used in the audio shell and some sample applications.
This way we can continue to use K_FOREVER when allocting buffers and it will always be done in a round-robin fashion while TXing as much as possible, by always enqueuing all the buffers with mock data.
Since this works for all streams (both broadcast and unicast), it was obvious to use the same implementation for all tests, and thus cleaning up the tests a bit and more them more similar.
fixes #80682