summaryrefslogtreecommitdiffstats
path: root/sound/firewire/motu
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2018-06-18 08:07:53 -0400
committerTakashi Iwai <tiwai@suse.de>2018-06-19 14:44:50 -0400
commit06ac0b6f8f74e98d32f9dea5209bd26f3e7b50ba (patch)
tree89a04fb4ddae4bebbcab20ca0d8675bb2e6c2d92 /sound/firewire/motu
parent81720c6d49b7932d642e7dca736bef9a40c9b5f7 (diff)
ALSA: firewire-motu: add a flag for AES/EBU on XLR interface
MOTU Traveler supports AES/EBU on XLR interface and data block of rx/tx packet includes two chunk for the interface. This commit adds a flag for this purpose. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/motu')
-rw-r--r--sound/firewire/motu/motu-protocol-v2.c5
-rw-r--r--sound/firewire/motu/motu-protocol-v3.c5
-rw-r--r--sound/firewire/motu/motu.h2
3 files changed, 11 insertions, 1 deletions
diff --git a/sound/firewire/motu/motu-protocol-v2.c b/sound/firewire/motu/motu-protocol-v2.c
index 614f9b11e010..f25b1ba118a2 100644
--- a/sound/firewire/motu/motu-protocol-v2.c
+++ b/sound/firewire/motu/motu-protocol-v2.c
@@ -160,6 +160,11 @@ static void calculate_fixed_part(struct snd_motu_packet_format *formats,
160 pcm_chunks[1] += 2; 160 pcm_chunks[1] += 2;
161 } 161 }
162 162
163 if (flags & SND_MOTU_SPEC_HAS_AESEBU_IFACE) {
164 pcm_chunks[0] += 2;
165 pcm_chunks[1] += 2;
166 }
167
163 /* 168 /*
164 * All of v2 models have a pair of coaxial interfaces for digital in/out 169 * All of v2 models have a pair of coaxial interfaces for digital in/out
165 * port. At 44.1/48.0/88.2/96.0 kHz, packets includes PCM from these 170 * port. At 44.1/48.0/88.2/96.0 kHz, packets includes PCM from these
diff --git a/sound/firewire/motu/motu-protocol-v3.c b/sound/firewire/motu/motu-protocol-v3.c
index 293353991591..7cc80a05e91f 100644
--- a/sound/firewire/motu/motu-protocol-v3.c
+++ b/sound/firewire/motu/motu-protocol-v3.c
@@ -199,6 +199,11 @@ static void calculate_fixed_part(struct snd_motu_packet_format *formats,
199 pcm_chunks[1] += 2; 199 pcm_chunks[1] += 2;
200 } 200 }
201 201
202 if (flags & SND_MOTU_SPEC_HAS_AESEBU_IFACE) {
203 pcm_chunks[0] += 2;
204 pcm_chunks[1] += 2;
205 }
206
202 /* 207 /*
203 * At least, packets have two data chunks for S/PDIF on coaxial 208 * At least, packets have two data chunks for S/PDIF on coaxial
204 * interface. 209 * interface.
diff --git a/sound/firewire/motu/motu.h b/sound/firewire/motu/motu.h
index bced0407179e..2764bcaab327 100644
--- a/sound/firewire/motu/motu.h
+++ b/sound/firewire/motu/motu.h
@@ -79,7 +79,7 @@ enum snd_motu_spec_flags {
79 SND_MOTU_SPEC_TX_MICINST_CHUNK = 0x0004, 79 SND_MOTU_SPEC_TX_MICINST_CHUNK = 0x0004,
80 SND_MOTU_SPEC_TX_RETURN_CHUNK = 0x0008, 80 SND_MOTU_SPEC_TX_RETURN_CHUNK = 0x0008,
81 SND_MOTU_SPEC_TX_REVERB_CHUNK = 0x0010, 81 SND_MOTU_SPEC_TX_REVERB_CHUNK = 0x0010,
82 SND_MOTU_SPEC_TX_AESEBU_CHUNK = 0x0020, 82 SND_MOTU_SPEC_HAS_AESEBU_IFACE = 0x0020,
83 SND_MOTU_SPEC_HAS_OPT_IFACE_A = 0x0040, 83 SND_MOTU_SPEC_HAS_OPT_IFACE_A = 0x0040,
84 SND_MOTU_SPEC_HAS_OPT_IFACE_B = 0x0080, 84 SND_MOTU_SPEC_HAS_OPT_IFACE_B = 0x0080,
85 SND_MOTU_SPEC_RX_MIDI_2ND_Q = 0x0100, 85 SND_MOTU_SPEC_RX_MIDI_2ND_Q = 0x0100,