linux-IllusionX/sound
Takashi Sakamoto 39c2649c71 ALSA: firewire-lib: replay sequence of incoming packets for outgoing packets
ALSA IEC 61883-1/6 packet streaming engine uses pre-computed parameters
ideal for nominal sampling transfer frequency (STF) to transfer packets
to device since it was added 2011. As a result of user experience for a
decade, it is clear that the sequence is not suitable to some actual
devices. It takes the devices to generate noise, and causes any type of
discontinuity in the series of packet transferred from the device. It's
required for the engine to transfer packets according to effective STF.

The effective STF is given by media clock recovered by the sequence of
packet transferred from the target device. In the previous commit, the
sequence is already cached. The media clock recovery can be achieved by
analyzing the sequence.

In technological world, many ideas are proposed for media clock recovery.
However, the small part of them could be actually adopted in our case
since floating point arithmetic is not mostly available in Linux kernel
land.

This commit adopts the simple way from them; sequence replay, which means
that the sequence of parameters from incoming packet is used as is to
transfer outgoing packets. The media clock is not computed internally,
but the sequence of outgoing packet superficially looks to be generated by
the media clock.

The association between source and destination is decided when starting
AMDTP domain. When the target device supports a pair of isochronous packet
streams, the tx stream is source and the rx stream is destination. When it
supports two pair of streams, each of tx stream is associated to
corresponding rx stream in its order. When it supports less number of tx
streams than rx streams, the fist tx stream is selected for all of rx
streams. When it supports more tx streams than rx streams, the first tx
packet is associated to the rx stream.

As I noted in previous commit, the sequence of parameters from incoming
packet is different between devices, time to time. It is worse idea to
replay the sequence of parameters from a device for the sequence of
packet to the other devices even if they are in the same category of
device.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210527122611.173711-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-28 11:05:45 +02:00
..
ac97 ALSA: ac97: fix PM reference leak in ac97_bus_remove() 2021-05-25 08:59:08 +02:00
aoa ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
arm ARM updates for 5.12-rc1: 2021-02-22 14:27:07 -08:00
atmel ALSA: atmel: ac97: clarify operator precedence 2020-09-03 09:27:34 +02:00
core ALSA: control_led - use DEVICE_ATTR_*() macro 2021-05-25 10:31:59 +02:00
drivers ALSA: drivers: opl3: fix useless self-comparison 2021-05-27 08:25:01 +02:00
firewire ALSA: firewire-lib: replay sequence of incoming packets for outgoing packets 2021-05-28 11:05:45 +02:00
hda ALSA: control - add generic LED API 2021-03-30 17:42:40 +02:00
i2c ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
isa ALSA: gus: Replace unsafe strcpy() with strscpy() 2021-05-14 09:48:33 +02:00
mips module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
oss sound/oss/dmasound: Remove superfluous "break" 2021-05-27 08:24:23 +02:00
parisc
pci ALSA: hda/ca0132: Make a const array static, makes object smaller 2021-05-27 08:25:54 +02:00
pcmcia module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ppc ALSA: control - add generic LED API 2021-03-30 17:42:40 +02:00
sh module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
soc ALSA: Drop superfluous argument from snd_power_wait() 2021-05-25 08:49:39 +02:00
sparc module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
spi
synth
usb Merge branch 'topic/pci-rescan-prep-v2' into for-next 2021-05-25 08:50:03 +02:00
virtio ALSA: virtio: fix kernel-doc 2021-04-27 08:39:39 +02:00
x86 module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
xen module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ac97_bus.c
Kconfig ALSA: virtio: add virtio sound driver 2021-03-07 09:07:16 +01:00
last.c
Makefile ALSA: virtio: add virtio sound driver 2021-03-07 09:07:16 +01:00
sound_core.c