-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f9617a
commit 9cd349c
Showing
8 changed files
with
215 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#ifndef DEVICE_H | ||
#define DEVICE_H | ||
|
||
enum inputflags { | ||
INPUT_GAIN = 1 << 0, | ||
INPUT_REFLEVEL = 1 << 1, | ||
INPUT_48V = 1 << 2, | ||
INPUT_HIZ = 1 << 3, | ||
}; | ||
|
||
struct inputinfo { | ||
char name[12]; | ||
int flags; | ||
}; | ||
|
||
enum outputflags { | ||
OUTPUT_REFLEVEL = 1 << 0, | ||
}; | ||
|
||
struct outputinfo { | ||
const char *name; | ||
int flags; | ||
}; | ||
|
||
enum deviceflags { | ||
DEVICE_DUREC = 1 << 0, | ||
DEVICE_ROOMEQ = 1 << 1, | ||
}; | ||
|
||
struct device { | ||
const char *id; | ||
const char *name; | ||
int version; | ||
int flags; | ||
|
||
const struct inputinfo *inputs; | ||
int inputslen; | ||
const struct outputinfo *outputs; | ||
int outputslen; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#include "device.h" | ||
|
||
#define LEN(a) (sizeof (a) / sizeof *(a)) | ||
|
||
static const struct inputinfo inputs[] = { | ||
{"Mic/Line 1", INPUT_GAIN | INPUT_48V}, | ||
{"Mic/Line 2", INPUT_GAIN | INPUT_48V}, | ||
{"Inst/Line 3", INPUT_GAIN | INPUT_REFLEVEL}, | ||
{"Inst/Line 4", INPUT_GAIN | INPUT_REFLEVEL}, | ||
{"Analog 5", INPUT_GAIN | INPUT_REFLEVEL}, | ||
{"Analog 6", INPUT_GAIN | INPUT_REFLEVEL}, | ||
{"Analog 7", INPUT_GAIN | INPUT_REFLEVEL}, | ||
{"Analog 8", INPUT_GAIN | INPUT_REFLEVEL}, | ||
{"SPDIF L"}, | ||
{"SPDIF R"}, | ||
{"AES L"}, | ||
{"AES R"}, | ||
{"ADAT 1"}, | ||
{"ADAT 2"}, | ||
{"ADAT 3"}, | ||
{"ADAT 4"}, | ||
{"ADAT 5"}, | ||
{"ADAT 6"}, | ||
{"ADAT 7"}, | ||
{"ADAT 8"}, | ||
}; | ||
_Static_assert(LEN(inputs) == 20, "bad inputs"); | ||
|
||
static const struct outputinfo outputs[] = { | ||
{"Analog 1", OUTPUT_REFLEVEL}, | ||
{"Analog 2", OUTPUT_REFLEVEL}, | ||
{"Analog 3", OUTPUT_REFLEVEL}, | ||
{"Analog 4", OUTPUT_REFLEVEL}, | ||
{"Analog 5", OUTPUT_REFLEVEL}, | ||
{"Analog 6", OUTPUT_REFLEVEL}, | ||
{"Phones 7", OUTPUT_REFLEVEL}, | ||
{"Phones 8", OUTPUT_REFLEVEL}, | ||
{"SPDIF L"}, | ||
{"SPDIF R"}, | ||
{"AES L"}, | ||
{"AES R"}, | ||
{"ADAT 1"}, | ||
{"ADAT 2"}, | ||
{"ADAT 3"}, | ||
{"ADAT 4"}, | ||
{"ADAT 5"}, | ||
{"ADAT 6"}, | ||
{"ADAT 7"}, | ||
{"ADAT 8"}, | ||
}; | ||
_Static_assert(LEN(outputs) == 20, "bad outputs"); | ||
|
||
const struct device ffucxii = { | ||
.id = "ffucxii", | ||
.name = "Fireface UCX II", | ||
.version = 30, | ||
.flags = DEVICE_DUREC | DEVICE_ROOMEQ, | ||
.inputs = inputs, | ||
.inputslen = LEN(inputs), | ||
.outputs = outputs, | ||
.outputslen = LEN(outputs), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.