[alsa-devel] [PATCH 1/2] ALSA: firewire: process packets in 'struct snd_pcm_ops.ack' callback

Takashi Iwai tiwai at suse.de
Wed Jun 7 07:59:20 CEST 2017


On Wed, 07 Jun 2017 02:38:05 +0200,
Takashi Sakamoto wrote:
> 
> In recent commit for ALSA PCM core, some arrangement is done for
> 'struct snd_pcm_ops.ack' callback. This is called when appl_ptr is
> explicitly moved in intermediate buffer for PCM frames, except for
> some cases described later.
> 
> For drivers in ALSA firewire stack, usage of this callback has a merit to
> reduce latency between time of PCM frame queueing and handling actual
> packets in recent isochronous cycle, because no need to wait for software
> IRQ context from isochronous context of OHCI 1394.
> 
> If this works well in a case that mapped page frame is used for the
> intermediate buffer, user process should execute some commands for ioctl(2)
> to tell the number of handled PCM frames in the intermediate buffer just
> after handling them.

This is one thing that was raised in the discussion with Intel people,
and my suggestion was to add a new flag to suppress the status/control
mmap like pcm_file->no_compat_mmap.  Then alsa-lib falls back to the
sync_ptr ioctl, and the driver can catch each appl_ptr update.

In anyway, I applied the patch now as is.  Thanks.


Takashi


More information about the Alsa-devel mailing list