All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/79] ALSA: More devres usages
@ 2021-07-15  7:58 Takashi Iwai
  2021-07-15  7:58 ` [PATCH v2 01/79] ALSA: core: Add device-managed page allocator helper Takashi Iwai
                   ` (78 more replies)
  0 siblings, 79 replies; 86+ messages in thread
From: Takashi Iwai @ 2021-07-15  7:58 UTC (permalink / raw)
  To: alsa-devel

Hi,

this is a v2 patch series for adapting more devres usages in ALSA
drivers, a resurrect of my early RFC patch with the fix and applying
to more drivers.  The main purpose is merely the code cleanup over the
tree by replacing the resource allocations with devres helpers as much
as possible.

The only major change is the addition of devres-supported card object
handling snd_devm_card_new() and the page allocation helper
snd_devm_alloc_pages().  Those allow us to get rid of the remove
callback completely in many drivers.  In the end, the series resulted
in a significant amount of code reduction.

Now ISA drivers and a few other drivers have been covered as
well as a couple of missing PCI drivers and fixes.


Takashi

===

v1->v2:
* Rearrange patch order
* Use size_t in snd_devm_card_new()
* Move card->releasing check into devres release
* Most of ISA drivers are included
* A few platform drivers included
* Fixed missing initializations, etc in a few drivers.

