firewire_dice_protocols/loud.rs
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (c) 2020 Takashi Sakamoto
3
4//! Hardware specification and application protocol specific to Loud (Mackie) Onyx Blackbird.
5//!
6//! The module includes structure, enumeration, and trait and its implementation for hardware
7//! specification and application protocol specific to Loud (Mackie) Onyx Blackbird.
8
9use super::tcat::{extension::*, tcd22xx_spec::*, *};
10
11/// Protocol implementation of Mackie Onyx Blackbird.
12#[derive(Default, Debug)]
13pub struct BlackbirdProtocol;
14
15impl TcatOperation for BlackbirdProtocol {}
16
17impl TcatGlobalSectionSpecification for BlackbirdProtocol {}
18
19impl TcatExtensionOperation for BlackbirdProtocol {}
20
21impl Tcd22xxSpecification for BlackbirdProtocol {
22 const INPUTS: &'static [Input] = &[
23 Input {
24 id: SrcBlkId::Ins0,
25 offset: 0,
26 count: 8,
27 label: None,
28 },
29 Input {
30 id: SrcBlkId::Adat,
31 offset: 0,
32 count: 8,
33 label: None,
34 },
35 ];
36 const OUTPUTS: &'static [Output] = &[
37 Output {
38 id: DstBlkId::Ins0,
39 offset: 0,
40 count: 8,
41 label: None,
42 },
43 Output {
44 id: DstBlkId::Adat,
45 offset: 0,
46 count: 8,
47 label: None,
48 },
49 ];
50 const FIXED: &'static [SrcBlk] = &[
51 SrcBlk {
52 id: SrcBlkId::Ins0,
53 ch: 0,
54 },
55 SrcBlk {
56 id: SrcBlkId::Ins0,
57 ch: 1,
58 },
59 SrcBlk {
60 id: SrcBlkId::Ins0,
61 ch: 2,
62 },
63 SrcBlk {
64 id: SrcBlkId::Ins0,
65 ch: 3,
66 },
67 SrcBlk {
68 id: SrcBlkId::Ins0,
69 ch: 4,
70 },
71 SrcBlk {
72 id: SrcBlkId::Ins0,
73 ch: 5,
74 },
75 SrcBlk {
76 id: SrcBlkId::Ins0,
77 ch: 6,
78 },
79 SrcBlk {
80 id: SrcBlkId::Ins0,
81 ch: 7,
82 },
83 ];
84
85 // NOTE: At low rate, digital 8 channels are composed by one optical interface in ADAT normal
86 // mode. At middle rate, digital 8 channels are composed by two optical interfaces in ADAT II
87 // mode. At higher rate, digital 4 channels are composed by them in ADAT IV mode. But the
88 // highest rate is not available in a point of TCAT glocal protocol.
89 const ADAT_CHANNELS: [u8; 3] = [8, 8, 4];
90}