1 /* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. 2 * Use of this source code is governed by a BSD-style license that can be 3 * found in the LICENSE file. 4 */ 5 6 #ifndef CRAS_CONFIG_H_ 7 #define CRAS_CONFIG_H_ 8 9 #include "cras_types.h" 10 11 #define CRAS_MIN_BUFFER_TIME_IN_US 1000 /* 1 milliseconds */ 12 13 #define CRAS_SERVER_RT_THREAD_PRIORITY 12 14 #define CRAS_CLIENT_RT_THREAD_PRIORITY 10 15 #define CRAS_CLIENT_NICENESS_LEVEL -10 16 #define CRAS_SOCKET_FILE ".cras_socket" 17 #define CRAS_PLAYBACK_SOCKET_FILE ".cras_playback" 18 #define CRAS_CAPTURE_SOCKET_FILE ".cras_capture" 19 20 /* Maximum socket_path size, which is equals to sizeof(sun_path) in sockaddr_un 21 * structure. 22 */ 23 #define CRAS_MAX_SOCKET_PATH_SIZE 108 24 25 /* CRAS_CONFIG_FILE_DIR is defined as $sysconfdir/cras by the configure 26 script. */ 27 28 /* Gets the path to save UDS socket files. */ 29 const char *cras_config_get_system_socket_file_dir(); 30 31 /* Fills sock_path by given connection type. 32 * 33 * Args: 34 * conn_type - server socket connection type. 35 * sock_path - socket path to be filled. 36 * 37 * Returns: 38 * 0 for success, positive error code on error. 39 */ 40 int cras_fill_socket_path(enum CRAS_CONNECTION_TYPE conn_type, char *sock_path); 41 42 #endif /* CRAS_CONFIG_H_ */ 43