motu: the 4pre channel layout within packets is now believed to be correct. Thanks...
[ffado.git] / libffado / src / fireworks / efc / efc_cmds_ioconfig.h
blobd3f128320194ba3d29c25b0c7243e5ff5f86391e
1 /*
2 * Copyright (C) 2005-2008 by Pieter Palmers
4 * This file is part of FFADO
5 * FFADO = Free Firewire (pro-)audio drivers for linux
7 * FFADO is based upon FreeBoB
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 2 of the License, or
12 * (at your option) version 3 of the License.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #ifndef FIREWORKS_EFC_CMD_IOCONFIG_H
25 #define FIREWORKS_EFC_CMD_IOCONFIG_H
27 #include "efc_cmd.h"
29 namespace FireWorks {
31 #define EFC_MAX_ISOC_MAP_ENTRIES 32
32 typedef struct tag_efc_isoc_map
34 uint32_t samplerate;
35 uint32_t flags;
37 uint32_t num_playmap_entries;
38 uint32_t num_phys_out;
39 uint32_t playmap[ EFC_MAX_ISOC_MAP_ENTRIES ];
41 uint32_t num_recmap_entries;
42 uint32_t num_phys_in;
43 uint32_t recmap[ EFC_MAX_ISOC_MAP_ENTRIES ];
44 } IsoChannelMap;
46 class EfcGenericIOConfigCmd : public EfcCmd
48 public:
49 EfcGenericIOConfigCmd(enum eIOConfigRegister r);
50 virtual ~EfcGenericIOConfigCmd() {};
52 virtual bool serialize( Util::Cmd::IOSSerialize& se );
53 virtual bool deserialize( Util::Cmd::IISDeserialize& de );
55 virtual void showEfcCmd();
57 bool setType( enum eCmdType type );
58 enum eCmdType getType() {return m_type;};
59 bool setRegister( enum eIOConfigRegister r );
60 enum eIOConfigRegister getRegister() {return m_reg;};
62 virtual const char* getCmdName() const
63 { return "EfcGenericIOConfigCmd"; };
65 uint32_t m_value;
67 private:
68 enum eCmdType m_type;
69 enum eIOConfigRegister m_reg;
72 class EfcIsocMapIOConfigCmd : public EfcCmd
74 public:
75 EfcIsocMapIOConfigCmd();
76 virtual ~EfcIsocMapIOConfigCmd() {};
78 virtual bool serialize( Util::Cmd::IOSSerialize& se );
79 virtual bool deserialize( Util::Cmd::IISDeserialize& de );
81 virtual void showEfcCmd();
83 bool setType( enum eCmdType type );
84 enum eCmdType getType() {return m_type;};
86 virtual const char* getCmdName() const
87 { return "EfcIsocMapIOConfigCmd"; };
89 uint32_t m_samplerate;
90 uint32_t m_flags;
92 uint32_t m_num_playmap_entries;
93 uint32_t m_num_phys_out;
94 uint32_t m_playmap[ EFC_MAX_ISOC_MAP_ENTRIES ];
96 uint32_t m_num_recmap_entries;
97 uint32_t m_num_phys_in;
98 uint32_t m_recmap[ EFC_MAX_ISOC_MAP_ENTRIES ];
100 private:
101 enum eCmdType m_type;
102 enum eIOConfigRegister m_reg;
105 } // namespace FireWorks
107 #endif // FIREWORKS_EFC_CMD_IOCONFIG_H