summaryrefslogtreecommitdiffstats
path: root/sound/firewire/motu/motu-protocol-v2.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2018-06-18 14:07:52 +0200
committerTakashi Iwai <tiwai@suse.de>2018-06-19 20:44:47 +0200
commit81720c6d49b7932d642e7dca736bef9a40c9b5f7 (patch)
treeed4aeeb3129fe4f819b2fd3fd78116789ed45369 /sound/firewire/motu/motu-protocol-v2.c
parentALSA: firewire-motu: suppless consumption for unused element of array in stack (diff)
downloadlinux-81720c6d49b7932d642e7dca736bef9a40c9b5f7.tar.xz
linux-81720c6d49b7932d642e7dca736bef9a40c9b5f7.zip
ALSA: firewire-motu: add a flag for chunks for main 1/2 out
This driver explicitly assumes that all of supported models have main data chunk separated from chunk for analog ports. However, MOTU Traveler doesn't support the separated main data chunk. This commit adds a flag for the separated main data chunk. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/motu/motu-protocol-v2.c')
-rw-r--r--sound/firewire/motu/motu-protocol-v2.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sound/firewire/motu/motu-protocol-v2.c b/sound/firewire/motu/motu-protocol-v2.c
index a51fd196d884..614f9b11e010 100644
--- a/sound/firewire/motu/motu-protocol-v2.c
+++ b/sound/firewire/motu/motu-protocol-v2.c
@@ -149,11 +149,15 @@ static void calculate_fixed_part(struct snd_motu_packet_format *formats,
pcm_chunks[1] += 2;
}
} else {
- /*
- * Packets to v2 units transfer main-out-1/2 and phone-out-1/2.
- */
- pcm_chunks[0] += 4;
- pcm_chunks[1] += 4;
+ if (flags & SND_MOTU_SPEC_RX_SEPARETED_MAIN) {
+ pcm_chunks[0] += 2;
+ pcm_chunks[1] += 2;
+ }
+
+ // Packets to v2 units include 2 chunks for phone 1/2, except
+ // for 176.4/192.0 kHz.
+ pcm_chunks[0] += 2;
+ pcm_chunks[1] += 2;
}
/*