mbox series

[0/2] firewire: core: allow unit drivers to schedule work item to process isochronous context

Message ID 20240908040549.75304-1-o-takashi@sakamocchi.jp (mailing list archive)
Headers show
Series firewire: core: allow unit drivers to schedule work item to process isochronous context | expand

Message

Takashi Sakamoto Sept. 8, 2024, 4:05 a.m. UTC
Hi,

ALSA firewire stack uses packet-per-buffer mode for both isochronous
receive (IR) and transmit (IT) contexts of 1394 OHCI. To process time
stamp per packet (or per sample in some cases) steadily for media clock
recovery against unexpected transmission skips in the IR context, 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 to finish. 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, in this series of changes,
fw_iso_context_schedule_flush_completions() is exposed as a kernel API
available by unit drivers. It is a counter part of
fw_iso_context_flush_completions(). This series of changes also includes
documentation about these kernel APIs.

Takashi Sakamoto (2):
  firewire: core: expose kernel API to schedule work item to process
    isochronous context
  firewire: core: fulfill documentation of
    fw_iso_context_flush_completions()

 Documentation/driver-api/firewire.rst |  2 ++
 drivers/firewire/core-iso.c           | 11 +++++++++++
 drivers/firewire/core.h               |  5 -----
 drivers/firewire/ohci.c               |  4 ++--
 include/linux/firewire.h              | 17 +++++++++++++++++
 5 files changed, 32 insertions(+), 7 deletions(-)

Comments

Takashi Sakamoto Sept. 9, 2024, 12:22 a.m. UTC | #1
On Sun, Sep 08, 2024 at 01:05:47PM +0900, Takashi Sakamoto wrote:
> Hi,
> 
> ALSA firewire stack uses packet-per-buffer mode for both isochronous
> receive (IR) and transmit (IT) contexts of 1394 OHCI. To process time
> stamp per packet (or per sample in some cases) steadily for media clock
> recovery against unexpected transmission skips in the IR context, 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 to finish. 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, in this series of changes,
> fw_iso_context_schedule_flush_completions() is exposed as a kernel API
> available by unit drivers. It is a counter part of
> fw_iso_context_flush_completions(). This series of changes also includes
> documentation about these kernel APIs.
> 
> Takashi Sakamoto (2):
>   firewire: core: expose kernel API to schedule work item to process
>     isochronous context
>   firewire: core: fulfill documentation of
>     fw_iso_context_flush_completions()
> 
>  Documentation/driver-api/firewire.rst |  2 ++
>  drivers/firewire/core-iso.c           | 11 +++++++++++
>  drivers/firewire/core.h               |  5 -----
>  drivers/firewire/ohci.c               |  4 ++--
>  include/linux/firewire.h              | 17 +++++++++++++++++
>  5 files changed, 32 insertions(+), 7 deletions(-)

Applied to for-next branch.


Regards

Takashi Sakamoto