summaryrefslogtreecommitdiff
path: root/sound/firewire/fireface/ff-protocol-latter.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2023-01-10 16:49:33 +0300
committerTakashi Iwai <tiwai@suse.de>2023-01-12 14:14:52 +0300
commitaf13842cad44eb1feb9da23c7ce5547ecf007694 (patch)
tree50abfb79ba2a25dc0479c224471d1b19740fbdc5 /sound/firewire/fireface/ff-protocol-latter.c
parent7fc693e474725544e5ee1cabde34d95e544eb708 (diff)
downloadlinux-af13842cad44eb1feb9da23c7ce5547ecf007694.tar.xz
ALSA: firewire-lib: compute extra delay for runtime of PCM substream
All drivers in ALSA firewire stack have never reported extra delay for the runtime of PCM substream. There is some reason, but the main reason is that the meaning of extra delay differs depending on driver design, especially for the packet-oriented driver. Here I define the extra delay for the case of IEC 61883-1/6. It is the number of PCM frames transferred or should be transferred between the current isochronous cycle and the isochronous cycle to which the latest isochronous packet arrived (in IR context) or is scheduled (in IT context). A commit baa914cd81f5 ("firewire: add kernel API to access CYCLE_TIME register") allow unit drivers to read CYCLE_TIME of 1394 OHCI controller. It allows the drivers to compute the current isochronous cycle. Additionally, a commit f0117128879b ("ALSA: firewire-lib: keep history to process isochronous packet") enables to save the history processing packets. It allows the driver to estimate the total number of data blocks in packets arriving shortly, or calculate the total number of data blocks in scheduled packets. Now it is ready. This commit implements the computation of the extra delay. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20230110134933.322794-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireface/ff-protocol-latter.c')
0 files changed, 0 insertions, 0 deletions