mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-05-05 06:46:52 -04:00
Recoded hwdep API to follow modern conf style.
Added hwdep configuration to alsa.conf. Added documentation for hwdep interface.
This commit is contained in:
parent
daebb1d1f0
commit
d02979784f
7 changed files with 683 additions and 172 deletions
45
src/hwdep/hwdep_local.h
Normal file
45
src/hwdep/hwdep_local.h
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* 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
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue