2015-05-17 05:24:36 +03:00
|
|
|
#ifndef USERSPACE_LIB_SOUND_H
|
|
|
|
#define USERSPACE_LIB_SOUND_H
|
2015-05-17 05:23:55 +03:00
|
|
|
|
2015-05-18 06:29:41 +03:00
|
|
|
#include <stdint.h>
|
2015-05-17 05:23:55 +03:00
|
|
|
|
|
|
|
#define SND_MAX_KNOBS 256
|
|
|
|
#define SND_KNOB_NAME_SIZE 256
|
2015-05-18 06:29:41 +03:00
|
|
|
#define SND_KNOB_MAX_VALUE UINT32_MAX
|
2015-05-17 05:23:55 +03:00
|
|
|
|
|
|
|
#define SND_KNOB_MASTER 0
|
|
|
|
#define SND_DEVICE_MAIN 0
|
|
|
|
|
|
|
|
typedef struct snd_knob_list {
|
2015-05-18 06:29:41 +03:00
|
|
|
uint32_t device; /* IN */
|
|
|
|
uint32_t num; /* OUT */
|
|
|
|
uint32_t ids[SND_MAX_KNOBS]; /* OUT */
|
2015-05-17 05:23:55 +03:00
|
|
|
} snd_knob_list_t;
|
|
|
|
|
|
|
|
typedef struct snd_knob_info {
|
2015-05-18 06:29:41 +03:00
|
|
|
uint32_t device; /* IN */
|
|
|
|
uint32_t id; /* IN */
|
|
|
|
char name[SND_KNOB_NAME_SIZE]; /* OUT */
|
2015-05-17 05:23:55 +03:00
|
|
|
} snd_knob_info_t;
|
|
|
|
|
|
|
|
typedef struct snd_knob_value {
|
2015-05-18 06:29:41 +03:00
|
|
|
uint32_t device; /* IN */
|
|
|
|
uint32_t id; /* IN */
|
|
|
|
uint32_t val; /* OUT for SND_MIXER_READ_KNOB, IN for SND_MIXER_WRITE_KNOB */
|
2015-05-17 05:23:55 +03:00
|
|
|
} snd_knob_value_t;
|
|
|
|
|
|
|
|
|
|
|
|
/* IOCTLs */
|
|
|
|
#define SND_MIXER_GET_KNOBS 0
|
|
|
|
#define SND_MIXER_GET_KNOB_INFO 1
|
|
|
|
#define SND_MIXER_READ_KNOB 2
|
|
|
|
#define SND_MIXER_WRITE_KNOB 3
|
|
|
|
|
2015-05-17 05:24:36 +03:00
|
|
|
#endif /* USERSPACE_LIB_SOUND_H */
|