diff mbox series

[BlueZ,v2,6/6] shared/bap: Remove stream double configuration

Message ID 20240209164630.92208-7-andrei.istodorescu@nxp.com
State New
Headers show
Series Update Sink BASE management | expand

Commit Message

Andrei Istodorescu Feb. 9, 2024, 4:46 p.m. UTC
The stream configuration is done in bt_bap_stream_set_user_data.
This will be cleaned in a later patch.
---
 src/shared/bap.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Luiz Augusto von Dentz Feb. 9, 2024, 10:22 p.m. UTC | #1
Hi Andrei,

On Fri, Feb 9, 2024 at 11:46 AM Andrei Istodorescu
<andrei.istodorescu@nxp.com> wrote:
>
> The stream configuration is done in bt_bap_stream_set_user_data.
> This will be cleaned in a later patch.

Hmm, I rather do the stream config with bt_bap_stream_config,
bt_bap_stream_set_user_data shall not attempt to change the stream
state, actually that might be why there are some warnings with bcast
since it no longer protecting the bap reference which is something Ive
recently introduced while introducing bt_bap_stream_ops.

> ---
>  src/shared/bap.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/src/shared/bap.c b/src/shared/bap.c
> index b88fc60842a3..133711e99d71 100644
> --- a/src/shared/bap.c
> +++ b/src/shared/bap.c
> @@ -1677,12 +1677,6 @@ static unsigned int bap_bcast_config(struct bt_bap_stream *stream,
>                                      bt_bap_stream_func_t func, void *user_data)
>  {
>         stream->qos = *qos;
> -       if (stream->lpac->type == BT_BAP_BCAST_SINK) {
> -               if (data)
> -                       stream_config(stream, data, NULL);
> -               stream_set_state(stream, BT_BAP_STREAM_STATE_CONFIG);
> -       }
> -
>         return 1;
>  }
>
> --
> 2.40.1
>
diff mbox series

Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index b88fc60842a3..133711e99d71 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -1677,12 +1677,6 @@  static unsigned int bap_bcast_config(struct bt_bap_stream *stream,
 				     bt_bap_stream_func_t func, void *user_data)
 {
 	stream->qos = *qos;
-	if (stream->lpac->type == BT_BAP_BCAST_SINK) {
-		if (data)
-			stream_config(stream, data, NULL);
-		stream_set_state(stream, BT_BAP_STREAM_STATE_CONFIG);
-	}
-
 	return 1;
 }