diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2024-09-08 13:05:48 +0900 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2024-09-08 13:05:48 +0900 |
commit | 446216bd8e5d4a3ffc9738f6adffc98fbfdcc582 (patch) | |
tree | 2288509c55cb530d317bdeea53cc59ac39bb3d2f /drivers/firewire/core.h | |
parent | 7519033f319d4dc8066cb3a37c1276610f4cb0ca (diff) | |
download | linux-446216bd8e5d4a3ffc9738f6adffc98fbfdcc582.tar.gz linux-446216bd8e5d4a3ffc9738f6adffc98fbfdcc582.tar.bz2 linux-446216bd8e5d4a3ffc9738f6adffc98fbfdcc582.zip |
firewire: core: expose kernel API to schedule work item to process isochronous context
In packet-per-buffer mode for isochronous context of 1394 OHCI, software
can schedule hardIRQ to the buffer in which the content of isochronous
packet is processed. The actual behaviour is different between isochronous
receive (IR) and transmit (IT) contexts in respect to isochronous cycle in
which the hardIRQ occurs.
In IR context, the hardIRQ occurs when the buffer is filled actually by
the content of received packet. If there are any isochronous cycles in
which the packet transmission is skipped, it is postponed to generate
the hardIRQ in respect to the isochronous cycle. In IT context, software
can schedule the content of packet every isochronous cycle including
skipping, therefore the hardIRQ occurs in the isochronous cycle to which
the software scheduled.
ALSA firewire stack uses the packet-per-buffer mode for both IR/IT
contexts. To process time stamp per packet (or per sample in some cases)
steadily for media clock recovery against unexpected transmission skips,
it uses an IT context to operate all of isochronous contexts by calls of
fw_iso_context_flush_completions() in the bottom-half of hardIRQ for the
IT context.
Although it looks well to handle all of isochronous contexts in a single
bottom-half context, it relatively takes longer time. In the future code
integration (not yet), it is possible to apply parallelism method to
process these context. In the case, it is useful to allow unit drivers to
schedule work items to process these isochronous contexts.
As a preparation, this commit exposes
fw_iso_context_schedule_flush_completions() as a kernel API available by
unit drivers. It is renamed from fw_iso_context_queue_work() since it is
a counter part of fw_iso_context_flush_completions().
Link: https://lore.kernel.org/r/20240908040549.75304-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'drivers/firewire/core.h')
-rw-r--r-- | drivers/firewire/core.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/firewire/core.h b/drivers/firewire/core.h index 2874f316156a..0ae2c84ecafe 100644 --- a/drivers/firewire/core.h +++ b/drivers/firewire/core.h @@ -164,11 +164,6 @@ static inline void fw_iso_context_init_work(struct fw_iso_context *ctx, work_fun INIT_WORK(&ctx->work, func); } -static inline void fw_iso_context_queue_work(struct fw_iso_context *ctx) -{ - queue_work(ctx->card->isoc_wq, &ctx->work); -} - /* -topology */ |