Home
last modified time | relevance | path

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

/Zephyr-latest/subsys/bluetooth/audio/
Daudio.c142 uint8_t bt_audio_get_chan_count(enum bt_audio_location chan_allocation) in bt_audio_get_chan_count() argument
144 if (chan_allocation == BT_AUDIO_LOCATION_MONO_AUDIO) { in bt_audio_get_chan_count()
149 return POPCOUNT(chan_allocation); in bt_audio_get_chan_count()
153 while (chan_allocation != 0U) { in bt_audio_get_chan_count()
154 cnt += chan_allocation & 1U; in bt_audio_get_chan_count()
155 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_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.c208 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
211 const bool is_left = (chan_allocation & BT_AUDIO_LOCATION_FRONT_LEFT) != 0; in bap_usb_add_frame_to_usb()
212 const bool is_right = (chan_allocation & BT_AUDIO_LOCATION_FRONT_RIGHT) != 0; in bap_usb_add_frame_to_usb()
213 const bool is_mono = chan_allocation == BT_AUDIO_LOCATION_MONO_AUDIO; in bap_usb_add_frame_to_usb()
228 if (bt_audio_get_chan_count(chan_allocation) != 1) { in bap_usb_add_frame_to_usb()
229 LOG_DBG("Invalid channel allocation %d", chan_allocation); in bap_usb_add_frame_to_usb()
302 LOG_DBG("Unsupported channel %d", chan_allocation); in bap_usb_add_frame_to_usb()
Daudio.h640 enum bt_audio_location chan_allocation) in print_codec_cfg_chan_allocation() argument
646 if (chan_allocation == BT_AUDIO_LOCATION_MONO_AUDIO) { in print_codec_cfg_chan_allocation()
653 if (chan_allocation & bit_val) { in print_codec_cfg_chan_allocation()
688 enum bt_audio_location chan_allocation; in print_codec_cfg() local
702 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in print_codec_cfg()
704 print_codec_cfg_chan_allocation(sh, indent, chan_allocation); in print_codec_cfg()
/Zephyr-latest/samples/bluetooth/bap_broadcast_sink/src/
Dmain.c121 enum bt_audio_location chan_allocation; member
213 frames_per_block = bt_audio_get_chan_count(stream->chan_allocation); in lc3_decoder_thread()
228 (stream->chan_allocation & BT_AUDIO_LOCATION_FRONT_LEFT) != 0; in lc3_decoder_thread()
230 (stream->chan_allocation & BT_AUDIO_LOCATION_FRONT_RIGHT) != 0; in lc3_decoder_thread()
232 stream->chan_allocation == BT_AUDIO_LOCATION_MONO_AUDIO; in lc3_decoder_thread()
367 &sink_stream->chan_allocation, true); in lc3_enable()
392 chan_alloc_bit_cnt = bt_audio_get_chan_count(sink_stream->chan_allocation); in lc3_enable()
407 frame_duration_us, freq_hz, sink_stream->chan_allocation, in lc3_enable()
604 enum bt_audio_location chan_allocation; member
634 err = bt_audio_codec_cfg_get_chan_allocation(&codec_cfg, &data->bis[idx].chan_allocation, in bis_get_channel_allocation_cb()
[all …]
/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.c98 enum bt_audio_location chan_allocation; in valid_base_subgroup() local
143 ret = bt_audio_codec_cfg_get_chan_allocation(&codec_cfg, &chan_allocation, true); in valid_base_subgroup()
145 chan_cnt = bt_audio_get_chan_count(chan_allocation); in valid_base_subgroup()
450 enum bt_audio_location chan_allocation; in validate_stream_codec_cfg() local
490 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, true); in validate_stream_codec_cfg()
492 if (chan_allocation != BT_AUDIO_LOCATION_FRONT_CENTER) { in validate_stream_codec_cfg()
493 FAIL("Unexpected channel allocation: 0x%08X", chan_allocation); in validate_stream_codec_cfg()
498 chan_cnt = bt_audio_get_chan_count(chan_allocation); in validate_stream_codec_cfg()
Dbap_broadcast_source_test.c63 enum bt_audio_location chan_allocation; in validate_stream_codec_cfg() local
108 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, true); in validate_stream_codec_cfg()
110 if (chan_allocation != BT_AUDIO_LOCATION_FRONT_CENTER) { in validate_stream_codec_cfg()
111 FAIL("Unexpected channel allocation: 0x%08X", chan_allocation); in validate_stream_codec_cfg()
116 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.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/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.c257 enum bt_audio_location chan_allocation; in ZTEST_F() local
264 bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in ZTEST_F()
265 zassert_equal(chan_allocation, in ZTEST_F()