From 0ab6c459c0a5b210ecb53bbd02d20010c03f1371 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Sun, 24 Sep 2023 20:45:38 +0200 Subject: [PATCH] example/hsp_hs_demo: fix sending of sco packets --- example/hsp_hs_demo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/hsp_hs_demo.c b/example/hsp_hs_demo.c index e99a3ae19..56e52c73d 100644 --- a/example/hsp_hs_demo.c +++ b/example/hsp_hs_demo.c @@ -181,6 +181,8 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * even switch (packet_type){ case HCI_SCO_DATA_PACKET: + // forward received SCO / audio packets to SCO component + if (READ_SCO_CONNECTION_HANDLE(event) != sco_handle) break; sco_demo_receive(event, event_size); break; case HCI_EVENT_PACKET: @@ -190,7 +192,6 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * even show_usage(); break; case HCI_EVENT_SCO_CAN_SEND_NOW: - if (READ_SCO_CONNECTION_HANDLE(event) != sco_handle) break; sco_demo_send(sco_handle); break; case HCI_EVENT_HSP_META: