root/trunk/libffado/src/rme/fireface_def.h

Revision 1533, 3.7 kB (checked in by jwoithe, 15 years ago)

RME: more low-level infrastructure

Line 
1 /*
2  * Copyright (C) 2009 by Jonathan Woithe
3  *
4  * This file is part of FFADO
5  * FFADO = Free Firewire (pro-)audio drivers for linux
6  *
7  * FFADO is based upon FreeBoB.
8  *
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.
13  *
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.
18  *
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/>.
21  *
22  */
23
24 /* This file contains definitions relating to the RME Fireface interfaces
25  * (Fireface 400 and Fireface 800).  Naming convention:
26  *   RME_FF_     identifier applies to both FF400 and FF800
27  *   RME_FF400_  identifier specific to the FF400
28  *   RME_FF800_  identifier specific to the FF800
29  */
30
31 #ifndef _FIREFACE_DEF
32 #define _FIREFACE_DEF
33
34 /* Identifiers for the Fireface models */
35 #define RME_FF400               0
36 #define RME_FF800               1
37
38 /* The Command Buffer Address (CBA) is different for the two interfaces */
39 #define RME_FF400_CMD_BUFFER    0xfc88f000
40 #define RME_FF800_CMD_BUFFER    0x80100500
41
42 /* Offsets for registers at fixed offsets from the device's command buffer address */
43 #define RME_FF_SRATE_CTRL_OFS   (0*4)
44 #define RME_FF_CONF1_OFS        (5*4)
45 #define RME_FF_CONF2_OFS        (6*4)
46 #define RME_FF_CONF3_OFS        (7*4)
47 #define RME_FF400_FLASH_CMD_OFS (8*4)
48
49 /* General register definitions */
50 #define RME_FF400_STREAM_START_REG   (RME_FF400_CMD_BUFFER + 0x001c)
51 #define RME_FF800_STREAM_START_REG  0x200000028LL
52 #define RME_FF400_STREAM_END_REG     (RME_FF400_CMD_BUFFER + 0x0004)  // 4 quadlets wide
53 #define RME_FF800_STREAM_END_REG    0x200000034LL                     // 3 quadlets wide
54
55 #define RME_FF_HOST_LED_REG         0x200000324LL
56
57 #define RME_FF_CHANNEL_MUTE_MASK     0x801c0000    /* Write only */
58 #define RME_FF_STATUS_REG            0x801c0000    /* Read only */
59
60 /* Addresses of various blocks in memory-mapped flash */
61 #define RME_FF400_FLASH_SETTINGS_ADDR       0x00060000
62 #define RME_FF400_FLASH_MIXER_VOLUME_ADDR   0x00070000
63 #define RME_FF400_FLASH_MIXER_PAN_ADDR      0x00070800
64 #define RME_FF400_FLASH_MIXER_HW_ADDR       0x00071000  /* Hardware volume settings, MIDI enable, submix */
65 #define RME_FF800_FLASH_MIXER_SHADOW_ADDR  0x3000e0000LL
66 #define RME_FF800_FLASH_MIXER_VOLUME_ADDR  0x3000e2000LL
67 #define RME_FF800_FLASH_MIXER_PAN_ADDR     0x3000e2800LL
68 #define RME_FF800_FLASH_MIXER_HW_ADDR      0x3000e3000LL  /* H/w volume settings, MIDI enable, submix */
69 #define RME_FF800_FLASH_SETTINGS_ADDR      0x3000f0000LL
70
71 /* Flash control registers */
72 #define RME_FF400_FLASH_BLOCK_ADDR_REG      0x80100288
73 #define RME_FF400_FLASH_BLOCK_SIZE_REG      0x8010028c
74 #define RME_FF400_FLASH_CMD_REG             (RME_FF400_CMD_BUFFER+RME_FF400_FLASH_CMD_OFS)
75 #define RME_FF400_FLASH_WRITE_BUFFER        0x80100290
76
77 /* Erase control registers on the FF800 */
78 #define RME_FF800_FLASH_ERASE_VOLUME_REG    0x3fffffff4LL
79 #define RME_FF800_FLASH_ERASE_SETTINGS_REG  0x3fffffff0LL
80 #define RME_FF800_FLASH_ERASE_FIRMWARE_REG  0x3fffffff8LL
81 #define RME_FF800_FLASH_ERASE_CONFIG_REG    0x3fffffffcLL
82
83 /* Flags and special values */
84 #define RME_FF400_FLASH_CMD_WRITE           0x1
85 #define RME_FF400_FLASH_CMD_READ            0x2
86 #define RME_FF400_FLASH_CMD_ERASE_VOLUME    0xe
87 #define RME_FF400_FLASH_CMD_ERASE_SETTINGS  0xd
88 #define RME_FF400_FLASH_CMD_ERASE_CONFIG    0xc
89
90 #endif
Note: See TracBrowser for help on using the browser.