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 #include "efc_avc_cmd.h"
26 #include "libutil/ByteSwap.h"
34 EfcOverAVCCmd::EfcOverAVCCmd(Ieee1394Service
& ieee1394service
)
35 : VendorDependentCmd( ieee1394service
)
43 EfcOverAVCCmd::~EfcOverAVCCmd()
48 EfcOverAVCCmd::serialize( Util::Cmd::IOSSerialize
& se
)
51 debugError("no child EFC command\n");
55 result
&= VendorDependentCmd::serialize( se
);
57 result
&= se
.write(m_dummy_1
, "Dummy byte 1");
58 result
&= se
.write(m_dummy_2
, "Dummy byte 1");
60 result
&= m_cmd
->serialize( se
);
63 debugWarning("Serialization failed\n");
70 EfcOverAVCCmd::deserialize( Util::Cmd::IISDeserialize
& de
)
73 debugError("no child EFC command\n");
77 result
&= VendorDependentCmd::deserialize( de
);
79 result
&= de
.read(&m_dummy_1
);
80 result
&= de
.read(&m_dummy_2
);
83 debugWarning("AV/C deserialization failed\n");
87 result
&= m_cmd
->deserialize( de
);
90 debugWarning("Deserialization failed\n");
96 } // namespace FireWorks