162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef SOUND_FIREWIRE_DICE_INTERFACE_H_INCLUDED
362306a36Sopenharmony_ci#define SOUND_FIREWIRE_DICE_INTERFACE_H_INCLUDED
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci/*
662306a36Sopenharmony_ci * DICE device interface definitions
762306a36Sopenharmony_ci */
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci/*
1062306a36Sopenharmony_ci * Generally, all registers can be read like memory, i.e., with quadlet read or
1162306a36Sopenharmony_ci * block read transactions with at least quadlet-aligned offset and length.
1262306a36Sopenharmony_ci * Writes are not allowed except where noted; quadlet-sized registers must be
1362306a36Sopenharmony_ci * written with a quadlet write transaction.
1462306a36Sopenharmony_ci *
1562306a36Sopenharmony_ci * All values are in big endian.  The DICE firmware runs on a little-endian CPU
1662306a36Sopenharmony_ci * and just byte-swaps _all_ quadlets on the bus, so values without endianness
1762306a36Sopenharmony_ci * (e.g. strings) get scrambled and must be byte-swapped again by the driver.
1862306a36Sopenharmony_ci */
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci/*
2162306a36Sopenharmony_ci * Streaming is handled by the "DICE driver" interface.  Its registers are
2262306a36Sopenharmony_ci * located in this private address space.
2362306a36Sopenharmony_ci */
2462306a36Sopenharmony_ci#define DICE_PRIVATE_SPACE		0xffffe0000000uLL
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci/*
2762306a36Sopenharmony_ci * The registers are organized in several sections, which are organized
2862306a36Sopenharmony_ci * separately to allow them to be extended individually.  Whether a register is
2962306a36Sopenharmony_ci * supported can be detected by checking its offset against its section's size.
3062306a36Sopenharmony_ci *
3162306a36Sopenharmony_ci * The section offset values are relative to DICE_PRIVATE_SPACE; the offset/
3262306a36Sopenharmony_ci * size values are measured in quadlets.  Read-only.
3362306a36Sopenharmony_ci */
3462306a36Sopenharmony_ci#define DICE_GLOBAL_OFFSET		0x00
3562306a36Sopenharmony_ci#define DICE_GLOBAL_SIZE		0x04
3662306a36Sopenharmony_ci#define DICE_TX_OFFSET			0x08
3762306a36Sopenharmony_ci#define DICE_TX_SIZE			0x0c
3862306a36Sopenharmony_ci#define DICE_RX_OFFSET			0x10
3962306a36Sopenharmony_ci#define DICE_RX_SIZE			0x14
4062306a36Sopenharmony_ci#define DICE_EXT_SYNC_OFFSET		0x18
4162306a36Sopenharmony_ci#define DICE_EXT_SYNC_SIZE		0x1c
4262306a36Sopenharmony_ci#define DICE_UNUSED2_OFFSET		0x20
4362306a36Sopenharmony_ci#define DICE_UNUSED2_SIZE		0x24
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci/*
4662306a36Sopenharmony_ci * Global settings.
4762306a36Sopenharmony_ci */
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci/*
5062306a36Sopenharmony_ci * Stores the full 64-bit address (node ID and offset in the node's address
5162306a36Sopenharmony_ci * space) where the device will send notifications.  Must be changed with
5262306a36Sopenharmony_ci * a compare/swap transaction by the owner.  This register is automatically
5362306a36Sopenharmony_ci * cleared on a bus reset.
5462306a36Sopenharmony_ci */
5562306a36Sopenharmony_ci#define GLOBAL_OWNER			0x000
5662306a36Sopenharmony_ci#define  OWNER_NO_OWNER			0xffff000000000000uLL
5762306a36Sopenharmony_ci#define  OWNER_NODE_SHIFT		48
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci/*
6062306a36Sopenharmony_ci * A bitmask with asynchronous events; read-only.  When any event(s) happen,
6162306a36Sopenharmony_ci * the bits of previous events are cleared, and the value of this register is
6262306a36Sopenharmony_ci * also written to the address stored in the owner register.
6362306a36Sopenharmony_ci */
6462306a36Sopenharmony_ci#define GLOBAL_NOTIFICATION		0x008
6562306a36Sopenharmony_ci/* Some registers in the Rx/Tx sections may have changed. */
6662306a36Sopenharmony_ci#define  NOTIFY_RX_CFG_CHG		0x00000001
6762306a36Sopenharmony_ci#define  NOTIFY_TX_CFG_CHG		0x00000002
6862306a36Sopenharmony_ci/* Lock status of the current clock source may have changed. */
6962306a36Sopenharmony_ci#define  NOTIFY_LOCK_CHG		0x00000010
7062306a36Sopenharmony_ci/* Write to the clock select register has been finished. */
7162306a36Sopenharmony_ci#define  NOTIFY_CLOCK_ACCEPTED		0x00000020
7262306a36Sopenharmony_ci/* Lock status of some clock source has changed. */
7362306a36Sopenharmony_ci#define  NOTIFY_EXT_STATUS		0x00000040
7462306a36Sopenharmony_ci/* Other bits may be used for device-specific events. */
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci/*
7762306a36Sopenharmony_ci * A name that can be customized for each device; read/write.  Padded with zero
7862306a36Sopenharmony_ci * bytes.  Quadlets are byte-swapped.  The encoding is whatever the host driver
7962306a36Sopenharmony_ci * happens to be using.
8062306a36Sopenharmony_ci */
8162306a36Sopenharmony_ci#define GLOBAL_NICK_NAME		0x00c
8262306a36Sopenharmony_ci#define  NICK_NAME_SIZE			64
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_ci/*
8562306a36Sopenharmony_ci * The current sample rate and clock source; read/write.  Whether a clock
8662306a36Sopenharmony_ci * source or sample rate is supported is device-specific; the internal clock
8762306a36Sopenharmony_ci * source is always available.  Low/mid/high = up to 48/96/192 kHz.  This
8862306a36Sopenharmony_ci * register can be changed even while streams are running.
8962306a36Sopenharmony_ci */
9062306a36Sopenharmony_ci#define GLOBAL_CLOCK_SELECT		0x04c
9162306a36Sopenharmony_ci#define  CLOCK_SOURCE_MASK		0x000000ff
9262306a36Sopenharmony_ci#define  CLOCK_SOURCE_AES1		0x00000000
9362306a36Sopenharmony_ci#define  CLOCK_SOURCE_AES2		0x00000001
9462306a36Sopenharmony_ci#define  CLOCK_SOURCE_AES3		0x00000002
9562306a36Sopenharmony_ci#define  CLOCK_SOURCE_AES4		0x00000003
9662306a36Sopenharmony_ci#define  CLOCK_SOURCE_AES_ANY		0x00000004
9762306a36Sopenharmony_ci#define  CLOCK_SOURCE_ADAT		0x00000005
9862306a36Sopenharmony_ci#define  CLOCK_SOURCE_TDIF		0x00000006
9962306a36Sopenharmony_ci#define  CLOCK_SOURCE_WC		0x00000007
10062306a36Sopenharmony_ci#define  CLOCK_SOURCE_ARX1		0x00000008
10162306a36Sopenharmony_ci#define  CLOCK_SOURCE_ARX2		0x00000009
10262306a36Sopenharmony_ci#define  CLOCK_SOURCE_ARX3		0x0000000a
10362306a36Sopenharmony_ci#define  CLOCK_SOURCE_ARX4		0x0000000b
10462306a36Sopenharmony_ci#define  CLOCK_SOURCE_INTERNAL		0x0000000c
10562306a36Sopenharmony_ci#define  CLOCK_RATE_MASK		0x0000ff00
10662306a36Sopenharmony_ci#define  CLOCK_RATE_32000		0x00000000
10762306a36Sopenharmony_ci#define  CLOCK_RATE_44100		0x00000100
10862306a36Sopenharmony_ci#define  CLOCK_RATE_48000		0x00000200
10962306a36Sopenharmony_ci#define  CLOCK_RATE_88200		0x00000300
11062306a36Sopenharmony_ci#define  CLOCK_RATE_96000		0x00000400
11162306a36Sopenharmony_ci#define  CLOCK_RATE_176400		0x00000500
11262306a36Sopenharmony_ci#define  CLOCK_RATE_192000		0x00000600
11362306a36Sopenharmony_ci#define  CLOCK_RATE_ANY_LOW		0x00000700
11462306a36Sopenharmony_ci#define  CLOCK_RATE_ANY_MID		0x00000800
11562306a36Sopenharmony_ci#define  CLOCK_RATE_ANY_HIGH		0x00000900
11662306a36Sopenharmony_ci#define  CLOCK_RATE_NONE		0x00000a00
11762306a36Sopenharmony_ci#define  CLOCK_RATE_SHIFT		8
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci/*
12062306a36Sopenharmony_ci * Enable streaming; read/write.  Writing a non-zero value (re)starts all
12162306a36Sopenharmony_ci * streams that have a valid iso channel set; zero stops all streams.  The
12262306a36Sopenharmony_ci * streams' parameters must be configured before starting.  This register is
12362306a36Sopenharmony_ci * automatically cleared on a bus reset.
12462306a36Sopenharmony_ci */
12562306a36Sopenharmony_ci#define GLOBAL_ENABLE			0x050
12662306a36Sopenharmony_ci
12762306a36Sopenharmony_ci/*
12862306a36Sopenharmony_ci * Status of the sample clock; read-only.
12962306a36Sopenharmony_ci */
13062306a36Sopenharmony_ci#define GLOBAL_STATUS			0x054
13162306a36Sopenharmony_ci/* The current clock source is locked. */
13262306a36Sopenharmony_ci#define  STATUS_SOURCE_LOCKED		0x00000001
13362306a36Sopenharmony_ci/* The actual sample rate; CLOCK_RATE_32000-_192000 or _NONE. */
13462306a36Sopenharmony_ci#define  STATUS_NOMINAL_RATE_MASK	0x0000ff00
13562306a36Sopenharmony_ci
13662306a36Sopenharmony_ci/*
13762306a36Sopenharmony_ci * Status of all clock sources; read-only.
13862306a36Sopenharmony_ci */
13962306a36Sopenharmony_ci#define GLOBAL_EXTENDED_STATUS		0x058
14062306a36Sopenharmony_ci/*
14162306a36Sopenharmony_ci * The _LOCKED bits always show the current status; any change generates
14262306a36Sopenharmony_ci * a notification.
14362306a36Sopenharmony_ci */
14462306a36Sopenharmony_ci#define  EXT_STATUS_AES1_LOCKED		0x00000001
14562306a36Sopenharmony_ci#define  EXT_STATUS_AES2_LOCKED		0x00000002
14662306a36Sopenharmony_ci#define  EXT_STATUS_AES3_LOCKED		0x00000004
14762306a36Sopenharmony_ci#define  EXT_STATUS_AES4_LOCKED		0x00000008
14862306a36Sopenharmony_ci#define  EXT_STATUS_ADAT_LOCKED		0x00000010
14962306a36Sopenharmony_ci#define  EXT_STATUS_TDIF_LOCKED		0x00000020
15062306a36Sopenharmony_ci#define  EXT_STATUS_ARX1_LOCKED		0x00000040
15162306a36Sopenharmony_ci#define  EXT_STATUS_ARX2_LOCKED		0x00000080
15262306a36Sopenharmony_ci#define  EXT_STATUS_ARX3_LOCKED		0x00000100
15362306a36Sopenharmony_ci#define  EXT_STATUS_ARX4_LOCKED		0x00000200
15462306a36Sopenharmony_ci#define  EXT_STATUS_WC_LOCKED		0x00000400
15562306a36Sopenharmony_ci/*
15662306a36Sopenharmony_ci * The _SLIP bits do not generate notifications; a set bit indicates that an
15762306a36Sopenharmony_ci * error occurred since the last time when this register was read with
15862306a36Sopenharmony_ci * a quadlet read transaction.
15962306a36Sopenharmony_ci */
16062306a36Sopenharmony_ci#define  EXT_STATUS_AES1_SLIP		0x00010000
16162306a36Sopenharmony_ci#define  EXT_STATUS_AES2_SLIP		0x00020000
16262306a36Sopenharmony_ci#define  EXT_STATUS_AES3_SLIP		0x00040000
16362306a36Sopenharmony_ci#define  EXT_STATUS_AES4_SLIP		0x00080000
16462306a36Sopenharmony_ci#define  EXT_STATUS_ADAT_SLIP		0x00100000
16562306a36Sopenharmony_ci#define  EXT_STATUS_TDIF_SLIP		0x00200000
16662306a36Sopenharmony_ci#define  EXT_STATUS_ARX1_SLIP		0x00400000
16762306a36Sopenharmony_ci#define  EXT_STATUS_ARX2_SLIP		0x00800000
16862306a36Sopenharmony_ci#define  EXT_STATUS_ARX3_SLIP		0x01000000
16962306a36Sopenharmony_ci#define  EXT_STATUS_ARX4_SLIP		0x02000000
17062306a36Sopenharmony_ci#define  EXT_STATUS_WC_SLIP		0x04000000
17162306a36Sopenharmony_ci
17262306a36Sopenharmony_ci/*
17362306a36Sopenharmony_ci * The measured rate of the current clock source, in Hz; read-only.
17462306a36Sopenharmony_ci */
17562306a36Sopenharmony_ci#define GLOBAL_SAMPLE_RATE		0x05c
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_ci/*
17862306a36Sopenharmony_ci * Some old firmware versions do not have the following global registers.
17962306a36Sopenharmony_ci * Windows drivers produced by TCAT lost backward compatibility in its
18062306a36Sopenharmony_ci * early release because they can handle firmware only which supports the
18162306a36Sopenharmony_ci * following registers.
18262306a36Sopenharmony_ci */
18362306a36Sopenharmony_ci
18462306a36Sopenharmony_ci/*
18562306a36Sopenharmony_ci * The version of the DICE driver specification that this device conforms to;
18662306a36Sopenharmony_ci * read-only.
18762306a36Sopenharmony_ci */
18862306a36Sopenharmony_ci#define GLOBAL_VERSION			0x060
18962306a36Sopenharmony_ci
19062306a36Sopenharmony_ci/*
19162306a36Sopenharmony_ci * Supported sample rates and clock sources; read-only.
19262306a36Sopenharmony_ci */
19362306a36Sopenharmony_ci#define GLOBAL_CLOCK_CAPABILITIES	0x064
19462306a36Sopenharmony_ci#define  CLOCK_CAP_RATE_32000		0x00000001
19562306a36Sopenharmony_ci#define  CLOCK_CAP_RATE_44100		0x00000002
19662306a36Sopenharmony_ci#define  CLOCK_CAP_RATE_48000		0x00000004
19762306a36Sopenharmony_ci#define  CLOCK_CAP_RATE_88200		0x00000008
19862306a36Sopenharmony_ci#define  CLOCK_CAP_RATE_96000		0x00000010
19962306a36Sopenharmony_ci#define  CLOCK_CAP_RATE_176400		0x00000020
20062306a36Sopenharmony_ci#define  CLOCK_CAP_RATE_192000		0x00000040
20162306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_AES1		0x00010000
20262306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_AES2		0x00020000
20362306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_AES3		0x00040000
20462306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_AES4		0x00080000
20562306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_AES_ANY	0x00100000
20662306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_ADAT		0x00200000
20762306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_TDIF		0x00400000
20862306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_WC		0x00800000
20962306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_ARX1		0x01000000
21062306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_ARX2		0x02000000
21162306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_ARX3		0x04000000
21262306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_ARX4		0x08000000
21362306a36Sopenharmony_ci#define  CLOCK_CAP_SOURCE_INTERNAL	0x10000000
21462306a36Sopenharmony_ci
21562306a36Sopenharmony_ci/*
21662306a36Sopenharmony_ci * Names of all clock sources; read-only.  Quadlets are byte-swapped.  Names
21762306a36Sopenharmony_ci * are separated with one backslash, the list is terminated with two
21862306a36Sopenharmony_ci * backslashes.  Unused clock sources are included.
21962306a36Sopenharmony_ci */
22062306a36Sopenharmony_ci#define GLOBAL_CLOCK_SOURCE_NAMES	0x068
22162306a36Sopenharmony_ci#define  CLOCK_SOURCE_NAMES_SIZE	256
22262306a36Sopenharmony_ci
22362306a36Sopenharmony_ci/*
22462306a36Sopenharmony_ci * Capture stream settings.  This section includes the number/size registers
22562306a36Sopenharmony_ci * and the registers of all streams.
22662306a36Sopenharmony_ci */
22762306a36Sopenharmony_ci
22862306a36Sopenharmony_ci/*
22962306a36Sopenharmony_ci * The number of supported capture streams; read-only.
23062306a36Sopenharmony_ci */
23162306a36Sopenharmony_ci#define TX_NUMBER			0x000
23262306a36Sopenharmony_ci
23362306a36Sopenharmony_ci/*
23462306a36Sopenharmony_ci * The size of one stream's register block, in quadlets; read-only.  The
23562306a36Sopenharmony_ci * registers of the first stream follow immediately afterwards; the registers
23662306a36Sopenharmony_ci * of the following streams are offset by this register's value.
23762306a36Sopenharmony_ci */
23862306a36Sopenharmony_ci#define TX_SIZE				0x004
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_ci/*
24162306a36Sopenharmony_ci * The isochronous channel number on which packets are sent, or -1 if the
24262306a36Sopenharmony_ci * stream is not to be used; read/write.
24362306a36Sopenharmony_ci */
24462306a36Sopenharmony_ci#define TX_ISOCHRONOUS			0x008
24562306a36Sopenharmony_ci
24662306a36Sopenharmony_ci/*
24762306a36Sopenharmony_ci * The number of audio channels; read-only.  There will be one quadlet per
24862306a36Sopenharmony_ci * channel; the first channel is the first quadlet in a data block.
24962306a36Sopenharmony_ci */
25062306a36Sopenharmony_ci#define TX_NUMBER_AUDIO			0x00c
25162306a36Sopenharmony_ci
25262306a36Sopenharmony_ci/*
25362306a36Sopenharmony_ci * The number of MIDI ports, 0-8; read-only.  If > 0, there will be one
25462306a36Sopenharmony_ci * additional quadlet in each data block, following the audio quadlets.
25562306a36Sopenharmony_ci */
25662306a36Sopenharmony_ci#define TX_NUMBER_MIDI			0x010
25762306a36Sopenharmony_ci
25862306a36Sopenharmony_ci/*
25962306a36Sopenharmony_ci * The speed at which the packets are sent, SCODE_100-_400; read/write.
26062306a36Sopenharmony_ci * SCODE_800 is only available in Dice III.
26162306a36Sopenharmony_ci */
26262306a36Sopenharmony_ci#define TX_SPEED			0x014
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ci/*
26562306a36Sopenharmony_ci * Names of all audio channels; read-only.  Quadlets are byte-swapped.  Names
26662306a36Sopenharmony_ci * are separated with one backslash, the list is terminated with two
26762306a36Sopenharmony_ci * backslashes.
26862306a36Sopenharmony_ci */
26962306a36Sopenharmony_ci#define TX_NAMES			0x018
27062306a36Sopenharmony_ci#define  TX_NAMES_SIZE			256
27162306a36Sopenharmony_ci
27262306a36Sopenharmony_ci/*
27362306a36Sopenharmony_ci * Audio IEC60958 capabilities; read-only.  Bitmask with one bit per audio
27462306a36Sopenharmony_ci * channel.
27562306a36Sopenharmony_ci */
27662306a36Sopenharmony_ci#define TX_AC3_CAPABILITIES		0x118
27762306a36Sopenharmony_ci
27862306a36Sopenharmony_ci/*
27962306a36Sopenharmony_ci * Send audio data with IEC60958 label; read/write.  Bitmask with one bit per
28062306a36Sopenharmony_ci * audio channel.  This register can be changed even while the stream is
28162306a36Sopenharmony_ci * running.
28262306a36Sopenharmony_ci */
28362306a36Sopenharmony_ci#define TX_AC3_ENABLE			0x11c
28462306a36Sopenharmony_ci
28562306a36Sopenharmony_ci/*
28662306a36Sopenharmony_ci * Playback stream settings.  This section includes the number/size registers
28762306a36Sopenharmony_ci * and the registers of all streams.
28862306a36Sopenharmony_ci */
28962306a36Sopenharmony_ci
29062306a36Sopenharmony_ci/*
29162306a36Sopenharmony_ci * The number of supported playback streams; read-only.
29262306a36Sopenharmony_ci */
29362306a36Sopenharmony_ci#define RX_NUMBER			0x000
29462306a36Sopenharmony_ci
29562306a36Sopenharmony_ci/*
29662306a36Sopenharmony_ci * The size of one stream's register block, in quadlets; read-only.  The
29762306a36Sopenharmony_ci * registers of the first stream follow immediately afterwards; the registers
29862306a36Sopenharmony_ci * of the following streams are offset by this register's value.
29962306a36Sopenharmony_ci */
30062306a36Sopenharmony_ci#define RX_SIZE				0x004
30162306a36Sopenharmony_ci
30262306a36Sopenharmony_ci/*
30362306a36Sopenharmony_ci * The isochronous channel number on which packets are received, or -1 if the
30462306a36Sopenharmony_ci * stream is not to be used; read/write.
30562306a36Sopenharmony_ci */
30662306a36Sopenharmony_ci#define RX_ISOCHRONOUS			0x008
30762306a36Sopenharmony_ci
30862306a36Sopenharmony_ci/*
30962306a36Sopenharmony_ci * Index of first quadlet to be interpreted; read/write.  If > 0, that many
31062306a36Sopenharmony_ci * quadlets at the beginning of each data block will be ignored, and all the
31162306a36Sopenharmony_ci * audio and MIDI quadlets will follow.
31262306a36Sopenharmony_ci */
31362306a36Sopenharmony_ci#define RX_SEQ_START			0x00c
31462306a36Sopenharmony_ci
31562306a36Sopenharmony_ci/*
31662306a36Sopenharmony_ci * The number of audio channels; read-only.  There will be one quadlet per
31762306a36Sopenharmony_ci * channel.
31862306a36Sopenharmony_ci */
31962306a36Sopenharmony_ci#define RX_NUMBER_AUDIO			0x010
32062306a36Sopenharmony_ci
32162306a36Sopenharmony_ci/*
32262306a36Sopenharmony_ci * The number of MIDI ports, 0-8; read-only.  If > 0, there will be one
32362306a36Sopenharmony_ci * additional quadlet in each data block, following the audio quadlets.
32462306a36Sopenharmony_ci */
32562306a36Sopenharmony_ci#define RX_NUMBER_MIDI			0x014
32662306a36Sopenharmony_ci
32762306a36Sopenharmony_ci/*
32862306a36Sopenharmony_ci * Names of all audio channels; read-only.  Quadlets are byte-swapped.  Names
32962306a36Sopenharmony_ci * are separated with one backslash, the list is terminated with two
33062306a36Sopenharmony_ci * backslashes.
33162306a36Sopenharmony_ci */
33262306a36Sopenharmony_ci#define RX_NAMES			0x018
33362306a36Sopenharmony_ci#define  RX_NAMES_SIZE			256
33462306a36Sopenharmony_ci
33562306a36Sopenharmony_ci/*
33662306a36Sopenharmony_ci * Audio IEC60958 capabilities; read-only.  Bitmask with one bit per audio
33762306a36Sopenharmony_ci * channel.
33862306a36Sopenharmony_ci */
33962306a36Sopenharmony_ci#define RX_AC3_CAPABILITIES		0x118
34062306a36Sopenharmony_ci
34162306a36Sopenharmony_ci/*
34262306a36Sopenharmony_ci * Receive audio data with IEC60958 label; read/write.  Bitmask with one bit
34362306a36Sopenharmony_ci * per audio channel.  This register can be changed even while the stream is
34462306a36Sopenharmony_ci * running.
34562306a36Sopenharmony_ci */
34662306a36Sopenharmony_ci#define RX_AC3_ENABLE			0x11c
34762306a36Sopenharmony_ci
34862306a36Sopenharmony_ci/*
34962306a36Sopenharmony_ci * Extended synchronization information.
35062306a36Sopenharmony_ci * This section can be read completely with a block read request.
35162306a36Sopenharmony_ci */
35262306a36Sopenharmony_ci
35362306a36Sopenharmony_ci/*
35462306a36Sopenharmony_ci * Current clock source; read-only.
35562306a36Sopenharmony_ci */
35662306a36Sopenharmony_ci#define EXT_SYNC_CLOCK_SOURCE		0x000
35762306a36Sopenharmony_ci
35862306a36Sopenharmony_ci/*
35962306a36Sopenharmony_ci * Clock source is locked (boolean); read-only.
36062306a36Sopenharmony_ci */
36162306a36Sopenharmony_ci#define EXT_SYNC_LOCKED			0x004
36262306a36Sopenharmony_ci
36362306a36Sopenharmony_ci/*
36462306a36Sopenharmony_ci * Current sample rate (CLOCK_RATE_* >> CLOCK_RATE_SHIFT), _32000-_192000 or
36562306a36Sopenharmony_ci * _NONE; read-only.
36662306a36Sopenharmony_ci */
36762306a36Sopenharmony_ci#define EXT_SYNC_RATE			0x008
36862306a36Sopenharmony_ci
36962306a36Sopenharmony_ci/*
37062306a36Sopenharmony_ci * ADAT user data bits; read-only.
37162306a36Sopenharmony_ci */
37262306a36Sopenharmony_ci#define EXT_SYNC_ADAT_USER_DATA		0x00c
37362306a36Sopenharmony_ci/* The data bits, if available. */
37462306a36Sopenharmony_ci#define  ADAT_USER_DATA_MASK		0x0f
37562306a36Sopenharmony_ci/* The data bits are not available. */
37662306a36Sopenharmony_ci#define  ADAT_USER_DATA_NO_DATA		0x10
37762306a36Sopenharmony_ci
37862306a36Sopenharmony_ci#endif
379