diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 23cadde..52a9f5e 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
struct bap_ep *ep = data;
uint8_t codec;
- bt_bap_pac_get_codec(ep->rpac, &codec, NULL, NULL);
+ /* For broadcast source, rpac is null so the codec
+ * is retrieved from the lpac
+ */
+ if (ep->rpac == NULL)
+ bt_bap_pac_get_codec(ep->lpac, &codec, NULL, NULL);
+ else
+ bt_bap_pac_get_codec(ep->rpac, &codec, NULL, NULL);
dbus_message_iter_append_basic(iter, DBUS_TYPE_BYTE, &codec);