23#ifndef __DC_MAPLE_SIP_H
24#define __DC_MAPLE_SIP_H
66typedef struct sip_state {
88#define SIP_SUBCOMMAND_GET_SAMPLES 0x01
95#define SIP_SUBCOMMAND_BASIC_CTRL 0x02
98#define SIP_MIN_GAIN 0x00
101#define SIP_DEFAULT_GAIN 0x0F
104#define SIP_MAX_GAIN 0x1F
128#define SIP_SAMPLE_16BIT_SIGNED 0x00
131#define SIP_SAMPLE_8BIT_ULAW 0x01
152#define SIP_SAMPLE_11KHZ 0x00
155#define SIP_SAMPLE_8KHZ 0x01
208void sip_shutdown(
void);
int sip_set_frequency(maple_device_t *dev, unsigned int freq)
Set the sample frequency to be recorded by the microphone.
int sip_stop_sampling(maple_device_t *dev, int block)
Stop sampling on a microphone.
int sip_set_gain(maple_device_t *dev, unsigned int g)
Set the microphone's gain value.
void(* sip_sample_cb)(maple_device_t *dev, uint8 *samples, size_t len)
Type for a microphone sample callback.
Definition sip.h:54
int sip_start_sampling(maple_device_t *dev, sip_sample_cb cb, int block)
Start sampling on a microphone.
int sip_set_sample_type(maple_device_t *dev, unsigned int type)
Set the sample type to be recorded by the microphone.
unsigned char uint8
8-bit unsigned integer
Definition types.h:35
Maple Bus driver interface.
One maple device.
Definition maple.h:270
SIP status structure.
Definition sip.h:66
sip_sample_cb callback
Sampling callback.
Definition sip.h:80
int sample_type
The type of samples that are being recorded.
Definition sip.h:71
int frequency
What frequency are we sampling at?
Definition sip.h:74
int is_sampling
Is the mic currently sampling?
Definition sip.h:77
int amp_gain
The gain value for the microphone amp.
Definition sip.h:68