XenevaOS
Loading...
Searching...
No Matches
XenevaOS
BaseHdr
sndsrv.h
Go to the documentation of this file.
1
13
#ifndef __SNDSRV_H__
14
#define __SNDSRV_H__
15
16
#include <
stdint.h
>
17
18
#define SNDSRV_RING_MAGIC 0x31565253u
/* 'SRV1' */
19
#define SNDSRV_DATA_OFFSET 4096
20
21
#define SNDSRV_IOC_ATTACH 0x5301
/* arg: SndsrvAttach */
22
#define SNDSRV_IOC_DETACH 0x5302
23
#define SNDSRV_IOC_STATS 0x5303
/* arg: SndsrvStats */
24
25
#define SNDSRV_OK 0
26
#define SNDSRV_E_PERM -1
27
#define SNDSRV_E_INVAL -2
28
#define SNDSRV_E_BUSY -3
29
30
typedef
struct
{
31
uint32_t
magic
;
32
uint32_t
size
;
/* data area bytes, a power of two */
33
uint32_t
period
;
/* PCM period in bytes */
34
uint32_t
reserved
;
35
volatile
uint32_t
head
;
/* bytes produced by the kernel */
36
volatile
uint32_t
tail
;
/* bytes consumed by the server */
37
volatile
uint32_t
running
;
/* 1 between start_output and stop_output */
38
volatile
uint32_t
dropped
;
/* bytes the kernel discarded: server too slow */
39
}
SndRingHdr
;
40
41
typedef
struct
{
uint64_t
ring_phys;
uint64_t
ring_len
; }
SndsrvAttach
;
42
typedef
struct
{
uint64_t
written
;
uint64_t
dropped
;
uint64_t
calls
; }
SndsrvStats
;
43
44
#endif
stdint.h
uint32_t
unsigned int uint32_t
Definition
acefiex.h:163
uint64_t
COMPILER_DEPENDENT_UINT64 uint64_t
Definition
acefiex.h:165
written
uint64_t written
Definition
sndproxy.c:46
dropped
uint64_t dropped
Definition
sndproxy.c:46
SndRingHdr
Definition
sndsrv.h:30
SndRingHdr::magic
uint32_t magic
Definition
sndsrv.h:31
SndRingHdr::size
uint32_t size
Definition
sndsrv.h:32
SndRingHdr::tail
volatile uint32_t tail
Definition
sndsrv.h:36
SndRingHdr::head
volatile uint32_t head
Definition
sndsrv.h:35
SndRingHdr::reserved
uint32_t reserved
Definition
sndsrv.h:34
SndRingHdr::period
uint32_t period
Definition
sndsrv.h:33
SndRingHdr::dropped
volatile uint32_t dropped
Definition
sndsrv.h:38
SndRingHdr::running
volatile uint32_t running
Definition
sndsrv.h:37
SndsrvAttach
Definition
sndsrv.h:41
SndsrvAttach::ring_len
uint64_t ring_len
Definition
sndsrv.h:41
SndsrvStats
Definition
sndsrv.h:42
SndsrvStats::calls
uint64_t calls
Definition
sndsrv.h:42
Generated by
1.9.8