XenevaOS
Loading...
Searching...
No Matches
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
30typedef struct {
32 uint32_t size; /* data area bytes, a power of two */
33 uint32_t period; /* PCM period in bytes */
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 */
40
41typedef struct { uint64_t ring_phys; uint64_t ring_len; } SndsrvAttach;
43
44#endif
unsigned int uint32_t
Definition acefiex.h:163
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
uint64_t written
Definition sndproxy.c:46
uint64_t dropped
Definition sndproxy.c:46
Definition sndsrv.h:30
uint32_t magic
Definition sndsrv.h:31
uint32_t size
Definition sndsrv.h:32
volatile uint32_t tail
Definition sndsrv.h:36
volatile uint32_t head
Definition sndsrv.h:35
uint32_t reserved
Definition sndsrv.h:34
uint32_t period
Definition sndsrv.h:33
volatile uint32_t dropped
Definition sndsrv.h:38
volatile uint32_t running
Definition sndsrv.h:37
Definition sndsrv.h:41
uint64_t ring_len
Definition sndsrv.h:41
Definition sndsrv.h:42
uint64_t calls
Definition sndsrv.h:42