root/branches/libffado-2.0/src/libstreaming/amdtp/AmdtpStreamProcessor-common.h

Revision 1556, 1.8 kB (checked in by ppalmers, 12 years ago)

fixes #207

Line 
1 /*
2  * Copyright (C) 2005-2009 by Pieter Palmers et. al.
3  * Copyright (C) 2009 by Adrian Knoth
4  *
5  * This file is part of FFADO
6  * FFADO = Free Firewire (pro-)audio drivers for linux
7  *
8  * FFADO is based upon FreeBoB.
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 2 of the License, or
13  * (at your option) version 3 of the License.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
22  *
23  */
24 #ifndef __FFADO_AMDTPTRANSMITSTREAMPROCESSOR_COMMON__
25 #define __FFADO_AMDTPTRANSMITSTREAMPROCESSOR_COMMON__
26
27 #include "config.h"
28
29 #include "debugmodule/debugmodule.h"
30
31 #include "../generic/StreamProcessor.h"
32 #include "../util/cip.h"
33
34 #include <libiec61883/iec61883.h>
35 #include <pthread.h>
36
37 #define AMDTP_MAX_PACKET_SIZE 2048
38
39 #define IEC61883_STREAM_TYPE_MIDI   0x0D
40 #define IEC61883_STREAM_TYPE_SPDIF  0x00
41 #define IEC61883_STREAM_TYPE_MBLA   0x06
42
43 #define IEC61883_AM824_LABEL_MASK             0xFF000000
44 #define IEC61883_AM824_GET_LABEL(x)         (((x) & 0xFF000000) >> 24)
45 #define IEC61883_AM824_SET_LABEL(x,y)         ((x) | ((y)<<24))
46
47 #define IEC61883_AM824_LABEL_MIDI_NO_DATA     0x80
48 #define IEC61883_AM824_LABEL_MIDI_1X          0x81
49 #define IEC61883_AM824_LABEL_MIDI_2X          0x82
50 #define IEC61883_AM824_LABEL_MIDI_3X          0x83
51
52 #define IEC61883_AM824_HAS_LABEL(x, lbl)         (((x) & 0xFF000000) == (((quadlet_t)(lbl))<<24))
53 #endif /* __FFADO_AMDTPTRANSMITSTREAMPROCESSOR_COMMON__ */
Note: See TracBrowser for help on using the browser.