Skip to content
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

Oct 3214 cherry pick fixes from upstream #2294

Merged
1 change: 1 addition & 0 deletions boards/native/nrf_bsim/board_irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
void nrfbsim_SEV_model(void);

#define IRQ_ZERO_LATENCY BIT(1) /* Unused in this board*/
#define IRQ_PRIO_LOWEST UINT8_MAX

Check notice on line 22 in boards/native/nrf_bsim/board_irq.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

boards/native/nrf_bsim/board_irq.h:22 -#define IRQ_PRIO_LOWEST UINT8_MAX +#define IRQ_PRIO_LOWEST UINT8_MAX

Check notice on line 22 in boards/native/nrf_bsim/board_irq.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

boards/native/nrf_bsim/board_irq.h:22 -#define IRQ_PRIO_LOWEST UINT8_MAX +#define IRQ_PRIO_LOWEST UINT8_MAX
#ifdef __cplusplus
}
#endif
Expand Down
5 changes: 5 additions & 0 deletions boards/native/nrf_bsim/common/cmsis/cmsis.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ void NVIC_DisableIRQ(IRQn_Type IRQn)
hw_irq_ctrl_disable_irq(CONFIG_NATIVE_SIMULATOR_MCU_N, IRQn);
}

uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
{
return hw_irq_ctrl_is_irq_pending(CONFIG_NATIVE_SIMULATOR_MCU_N, IRQn);
}

void NVIC_EnableIRQ(IRQn_Type IRQn)
{
hw_irq_ctrl_enable_irq(CONFIG_NATIVE_SIMULATOR_MCU_N, IRQn);
Expand Down
1 change: 1 addition & 0 deletions boards/native/nrf_bsim/common/cmsis/cmsis.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ void __set_PRIMASK(uint32_t primask);
void NVIC_SetPendingIRQ(IRQn_Type IRQn);
void NVIC_ClearPendingIRQ(IRQn_Type IRQn);
void NVIC_DisableIRQ(IRQn_Type IRQn);
uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn);
void NVIC_EnableIRQ(IRQn_Type IRQn);
void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority);
uint32_t NVIC_GetPriority(IRQn_Type IRQn);
Expand Down
8 changes: 7 additions & 1 deletion include/zephyr/bluetooth/audio/cap.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ struct bt_cap_unicast_audio_stop_param {

/** Array of streams to stop */
struct bt_cap_stream **streams;

/** Whether to release the streams after they have stopped */
bool release;
};

/**
Expand Down Expand Up @@ -379,7 +382,10 @@ int bt_cap_initiator_unicast_audio_update(const struct bt_cap_unicast_audio_upda
*
* @param param Stop parameters.
*
* @return 0 on success or negative error value on failure.
* @return 0 on success
* @retval -EBUSY if a CAP procedure is already in progress
* @retval -EINVAL if any parameter is invalid
* @retval -EALREADY if no state changes will occur
*/
int bt_cap_initiator_unicast_audio_stop(const struct bt_cap_unicast_audio_stop_param *param);

Expand Down
1 change: 1 addition & 0 deletions scripts/native_simulator/common/src/include/nsi_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
#define NSI_CODE_UNREACHABLE __builtin_unreachable()

#define NSI_FUNC_NORETURN __attribute__((__noreturn__))
#define NSI_WEAK __attribute__((__weak__))

Check notice on line 32 in scripts/native_simulator/common/src/include/nsi_utils.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

scripts/native_simulator/common/src/include/nsi_utils.h:32 -#define NSI_WEAK __attribute__((__weak__)) +#define NSI_WEAK __attribute__((__weak__))

Check notice on line 32 in scripts/native_simulator/common/src/include/nsi_utils.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

scripts/native_simulator/common/src/include/nsi_utils.h:32 -#define NSI_WEAK __attribute__((__weak__)) +#define NSI_WEAK __attribute__((__weak__))
#if defined(__clang__)
/* The address sanitizer in llvm adds padding (redzones) after data
* But for those we are re-grouping using the linker script
Expand Down
4 changes: 2 additions & 2 deletions subsys/bluetooth/audio/bap_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ void bt_bap_stream_detach(struct bt_bap_stream *stream)
{
const bool is_broadcast = bt_bap_stream_is_broadcast(stream);

LOG_DBG("stream %p", stream);
LOG_DBG("stream %p conn %p ep %p", stream, (void *)stream->conn, (void *)stream->ep);

if (stream->conn != NULL) {
bt_conn_unref(stream->conn);
Expand Down Expand Up @@ -523,7 +523,7 @@ int bt_bap_stream_config(struct bt_conn *conn, struct bt_bap_stream *stream, str
codec_cfg, codec_cfg ? codec_cfg->id : 0, codec_cfg ? codec_cfg->cid : 0,
codec_cfg ? codec_cfg->vid : 0);

CHECKIF(conn == NULL || stream == NULL || codec_cfg == NULL) {
CHECKIF(conn == NULL || stream == NULL || codec_cfg == NULL || ep == NULL) {
LOG_DBG("NULL value(s) supplied)");
return -EINVAL;
}
Expand Down
10 changes: 10 additions & 0 deletions subsys/bluetooth/audio/cap_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ void bt_cap_common_set_subproc(enum bt_cap_common_subproc_type subproc_type)
active_proc.subproc_type = subproc_type;
}

bool bt_cap_common_proc_is_type(enum bt_cap_common_proc_type proc_type)
{
return active_proc.proc_type == proc_type;
}

bool bt_cap_common_subproc_is_type(enum bt_cap_common_subproc_type subproc_type)
{
return active_proc.subproc_type == subproc_type;
Expand Down Expand Up @@ -122,7 +127,12 @@ void bt_cap_common_abort_proc(struct bt_conn *conn, int err)
return;
}

#if defined(CONFIG_BT_CAP_INITIATOR_UNICAST)
LOG_DBG("Aborting proc %d with subproc %d for %p: %d", active_proc.proc_type,
active_proc.subproc_type, (void *)conn, err);
#else /* !CONFIG_BT_CAP_INITIATOR_UNICAST */
LOG_DBG("Aborting proc %d for %p: %d", active_proc.proc_type, (void *)conn, err);
#endif /* CONFIG_BT_CAP_INITIATOR_UNICAST */

active_proc.err = err;
active_proc.failed_conn = conn;
Expand Down
Loading
Loading