From 81720c6d49b7932d642e7dca736bef9a40c9b5f7 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Mon, 18 Jun 2018 21:07:52 +0900 Subject: 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 Signed-off-by: Takashi Iwai --- sound/firewire/motu/motu-protocol-v2.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'sound/firewire/motu/motu-protocol-v2.c') 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; } /* -- cgit v1.2.3