22 #ifndef __DC_MAPLE_SIP_H
23 #define __DC_MAPLE_SIP_H
25 #include <sys/cdefs.h>
28 #include <sys/types.h>
80 #define SIP_SUBCOMMAND_GET_SAMPLES 0x01
87 #define SIP_SUBCOMMAND_BASIC_CTRL 0x02
90 #define SIP_MIN_GAIN 0x00
93 #define SIP_DEFAULT_GAIN 0x0F
96 #define SIP_MAX_GAIN 0x1F
120 #define SIP_SAMPLE_16BIT_SIGNED 0x00
123 #define SIP_SAMPLE_8BIT_ULAW 0x01
144 #define SIP_SAMPLE_11KHZ 0x00
147 #define SIP_SAMPLE_8KHZ 0x01
int sample_type
The type of samples that are being recorded.
Definition: sip.h:63
void(* sip_sample_cb)(maple_device_t *dev, uint8 *samples, size_t len)
Type for a microphone sample callback.
Definition: sip.h:46
int sip_set_sample_type(maple_device_t *dev, unsigned int type)
Set the sample type to be recorded by the microphone.
int sip_set_gain(maple_device_t *dev, unsigned int g)
Set the microphone's gain value.
One maple device.
Definition: maple.h:237
int sip_set_frequency(maple_device_t *dev, unsigned int freq)
Set the sample frequency to be recorded by the microphone.
Maple Bus driver interface.
sip_sample_cb callback
Sampling callback.
Definition: sip.h:72
SIP status structure.
Definition: sip.h:58
int sip_start_sampling(maple_device_t *dev, sip_sample_cb cb, int block)
Start sampling on a microphone.
struct sip_state sip_state_t
SIP status structure.
int amp_gain
The gain value for the microphone amp.
Definition: sip.h:60
unsigned char uint8
8-bit unsigned integer
Definition: types.h:30
int frequency
What frequency are we sampling at?
Definition: sip.h:66
int is_sampling
Is the mic currently sampling?
Definition: sip.h:69
int sip_stop_sampling(maple_device_t *dev, int block)
Stop sampling on a microphone.