Home
last modified time | relevance | path

Searched refs:sample_rate (Results 1 – 25 of 72) sorted by relevance

123

/packages/modules/Bluetooth/system/stack/a2dp/
Da2dp_vendor_ldac.cc644 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in build_codec_config()
646 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in build_codec_config()
648 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_88200; in build_codec_config()
650 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_96000; in build_codec_config()
652 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_176400; in build_codec_config()
654 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_192000; in build_codec_config()
673 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in A2dpCodecConfigLdacSource()
676 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in A2dpCodecConfigLdacSource()
679 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_88200; in A2dpCodecConfigLdacSource()
682 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_96000; in A2dpCodecConfigLdacSource()
[all …]
Da2dp_aac.cc754 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in build_codec_config()
756 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in build_codec_config()
758 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_88200; in build_codec_config()
760 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_96000; in build_codec_config()
778 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in A2dpCodecConfigAacSource()
781 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in A2dpCodecConfigAacSource()
784 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_88200; in A2dpCodecConfigAacSource()
787 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_96000; in A2dpCodecConfigAacSource()
825 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_96000; in select_best_sample_rate()
830 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_88200; in select_best_sample_rate()
[all …]
Da2dp_vendor_aptx.cc442 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in A2dpCodecConfigAptx()
445 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in A2dpCodecConfigAptx()
483 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in select_best_sample_rate()
488 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in select_best_sample_rate()
503 switch (p_codec_audio_config->sample_rate) { in select_audio_sample_rate()
507 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in select_audio_sample_rate()
514 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in select_audio_sample_rate()
660 codec_config_.sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_NONE; in setCodecConfig()
661 switch (codec_user_config_.sample_rate) { in setCodecConfig()
665 codec_capability_.sample_rate = codec_user_config_.sample_rate; in setCodecConfig()
[all …]
Da2dp_vendor_aptx_hd.cc460 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in A2dpCodecConfigAptxHd()
463 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in A2dpCodecConfigAptxHd()
501 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in select_best_sample_rate()
506 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in select_best_sample_rate()
521 switch (p_codec_audio_config->sample_rate) { in select_audio_sample_rate()
525 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in select_audio_sample_rate()
532 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in select_audio_sample_rate()
675 codec_config_.sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_NONE; in setCodecConfig()
676 switch (codec_user_config_.sample_rate) { in setCodecConfig()
680 codec_capability_.sample_rate = codec_user_config_.sample_rate; in setCodecConfig()
[all …]
Da2dp_sbc.cc851 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in build_codec_config()
853 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in build_codec_config()
872 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in A2dpCodecConfigSbcSource()
875 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in A2dpCodecConfigSbcSource()
918 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in select_best_sample_rate()
923 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in select_best_sample_rate()
938 switch (p_codec_audio_config->sample_rate) { in select_audio_sample_rate()
942 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_44100; in select_audio_sample_rate()
949 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in select_audio_sample_rate()
1136 codec_config_.sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_NONE; in setCodecConfig()
[all …]
Da2dp_vendor_opus.cc687 result->sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in build_codec_config()
710 codec_local_capability_.sample_rate |= BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in A2dpCodecConfigOpusSource()
742 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in select_best_sample_rate()
757 switch (p_codec_audio_config->sample_rate) { in select_audio_sample_rate()
761 p_codec_config->sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_48000; in select_audio_sample_rate()
914 device_codec_config_.sample_rate, device_codec_config_.bits_per_sample, in setCodecConfig()
951 codec_config_.sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_NONE; in setCodecConfig()
953 switch (codec_user_config_.sample_rate) { in setCodecConfig()
957 codec_capability_.sample_rate = codec_user_config_.sample_rate; in setCodecConfig()
958 codec_config_.sample_rate = codec_user_config_.sample_rate; in setCodecConfig()
[all …]
Da2dp_vendor_ldac_decoder.cc65 int32_t sample_rate,
84 uint32_t sample_rate; member
248 int32_t sample_rate; in a2dp_vendor_ldac_decoder_configure() local
258 sample_rate = A2DP_VendorGetTrackSampleRateLdac(p_codec_info); in a2dp_vendor_ldac_decoder_configure()
263 sample_rate, bits_per_sample, channel_mode); in a2dp_vendor_ldac_decoder_configure()
266 ldac_BCO_configure_func(a2dp_ldac_decoder_cb.ldac_handle_bco, sample_rate, in a2dp_vendor_ldac_decoder_configure()
Da2dp_aac_encoder.cc49 uint32_t sample_rate; member
190 p_feeding_params->sample_rate = A2DP_GetTrackSampleRateAac(p_codec_info); in a2dp_aac_encoder_update()
195 p_feeding_params->sample_rate, p_feeding_params->bits_per_sample, in a2dp_aac_encoder_update()
199 p_encoder_params->sample_rate = in a2dp_aac_encoder_update()
200 a2dp_aac_encoder_cb.feeding_params.sample_rate; in a2dp_aac_encoder_update()
209 p_encoder_params->sample_rate, p_encoder_params->channel_mode); in a2dp_aac_encoder_update()
441 auto sample_rate = a2dp_aac_encoder_cb.feeding_params.sample_rate; in a2dp_aac_feeding_reset() local
442 if (frame_length == 0 || sample_rate == 0) { in a2dp_aac_feeding_reset()
452 a2dp_aac_encoder_interval_ms = frame_length * 1000 / sample_rate; in a2dp_aac_feeding_reset()
462 (a2dp_aac_encoder_cb.feeding_params.sample_rate * in a2dp_aac_feeding_reset()
Da2dp_vendor_ldac_encoder.cc58 uint32_t sample_rate; member
205 p_feeding_params->sample_rate = in a2dp_vendor_ldac_encoder_update()
212 p_feeding_params->sample_rate, p_feeding_params->bits_per_sample, in a2dp_vendor_ldac_encoder_update()
217 p_encoder_params->sample_rate = in a2dp_vendor_ldac_encoder_update()
218 a2dp_ldac_encoder_cb.feeding_params.sample_rate; in a2dp_vendor_ldac_encoder_update()
308 __func__, p_encoder_params->sample_rate, p_encoder_params->channel_mode, in a2dp_vendor_ldac_encoder_update()
318 p_encoder_params->sample_rate); in a2dp_vendor_ldac_encoder_update()
345 (a2dp_ldac_encoder_cb.feeding_params.sample_rate * in a2dp_vendor_ldac_feeding_reset()
442 switch (p_encoder_params->sample_rate) { in a2dp_ldac_encode_frames()
Da2dp_vendor_opus_encoder.cc36 uint32_t sample_rate; member
221 p_feeding_params->sample_rate = in a2dp_vendor_opus_encoder_update()
228 p_feeding_params->sample_rate, p_feeding_params->bits_per_sample, in a2dp_vendor_opus_encoder_update()
232 p_encoder_params->sample_rate = in a2dp_vendor_opus_encoder_update()
233 a2dp_opus_encoder_cb.feeding_params.sample_rate; in a2dp_vendor_opus_encoder_update()
297 (a2dp_opus_encoder_cb.feeding_params.sample_rate * in a2dp_vendor_opus_feeding_reset()
314 a2dp_opus_encoder_cb.opus_encoder_params.sample_rate); in a2dp_vendor_opus_get_encoder_interval_ms()
/packages/modules/Bluetooth/system/blueberry/utils/
Dbt_audio_utils.py25 sample_rate=48000, argument
49 frequency, channel, sample_rate, sample_format, duration_sec)
52 (audio_processor.AudioProcessor.SOX, channel, sample_rate,
81 def measure_fundamental_frequency(signal, sample_rate): argument
91 return sample_rate * (np.argmax(np.abs(np.fft.rfft(signal))) / len(signal))
106 def measure_thdn(signal, sample_rate, q, frequency=None): argument
126 frequency = measure_fundamental_frequency(window, sample_rate)
128 wo = frequency / (sample_rate / 2)
178 sample_rate, wave_data = wavfile.read(audio_file)
193 sample_rate=sample_rate,
[all …]
/packages/modules/Bluetooth/system/bta/hearing_aid/
Dhearing_aid_audio_source.cc63 int sample_rate = -1; variable
91 (num_channels * sample_rate * data_interval_ms * (bit_rate / 8)) / 1000; in send_audio_data()
230 if (sample_rate == 16000) { in hearing_aid_recv_ctrl_data()
231 codec_config.sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_16000; in hearing_aid_recv_ctrl_data()
232 codec_capability.sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_16000; in hearing_aid_recv_ctrl_data()
233 } else if (sample_rate == 24000) { in hearing_aid_recv_ctrl_data()
234 codec_config.sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_24000; in hearing_aid_recv_ctrl_data()
235 codec_capability.sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_24000; in hearing_aid_recv_ctrl_data()
237 LOG_ALWAYS_FATAL("unsupported sample rate: %d", sample_rate); in hearing_aid_recv_ctrl_data()
249 reinterpret_cast<const uint8_t*>(&codec_config.sample_rate), in hearing_aid_recv_ctrl_data()
[all …]
/packages/modules/Bluetooth/system/include/hardware/
Dbt_av.h143 btav_a2dp_codec_sample_rate_t sample_rate; member
195 (sample_rate == BTAV_A2DP_CODEC_SAMPLE_RATE_NONE), "NONE"); in ToString()
197 (sample_rate & BTAV_A2DP_CODEC_SAMPLE_RATE_44100), in ToString()
200 (sample_rate & BTAV_A2DP_CODEC_SAMPLE_RATE_48000), in ToString()
203 (sample_rate & BTAV_A2DP_CODEC_SAMPLE_RATE_88200), in ToString()
206 (sample_rate & BTAV_A2DP_CODEC_SAMPLE_RATE_96000), in ToString()
209 (sample_rate & BTAV_A2DP_CODEC_SAMPLE_RATE_176400), in ToString()
212 (sample_rate & BTAV_A2DP_CODEC_SAMPLE_RATE_192000), in ToString()
215 (sample_rate & BTAV_A2DP_CODEC_SAMPLE_RATE_16000), in ToString()
218 (sample_rate & BTAV_A2DP_CODEC_SAMPLE_RATE_24000), in ToString()
[all …]
/packages/modules/Bluetooth/system/audio_hearing_aid_hw/src/
Daudio_hearing_aid_hw.cc492 tHA_SAMPLE_RATE sample_rate; in ha_read_input_audio_config() local
500 if (ha_ctrl_receive(common, &sample_rate, sizeof(tHA_SAMPLE_RATE)) < 0) in ha_read_input_audio_config()
506 switch (sample_rate) { in ha_read_input_audio_config()
511 common->cfg.rate = sample_rate; in ha_read_input_audio_config()
514 ERROR("Invalid sample rate: %" PRIu32, sample_rate); in ha_read_input_audio_config()
549 if (ha_ctrl_receive(common, &codec_config->sample_rate, in ha_read_output_audio_config()
563 if (ha_ctrl_receive(common, &codec_capability->sample_rate, in ha_read_output_audio_config()
577 switch (codec_config->sample_rate) { in ha_read_output_audio_config()
604 ERROR("Invalid sample rate: 0x%x", codec_config->sample_rate); in ha_read_output_audio_config()
651 codec_config->sample_rate, codec_config->bits_per_sample, in ha_read_output_audio_config()
[all …]
/packages/modules/Bluetooth/system/audio_a2dp_hw/src/
Daudio_a2dp_hw.cc490 tA2DP_SAMPLE_RATE sample_rate; in a2dp_read_input_audio_config() local
498 if (a2dp_ctrl_receive(common, &sample_rate, sizeof(tA2DP_SAMPLE_RATE)) < 0) in a2dp_read_input_audio_config()
505 switch (sample_rate) { in a2dp_read_input_audio_config()
508 common->cfg.rate = sample_rate; in a2dp_read_input_audio_config()
511 ERROR("Invalid sample rate: %" PRIu32, sample_rate); in a2dp_read_input_audio_config()
546 if (a2dp_ctrl_receive(common, &codec_config->sample_rate, in a2dp_read_output_audio_config()
560 if (a2dp_ctrl_receive(common, &codec_capability->sample_rate, in a2dp_read_output_audio_config()
574 switch (codec_config->sample_rate) { in a2dp_read_output_audio_config()
595 ERROR("Invalid sample rate: 0x%x", codec_config->sample_rate); in a2dp_read_output_audio_config()
642 codec_config->sample_rate, codec_config->bits_per_sample, in a2dp_read_output_audio_config()
[all …]
/packages/modules/Bluetooth/system/btif/src/
Dbtif_a2dp_control.cc144 tA2DP_SAMPLE_RATE sample_rate = btif_a2dp_sink_get_sample_rate(); in btif_a2dp_control_on_get_input_audio_config() local
149 reinterpret_cast<uint8_t*>(&sample_rate), in btif_a2dp_control_on_get_input_audio_config()
158 codec_config.sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_NONE; in btif_a2dp_control_on_get_output_audio_config()
161 codec_capability.sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_NONE; in btif_a2dp_control_on_get_output_audio_config()
174 reinterpret_cast<const uint8_t*>(&codec_config.sample_rate), in btif_a2dp_control_on_get_output_audio_config()
184 reinterpret_cast<const uint8_t*>(&codec_capability.sample_rate), in btif_a2dp_control_on_get_output_audio_config()
196 codec_config.sample_rate = BTAV_A2DP_CODEC_SAMPLE_RATE_NONE; in btif_a2dp_control_on_set_output_audio_config()
203 reinterpret_cast<uint8_t*>(&codec_config.sample_rate), in btif_a2dp_control_on_set_output_audio_config()
228 __func__, codec_config.sample_rate, codec_config.bits_per_sample, in btif_a2dp_control_on_set_output_audio_config()
Dbtif_a2dp_sink.cc94 sample_rate(0), in BtifA2dpSinkControlBlock()
112 sample_rate = 0; in Reset()
121 tA2DP_SAMPLE_RATE sample_rate; member in BtifA2dpSinkControlBlock
348 return btif_a2dp_sink_cb.sample_rate; in btif_a2dp_sink_get_sample_rate()
607 int sample_rate = A2DP_GetTrackSampleRate(p_buf->codec_info); in btif_a2dp_sink_decoder_update_event() local
608 if (sample_rate == -1) { in btif_a2dp_sink_decoder_update_event()
627 btif_a2dp_sink_cb.sample_rate = sample_rate; in btif_a2dp_sink_decoder_update_event()
653 BtifAvrcpAudioTrackCreate(sample_rate, bits_per_sample, channel_count); in btif_a2dp_sink_decoder_update_event()
/packages/modules/Bluetooth/system/bta/le_audio/audio_hal_client/
Daudio_hal_client.h64 uint32_t sample_rate; member
79 (sample_rate == other.sample_rate) &&
86 (sample_rate == other.sample_rate) &&
92 return (num_channels == 0) || (sample_rate == 0) || in IsInvalid()
/packages/modules/Bluetooth/system/bta/le_audio/broadcaster/
Dbroadcaster_types.cc237 .sample_rate = LeAudioCodecConfiguration::kSampleRate16000,
249 .sample_rate = LeAudioCodecConfiguration::kSampleRate16000,
261 .sample_rate = LeAudioCodecConfiguration::kSampleRate24000,
273 .sample_rate = LeAudioCodecConfiguration::kSampleRate48000,
285 .sample_rate = LeAudioCodecConfiguration::kSampleRate48000,
297 .sample_rate = LeAudioCodecConfiguration::kSampleRate48000,
309 .sample_rate = LeAudioCodecConfiguration::kSampleRate48000,
361 sample_rate_to_sampling_freq_map.count(source_codec_config.sample_rate)) in GetSubgroupCodecSpecData()
370 source_codec_config.sample_rate))}, in GetSubgroupCodecSpecData()
/packages/modules/Bluetooth/system/audio_hearing_aid_hw/test/
Daudio_hearing_aid_hw_test.cc116 uint32_t sample_rate = codec_sample_rate2value(codec_sample_rate); in TEST_F() local
117 EXPECT_TRUE(sample_rate != 0); in TEST_F()
129 (time_period_ms * AUDIO_STREAM_OUTPUT_BUFFER_PERIODS * sample_rate * in TEST_F()
/packages/modules/Bluetooth/system/audio_a2dp_hw/test/
Daudio_a2dp_hw_test.cc116 uint32_t sample_rate = codec_sample_rate2value(codec_sample_rate); in TEST_F() local
117 EXPECT_TRUE(sample_rate != 0); in TEST_F()
129 (time_period_ms * AUDIO_STREAM_OUTPUT_BUFFER_PERIODS * sample_rate * in TEST_F()
/packages/modules/Bluetooth/system/audio_bluetooth_hw/
Ddevice_port_proxy_hidl.cc52 unsigned int SampleRateToAudioFormat(SampleRate_2_1 sample_rate) { in SampleRateToAudioFormat() argument
53 switch (sample_rate) { in SampleRateToAudioFormat()
540 audio_cfg->sample_rate = kBluetoothDefaultSampleRate; in LoadAudioConfig()
552 audio_cfg->sample_rate = kBluetoothDefaultSampleRate; in LoadAudioConfig()
570 audio_cfg->sample_rate = SampleRateToAudioFormat(pcm_cfg.sampleRate); in LoadAudioConfig()
580 audio_cfg->sample_rate = kBluetoothDefaultSampleRate; in LoadAudioConfig()
592 audio_cfg->sample_rate = kBluetoothDefaultSampleRate; in LoadAudioConfig()
609 audio_cfg->sample_rate = SampleRateToAudioFormat(pcm_cfg.sampleRate); in LoadAudioConfig()
Ddevice_port_proxy.cc340 audio_cfg->sample_rate = kBluetoothDefaultSampleRate; in LoadAudioConfig()
349 audio_cfg->sample_rate = kBluetoothDefaultSampleRate; in LoadAudioConfig()
363 audio_cfg->sample_rate = pcm_cfg.sampleRateHz; in LoadAudioConfig()
377 audio_cfg->sample_rate = kBluetoothDefaultSampleRate; in LoadAudioConfig()
386 audio_cfg->sample_rate = kBluetoothDefaultSampleRate; in LoadAudioConfig()
401 audio_cfg->sample_rate = pcm_cfg.sampleRateHz; in LoadAudioConfig()
/packages/modules/Bluetooth/system/bta/le_audio/
Dcodec_manager.cc192 int sample_rate = broadcast_config.sampling_rate; in UpdateSupportedBroadcastConfig() local
195 if (bcast_high_reliability_qos.find(sample_rate) != in UpdateSupportedBroadcastConfig()
197 bcast_high_reliability_qos[sample_rate].find(frame_duration) != in UpdateSupportedBroadcastConfig()
198 bcast_high_reliability_qos[sample_rate].end()) { in UpdateSupportedBroadcastConfig()
199 auto qos = bcast_high_reliability_qos[sample_rate].at(frame_duration); in UpdateSupportedBroadcastConfig()
207 sample_rate, frame_duration); in UpdateSupportedBroadcastConfig()
/packages/modules/Bluetooth/system/gd/rust/topshim/btav/
Dbtav_shim.cc187 .sample_rate = static_cast<uint8_t>(config.sample_rate), in to_rust_codec_config()
201 .sample_rate = static_cast<btav_a2dp_codec_sample_rate_t>(rconfig.sample_rate), in from_rust_codec_config()
307 .sample_rate = static_cast<btav_a2dp_codec_sample_rate_t>(rconfig.sample_rate), in set_audio_config()

123