1d5ac70f0Sopenharmony_ci/* 2d5ac70f0Sopenharmony_ci * HwDep interface - local header file 3d5ac70f0Sopenharmony_ci * Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz> 4d5ac70f0Sopenharmony_ci * 5d5ac70f0Sopenharmony_ci * 6d5ac70f0Sopenharmony_ci * This library is free software; you can redistribute it and/or modify 7d5ac70f0Sopenharmony_ci * it under the terms of the GNU Lesser General Public License as 8d5ac70f0Sopenharmony_ci * published by the Free Software Foundation; either version 2.1 of 9d5ac70f0Sopenharmony_ci * the License, or (at your option) any later version. 10d5ac70f0Sopenharmony_ci * 11d5ac70f0Sopenharmony_ci * This program is distributed in the hope that it will be useful, 12d5ac70f0Sopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 13d5ac70f0Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14d5ac70f0Sopenharmony_ci * GNU Lesser General Public License for more details. 15d5ac70f0Sopenharmony_ci * 16d5ac70f0Sopenharmony_ci * You should have received a copy of the GNU Lesser General Public 17d5ac70f0Sopenharmony_ci * License along with this library; if not, write to the Free Software 18d5ac70f0Sopenharmony_ci * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19d5ac70f0Sopenharmony_ci * 20d5ac70f0Sopenharmony_ci */ 21d5ac70f0Sopenharmony_ci 22d5ac70f0Sopenharmony_ci#include "local.h" 23d5ac70f0Sopenharmony_ci#include <stdio.h> 24d5ac70f0Sopenharmony_ci#include <stdlib.h> 25d5ac70f0Sopenharmony_ci#include <limits.h> 26d5ac70f0Sopenharmony_ci 27d5ac70f0Sopenharmony_citypedef struct { 28d5ac70f0Sopenharmony_ci int (*close)(snd_hwdep_t *hwdep); 29d5ac70f0Sopenharmony_ci int (*nonblock)(snd_hwdep_t *hwdep, int nonblock); 30d5ac70f0Sopenharmony_ci int (*info)(snd_hwdep_t *hwdep, snd_hwdep_info_t *info); 31d5ac70f0Sopenharmony_ci int (*ioctl)(snd_hwdep_t *hwdep, unsigned int request, void * arg); 32d5ac70f0Sopenharmony_ci ssize_t (*write)(snd_hwdep_t *hwdep, const void *buffer, size_t size); 33d5ac70f0Sopenharmony_ci ssize_t (*read)(snd_hwdep_t *hwdep, void *buffer, size_t size); 34d5ac70f0Sopenharmony_ci} snd_hwdep_ops_t; 35d5ac70f0Sopenharmony_ci 36d5ac70f0Sopenharmony_cistruct _snd_hwdep { 37d5ac70f0Sopenharmony_ci void *dl_handle; 38d5ac70f0Sopenharmony_ci char *name; 39d5ac70f0Sopenharmony_ci snd_hwdep_type_t type; 40d5ac70f0Sopenharmony_ci int mode; 41d5ac70f0Sopenharmony_ci int poll_fd; 42d5ac70f0Sopenharmony_ci const snd_hwdep_ops_t *ops; 43d5ac70f0Sopenharmony_ci void *private_data; 44d5ac70f0Sopenharmony_ci}; 45d5ac70f0Sopenharmony_ci 46d5ac70f0Sopenharmony_ciint snd_hwdep_hw_open(snd_hwdep_t **handle, const char *name, int card, int device, int mode); 47