Skip to content

RFC Add devres support to card resources

Takashi Iwai alsa-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ALSA: core: Add device-managed page allocator helperinclude/sound/memalloc.h sound/core/memalloc.c+74 -180 replies
2/5ALSA: core: Add managed card creationinclude/sound/core.h sound/core/init.c+96 -40 replies
3/5ALSA: intel8x0: Allocate resources with device-managed APIssound/pci/intel8x0.c sound/pci/intel8x0m.c+92 -1940 replies
4/5ALSA: atiixp: Allocate resources with device-managed APIssound/pci/atiixp.c sound/pci/atiixp_modem.c+60 -1480 replies
5/5ALSA: hda: Allocate resources with device-managed APIssound/pci/hda/hda_controller.h sound/pci/hda/hda_intel.c+10 -340 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH RFC 0/5] Add devres support to card resources

Hi,

the devres or device-managed resource allocation is a popular method among many drivers but we didn't have such a mechanism for the core sound card objects. Here is an attempt to implement that.

The first patch gives the devm-version of page allocator helper, and the second patch provides the devm-version of snd_card_new(). The rest patches are examples of the new API usages.

As of now, this patch series is still an RFC. The usefulness of this is still unclear, but I believe this can be used in all legacy ALSA drivers pretty well. For ASoC, this would help very little, supposedly, though.

The latest patches are found in topic/devres branch of my sound.git tree, too.

thanks,

Takashi

===

Takashi Iwai (5):
ALSA: core: Add device-managed page allocator helper
ALSA: core: Add managed card creation
ALSA: intel8x0: Allocate resources with device-managed APIs
ALSA: atiixp: Allocate resources with device-managed APIs
ALSA: hda: Allocate resources with device-managed APIs

 include/sound/core.h           |   5 ++
 include/sound/memalloc.h       |   4 +
 sound/core/init.c              |  95 +++++++++++++++++++++-
 sound/core/memalloc.c          |  88 +++++++++++++++-----
 sound/pci/atiixp.c             | 104 +++++++-----------------
 sound/pci/atiixp_modem.c       | 104 +++++++-----------------
 sound/pci/hda/hda_controller.h |   1 -
 sound/pci/hda/hda_intel.c      |  43 +++-------
 sound/pci/intel8x0.c           | 143 +++++++++++----------------------
 sound/pci/intel8x0m.c          | 143 +++++++++++----------------------
 10 files changed, 332 insertions(+), 398 deletions(-)
Signature · 1 line
2.18.0