Problem with bt_bap_base_subgroup_codec_to_codec_cfg

Hi Nordic!

I'm evaluating the zephyr samples "broadcast_audio_sink" and "broadcast_audio_source". Running these two on two separate nrf5340 audio dev boards works fine. But, for my testning purposes I need to use another source, e.g. the nrf5340 audio application running as a source. Using this source or a number of other sources out there (both nordic and non-nordic based sources) triggers the following problem on the "broadcast_audio_sink":

Scanning for broadcast sources

Waiting for Broadcaster

Found broadcaster with ID 0x4276E8 and addr CC:89:6C:42:01:AF (random) and sid 0x01

broadcaster_broadcast_id = 0x4276E8

Attempting to PA sync to the broadcaster with id 0x4276E8

Waiting for PA synced

Found broadcaster with ID 0x4276E8 and addr CC:89:6C:42:01:AF (random) and sid 0x01

broadcaster_broadcast_id = 0x4276E8

PA sync 0x200076d4 synced for broadcast sink with broadcast ID 0x4276E8

Broadcast source PA synced, creating Broadcast Sink

Receive state updated, pa sync state: 2

Broadcast Sink created, waiting for BASE

Received BASE with 1 subgroups from broadcast sink 0x20007a78

Could not get codec configuration: -12

Failed to parse subgroups: 0

Failed to find a valid BIS

Broadcast sink (0x20007a78) is syncable, BIG not encrypted

Received BASE with 1 subgroups from broadcast sink 0x20007a78

Could not get codec configuration: -12

Failed to parse subgroups: 0

Failed to find a valid BIS

Comparing with the "broadcast_audio_source" sample the (working) output is:

Waiting for Broadcaster

Found broadcaster with ID 0x231468 and addr 34:9A:FD:CD:A0:64 (random) and sid 0x00

broadcaster_broadcast_id = 0x231468

Attempting to PA sync to the broadcaster with id 0x231468

Waiting for PA synced

Found broadcaster with ID 0x231468 and addr 34:9A:FD:CD:A0:64 (random) and sid 0x00

broadcaster_broadcast_id = 0x231468

Found broadcaster with ID 0x231468 and addr 34:9A:FD:CD:A0:64 (random) and sid 0x00

broadcaster_broadcast_id = 0x231468

Found broadcaster with ID 0x231468 and addr 34:9A:FD:CD:A0:64 (random) and sid 0x00

broadcaster_broadcast_id = 0x231468

Found broadcaster with ID 0x231468 and addr 34:9A:FD:CD:A0:64 (random) and sid 0x00

broadcaster_broadcast_id = 0x231468

PA sync 0x20007604 synced for broadcast sink with broadcast ID 0x231468

Broadcast source PA synced, creating Broadcast Sink

Receive state updated, pa sync state: 2

Broadcast Sink created, waiting for BASE

Receive state updated, pa sync state: 2

subgroup 0 bis_sync: 0x00000000

Received BASE with 1 subgroups from broadcast sink 0x200079a8

bis_index_bitfield = 0x00000002

Broadcast sink (0x200079a8) is syncable, BIG not encrypted

BASE received, waiting for syncable

Waiting for broadcast code

Waiting for BIS sync request

Syncing to broadcast with bitfield: 0x00000002 = 0x00000002 (bis_index) & 0xffffffff (req_bis_sync), stream_count = 1

Waiting for stream(s) started

Receive state updated, pa sync state: 2

subgroup 0 bis_sync: 0x00000002

Stream 0x20000fc8 connected

Stream 0x20000fc8 started

Looking into the code, this is where it fails (relating to the first log above):

err = bt_bap_base_subgroup_codec_to_codec_cfg(subgroup, &codec_cfg);
if (err != 0) {
printk("Could not get codec configuration: %d\n", err);

return true;
}

 

Any idea what this could be related to? Anything to change on the source side? 

Best regards,

Henrik

Related