diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2021-05-18 10:45:55 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-05-18 12:23:55 +0200 |
commit | 6a3ce97da2ab2bd7ca7a446b62b104488ccd43ef (patch) | |
tree | 76c7fe9742982b8bf9eb7fe34aa1da484dc25277 /sound/firewire/amdtp-stream.c | |
parent | ALSA: oxfw: code refactoring for jumbo-payload quirk in OXFW970 (diff) | |
download | linux-6a3ce97da2ab2bd7ca7a446b62b104488ccd43ef.tar.xz linux-6a3ce97da2ab2bd7ca7a446b62b104488ccd43ef.zip |
ALSA: firewire-lib: code refactoring for jumbo payload quirk
A new macro is added to describe the maximum number of cycles to accept
cycle skip by jumbo payload quirk.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518084557.102681-10-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp-stream.c')
-rw-r--r-- | sound/firewire/amdtp-stream.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index b14c3922efb2..409274a532ed 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -64,6 +64,11 @@ #define IT_PKT_HEADER_SIZE_CIP 8 // For 2 CIP header. #define IT_PKT_HEADER_SIZE_NO_CIP 0 // Nothing. +// The initial firmware of OXFW970 can postpone transmission of packet during finishing +// asynchronous transaction. This module accepts 5 cycles to skip as maximum to avoid buffer +// overrun. Actual device can skip more, then this module stops the packet streaming. +#define IR_JUMBO_PAYLOAD_MAX_SKIP_CYCLES 5 + static void pcm_period_work(struct work_struct *work); /** @@ -316,7 +321,7 @@ unsigned int amdtp_stream_get_max_payload(struct amdtp_stream *s) unsigned int cip_header_size = 0; if (s->flags & CIP_JUMBO_PAYLOAD) - multiplier = 5; + multiplier = IR_JUMBO_PAYLOAD_MAX_SKIP_CYCLES; if (!(s->flags & CIP_NO_HEADER)) cip_header_size = sizeof(__be32) * 2; |