Home
last modified time | relevance | path

Searched refs:chan_allocation (Results 1 – 19 of 19) sorted by relevance

/Zephyr-latest/subsys/bluetooth/audio/
Daudio.c143 uint8_t bt_audio_get_chan_count(enum bt_audio_location chan_allocation) in bt_audio_get_chan_count() argument
145 if (chan_allocation == BT_AUDIO_LOCATION_MONO_AUDIO) { in bt_audio_get_chan_count()
150 return POPCOUNT(chan_allocation); in bt_audio_get_chan_count()
154 while (chan_allocation != 0U) { in bt_audio_get_chan_count()
155 cnt += chan_allocation & 1U; in bt_audio_get_chan_count()
156 chan_allocation >>= 1U; in bt_audio_get_chan_count()
Dcodec.c428 enum bt_audio_location *chan_allocation, in bt_audio_codec_cfg_get_chan_allocation() argument
434 *chan_allocation = 0; in bt_audio_codec_cfg_get_chan_allocation()
441 CHECKIF(chan_allocation == NULL) { in bt_audio_codec_cfg_get_chan_allocation()
449 *chan_allocation = BT_AUDIO_LOCATION_MONO_AUDIO; in bt_audio_codec_cfg_get_chan_allocation()
461 *chan_allocation = sys_get_le32(data); in bt_audio_codec_cfg_get_chan_allocation()
467 enum bt_audio_location chan_allocation) in bt_audio_codec_cfg_set_chan_allocation() argument
471 if ((chan_allocation & BT_AUDIO_LOCATION_ANY) != chan_allocation) { in bt_audio_codec_cfg_set_chan_allocation()
472 LOG_DBG("Invalid chan_allocation value: 0x%08X", chan_allocation); in bt_audio_codec_cfg_set_chan_allocation()
476 chan_allocation_u32 = sys_cpu_to_le32((uint32_t)chan_allocation); in bt_audio_codec_cfg_set_chan_allocation()
/Zephyr-latest/samples/bluetooth/bap_broadcast_sink/src/
Dusb.c209 int usb_add_frame_to_usb(enum bt_audio_location chan_allocation, const int16_t *frame, in usb_add_frame_to_usb() argument
212 const bool is_left = (chan_allocation & BT_AUDIO_LOCATION_FRONT_LEFT) != 0; in usb_add_frame_to_usb()
213 const bool is_right = (chan_allocation & BT_AUDIO_LOCATION_FRONT_RIGHT) != 0; in usb_add_frame_to_usb()
214 const bool is_mono = chan_allocation == BT_AUDIO_LOCATION_MONO_AUDIO; in usb_add_frame_to_usb()
228 if (bt_audio_get_chan_count(chan_allocation) != 1) { in usb_add_frame_to_usb()
229 LOG_DBG("Invalid channel allocation %d", chan_allocation); in usb_add_frame_to_usb()
302 LOG_DBG("Unsupported channel %d", chan_allocation); in usb_add_frame_to_usb()
Dusb.h51 int usb_add_frame_to_usb(enum bt_audio_location chan_allocation, const int16_t *frame,
Dmain.c173 enum bt_audio_location chan_allocation; member
203 err = bt_audio_codec_cfg_get_chan_allocation(&codec_cfg, &data->bis[idx].chan_allocation, in bis_get_channel_allocation_cb()
236 enum bt_audio_location chan_allocation = BT_AUDIO_LOCATION_MONO_AUDIO; in subgroup_get_valid_bis_indexes_cb() local
280 data.bis[i].chan_allocation = subgroup_chan_allocation_available in subgroup_get_valid_bis_indexes_cb()
288 if ((data.bis[i].chan_allocation == CONFIG_TARGET_BROADCAST_CHANNEL) || in subgroup_get_valid_bis_indexes_cb()
289 ((data.bis[i].chan_allocation & CONFIG_TARGET_BROADCAST_CHANNEL) == in subgroup_get_valid_bis_indexes_cb()
298 } else if ((data.bis[i].chan_allocation & CONFIG_TARGET_BROADCAST_CHANNEL) != 0) { in subgroup_get_valid_bis_indexes_cb()
300 chan_allocation |= data.bis[i].chan_allocation; in subgroup_get_valid_bis_indexes_cb()
303 if ((chan_allocation & CONFIG_TARGET_BROADCAST_CHANNEL) == in subgroup_get_valid_bis_indexes_cb()
/Zephyr-latest/samples/bluetooth/bap_unicast_client/src/
Dstream_lc3.c108 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &lc3_tx->chan_allocation, false); in extract_lc3_config()
111 lc3_tx->chan_allocation = BT_AUDIO_LOCATION_MONO_AUDIO; in extract_lc3_config()
114 lc3_tx->chan_cnt = bt_audio_get_chan_count(lc3_tx->chan_allocation); in extract_lc3_config()
Dstream_lc3.h29 enum bt_audio_location chan_allocation; member
/Zephyr-latest/subsys/bluetooth/audio/shell/
Dbap_usb.c210 int bap_usb_add_frame_to_usb(enum bt_audio_location chan_allocation, const int16_t *frame, in bap_usb_add_frame_to_usb() argument
213 const bool is_left = (chan_allocation & BT_AUDIO_LOCATION_FRONT_LEFT) != 0; in bap_usb_add_frame_to_usb()
214 const bool is_right = (chan_allocation & BT_AUDIO_LOCATION_FRONT_RIGHT) != 0; in bap_usb_add_frame_to_usb()
215 const bool is_mono = chan_allocation == BT_AUDIO_LOCATION_MONO_AUDIO; in bap_usb_add_frame_to_usb()
230 if (bt_audio_get_chan_count(chan_allocation) != 1) { in bap_usb_add_frame_to_usb()
231 LOG_DBG("Invalid channel allocation %d", chan_allocation); in bap_usb_add_frame_to_usb()
304 LOG_DBG("Unsupported channel %d", chan_allocation); in bap_usb_add_frame_to_usb()
Daudio.h629 enum bt_audio_location chan_allocation) in print_codec_cfg_chan_allocation() argument
635 if (chan_allocation == BT_AUDIO_LOCATION_MONO_AUDIO) { in print_codec_cfg_chan_allocation()
642 if (chan_allocation & bit_val) { in print_codec_cfg_chan_allocation()
675 enum bt_audio_location chan_allocation; in print_codec_cfg() local
689 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in print_codec_cfg()
691 print_codec_cfg_chan_allocation(indent, chan_allocation); in print_codec_cfg()
/Zephyr-latest/tests/bluetooth/audio/codec/src/
Dmain.c245 enum bt_audio_location chan_allocation = BT_AUDIO_LOCATION_FRONT_RIGHT; in ZTEST() local
248 err = bt_audio_codec_cfg_get_chan_allocation(&preset.codec_cfg, &chan_allocation, false); in ZTEST()
250 zassert_equal(chan_allocation, BT_AUDIO_LOCATION_FRONT_LEFT, "unexpected return value %d", in ZTEST()
251 chan_allocation); in ZTEST()
257 enum bt_audio_location chan_allocation; in ZTEST() local
260 err = bt_audio_codec_cfg_get_chan_allocation(&codec_cfg, &chan_allocation, true); in ZTEST()
262 zassert_equal(chan_allocation, BT_AUDIO_LOCATION_MONO_AUDIO, "unexpected return value %d", in ZTEST()
263 chan_allocation); in ZTEST()
269 enum bt_audio_location chan_allocation; in ZTEST() local
272 err = bt_audio_codec_cfg_get_chan_allocation(&codec_cfg, &chan_allocation, false); in ZTEST()
[all …]
/Zephyr-latest/tests/bsim/bluetooth/audio/src/
Dbap_broadcast_sink_test.c97 enum bt_audio_location chan_allocation; in valid_base_subgroup() local
146 ret = bt_audio_codec_cfg_get_chan_allocation(&codec_cfg, &chan_allocation, true); in valid_base_subgroup()
148 chan_cnt = bt_audio_get_chan_count(chan_allocation); in valid_base_subgroup()
460 enum bt_audio_location chan_allocation; in validate_stream_codec_cfg() local
505 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, true); in validate_stream_codec_cfg()
507 if (chan_allocation != BT_AUDIO_LOCATION_FRONT_CENTER) { in validate_stream_codec_cfg()
508 FAIL("Unexpected channel allocation: 0x%08X", chan_allocation); in validate_stream_codec_cfg()
513 chan_cnt = bt_audio_get_chan_count(chan_allocation); in validate_stream_codec_cfg()
Dbap_broadcast_source_test.c67 enum bt_audio_location chan_allocation; in validate_stream_codec_cfg() local
117 ret = bt_audio_codec_cfg_get_chan_allocation(stream_codec_cfg, &chan_allocation, true); in validate_stream_codec_cfg()
119 if (chan_allocation != BT_AUDIO_LOCATION_FRONT_CENTER) { in validate_stream_codec_cfg()
120 FAIL("Unexpected channel allocation: 0x%08X", chan_allocation); in validate_stream_codec_cfg()
125 chan_cnt = bt_audio_get_chan_count(chan_allocation); in validate_stream_codec_cfg()
/Zephyr-latest/samples/bluetooth/tmap_peripheral/src/
Dbap_unicast_sr.c80 enum bt_audio_location chan_allocation; in print_codec_cfg() local
98 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in print_codec_cfg()
100 printk(" Channel allocation: 0x%x\n", chan_allocation); in print_codec_cfg()
/Zephyr-latest/samples/bluetooth/cap_acceptor/src/
Dcap_acceptor_unicast.c65 enum bt_audio_location chan_allocation; in log_codec_cfg() local
83 if (bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, true) == in log_codec_cfg()
85 LOG_INF("\tChannel allocation: 0x%08X", chan_allocation); in log_codec_cfg()
/Zephyr-latest/samples/bluetooth/hap_ha/src/
Dbap_unicast_sr.c91 enum bt_audio_location chan_allocation; in print_codec_cfg() local
109 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in print_codec_cfg()
111 printk(" Channel allocation: 0x%x\n", chan_allocation); in print_codec_cfg()
/Zephyr-latest/include/zephyr/bluetooth/audio/
Daudio.h793 uint8_t bt_audio_get_chan_count(enum bt_audio_location chan_allocation);
933 enum bt_audio_location *chan_allocation,
947 enum bt_audio_location chan_allocation);
/Zephyr-latest/samples/bluetooth/bap_unicast_server/src/
Dmain.c153 enum bt_audio_location chan_allocation; in print_codec_cfg() local
171 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in print_codec_cfg()
173 printk(" Channel allocation: 0x%x\n", chan_allocation); in print_codec_cfg()
/Zephyr-latest/tests/bluetooth/tester/src/audio/
Dbtp_bap_unicast.c63 enum bt_audio_location chan_allocation; in print_codec_cfg() local
81 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in print_codec_cfg()
83 LOG_DBG(" Channel allocation: 0x%x", chan_allocation); in print_codec_cfg()
283 enum bt_audio_location chan_allocation; in validate_codec_parameters() local
287 bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in validate_codec_parameters()
/Zephyr-latest/tests/bluetooth/audio/bap_broadcast_source/src/
Dmain.c255 enum bt_audio_location chan_allocation; in ZTEST_F() local
262 bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in ZTEST_F()
263 zassert_equal(chan_allocation, in ZTEST_F()