Home | History | Annotate | Download | only in include
      1 /******************************************************************************
      2  *
      3  *  Copyright 2016 The Android Open Source Project
      4  *  Copyright 2009-2012 Broadcom Corporation
      5  *
      6  *  Licensed under the Apache License, Version 2.0 (the "License");
      7  *  you may not use this file except in compliance with the License.
      8  *  You may obtain a copy of the License at:
      9  *
     10  *  http://www.apache.org/licenses/LICENSE-2.0
     11  *
     12  *  Unless required by applicable law or agreed to in writing, software
     13  *  distributed under the License is distributed on an "AS IS" BASIS,
     14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15  *  See the License for the specific language governing permissions and
     16  *  limitations under the License.
     17  *
     18  ******************************************************************************/
     19 
     20 #ifndef BTIF_A2DP_CONTROL_H
     21 #define BTIF_A2DP_CONTROL_H
     22 
     23 #include "audio_a2dp_hw/include/audio_a2dp_hw.h"
     24 
     25 // Initialize the A2DP control module. It should be called during the
     26 // startup stage of A2DP streaming.
     27 void btif_a2dp_control_init(void);
     28 
     29 // Cleanup the A2DP control module. It should be called during the shutdown
     30 // stage of A2DP streaming.
     31 void btif_a2dp_control_cleanup(void);
     32 
     33 // Acknowledge A2DP command to the origin of audio streaming.
     34 // |status| is the acknowledement status - see |tA2DP_CTRL_ACK|.
     35 void btif_a2dp_command_ack(tA2DP_CTRL_ACK status);
     36 
     37 // Increment the total number audio data bytes that have been encoded since
     38 // last encoding attempt.
     39 // |bytes_read| is the number of bytes to increment by.
     40 void btif_a2dp_control_log_bytes_read(uint32_t bytes_read);
     41 
     42 // Set the audio delay reported to the audio HAL in uints of 1/10ms.
     43 // |delay| is the audio delay to set.
     44 void btif_a2dp_control_set_audio_delay(uint16_t delay);
     45 
     46 // Reset the remote audio device's delay value and reset the counter that keeps
     47 // track of the number of audio bytes sent
     48 void btif_a2dp_control_reset_audio_delay(void);
     49 
     50 #endif /* BTIF_A2DP_CONTROL_H */
     51