Expand higher API (set config string).
[rrq/lsp-utils.git] / lsp-alsa / libasound-pcm.lsp
1 (constant
2  ;; typedef enum _snd_pcm_stream
3  'SND_PCM_STREAM_PLAYBACK 0
4  'SND_PCM_STREAM_CAPTURE  1
5  ;; Non blocking mode (flag for open mode)
6  'SND_PCM_NONBLOCK 0x00000001
7  ;; Async notification
8  'SND_PCM_ASYNC    0x00000002
9  ;; enum _snd_pcm_format (some)
10  'SND_PCM_FORMAT_S16_LE 2
11  ;; enum _snd_pcm_access (some)
12  'SND_PCM_ACCESS_RW_INTERLEAVED 3
13  'SND_PCM_ACCESS_RW_NONINTERLEAVED 4
14  )
15
16 (import LIB "snd_pcm_open" "int"
17         "void*" ; snd_pcm_t **pcmp [output]
18         "char*" ; const char *name
19         "int"   ; snd_pcm_stream_t stream
20         "int"   ; int mode
21         )
22
23 (import LIB "snd_pcm_writei" "long" ; snd_pcm_uframes_t 
24         "void*" ; snd_pcm_t *pcm
25         "void*" ; const void *buffer
26         "long"   ; snd_pcm_uframes_t size
27         )
28
29 (import LIB "snd_pcm_prepare" "int" ; int
30         "void*" ; snd_pcm_t *pcm
31         )
32
33 (import LIB "snd_pcm_start" "int" ; int
34         "void*" ; snd_pcm_t *pcm
35         )
36
37 ;;typedef struct _snd_pcm_hw_params snd_pcm_hw_params_t
38 #      "unsigned" ; unsigned int flags;
39 #      struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK -
40 #                             SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
41 #      struct snd_mask mres[5];        /* reserved masks */
42 #      struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
43 #                                      SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
44 #      struct snd_interval ires[9];    /* reserved intervals */
45 #      unsigned int rmask;             /* W: requested masks */
46 #      unsigned int cmask;             /* R: changed masks */
47 #      unsigned int info;              /* R: Info flags for returned setup */
48 #      unsigned int msbits;            /* R: used most significant bits */
49 #      unsigned int rate_num;          /* R: rate numerator */
50 #      unsigned int rate_den;          /* R: rate denominator */
51 #      snd_pcm_uframes_t fifo_size;    /* R: chip FIFO size in frames */
52 #      unsigned char reserved[64];     /* reserved for future */
53
54 #(import LIB "snd_pcm_hw_params_current" "int"
55 #       "void*" ; snd_pcm_t *pcm
56 #        "void*" ; snd_pcm_hw_params_t *params
57 #        )
58
59 (import LIB "snd_pcm_state" "int" ; snd_pcm_state_t snd_pcm_state
60         "void*" ; snd_pcm_t *pcm
61         )
62
63 (import LIB "snd_pcm_start" "int" ; snd_pcm_state_t snd_pcm_start
64         "void*" ; snd_pcm_t *pcm
65         )
66
67 (import LIB "snd_pcm_wait" "int"
68         "void*" ; snd_pcm_t *pcm
69         "int"   ; int timeout 
70         )
71
72 (import LIB "snd_pcm_set_params" "int"
73         "void*" ; snd_pcm_t *pcm
74         "int"   ; snd_pcm_format_t format
75         "int"   ; snd_pcm_access_t access
76         "unsigned int" ; unsigned int channels
77         "unsigned int" ; unsigned int rate
78         "int"   ;int soft_resample
79         "unsigned int" ; unsigned int latency
80         )
81
82 (import LIB "snd_pcm_drain" "int"
83         "void*" ; snd_pcm_t *pcm
84         )
85
86 (import LIB "snd_pcm_close" "int"
87         "void*" ; snd_pcm_t *pcm
88         )
89