• Takashi Iwai's avatar
    ALSA: pcm: Direct in-kernel read/write support · 68541213
    Takashi Iwai authored
    Now all materials are ready, let's allow the direct in-kernel
    read/write, i.e. a kernel-space buffer is passed for read or write,
    instead of the normal user-space buffer.  This feature is used by OSS
    layer and UAC1 driver, for example.
    
    The __snd_pcm_lib_xfer() takes in_kernel argument that indicates the
    in-kernel buffer copy.  When this flag is set, another transfer code
    is used.  It's either via copy_kernel PCM ops or the normal memcpy(),
    depending on the driver setup.
    
    As external API, snd_pcm_kernel_read(), *_write() and other variants
    are provided.
    
    That's all.  This support is really simple because of the code
    refactoring until now.
    Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    68541213
pcm_lib.c 68 KB