1 /****************************************************************************** 2 * 3 * Copyright (C) 2009-2018 Realtek Corporation 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 /****************************************************************************** 20 * 21 * Filename: userial_vendor.h 22 * 23 * Description: Contains vendor-specific definitions used in serial port 24 * controls 25 * 26 ******************************************************************************/ 27 28 #ifndef RTK_SOCKET_H 29 #define RTK_SOCKET_H 30 31 #include "userial.h" 32 33 #ifdef CONFIG_SCO_OVER_HCI 34 #define SCO_CTRL_PATH "/data/misc/bluedroid/.sco_ctrl" 35 #define SCO_DATA_PATH "/data/misc/bluedroid/.sco_data" 36 37 typedef enum { 38 SCO_CTRL_CMD_NONE, 39 SCO_CTRL_CMD_CHECK_READY, 40 SCO_CTRL_CMD_OUT_START, 41 SCO_CTRL_CMD_IN_START, 42 SCO_CTRL_CMD_OUT_STOP, 43 SCO_CTRL_CMD_IN_STOP, 44 SCO_CTRL_CMD_SUSPEND, 45 SCO_CTRL_GET_AUDIO_CONFIG, 46 SCO_CTRL_CMD_OFFLOAD_START, 47 SCO_CTRL_CMD_CLOSE, 48 } tSCO_CTRL_CMD; 49 50 #define SCO_SAMPLE_RATE_8K 1 51 #define SCO_SAMPLE_RATE_16K 2 52 53 #endif 54 55 #define MAX(a, b) ((a) > (b) ? (a) : (b)) 56 57 /****************************************************************************** 58 ** Constants & Macros 59 ******************************************************************************/ 60 61 uint32_t Skt_Read(int fd, uint8_t *p_buf, uint32_t len, bool *condition); 62 int Skt_Read_noblock(int fd, uint8_t *p_buf, uint32_t len); 63 bool Skt_Send(int fd, uint8_t *p_buf, uint16_t msglen); 64 int Skt_Send_noblock(int fd, uint8_t *p_buf, uint16_t msglen); 65 #endif 66