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