hfp_ag.c (febc14f55dcddbdd1f92dac871eccf3e81349bc7) | hfp_ag.c (42bafa11b1ced812dc30728166c5265b044825b4) |
---|---|
1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 195 unchanged lines hidden (view full) --- 204 de_add_number(service, DE_UINT, DE_SIZE_16, 0x0301); // Hands-Free Profile - Network 205 de_add_number(service, DE_UINT, DE_SIZE_8, ability_to_reject_call); 206 207 // Construct SupportedFeatures for SDP bitmap: 208 // 209 // "The values of the “SupportedFeatures” bitmap given in Table 5.4 shall be the same as the values 210 // of the Bits 0 to 4 of the unsolicited result code +BRSF" 211 // | 1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 195 unchanged lines hidden (view full) --- 204 de_add_number(service, DE_UINT, DE_SIZE_16, 0x0301); // Hands-Free Profile - Network 205 de_add_number(service, DE_UINT, DE_SIZE_8, ability_to_reject_call); 206 207 // Construct SupportedFeatures for SDP bitmap: 208 // 209 // "The values of the “SupportedFeatures” bitmap given in Table 5.4 shall be the same as the values 210 // of the Bits 0 to 4 of the unsolicited result code +BRSF" 211 // |
212 uint16_t sdp_features = supported_features &0x1f; 213 if (supported_features & wide_band_speech){ 214 sdp_features |= 1 << 5; // Wide band speech bit | 212 // Wide band speech (bit 5) requires Codec negotiation 213 // 214 uint16_t sdp_features = supported_features & 0x1f; 215 if (wide_band_speech && (supported_features & (1 << HFP_AGSF_CODEC_NEGOTIATION))){ 216 sdp_features |= 1 << 5; |
215 } 216 de_add_number(service, DE_UINT, DE_SIZE_16, 0x0311); // Hands-Free Profile - SupportedFeatures 217 de_add_number(service, DE_UINT, DE_SIZE_16, sdp_features); 218} 219 220static int hfp_ag_send_change_in_band_ring_tone_setting_cmd(uint16_t cid){ 221 char buffer[20]; 222 sprintf(buffer, "\r\n%s:%d\r\n", HFP_CHANGE_IN_BAND_RING_TONE_SETTING, use_in_band_tone()); --- 2182 unchanged lines hidden --- | 217 } 218 de_add_number(service, DE_UINT, DE_SIZE_16, 0x0311); // Hands-Free Profile - SupportedFeatures 219 de_add_number(service, DE_UINT, DE_SIZE_16, sdp_features); 220} 221 222static int hfp_ag_send_change_in_band_ring_tone_setting_cmd(uint16_t cid){ 223 char buffer[20]; 224 sprintf(buffer, "\r\n%s:%d\r\n", HFP_CHANGE_IN_BAND_RING_TONE_SETTING, use_in_band_tone()); --- 2182 unchanged lines hidden --- |