提交 6c1549c4 编写于 作者: T Takashi Sakamoto 提交者: Takashi Iwai

ALSA: firewire-motu: suppless consumption for unused element of array in stack

In MOTU firewire protocol, data block consists of 24 bit data chunks except
for one quadlet for source packet header (SPH). The number of data chunk in
a data block is different between three clock modes; low, middle and high.
When unit supports ADAT on optical interface, the data block includes some
chunks for ADAT channels. These ADAT chunks are unavailable at high mode.

This driver has local functions to calculate the number of ADAT chunks. But
They uses stack for three clock modes. This is useless for higher mode.
Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 a8eaad7b
...@@ -176,7 +176,7 @@ static void calculate_differed_part(struct snd_motu_packet_format *formats, ...@@ -176,7 +176,7 @@ static void calculate_differed_part(struct snd_motu_packet_format *formats,
enum snd_motu_spec_flags flags, enum snd_motu_spec_flags flags,
u32 data, u32 mask, u32 shift) u32 data, u32 mask, u32 shift)
{ {
unsigned char pcm_chunks[3] = {0, 0}; unsigned char pcm_chunks[2] = {0, 0};
/* /*
* When optical interfaces are configured for S/PDIF (TOSLINK), * When optical interfaces are configured for S/PDIF (TOSLINK),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册