-
Notifications
You must be signed in to change notification settings - Fork 8.2k
LE Audio: Receiver start fix #51030
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
LE Audio: Receiver start fix #51030
Conversation
0872f23 to
afeb74a
Compare
|
Ping @szymon-czapracki |
afeb74a to
58e967a
Compare
17e016b to
d97c224
Compare
|
@szymon-czapracki could you please take a look at this one as it seems to be related to the issue you've discovered. |
d97c224 to
8c9ec68
Compare
|
Rebased on #51897 |
8c9ec68 to
8d588e0
Compare
45e798c to
38c3101
Compare
38c3101 to
4ada35c
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 bt_audio_stream_start is called for SINK only? The API says:
* For the unicast server, this will put the stream into the streaming state if
* the CIS is connected (initialized by the unicast client). If the CIS is not
* connected yet, the stream will go into the streaming state as soon as the
* CIS is connected.
In other words I would expect bt_audio_stream_start will put the stream in streaming state, where both streams SINK and SOURCE need to be handled the same way from API point of view.
It's an ASCS specification detail that in case of SINK and SOURCE this method will be handled differently internally:
SINK:
- Wait for CIS to be connected if not yet
- Notify ASE state: Streaming
- Call stream->started()
SOURCE:
- Wait for CIS to be connected if not yet
- Wait for ASE control operation: Receiver Start Ready
- Notify ASE state: Streaming
- Call 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.
We could have similar behavior for sink and source ASEs for bt_audio_stream_start, but my thought here would be that bt_audio_stream_start is a wrapper for the receiver start ready operation, which can only be done on sink ASEs on the server, and similarly only for source ASEs on the client (as per the ASCS spec).
I agree that the documentation of the function is incorrect in this regard, and should be updated.
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.
Updated the documentation a bit :)
Only the receiver of the audio is allowed to send the receiver start ready command. Furthermore, this removes the automated transition to the streaming state on the server, as the server now shall call bt_audio_stream_start to put the stream into the streaming state. Signed-off-by: Emil Gydesen <[email protected]>
4ada35c to
0124000
Compare
Modifies how and when the ASE on the unicast server side transitions to the streaming state.
Depends on #50822
fixes #50777
Reverts some changes done by #51027