summaryrefslogtreecommitdiff
path: root/sound/firewire/motu/motu-pcm.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2020-05-19 14:16:36 +0300
committerTakashi Iwai <tiwai@suse.de>2020-05-22 17:52:16 +0300
commit9883b3850fba6c2842a15ac3b38e36b214e03ddf (patch)
treec7acc47c3af8ae02294043309417bb563d7113f5 /sound/firewire/motu/motu-pcm.c
parent0090c1c5f327da077f371f5f8675a576bca6ebf9 (diff)
downloadlinux-9883b3850fba6c2842a15ac3b38e36b214e03ddf.tar.xz
ALSA: firewire-motu: use table-based calculation of packet formats for proc
This commit uses table-based calculation of packet formats for proc nodes. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20200519111641.123211-10-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/motu/motu-pcm.c')
-rw-r--r--sound/firewire/motu/motu-pcm.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/firewire/motu/motu-pcm.c b/sound/firewire/motu/motu-pcm.c
index b24bb870388e..8e1437371263 100644
--- a/sound/firewire/motu/motu-pcm.c
+++ b/sound/firewire/motu/motu-pcm.c
@@ -26,8 +26,7 @@ static int motu_rate_constraint(struct snd_pcm_hw_params *params,
rate = snd_motu_clock_rates[i];
mode = i / 2;
- pcm_channels = formats->fixed_part_pcm_chunks[mode] +
- formats->differed_part_pcm_chunks[mode];
+ pcm_channels = formats->pcm_chunks[mode];
if (!snd_interval_test(c, pcm_channels))
continue;
@@ -59,8 +58,7 @@ static int motu_channels_constraint(struct snd_pcm_hw_params *params,
if (!snd_interval_test(r, rate))
continue;
- pcm_channels = formats->fixed_part_pcm_chunks[mode] +
- formats->differed_part_pcm_chunks[mode];
+ pcm_channels = formats->pcm_chunks[mode];
channels.min = min(channels.min, pcm_channels);
channels.max = max(channels.max, pcm_channels);
}
@@ -82,8 +80,7 @@ static void limit_channels_and_rates(struct snd_motu *motu,
rate = snd_motu_clock_rates[i];
mode = i / 2;
- pcm_channels = formats->fixed_part_pcm_chunks[mode] +
- formats->differed_part_pcm_chunks[mode];
+ pcm_channels = formats->pcm_chunks[mode];
if (pcm_channels == 0)
continue;