Skip to content

ALSA: pcm: API cleanups and extensions

Takashi Iwai alsa-devel oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 27 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8ALSA: pcm: Introduce managed buffer allocation modeinclude/sound/pcm.h sound/core/pcm_memory.c sound/core/pcm_native.c+90 -132 replies
2/8ALSA: docs: Update for managed buffer allocation modeDocumentation/sound/kernel-api/writing-an-alsa-driver.rst+64 -350 replies
3/8ALSA: pcm: Allow NULL ioctl opssound/core/pcm_native.c+15 -40 replies
4/8ALSA: docs: Update document about the default PCM ioctl opsDocumentation/sound/kernel-api/writing-an-alsa-driver.rst+4 -40 replies
5/8ALSA: pcm: Move PCM_RUNTIME_CHECK() macro into local headerinclude/sound/pcm.h sound/core/pcm_local.h+2 -21 reply
6/8ALSA: pcm: Add the support for sync-stop operationinclude/sound/pcm.h sound/core/pcm_native.c+17 -02 replies
7/8ALSA: pcm: Add card sync_irq fieldinclude/sound/core.h sound/core/init.c sound/core/pcm_native.c+4 -022 replies
8/8ALSA: docs: Update about the new PCM sync_stop opsDocumentation/sound/kernel-api/writing-an-alsa-driver.rst+41 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [alsa-devel] [PATCH 0/8] ALSA: pcm: API cleanups and extensions

Hi,

this is a patch series for a few ALSA PCM API changes.

Basically the patch set introduces three changes:

* Add the "managed buffer allocation" mode;
this allows many drivers to drop hw_params and hw_free callbacks that simply call snd_pcm_lib_malloc_pages() and *_free_pages().

* Make PCM ioctl ops optional;
almost all driver can drop the lines to define pcm_ops.ioctl.

* The new sync_stop PCM ops and card->sync_irq;
it's used to synchronize the pending task after stopping the stream, for fixing the use-after-free or such problem.

I planned originally merging these changes to 5.6. But since the API changes would influence on many drivers outside sound git tree, it might be easier to merge only these core changes at first during 5.5 merge window while keeping the rest (the actual driver implementations) intact -- that's why I post now for reviews. The changes are additional, and they won't break things by themselves. The drivers can / need to change the call patterns for following these new APIs.

thanks,

Takashi

===

Takashi Iwai (8):
ALSA: pcm: Introduce managed buffer allocation mode
ALSA: docs: Update for managed buffer allocation mode
ALSA: pcm: Allow NULL ioctl ops
ALSA: docs: Update document about the default PCM ioctl ops
ALSA: pcm: Move PCM_RUNTIME_CHECK() macro into local header
ALSA: pcm: Add the support for sync-stop operation
ALSA: pcm: Add card sync_irq field
ALSA: docs: Update about the new PCM sync_stop ops

 .../sound/kernel-api/writing-an-alsa-driver.rst    | 148 +++++++++++++++------
 include/sound/core.h                               |   1 +
 include/sound/pcm.h                                |  12 +-
 sound/core/init.c                                  |   1 +
 sound/core/pcm_local.h                             |   2 +
 sound/core/pcm_memory.c                            |  83 ++++++++++--
 sound/core/pcm_native.c                            |  48 ++++++-
 7 files changed, 237 insertions(+), 58 deletions(-)
Signature · 6 lines
2.16.4

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel