mbox series

[00/10] ALSA/ASoC: hda: cleanup sound/hda/ext code

Message ID 20221019162115.185917-1-pierre-louis.bossart@linux.intel.com (mailing list archive)
Headers show
Series ALSA/ASoC: hda: cleanup sound/hda/ext code | expand

Message

Pierre-Louis Bossart Oct. 19, 2022, 4:21 p.m. UTC
The code in sound/hda/ext can be cleaned-up. This patchset suggests a
more consistent use of prefixes and variable names. It also removes
useless code, uses helpers when possible, and clarifies an incorrect
assumption that SPIB/DRMS capabilities are tied to Intel multi-link
and DSP extensions (they are not).

This is a rather invasive set of changes touching sound/hda,
sound/soc/intel/skylake, sound/soc/intel/avs and sound/soc/sof/intel,
but there should be no change in terms of functionality.

I would recommend merging these changes through the ASoC tree.

Pierre-Louis Bossart (10):
  ALSA: hda: ext: hdac_ext_controller: use helpers in loop
  ALSA: hda: ext: hda_ext_controller: use hlink variable/parameter
  ASoC: SOF: Intel: hda-dai: use hlink variable/parameter
  ALSA/ASoC: hda: clarify bus_get_link() and bus_link_get() helpers
  ALSA/ASoC: hda: ext: add 'ext' prefix to snd_hdac_link_free_all
  ALSA/ASoC: hda: ext: remove 'link' prefix for stream-related
    operations
  ALSA/ASoC: hda: ext: add 'bus' prefix for multi-link stream setting
  ALSA: hda: ext: reduce ambiguity between 'multi-link' and 'link' DMA
  ALSA: hda: hdac_ext_controller: remove useless loop
  ALSA/ASoC: hda: move SPIB/DRMS functionality from ext layer

 include/sound/hdaudio.h                |  26 ++++
 include/sound/hdaudio_ext.h            |  66 ++------
 sound/hda/ext/hdac_ext_controller.c    | 116 ++++++++------
 sound/hda/ext/hdac_ext_stream.c        | 203 +++----------------------
 sound/hda/hdac_stream.c                | 136 +++++++++++++++++
 sound/soc/codecs/hda.c                 |   4 +-
 sound/soc/codecs/hdac_hda.c            |   6 +-
 sound/soc/codecs/hdac_hdmi.c           |   8 +-
 sound/soc/intel/avs/core.c             |   2 +-
 sound/soc/intel/avs/loader.c           |  16 +-
 sound/soc/intel/avs/pcm.c              |  16 +-
 sound/soc/intel/skylake/skl-messages.c |   6 +-
 sound/soc/intel/skylake/skl-pcm.c      |  35 +++--
 sound/soc/intel/skylake/skl.c          |   2 +-
 sound/soc/sof/intel/hda-dai.c          |  42 ++---
 sound/soc/sof/intel/hda-pcm.c          |   3 +-
 sound/soc/sof/intel/hda-stream.c       |  16 +-
 sound/soc/sof/intel/hda.c              |   2 +-
 18 files changed, 343 insertions(+), 362 deletions(-)

Comments

Takashi Iwai Oct. 20, 2022, 1:38 p.m. UTC | #1
On Wed, 19 Oct 2022 18:21:05 +0200,
Pierre-Louis Bossart wrote:
> 
> The code in sound/hda/ext can be cleaned-up. This patchset suggests a
> more consistent use of prefixes and variable names. It also removes
> useless code, uses helpers when possible, and clarifies an incorrect
> assumption that SPIB/DRMS capabilities are tied to Intel multi-link
> and DSP extensions (they are not).
> 
> This is a rather invasive set of changes touching sound/hda,
> sound/soc/intel/skylake, sound/soc/intel/avs and sound/soc/sof/intel,
> but there should be no change in terms of functionality.
> 
> I would recommend merging these changes through the ASoC tree.
> 
> Pierre-Louis Bossart (10):
>   ALSA: hda: ext: hdac_ext_controller: use helpers in loop
>   ALSA: hda: ext: hda_ext_controller: use hlink variable/parameter
>   ASoC: SOF: Intel: hda-dai: use hlink variable/parameter
>   ALSA/ASoC: hda: clarify bus_get_link() and bus_link_get() helpers
>   ALSA/ASoC: hda: ext: add 'ext' prefix to snd_hdac_link_free_all
>   ALSA/ASoC: hda: ext: remove 'link' prefix for stream-related
>     operations
>   ALSA/ASoC: hda: ext: add 'bus' prefix for multi-link stream setting
>   ALSA: hda: ext: reduce ambiguity between 'multi-link' and 'link' DMA
>   ALSA: hda: hdac_ext_controller: remove useless loop
>   ALSA/ASoC: hda: move SPIB/DRMS functionality from ext layer

Applied now to for-next branch.

Mark, if you need those changes in your tree, feel free to pull from
topic/hda-ext-cleanup branch of my tree.  I can add the tag if
needed, too.


thanks,

Takashi
Cezary Rojewski Oct. 20, 2022, 2:05 p.m. UTC | #2
On 2022-10-20 3:38 PM, Takashi Iwai wrote:

...

> Applied now to for-next branch.
> 
> Mark, if you need those changes in your tree, feel free to pull from
> topic/hda-ext-cleanup branch of my tree.  I can add the tag if
> needed, too.


I'd very much appreciate if you merged this series into your tree, Mark. 
As Pierre mentioned, recent PCM suspend/resume() series for the 
avs-driver needs to be rebased onto this one to eliminate any conflicts.


Regards,
Czarek
Mark Brown Oct. 21, 2022, 11:28 a.m. UTC | #3
On Thu, Oct 20, 2022 at 04:05:32PM +0200, Cezary Rojewski wrote:

> I'd very much appreciate if you merged this series into your tree, Mark. As
> Pierre mentioned, recent PCM suspend/resume() series for the avs-driver
> needs to be rebased onto this one to eliminate any conflicts.

Pulled now.