ALSA: firewire-lib: compute the value of second field in cycle count for IT context
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 9 May 2016 12:12:44 +0000 (21:12 +0900)
committerTakashi Iwai <tiwai@suse.de>
Mon, 9 May 2016 13:18:24 +0000 (15:18 +0200)
commit73fc7f080105b16d9f189c82d0092f22107cc67b
tree051f5fefd0cb13486f64962cab6d018e5c04a764
parent38b19ed7f81ec930f3ad2066ae088f574970c814
ALSA: firewire-lib: compute the value of second field in cycle count for IT context

In callback function of isochronous context, u32 variable is passed for
cycle count. The value of this variable comes from DMA descriptors of 1394
Open Host Controller Interface (1394 OHCI). In the specification, DMA
descriptors transport lower 3 bits for second field and full cycle field in
16 bits field, therefore 16 bits of the u32 variable are available. The
value for second is modulo 8, and the value for cycle is modulo 8,000.

Currently, ALSA firewire-lib module don't use the value of the second
field, because the value is useless to calculate presentation timestamp in
IEC 61883-6. However, the value may be useful for debugging. In later
commit, it will be printed with the other parameters for debugging.

This commit makes this module to handle the whole cycle count including
second. The value is calculated by cycle unit. The existed code is already
written with ignoring the value of second, thus this commit causes no
issues.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/amdtp-stream.c