Takashi Iwai (79):
  ALSA: core: Add device-managed page allocator helper
  ALSA: core: Add managed card creation
  ALSA: core: Add device-managed request_dma()
  ALSA: doc: Add device-managed resource section
  ALSA: intel8x0: Allocate resources with device-managed APIs
  ALSA: atiixp: Allocate resources with device-managed APIs
  ALSA: hda: Allocate resources with device-managed APIs
  ALSA: ad1889: Allocate resources with device-managed APIs
  ALSA: als300: Allocate resources with device-managed APIs
  ALSA: als4000: Allocate resources with device-managed APIs
  ALSA: azt3328: Allocate resources with device-managed APIs
  ALSA: bt87x: Allocate resources with device-managed APIs
  ALSA: cmipci: Allocate resources with device-managed APIs
  ALSA: cs4281: Allocate resources with device-managed APIs
  ALSA: cs5530: Allocate resources with device-managed APIs
  ALSA: ens137x: Allocate resources with device-managed APIs
  ALSA: es1938: Allocate resources with device-managed APIs
  ALSA: es1968: Allocate resources with device-managed APIs
  ALSA: fm801: Allocate resources with device-managed APIs
  ALSA: maestro3: Allocate resources with device-managed APIs
  ALSA: rme32: Allocate resources with device-managed APIs
  ALSA: rme96: Allocate resources with device-managed APIs
  ALSA: sis7019: Allocate resources with device-managed APIs
  ALSA: sonicvibes: Allocate resources with device-managed APIs
  ALSA: via82xx: Allocate resources with device-managed APIs
  ALSA: ali5451: Allocate resources with device-managed APIs
  ALSA: au88x0: Allocate resources with device-managed APIs
  ALSA: aw2: Allocate resources with device-managed APIs
  ALSA: ca0106: Allocate resources with device-managed APIs
  ALSA: cs46xx: Allocate resources with device-managed APIs
  ALSA: cs5535audio: Allocate resources with device-managed APIs
  ALSA: echoaudio: Allocate resources with device-managed APIs
  ALSA: emu10k1: Allocate resources with device-managed APIs
  ALSA: emu10k1x: Allocate resources with device-managed APIs
  ALSA: ice1712: Allocate resources with device-managed APIs
  ALSA: ice1724: Allocate resources with device-managed APIs
  ALSA: ali5451: Allocate resources with device-managed APIs
  ALSA: ice1724: Allocate resources with device-managed APIs
  ALSA: korg1212: Allocate resources with device-managed APIs
  ALSA: lola: Allocate resources with device-managed APIs
  ALSA: lx6464es: Allocate resources with device-managed APIs
  ALSA: nm256: Allocate resources with device-managed APIs
  ALSA: oxygen: Allocate resources with device-managed APIs
  ALSA: riptide: Allocate resources with device-managed APIs
  ALSA: hdsp: Allocate resources with device-managed APIs
  ALSA: hdspm: Allocate resources with device-managed APIs
  ALSA: rme9652: Allocate resources with device-managed APIs
  ALSA: trident: Allocate resources with device-managed APIs
  ALSA: vx: Manage vx_core object with devres
  ALSA: vx222: Allocate resources with device-managed APIs
  ALSA: ymfpci: Allocate resources with device-managed APIs
  ALSA: ad1816a: Allocate resources with device-managed APIs
  ALSA: wss: Allocate resources with device-managed APIs
  ALSA: sb: Allocate resources with device-managed APIs
  ALSA: ad1848: Allocate resources with device-managed APIs
  ALSA: adlib: Allocate resources with device-managed APIs
  ALSA: als100: Allocate resources with device-managed APIs
  ALSA: azt2320: Allocate resources with device-managed APIs
  ALSA: cmi8328: Allocate resources with device-managed APIs
  ALSA: cmi8330: Allocate resources with device-managed APIs
  ALSA: cs423x: Allocate resources with device-managed APIs
  ALSA: es1688: Allocate resources with device-managed APIs
  ALSA: es18xx: Allocate resources with device-managed APIs
  ALSA: galaxy: Allocate resources with device-managed APIs
  ALSA: gus: Allocate resources with device-managed APIs
  ALSA: msnd: Allocate resources with device-managed APIs
  ALSA: opti9xx: Allocate resources with device-managed APIs
  ALSA: opl3sa2: Allocate resources with device-managed APIs
  ALSA: sc6000: Allocate resources with device-managed APIs
  ALSA: sscape: Allocate resources with device-managed APIs
  ALSA: wavefront: Allocate resources with device-managed APIs
  ALSA: x86: Allocate resources with device-managed APIs
  ALSA: virmidi: Allocate resources with device-managed APIs
  ALSA: mtpav: Allocate resources with device-managed APIs
  ALSA: serial-u16550: Allocate resources with device-managed APIs
  ALSA: mpu401: Allocate resources with device-managed APIs
  ALSA: aloop: Allocate resources with device-managed APIs
  ALSA: dummy: Allocate resources with device-managed APIs
  ALSA: pcsp: Allocate resources with device-managed APIs

 .../kernel-api/writing-an-alsa-driver.rst     |  33 +++
 include/sound/core.h                          |   6 +
 include/sound/emu10k1.h                       |   6 +-
 include/sound/emu8000.h                       |   3 -
 include/sound/es1688.h                        |   1 -
 include/sound/memalloc.h                      |   4 +
 sound/core/init.c                             |  99 +++++++-
 sound/core/isadma.c                           |  38 ++++
 sound/core/memalloc.c                         |  46 ++++
 sound/drivers/aloop.c                         |  26 +--
 sound/drivers/dummy.c                         |  24 +-
 sound/drivers/mpu401/mpu401.c                 |  34 +--
 sound/drivers/mtpav.c                         |  30 +--
 sound/drivers/pcsp/pcsp.c                     |  49 ++--
 sound/drivers/pcsp/pcsp_input.c               |  14 +-
 sound/drivers/pcsp/pcsp_input.h               |   1 -
 sound/drivers/serial-u16550.c                 |  57 +----
 sound/drivers/virmidi.c                       |  21 +-
 sound/drivers/vx/vx_core.c                    |  12 +-
 sound/isa/ad1816a/ad1816a.c                   |  41 +---
 sound/isa/ad1816a/ad1816a_lib.c               |  49 +---
 sound/isa/ad1848/ad1848.c                     |  19 +-
 sound/isa/adlib.c                             |  28 +--
 sound/isa/als100.c                            |  41 +---
 sound/isa/azt2320.c                           |  49 +---
 sound/isa/cmi8328.c                           |  31 +--
 sound/isa/cmi8330.c                           |  27 +--
 sound/isa/cs423x/cs4231.c                     |  21 +-
 sound/isa/cs423x/cs4236.c                     |  52 +----
 sound/isa/cs423x/cs4236_lib.c                 |   2 -
 sound/isa/es1688/es1688.c                     |  33 +--
 sound/isa/es1688/es1688_lib.c                 |  29 +--
 sound/isa/es18xx.c                            | 112 ++--------
 sound/isa/galaxy/galaxy.c                     |  82 +++----
 sound/isa/gus/gus_main.c                      |  44 ++--
 sound/isa/gus/gusclassic.c                    |  28 +--
 sound/isa/gus/gusextreme.c                    |  39 ++--
 sound/isa/gus/gusmax.c                        |  65 ++----
 sound/isa/gus/interwave.c                     |  53 +----
 sound/isa/msnd/msnd_pinnacle.c                | 119 +++-------
 sound/isa/opl3sa2.c                           |  60 +----
 sound/isa/opti9xx/miro.c                      |  76 ++-----
 sound/isa/opti9xx/opti92x-ad1848.c            |  80 ++-----
 sound/isa/sb/emu8000.c                        |  48 +---
 sound/isa/sb/jazz16.c                         |  39 +---
 sound/isa/sb/sb16.c                           |  42 +---
 sound/isa/sb/sb8.c                            |  48 ++--
 sound/isa/sb/sb_common.c                      |  64 ++----
 sound/isa/sc6000.c                            |  73 +++---
 sound/isa/sscape.c                            |  92 ++------
 sound/isa/wavefront/wavefront.c               |  46 +---
 sound/isa/wss/wss_lib.c                       |  67 +-----
 sound/pci/ad1889.c                            | 144 +++---------
 sound/pci/ali5451/ali5451.c                   |  90 ++------
 sound/pci/als300.c                            |  79 ++-----
 sound/pci/als4000.c                           |  59 ++---
 sound/pci/atiixp.c                            |  92 ++------
 sound/pci/atiixp_modem.c                      |  92 ++------
 sound/pci/au88x0/au88x0.c                     | 134 +++--------
 sound/pci/aw2/aw2-alsa.c                      | 102 ++-------
 sound/pci/azt3328.c                           | 124 +++-------
 sound/pci/bt87x.c                             |  98 +++-----
 sound/pci/ca0106/ca0106.h                     |   3 +-
 sound/pci/ca0106/ca0106_main.c                | 114 +++-------
 sound/pci/cmipci.c                            | 104 +++------
 sound/pci/cs4281.c                            | 112 ++--------
 sound/pci/cs46xx/cs46xx.c                     |  51 ++---
 sound/pci/cs46xx/cs46xx.h                     |   4 +-
 sound/pci/cs46xx/cs46xx_lib.c                 | 111 ++-------
 sound/pci/cs5530.c                            |  86 ++-----
 sound/pci/cs5535audio/cs5535audio.c           |  94 ++------
 sound/pci/cs5535audio/cs5535audio_olpc.c      |   7 +-
 sound/pci/echoaudio/echoaudio.c               | 168 ++++----------
 sound/pci/echoaudio/echoaudio.h               |   2 +-
 sound/pci/emu10k1/emu10k1.c                   |  53 ++---
 sound/pci/emu10k1/emu10k1_main.c              | 102 +++------
 sound/pci/emu10k1/emu10k1x.c                  | 128 +++--------
 sound/pci/emu10k1/p16v.c                      |  22 +-
 sound/pci/ens1370.c                           | 115 +++-------
 sound/pci/es1938.c                            |  97 ++------
 sound/pci/es1968.c                            | 112 ++--------
 sound/pci/fm801.c                             | 103 ++-------
 sound/pci/hda/hda_controller.h                |   1 -
 sound/pci/hda/hda_intel.c                     |  26 +--
 sound/pci/ice1712/ice1712.c                   | 133 +++--------
 sound/pci/ice1712/ice1724.c                   | 129 +++--------
 sound/pci/intel8x0.c                          | 140 ++++--------
 sound/pci/intel8x0m.c                         | 139 ++++--------
 sound/pci/korg1212/korg1212.c                 | 211 +++++-------------
 sound/pci/lola/lola.c                         | 127 +++--------
 sound/pci/lola/lola.h                         |   5 +-
 sound/pci/lola/lola_pcm.c                     |  20 +-
 sound/pci/lx6464es/lx6464es.c                 | 112 ++--------
 sound/pci/maestro3.c                          | 106 ++-------
 sound/pci/nm256/nm256.c                       | 130 +++--------
 sound/pci/oxygen/oxygen.c                     |   1 -
 sound/pci/oxygen/oxygen.h                     |   1 -
 sound/pci/oxygen/oxygen_lib.c                 |  66 ++----
 sound/pci/oxygen/se6x.c                       |   1 -
 sound/pci/oxygen/virtuoso.c                   |   1 -
 sound/pci/riptide/riptide.c                   |  89 ++------
 sound/pci/rme32.c                             |  49 +---
 sound/pci/rme96.c                             |  57 ++---
 sound/pci/rme9652/hdsp.c                      |  89 +++-----
 sound/pci/rme9652/hdspm.c                     |  64 +-----
 sound/pci/rme9652/rme9652.c                   |  85 ++-----
 sound/pci/sis7019.c                           |  87 ++------
 sound/pci/sonicvibes.c                        | 117 +++-------
 sound/pci/trident/trident.c                   |  39 +---
 sound/pci/trident/trident.h                   |   7 +-
 sound/pci/trident/trident_main.c              |  90 +++-----
 sound/pci/trident/trident_memory.c            |   8 +-
 sound/pci/via82xx.c                           | 116 +++-------
 sound/pci/via82xx_modem.c                     |  88 ++------
 sound/pci/vx222/vx222.c                       |  69 +-----
 sound/pci/ymfpci/ymfpci.c                     |  66 +++---
 sound/pci/ymfpci/ymfpci.h                     |   8 +-
 sound/pci/ymfpci/ymfpci_main.c                | 149 ++++---------
 sound/pcmcia/vx/vxpocket.c                    |  22 --
 sound/x86/intel_hdmi_audio.c                  |  57 ++---
 120 files changed, 1997 insertions(+), 5513 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 86+ messages in thread

