ALSA project - the C library reference
Toggle main menu visibility
Loading...
Searching...
No Matches
timer_local.h
1
/*
2
* Timer 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 "local.h"
23
#include <limits.h>
24
#include <sys/ioctl.h>
25
26
#ifndef DOC_HIDDEN
27
typedef
struct
{
28
int (*close)(
snd_timer_t
*timer);
29
int (*nonblock)(
snd_timer_t
*timer,
int
nonblock);
30
int (*async)(
snd_timer_t
*timer,
int
sig, pid_t pid);
31
int (*info)(
snd_timer_t
*timer,
snd_timer_info_t
*info);
32
int (*params)(
snd_timer_t
*timer,
snd_timer_params_t
*params);
33
int (*
status
)(
snd_timer_t
*timer,
snd_timer_status_t
*
status
);
34
int (*rt_start)(
snd_timer_t
*timer);
35
int (*rt_stop)(
snd_timer_t
*timer);
36
int (*rt_continue)(
snd_timer_t
*timer);
37
ssize_t (*read)(
snd_timer_t
*timer,
void
*buffer,
size_t
size);
38
} snd_timer_ops_t;
39
40
struct
_snd_timer {
41
unsigned
int
version;
42
void
*dl_handle;
43
char
*name;
44
snd_timer_type_t
type
;
45
int
mode;
46
int
poll_fd;
47
const
snd_timer_ops_t *ops;
48
void
*private_data;
49
struct
list_head async_handlers;
50
};
51
52
typedef
struct
{
53
int (*close)(
snd_timer_query_t
*timer);
54
int (*next_device)(
snd_timer_query_t
*timer,
snd_timer_id_t
*tid);
55
int (*info)(
snd_timer_query_t
*timer,
snd_timer_ginfo_t
*info);
56
int (*params)(
snd_timer_query_t
*timer,
snd_timer_gparams_t
*info);
57
int (*
status
)(
snd_timer_query_t
*timer,
snd_timer_gstatus_t
*info);
58
} snd_timer_query_ops_t;
59
60
struct
_snd_timer_query {
61
void
*dl_handle;
62
char
*name;
63
snd_timer_type_t
type
;
64
int
mode;
65
int
poll_fd;
66
const
snd_timer_query_ops_t *ops;
67
void
*private_data;
68
};
69
#endif
/* DOC_HIDDEN */
70
71
int
snd_timer_hw_open(
snd_timer_t
**handle,
const
char
*name,
int
dev_class,
int
dev_sclass,
int
card,
int
device,
int
subdevice,
int
mode);
72
73
int
snd_timer_query_hw_open(
snd_timer_query_t
**handle,
const
char
*name,
int
mode);
74
75
int
snd_timer_async(
snd_timer_t
*timer,
int
sig, pid_t pid);
76
77
#ifdef INTERNAL
78
int
INTERNAL(
snd_timer_params_set_exclusive
)(
snd_timer_params_t
* params,
int
exclusive);
79
int
INTERNAL(
snd_timer_params_get_exclusive
)(
snd_timer_params_t
* params);
80
void
INTERNAL(
snd_timer_params_set_filter
)(
snd_timer_params_t
* params,
unsigned
int
filter);
81
unsigned
int
INTERNAL(
snd_timer_params_get_filter
)(
snd_timer_params_t
* params);
82
int
INTERNAL(
snd_timer_query_info
)(
snd_timer_query_t
*timer,
snd_timer_ginfo_t
*info);
83
int
INTERNAL(
snd_timer_query_params
)(
snd_timer_query_t
*timer,
snd_timer_gparams_t
*params);
84
int
INTERNAL(
snd_timer_query_status
)(
snd_timer_query_t
*timer,
snd_timer_gstatus_t
*
status
);
85
#endif
/* INTERNAL */
snd_timer_query_params
int snd_timer_query_params(snd_timer_query_t *handle, snd_timer_gparams_t *params)
set the timer global parameters
Definition
timer_query.c:407
snd_timer_type_t
snd_timer_type_t
Definition
timer.h:133
snd_timer_query_t
struct _snd_timer_query snd_timer_query_t
Definition
timer.h:143
snd_timer_params_t
struct _snd_timer_params snd_timer_params_t
Definition
timer.h:63
snd_timer_params_set_exclusive
int snd_timer_params_set_exclusive(snd_timer_params_t *params, int exclusive)
set timer exclusive use
Definition
timer.c:642
snd_timer_query_status
int snd_timer_query_status(snd_timer_query_t *handle, snd_timer_gstatus_t *status)
get the timer global status
Definition
timer_query.c:425
snd_timer_params_get_exclusive
int snd_timer_params_get_exclusive(snd_timer_params_t *params)
determine if timer has exclusive flag
Definition
timer.c:662
snd_timer_status_t
struct _snd_timer_status snd_timer_status_t
Definition
timer.h:65
snd_timer_ginfo_t
struct _snd_timer_ginfo snd_timer_ginfo_t
Definition
timer.h:55
snd_timer_t
struct _snd_timer snd_timer_t
Definition
timer.h:145
snd_timer_id_t
struct _snd_timer_id snd_timer_id_t
Definition
timer.h:53
snd_timer_gparams_t
struct _snd_timer_gparams snd_timer_gparams_t
Definition
timer.h:57
snd_timer_info_t
struct _snd_timer_info snd_timer_info_t
Definition
timer.h:61
snd_timer_params_get_filter
unsigned int snd_timer_params_get_filter(snd_timer_params_t *params)
get timer event filter
Definition
timer.c:764
snd_timer_params_set_filter
void snd_timer_params_set_filter(snd_timer_params_t *params, unsigned int filter)
set timer event filter
Definition
timer.c:748
snd_timer_gstatus_t
struct _snd_timer_gstatus snd_timer_gstatus_t
Definition
timer.h:59
snd_timer_query_info
int snd_timer_query_info(snd_timer_query_t *handle, snd_timer_ginfo_t *info)
obtain the timer global information
Definition
timer_query.c:389
type
uint8_t type
Definition
ump_msg.h:1
status
uint8_t status
Definition
ump_msg.h:3
src
timer
timer_local.h
Generated by
1.17.0