16afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth/******************************************************************************
26afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *
36afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *  Copyright (C) 2015 Google, Inc.
46afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *
56afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *  Licensed under the Apache License, Version 2.0 (the "License");
66afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *  you may not use this file except in compliance with the License.
76afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *  You may obtain a copy of the License at:
86afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *
96afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *  http://www.apache.org/licenses/LICENSE-2.0
106afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *
116afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *  Unless required by applicable law or agreed to in writing, software
126afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *  distributed under the License is distributed on an "AS IS" BASIS,
136afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
146afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *  See the License for the specific language governing permissions and
156afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *  limitations under the License.
166afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth *
176afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth ******************************************************************************/
186afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth
196afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth#pragma once
206afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth
216afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth// Audio state definitions.
226afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananthtypedef enum {
236afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth    SCO_STATE_OFF = 0,      // Audio is off.
246afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth    SCO_STATE_OFF_TRANSFER, // Closed pending final transfer of audio.
256afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth    SCO_STATE_ON,           // Audio is on.
266afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth    SCO_STATE_SETUP,        // Open pending completion of audio setup.
276afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth} sco_state_t;
286afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth
296afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth// Codec type definitions.
306afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananthtypedef enum {
316afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth    SCO_CODEC_NONE = 0x0000,
326afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth    SCO_CODEC_CVSD = 0x0001,
336afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth    SCO_CODEC_MSBC = 0x0002,
346afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth} sco_codec_t;
356afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth
366afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth// Set the audio state on the controller for SCO (PCM, WBS, ...) using the
376afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananth// vendor library.
386afb248849399cfba59fb1e683a06e31d88e5d1dMudumba Ananthvoid set_audio_state(uint16_t handle, sco_codec_t codec, sco_state_t state);
39