end of thread, other threads:[~2021-07-20 22:29 UTC | newest]

Thread overview: 86+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15  7:58 [PATCH v2 00/79] ALSA: More devres usages Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 01/79] ALSA: core: Add device-managed page allocator helper Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 02/79] ALSA: core: Add managed card creation Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 03/79] ALSA: core: Add device-managed request_dma() Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 04/79] ALSA: doc: Add device-managed resource section Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 05/79] ALSA: intel8x0: Allocate resources with device-managed APIs Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 06/79] ALSA: atiixp: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 07/79] ALSA: hda: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 08/79] ALSA: ad1889: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 09/79] ALSA: als300: " Takashi Iwai
2021-07-20 19:45   ` Nathan Chancellor
2021-07-20 22:18     ` Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 10/79] ALSA: als4000: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 11/79] ALSA: azt3328: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 12/79] ALSA: bt87x: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 13/79] ALSA: cmipci: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 14/79] ALSA: cs4281: " Takashi Iwai
2021-07-20 19:46   ` Nathan Chancellor
2021-07-20 22:17     ` Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 15/79] ALSA: cs5530: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 16/79] ALSA: ens137x: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 17/79] ALSA: es1938: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 18/79] ALSA: es1968: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 19/79] ALSA: fm801: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 20/79] ALSA: maestro3: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 21/79] ALSA: rme32: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 22/79] ALSA: rme96: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 23/79] ALSA: sis7019: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 24/79] ALSA: sonicvibes: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 25/79] ALSA: via82xx: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 26/79] ALSA: ali5451: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 27/79] ALSA: au88x0: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 28/79] ALSA: aw2: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 29/79] ALSA: ca0106: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 30/79] ALSA: cs46xx: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 31/79] ALSA: cs5535audio: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 32/79] ALSA: echoaudio: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 33/79] ALSA: emu10k1: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 34/79] ALSA: emu10k1x: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 35/79] ALSA: ice1712: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 36/79] ALSA: ice1724: " Takashi Iwai
2021-07-15  7:58 ` [PATCH v2 37/79] ALSA: ali5451: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 38/79] ALSA: ice1724: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 39/79] ALSA: korg1212: " Takashi Iwai
2021-07-20 19:41   ` Nathan Chancellor
2021-07-20 22:28     ` Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 40/79] ALSA: lola: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 41/79] ALSA: lx6464es: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 42/79] ALSA: nm256: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 43/79] ALSA: oxygen: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 44/79] ALSA: riptide: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 45/79] ALSA: hdsp: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 46/79] ALSA: hdspm: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 47/79] ALSA: rme9652: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 48/79] ALSA: trident: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 49/79] ALSA: vx: Manage vx_core object with devres Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 50/79] ALSA: vx222: Allocate resources with device-managed APIs Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 51/79] ALSA: ymfpci: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 52/79] ALSA: ad1816a: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 53/79] ALSA: wss: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 54/79] ALSA: sb: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 55/79] ALSA: ad1848: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 56/79] ALSA: adlib: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 57/79] ALSA: als100: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 58/79] ALSA: azt2320: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 59/79] ALSA: cmi8328: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 60/79] ALSA: cmi8330: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 61/79] ALSA: cs423x: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 62/79] ALSA: es1688: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 63/79] ALSA: es18xx: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 64/79] ALSA: galaxy: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 65/79] ALSA: gus: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 66/79] ALSA: msnd: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 67/79] ALSA: opti9xx: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 68/79] ALSA: opl3sa2: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 69/79] ALSA: sc6000: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 70/79] ALSA: sscape: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 71/79] ALSA: wavefront: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 72/79] ALSA: x86: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 73/79] ALSA: virmidi: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 74/79] ALSA: mtpav: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 75/79] ALSA: serial-u16550: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 76/79] ALSA: mpu401: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 77/79] ALSA: aloop: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 78/79] ALSA: dummy: " Takashi Iwai
2021-07-15  7:59 ` [PATCH v2 79/79] ALSA: pcsp: " Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.