mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 09:44:18 +08:00
a9c4284bf5
In current implementation, packet processing is done in both of software
IRQ contexts of IR/IT contexts and process contexts.
This is usual interrupt handling of IR/IT context for 1394 OHCI.
(in hardware IRQ context)
irq_handler() (drivers/firewire/ohci.c)
->tasklet_schedule()
(in software IRQ context)
handle_it_packet() or handle_ir_packet_per_buffer() (drivers/firewire/ohci.c)
->flush_iso_completions()
->struct fw_iso_context.callback.sc()
= out_stream_callback() or in_stream_callback()
However, we have another chance for packet processing. It's done in PCM
frame handling via ALSA PCM interfaces.
(in process context)
ioctl(i.e. SNDRV_PCM_IOCTL_HWSYNC)
->snd_pcm_hwsync() (sound/core/pcm_native.c)
->snd_pcm_update_hw_ptr() (sound/core/pcm_lib.c)
->snd_pcm_update_hw_ptr0()
->struct snd_pcm_ops.pointer()
= amdtp_stream_pcm_pointer()
->fw_iso_context_flush_completions() (drivers/firewire/core-iso.c)
->struct fw_card_driver.flush_iso_completions()
= ohci_flush_iso_completions() (drivers/firewire/ohci.c)
->flush_iso_completions()
->struct fw_iso_context.callback.sc()
= out_stream_callback() or in_stream_callback()
This design is for a better granularity of PCM pointer. When ioctl(2) is
executed with some commands for ALSA PCM interface, queued packets are
handled at first. Then, the latest number of handled PCM frames is
reported. The number can represent PCM frames transferred in most near
isochronous cycle.
Current tracepoints include no information to distinguish running contexts.
When tracing the interval of software IRQ context, this is not good.
This commit adds more information for current context. Additionally, the
index of packet processed in one context is added in a case that packet
processing is executed in continuous context of the same kind,
As a result, the output includes 11 fields with additional two fields
to commit
|
||
---|---|---|
.. | ||
bebob | ||
dice | ||
digi00x | ||
fireworks | ||
oxfw | ||
tascam | ||
amdtp-am824.c | ||
amdtp-am824.h | ||
amdtp-stream-trace.h | ||
amdtp-stream.c | ||
amdtp-stream.h | ||
cmp.c | ||
cmp.h | ||
fcp.c | ||
fcp.h | ||
isight.c | ||
iso-resources.c | ||
iso-resources.h | ||
Kconfig | ||
lib.c | ||
lib.h | ||
Makefile | ||
packets-buffer.c | ||
packets-buffer.h |