2001-07-13 10:00:19 +00:00
|
|
|
/*
|
|
|
|
|
* HwDep interface - local header file
|
|
|
|
|
* Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or modify
|
2001-12-30 09:22:54 +00:00
|
|
|
* it under the terms of the GNU Lesser General Public License as
|
|
|
|
|
* published by the Free Software Foundation; either version 2.1 of
|
2001-07-13 10:00:19 +00:00
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2001-12-30 09:22:54 +00:00
|
|
|
* GNU Lesser General Public License for more details.
|
2001-07-13 10:00:19 +00:00
|
|
|
*
|
2001-12-30 09:22:54 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2001-07-13 10:00:19 +00:00
|
|
|
* License along with this library; if not, write to the Free Software
|
2001-12-30 09:22:54 +00:00
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2001-07-13 10:00:19 +00:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <limits.h>
|
|
|
|
|
#include "local.h"
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
int (*close)(snd_hwdep_t *hwdep);
|
|
|
|
|
int (*nonblock)(snd_hwdep_t *hwdep, int nonblock);
|
|
|
|
|
int (*info)(snd_hwdep_t *hwdep, snd_hwdep_info_t *info);
|
|
|
|
|
int (*ioctl)(snd_hwdep_t *hwdep, unsigned int request, void * arg);
|
|
|
|
|
ssize_t (*write)(snd_hwdep_t *hwdep, const void *buffer, size_t size);
|
|
|
|
|
ssize_t (*read)(snd_hwdep_t *hwdep, void *buffer, size_t size);
|
|
|
|
|
} snd_hwdep_ops_t;
|
|
|
|
|
|
|
|
|
|
struct _snd_hwdep {
|
|
|
|
|
char *name;
|
|
|
|
|
snd_hwdep_type_t type;
|
|
|
|
|
int mode;
|
|
|
|
|
int poll_fd;
|
|
|
|
|
snd_hwdep_ops_t *ops;
|
|
|
|
|
void *private_data;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
int snd_hwdep_hw_open(snd_hwdep_t **handle, const char *name, int card, int device, int mode);
|