firewire_fireworks_protocols/
rip.rs

1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (c) 2023 Takashi Sakamoto
3
4//! Protocol implementations for Robot Interface Pack.
5//!
6//! The module includes protocol about port configuration defined by Echo Audio Digital Corporation
7//! for Gibson Robot Interface Pack.
8
9use super::{robot_guitar::*, *};
10
11/// Protocol implementation for former model of Robot Interface Pack (RIP).
12///
13/// Diagram of internal signal flow
14///
15/// ```text
16///
17/// guitar-input-1 ------+
18/// piezo-input-2 -------+---+-------------> stream-output-1/2
19/// string-input-1/2 --------|--+----------> stream-output-5/6
20/// string-input-3/4 --------|--|----------> stream-output-7/8
21/// string-input-5/6 --------|--|--+-------> stream-output-7/8
22///                          |  |  |
23///                          v  v  v
24///                       ++=========++
25///                       ||  mixer  ||
26/// stream-input-1/2 ---> ||         || ---> analog-output-1/2
27///                       ||  8 x 6  ||
28///                       ++=========++
29/// ```
30#[derive(Default, Debug)]
31pub struct RipProtocol;
32
33impl EfwHardwareSpecification for RipProtocol {
34    const SUPPORTED_SAMPLING_RATES: &'static [u32] = &[44100, 48000, 88200, 96000, 176400, 192000];
35    const SUPPORTED_SAMPLING_CLOCKS: &'static [ClkSrc] =
36        &[ClkSrc::Internal, ClkSrc::WordClock, ClkSrc::Spdif];
37    const CAPABILITIES: &'static [HwCap] = &[
38        HwCap::ChangeableRespAddr,
39        HwCap::Fpga,
40        HwCap::RobotGuitar,
41        HwCap::GuitarCharging,
42    ];
43    const TX_CHANNEL_COUNTS: [usize; 3] = [8, 8, 8];
44    const RX_CHANNEL_COUNTS: [usize; 3] = [2, 2, 2];
45    const MONITOR_SOURCE_COUNT: usize = 8;
46    const MONITOR_DESTINATION_COUNT: usize = 2;
47    const MIDI_INPUT_COUNT: usize = 0;
48    const MIDI_OUTPUT_COUNT: usize = 0;
49
50    const PHYS_INPUT_GROUPS: &'static [(PhysGroupType, usize)] = &[
51        (PhysGroupType::Guitar, 1),
52        (PhysGroupType::PiezoGuitar, 1),
53        (PhysGroupType::GuitarString, 6),
54    ];
55
56    const PHYS_OUTPUT_GROUPS: &'static [(PhysGroupType, usize)] = &[(PhysGroupType::Analog, 2)];
57}
58
59impl EfwPlaybackSoloSpecification for RipProtocol {}
60
61impl EfwRobotGuitarSpecification for RipProtocol {}