linux/sound/firewire/oxfw
Takashi Sakamoto a2064710ba ALSA: firewire-lib: add buffer-over-run protection at receiving more data blocks than expected
In IEC 61883-6, the number of data blocks in a packet is limited up to
the value of SYT_INTERVAL. Current implementation is compliant to the
limitation, while it can cause buffer-over-run when the value of dbs
field in received packet is illegally large.

This commit adds a validator to detect such illegal packets to prevent
the buffer-over-run. Actually, the buffer is aligned to the size of memory
 page, thus this issue hardly causes system errors due to the room to page
alignment, as long as a few packets includes such jumbo payload; i.e.
a packet to several received packets.

Here, Behringer F-Control Audio 202 (based on OXFW 960) has a quirk to
postpone transferring isochronous packet till finish handling any
asynchronous packets. In this case, this model is lazy, transfers no
packets according to several cycle-start packets. After finishing, this
model pushes required data in next isochronous packet. As a result, the
packet include more data blocks than IEC 61883-6 defines.

To continue to support this model, this commit adds a new flag to extend
the length of calculated payload. This flag allows the size of payload
5 times as large as IEC 61883-6 defines. As a result, packets from this
model passed the validator successfully.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-23 09:13:18 +02:00
..
Makefile ALSA: oxfw: Add hwdep interface 2014-12-10 10:50:00 +01:00
oxfw-command.c ALSA: oxfw: Add support for AV/C stream format command to get/set supported stream formation 2014-12-10 10:47:09 +01:00
oxfw-control.c ALSA: oxfw: Split control functionality to a new file 2014-11-29 20:22:37 +01:00
oxfw-hwdep.c ALSA: oxfw: Add hwdep interface 2014-12-10 10:50:00 +01:00
oxfw-midi.c ALSA: oxfw: Add hwdep interface 2014-12-10 10:50:00 +01:00
oxfw-pcm.c ALSA: oxfw: some signedness bugs 2014-12-15 10:03:21 +01:00
oxfw-proc.c ALSA: oxfw: some signedness bugs 2014-12-15 10:03:21 +01:00
oxfw-stream.c ALSA: firewire-lib: add buffer-over-run protection at receiving more data blocks than expected 2015-05-23 09:13:18 +02:00
oxfw.c ALSA: fireworks/bebob/dice/oxfw: make it possible to shutdown safely 2015-02-23 09:11:24 +01:00
oxfw.h ALSA: oxfw: Add hwdep interface 2014-12-10 10:50:00 +01:00