[PATCH 00/31] sound: Phase out hybrid PCI devres API

Philipp Stanner posted 31 patches 8 months ago
sound/pci/ali5451/ali5451.c         |  2 +-
sound/pci/als300.c                  |  2 +-
sound/pci/als4000.c                 |  2 +-
sound/pci/azt3328.c                 |  2 +-
sound/pci/ca0106/ca0106_main.c      |  2 +-
sound/pci/cmipci.c                  |  2 +-
sound/pci/cs46xx/cs46xx_lib.c       |  2 +-
sound/pci/cs5535audio/cs5535audio.c |  2 +-
sound/pci/echoaudio/echoaudio.c     |  2 +-
sound/pci/emu10k1/emu10k1_main.c    |  2 +-
sound/pci/emu10k1/emu10k1x.c        |  2 +-
sound/pci/ens1370.c                 |  2 +-
sound/pci/es1938.c                  |  2 +-
sound/pci/es1968.c                  |  2 +-
sound/pci/fm801.c                   |  2 +-
sound/pci/ice1712/ice1712.c         |  2 +-
sound/pci/ice1712/ice1724.c         |  2 +-
sound/pci/intel8x0.c                |  2 +-
sound/pci/intel8x0m.c               |  2 +-
sound/pci/lx6464es/lx6464es.c       |  2 +-
sound/pci/maestro3.c                |  2 +-
sound/pci/nm256/nm256.c             |  2 +-
sound/pci/oxygen/oxygen_lib.c       |  2 +-
sound/pci/riptide/riptide.c         |  2 +-
sound/pci/rme32.c                   |  2 +-
sound/pci/rme96.c                   |  2 +-
sound/pci/rme9652/hdsp.c            |  2 +-
sound/pci/rme9652/rme9652.c         |  2 +-
sound/pci/sis7019.c                 |  2 +-
sound/pci/sonicvibes.c              |  2 +-
sound/pci/trident/trident_main.c    |  2 +-
sound/pci/via82xx.c                 |  2 +-
sound/pci/via82xx_modem.c           |  2 +-
sound/pci/vx222/vx222.c             |  2 +-
sound/pci/ymfpci/ymfpci_main.c      |  2 +-
sound/soc/intel/atom/sst/sst_pci.c  | 56 ++++++++++++-----------------
sound/soc/intel/avs/core.c          |  7 ++--
sound/soc/sof/sof-pci-dev.c         | 12 ++-----
38 files changed, 62 insertions(+), 83 deletions(-)
[PATCH 00/31] sound: Phase out hybrid PCI devres API
Posted by Philipp Stanner 8 months ago
Hi,

a year ago we spent quite some work trying to get PCI into better shape.
Some pci_ functions can be sometimes managed with devres, which is
obviously bad. We want to provide an obvious API, where pci_ functions
are never, and pcim_ functions are always managed.

Thus, everyone enabling his device with pcim_enable_device() must be
ported to pcim_ functions. Porting all users will later enable us to
significantly simplify parts of the PCI subsystem. See here [1] for
details.

This patch series does that for sound.

Feel free to squash the commits as you see fit.

P.

[1] https://elixir.bootlin.com/linux/v6.14-rc4/source/drivers/pci/devres.c#L18

