diff options
Diffstat (limited to 'btif/include')
-rw-r--r-- | btif/include/bluetoothTrack.h | 42 | ||||
-rw-r--r-- | btif/include/btif_av.h | 15 | ||||
-rw-r--r-- | btif/include/btif_media.h | 19 |
3 files changed, 75 insertions, 1 deletions
diff --git a/btif/include/bluetoothTrack.h b/btif/include/bluetoothTrack.h new file mode 100644 index 000000000..d18b18354 --- /dev/null +++ b/btif/include/bluetoothTrack.h @@ -0,0 +1,42 @@ +/* +* Copyright (c) 2013, The Linux Foundation. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of The Linux Foundation nor +* the names of its contributors may be used to endorse or promote +* products derived from this software without specific prior written +* permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#if defined (__cplusplus) || (cplusplus) +extern "C" { +#endif + +int btCreateTrack(int trackFreq, int channelType); +void btDeleteTrack(); +void btStopTrack(); +void btStartTrack(); +void btPauseTrack(); +int btWriteData(void *audioBuffer, int bufferlen); + +#if defined (__cplusplus) || (cplusplus) +} +#endif diff --git a/btif/include/btif_av.h b/btif/include/btif_av.h index bd691bbc7..37caf6610 100644 --- a/btif/include/btif_av.h +++ b/btif/include/btif_av.h @@ -47,6 +47,7 @@ typedef enum { BTIF_AV_SUSPEND_STREAM_REQ_EVT, BTIF_AV_SINK_CONFIG_REQ_EVT, BTIF_AV_CLEANUP_REQ_EVT, + BTIF_AV_SINK_FOCUS_REQ_EVT, } btif_av_sm_event_t; @@ -155,6 +156,20 @@ BOOLEAN btif_av_is_connected(void); BOOLEAN btif_av_is_peer_edr(void); +#ifdef USE_AUDIO_TRACK +/******************************************************************************* +** +** Function btif_queue_focus_rquest +** +** Description This is used to move context to btif and +** queue audio_focus_request +** +** Returns none +** +*******************************************************************************/ +void btif_queue_focus_rquest(void); +#endif + /****************************************************************************** ** ** Function btif_av_clear_remote_suspend_flag diff --git a/btif/include/btif_media.h b/btif/include/btif_media.h index ed8af007a..023e03cde 100644 --- a/btif/include/btif_media.h +++ b/btif/include/btif_media.h @@ -99,6 +99,21 @@ typedef struct } tBTIF_MEDIA_SINK_CFG_UPDATE; #endif +#ifdef USE_AUDIO_TRACK +typedef enum { + BTIF_MEDIA_FOCUS_IDLE = 0, + BTIF_MEIDA_FOCUS_READY, + BTIF_MEIDA_FOCUS_REQUESTED, + BTIF_MEIDA_FOCUS_GRANTED +}btif_media_audio_focus_state; + +typedef struct +{ + BT_HDR hdr; + UINT8 focus_state; +} tBTIF_MEDIA_SINK_FOCUS_UPDATE; +#endif + /******************************************************************************* ** Public functions *******************************************************************************/ @@ -278,5 +293,7 @@ void btif_reset_decoder(UINT8 *p_av); int btif_a2dp_get_track_frequency(UINT8 frequency); int btif_a2dp_get_track_channel_count(UINT8 channeltype); void btif_a2dp_set_peer_sep(UINT8 sep); - +#ifdef USE_AUDIO_TRACK +void btif_a2dp_set_audio_focus_state(btif_media_audio_focus_state state); +#endif #endif |