Lines Matching refs:sampleRate
47 uint16_t sampleRate; /* Sampling Frequency */ member
158 if (p_ie->sampleRate == 0) return A2DP_INVALID_PARAMS; in A2DP_BuildInfoAac()
159 *p_result++ = (uint8_t)(p_ie->sampleRate & A2DP_AAC_SAMPLING_FREQ_MASK0); in A2DP_BuildInfoAac()
160 *p_result = (uint8_t)((p_ie->sampleRate & A2DP_AAC_SAMPLING_FREQ_MASK1) >> 8); in A2DP_BuildInfoAac()
204 p_ie->sampleRate = (*p_codec_info & A2DP_AAC_SAMPLING_FREQ_MASK0) | in A2DP_ParseInfoAac()
223 if (A2DP_BitsSet(p_ie->sampleRate) == A2DP_SET_ZERO_BIT) in A2DP_ParseInfoAac()
233 if (A2DP_BitsSet(p_ie->sampleRate) != A2DP_SET_ONE_BIT) in A2DP_ParseInfoAac()
307 cfg_cie.sampleRate, p_cap->sampleRate); in A2DP_CodecInfoMatchesCapabilityAac()
320 if ((cfg_cie.sampleRate & p_cap->sampleRate) == 0) return A2DP_BAD_SAMP_FREQ; in A2DP_CodecInfoMatchesCapabilityAac()
377 (aac_cie_a.sampleRate == aac_cie_b.sampleRate) && in A2DP_CodecEqualsAac()
394 switch (aac_cie.sampleRate) { in A2DP_GetTrackSampleRateAac()
633 AppendField(&field, (aac_cie.sampleRate == 0), "NONE"); in A2DP_CodecInfoStringAac()
634 AppendField(&field, (aac_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_8000), in A2DP_CodecInfoStringAac()
636 AppendField(&field, (aac_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_11025), in A2DP_CodecInfoStringAac()
638 AppendField(&field, (aac_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_12000), in A2DP_CodecInfoStringAac()
640 AppendField(&field, (aac_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_16000), in A2DP_CodecInfoStringAac()
642 AppendField(&field, (aac_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_22050), in A2DP_CodecInfoStringAac()
644 AppendField(&field, (aac_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_24000), in A2DP_CodecInfoStringAac()
646 AppendField(&field, (aac_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_32000), in A2DP_CodecInfoStringAac()
648 AppendField(&field, (aac_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_44100), in A2DP_CodecInfoStringAac()
650 AppendField(&field, (aac_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_48000), in A2DP_CodecInfoStringAac()
652 AppendField(&field, (aac_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_64000), in A2DP_CodecInfoStringAac()
654 AppendField(&field, (aac_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_88200), in A2DP_CodecInfoStringAac()
656 AppendField(&field, (aac_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_96000), in A2DP_CodecInfoStringAac()
658 res << "\tsamp_freq: " << field << " (" << loghex(aac_cie.sampleRate) in A2DP_CodecInfoStringAac()
754 if (config_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_44100) in build_codec_config()
756 if (config_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_48000) in build_codec_config()
758 if (config_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_88200) in build_codec_config()
760 if (config_cie.sampleRate & A2DP_AAC_SAMPLING_FREQ_96000) in build_codec_config()
778 if (a2dp_aac_source_caps.sampleRate & A2DP_AAC_SAMPLING_FREQ_44100) { in A2dpCodecConfigAacSource()
781 if (a2dp_aac_source_caps.sampleRate & A2DP_AAC_SAMPLING_FREQ_48000) { in A2dpCodecConfigAacSource()
784 if (a2dp_aac_source_caps.sampleRate & A2DP_AAC_SAMPLING_FREQ_88200) { in A2dpCodecConfigAacSource()
787 if (a2dp_aac_source_caps.sampleRate & A2DP_AAC_SAMPLING_FREQ_96000) { in A2dpCodecConfigAacSource()
821 static bool select_best_sample_rate(uint16_t sampleRate, in select_best_sample_rate() argument
824 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_96000) { in select_best_sample_rate()
825 p_result->sampleRate = A2DP_AAC_SAMPLING_FREQ_96000; in select_best_sample_rate()
829 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_88200) { in select_best_sample_rate()
830 p_result->sampleRate = A2DP_AAC_SAMPLING_FREQ_88200; in select_best_sample_rate()
834 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_48000) { in select_best_sample_rate()
835 p_result->sampleRate = A2DP_AAC_SAMPLING_FREQ_48000; in select_best_sample_rate()
839 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_44100) { in select_best_sample_rate()
840 p_result->sampleRate = A2DP_AAC_SAMPLING_FREQ_44100; in select_best_sample_rate()
854 const btav_a2dp_codec_config_t* p_codec_audio_config, uint16_t sampleRate, in select_audio_sample_rate() argument
858 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_44100) { in select_audio_sample_rate()
859 p_result->sampleRate = A2DP_AAC_SAMPLING_FREQ_44100; in select_audio_sample_rate()
865 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_48000) { in select_audio_sample_rate()
866 p_result->sampleRate = A2DP_AAC_SAMPLING_FREQ_48000; in select_audio_sample_rate()
872 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_88200) { in select_audio_sample_rate()
873 p_result->sampleRate = A2DP_AAC_SAMPLING_FREQ_88200; in select_audio_sample_rate()
879 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_96000) { in select_audio_sample_rate()
880 p_result->sampleRate = A2DP_AAC_SAMPLING_FREQ_96000; in select_audio_sample_rate()
1019 uint16_t sampleRate; in setCodecConfig() local
1088 sampleRate = p_a2dp_aac_caps->sampleRate & peer_info_cie.sampleRate; in setCodecConfig()
1092 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_44100) { in setCodecConfig()
1093 result_config_cie.sampleRate = A2DP_AAC_SAMPLING_FREQ_44100; in setCodecConfig()
1099 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_48000) { in setCodecConfig()
1100 result_config_cie.sampleRate = A2DP_AAC_SAMPLING_FREQ_48000; in setCodecConfig()
1106 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_88200) { in setCodecConfig()
1107 result_config_cie.sampleRate = A2DP_AAC_SAMPLING_FREQ_88200; in setCodecConfig()
1113 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_96000) { in setCodecConfig()
1114 result_config_cie.sampleRate = A2DP_AAC_SAMPLING_FREQ_96000; in setCodecConfig()
1132 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_44100) { in setCodecConfig()
1136 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_48000) { in setCodecConfig()
1140 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_88200) { in setCodecConfig()
1144 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_96000) { in setCodecConfig()
1152 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_44100) in setCodecConfig()
1154 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_48000) in setCodecConfig()
1156 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_88200) in setCodecConfig()
1158 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_96000) in setCodecConfig()
1162 if (select_audio_sample_rate(&codec_audio_config_, sampleRate, in setCodecConfig()
1169 a2dp_aac_default_config.sampleRate & peer_info_cie.sampleRate, in setCodecConfig()
1175 if (select_best_sample_rate(sampleRate, &result_config_cie, in setCodecConfig()
1184 __func__, p_a2dp_aac_caps->sampleRate, peer_info_cie.sampleRate); in setCodecConfig()
1420 uint16_t sampleRate; in setPeerCodecCapabilities() local
1441 sampleRate = p_a2dp_aac_caps->sampleRate & peer_info_cie.sampleRate; in setPeerCodecCapabilities()
1442 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_44100) { in setPeerCodecCapabilities()
1446 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_48000) { in setPeerCodecCapabilities()
1450 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_88200) { in setPeerCodecCapabilities()
1454 if (sampleRate & A2DP_AAC_SAMPLING_FREQ_96000) { in setPeerCodecCapabilities()