Philipp Stanner (31):
  ASoC: sof: Use pure devres PCI
  ASoC: intel/avs: Use pure devres PCI
  AsoC: intel/atom: Use pure devres PCI
  ALSA: sonicvibes: Use pure devres PCI
  ALSA: rme96: Use pure devres PCI
  ALSA: rme32: Use pure devres PCI
  ALSA: ens1370: Use pure devres PCI
  ALSA: cmipci: Use pure devres PCI
  ALSA: via82: Use pure devres PCI
  ALSA: sis7019: Use pure devres PCI
  ALSA: intel8x: Use pure devres PCI
  ALSA: fm801: Use pure devres PCI
  ALSA: es19x8: Use pure devres PCI
  ALSA: azt3328: Use pure devres PCI
  ALSA: als: Use pure devres PCI
  ALSA: oxygen: Use pure devres PCI
  ALSA: lx6464es: Use pure devres PCI
  ALSA: vx222: Use pure devres PCI
  ALSA: trident: Use pure devres PCI
  ALSA: rme9652: Use pure devres PCI
  ALSA: ymfpci: Use pure devres PCI
  ALSA: riptide: Use pure devres PCI
  ALSA: nm256: Use pure devres PCI
  ALSA: ice: Use pure devres PCI
  ALSA: emu10k1: Use pure devres PCI
  ALSA: echoaudio: Use pure devres PCI
  ALSA: cs5535: Use pure devres PCI
  ALSA: cs46xx: Use pure devres PCI
  ALSA: ca0106: Use pure devres PCI
  ALSA: ali5451: Use pure devres PCI
  ALSA: maestro3: Use pure devres PCI

 sound/pci/ali5451/ali5451.c         |  2 +-
 sound/pci/als300.c                  |  2 +-
 sound/pci/als4000.c                 |  2 +-
 sound/pci/azt3328.c                 |  2 +-
 sound/pci/ca0106/ca0106_main.c      |  2 +-
 sound/pci/cmipci.c                  |  2 +-
 sound/pci/cs46xx/cs46xx_lib.c       |  2 +-
 sound/pci/cs5535audio/cs5535audio.c |  2 +-
 sound/pci/echoaudio/echoaudio.c     |  2 +-
 sound/pci/emu10k1/emu10k1_main.c    |  2 +-
 sound/pci/emu10k1/emu10k1x.c        |  2 +-
 sound/pci/ens1370.c                 |  2 +-
 sound/pci/es1938.c                  |  2 +-
 sound/pci/es1968.c                  |  2 +-
 sound/pci/fm801.c                   |  2 +-
 sound/pci/ice1712/ice1712.c         |  2 +-
 sound/pci/ice1712/ice1724.c         |  2 +-
 sound/pci/intel8x0.c                |  2 +-
 sound/pci/intel8x0m.c               |  2 +-
 sound/pci/lx6464es/lx6464es.c       |  2 +-
 sound/pci/maestro3.c                |  2 +-
 sound/pci/nm256/nm256.c             |  2 +-
 sound/pci/oxygen/oxygen_lib.c       |  2 +-
 sound/pci/riptide/riptide.c         |  2 +-
 sound/pci/rme32.c                   |  2 +-
 sound/pci/rme96.c                   |  2 +-
 sound/pci/rme9652/hdsp.c            |  2 +-
 sound/pci/rme9652/rme9652.c         |  2 +-
 sound/pci/sis7019.c                 |  2 +-
 sound/pci/sonicvibes.c              |  2 +-
 sound/pci/trident/trident_main.c    |  2 +-
 sound/pci/via82xx.c                 |  2 +-
 sound/pci/via82xx_modem.c           |  2 +-
 sound/pci/vx222/vx222.c             |  2 +-
 sound/pci/ymfpci/ymfpci_main.c      |  2 +-
 sound/soc/intel/atom/sst/sst_pci.c  | 56 ++++++++++++-----------------
 sound/soc/intel/avs/core.c          |  7 ++--
 sound/soc/sof/sof-pci-dev.c         | 12 ++-----
 38 files changed, 62 insertions(+), 83 deletions(-)

-- 
2.48.1
Re: [PATCH 00/31] sound: Phase out hybrid PCI devres API
Posted by Andy Shevchenko 8 months ago
On Wed, Apr 16, 2025 at 03:12:10PM +0200, Philipp Stanner wrote:
> Hi,
> 
> a year ago we spent quite some work trying to get PCI into better shape.
> Some pci_ functions can be sometimes managed with devres, which is
> obviously bad. We want to provide an obvious API, where pci_ functions
> are never, and pcim_ functions are always managed.
> 
> Thus, everyone enabling his device with pcim_enable_device() must be
> ported to pcim_ functions. Porting all users will later enable us to
> significantly simplify parts of the PCI subsystem. See here [1] for
> details.
> 
> This patch series does that for sound.

AFAIK the ASoC and ALSA maintained by different people and perhaps you would
need to split, but I'm not the guy in charge, so wait for them to tell you
their preferences.

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH 00/31] sound: Phase out hybrid PCI devres API
Posted by Andy Shevchenko 8 months ago
On Wed, Apr 16, 2025 at 06:34:35PM +0300, Andy Shevchenko wrote:
> On Wed, Apr 16, 2025 at 03:12:10PM +0200, Philipp Stanner wrote:

> > a year ago we spent quite some work trying to get PCI into better shape.
> > Some pci_ functions can be sometimes managed with devres, which is
> > obviously bad. We want to provide an obvious API, where pci_ functions
> > are never, and pcim_ functions are always managed.
> > 
> > Thus, everyone enabling his device with pcim_enable_device() must be
> > ported to pcim_ functions. Porting all users will later enable us to
> > significantly simplify parts of the PCI subsystem. See here [1] for
> > details.
> > 
> > This patch series does that for sound.
> 
> AFAIK the ASoC and ALSA maintained by different people and perhaps you would
> need to split, but I'm not the guy in charge, so wait for them to tell you
> their preferences.

Seems split is a good to have as I just looked to all of them and ALSA are
pretty straightforward, while for every patch in ASoC I have a comment.

So, here is a formal tag for all ALSA patches. Feel free to send a v2
with them and the tag.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
With Best Regards,
Andy Shevchenko