mbox series

[RESEND,00/31] AMD SOF based generic SoundWire machine driver

Message ID 20240801091446.10457-1-Vijendar.Mukunda@amd.com (mailing list archive)
Headers show
Series AMD SOF based generic SoundWire machine driver | expand

Message

Vijendar Mukunda Aug. 1, 2024, 9:14 a.m. UTC
This patch series majorly consists of below changes.
- Rename structures, macros and codec helper names used in Intel
SoundWire generic driver to make it generic.
- Move Intel SoundWire driver common structures, macros and codec
helper functions to common placeholder so that it can be used by
other platform machine driver.
- Refactor few SoundWire common codec helper functions.
- AMD SOF based generic SoundWire machine driver for ACP 6.3 variant.

This work started a couple of months ago to avoid duplication of code
that wasn't really Intel-specific in the "sof_sdw" machine driver.
The code went through multiple iterations, was tested for multiple weeks
and a couple of build issues reported by the Intel kbuild bots were
corrected.

This is the initial version of SoundWire machine driver for AMD
platforms. Additional code refactoring will be done in the next step on
the AMD side.

Link: https://github.com/thesofproject/linux/pull/5068
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

Vijendar Mukunda (31):
  ASoC: intel: rename codec_info and dai_info structures names
  ASoC: intel: rename soundwire common header macros
  ASoC: intel: rename soundwire machine driver soc ops
  ASoC: intel: rename soundwire codec helper functions
  ASoC: intel: rename maxim codec macros
  ASoC: intel: rename ignore_pch_dmic variable name
  ASoC: intel/sdw-utils: move soundwire machine driver soc ops
  ASoC: intel: move soundwire machine driver common structures
  ASoC: intel/sdw_utils: move soundwire machine driver helper functions
  ASoC: intel/sdw_utils: move dmic codec helper function
  ASoC: intel/sdw_utils: move rtk dmic helper functions
  ASoC: intel/sdw_utils: move rt712 sdca helper functions
  ASoC: intel/sdw_utils: move rt722 sdca helper functions
  ASoC: intel: split soundwire machine driver private data
  ASoC: intel/sdw_utils: move rt5682 codec helper function
  ASoC: intel/sdw_utils: move rtk jack common helper functions
  ASoC: intel/sdw_utils: move rt700 and rt711 codec helper functions
  ASoC: intel/sdw_utils: move rtk amp codec helper functions
  ASoC: intel/sdw_utils: move cirrus soundwire codec helper functions
  ASoC: intel/sdw_utils: move maxim codec helper functions
  ASoC: intel/sdw_utils: move dai id common macros
  ASoC: intel/sdw_utils: move soundwire dai type macros
  ASoC: intel/sdw_utils: move soundwire codec_info_list structure
  ASoC: intel/sdw_utils: move machine driver dai link helper functions
  ASoC: sdw_utils: refactor sof_sdw_card_late_probe function
  ASoC: intel/sdw_utils: refactor init_dai_link() and
    init_simple_dai_link()
  ASoC: soc-acpi: add pci revision id field in mach params structure
  ASoC: amd: acp: add soundwire machines for acp6.3 based platform
  ASoC: SOF: amd: add alternate machines for acp6.3 based platform
  ASoC: SOF: amd: update mach params subsystem_rev variable
  ASoC: amd/sdw_utils: add sof based soundwire generic machine driver

 include/sound/soc-acpi.h                      |    2 +
 include/sound/soc_sdw_utils.h                 |  216 ++++
 sound/soc/Kconfig                             |    2 +
 sound/soc/Makefile                            |    1 +
 sound/soc/amd/acp/Kconfig                     |   22 +
 sound/soc/amd/acp/Makefile                    |    4 +
 sound/soc/amd/acp/acp-sdw-sof-mach.c          |  742 +++++++++++
 sound/soc/amd/acp/amd-acp63-acpi-match.c      |   90 ++
 sound/soc/amd/acp/soc_amd_sdw_common.h        |   44 +
 sound/soc/amd/mach-config.h                   |    1 +
 sound/soc/intel/boards/Kconfig                |    1 +
 sound/soc/intel/boards/Makefile               |    9 -
 sound/soc/intel/boards/sof_sdw.c              | 1142 ++---------------
 sound/soc/intel/boards/sof_sdw_common.h       |  166 +--
 sound/soc/intel/boards/sof_sdw_hdmi.c         |   14 +-
 sound/soc/sdw_utils/Kconfig                   |    6 +
 sound/soc/sdw_utils/Makefile                  |   11 +
 .../soc_sdw_bridge_cs35l56.c}                 |   56 +-
 .../soc_sdw_cs42l42.c}                        |   13 +-
 .../soc_sdw_cs42l43.c}                        |   38 +-
 .../soc_sdw_cs_amp.c}                         |   18 +-
 .../soc_sdw_dmic.c}                           |   10 +-
 .../soc_sdw_maxim.c}                          |   56 +-
 .../soc_sdw_rt5682.c}                         |   12 +-
 .../soc_sdw_rt700.c}                          |   12 +-
 .../soc_sdw_rt711.c}                          |   38 +-
 .../soc_sdw_rt712_sdca.c}                     |   10 +-
 .../soc_sdw_rt722_sdca.c}                     |   10 +-
 .../soc_sdw_rt_amp.c}                         |   32 +-
 .../soc_sdw_rt_amp_coeff_tables.h}            |    6 +-
 .../soc_sdw_rt_dmic.c}                        |   11 +-
 .../soc_sdw_rt_sdca_jack_common.c}            |   40 +-
 sound/soc/sdw_utils/soc_sdw_utils.c           |  990 ++++++++++++++
 sound/soc/sof/amd/Kconfig                     |    1 +
 sound/soc/sof/amd/acp-common.c                |    3 +
 sound/soc/sof/amd/acp.c                       |    1 +
 sound/soc/sof/amd/acp.h                       |    1 +
 sound/soc/sof/amd/pci-acp63.c                 |    1 +
 38 files changed, 2475 insertions(+), 1357 deletions(-)
 create mode 100644 include/sound/soc_sdw_utils.h
 create mode 100644 sound/soc/amd/acp/acp-sdw-sof-mach.c
 create mode 100644 sound/soc/amd/acp/amd-acp63-acpi-match.c
 create mode 100644 sound/soc/amd/acp/soc_amd_sdw_common.h
 create mode 100644 sound/soc/sdw_utils/Kconfig
 create mode 100644 sound/soc/sdw_utils/Makefile
 rename sound/soc/{intel/boards/bridge_cs35l56.c => sdw_utils/soc_sdw_bridge_cs35l56.c} (63%)
 rename sound/soc/{intel/boards/sof_sdw_cs42l42.c => sdw_utils/soc_sdw_cs42l42.c} (82%)
 rename sound/soc/{intel/boards/sof_sdw_cs42l43.c => sdw_utils/soc_sdw_cs42l43.c} (73%)
 rename sound/soc/{intel/boards/sof_sdw_cs_amp.c => sdw_utils/soc_sdw_cs_amp.c} (66%)
 rename sound/soc/{intel/boards/sof_sdw_dmic.c => sdw_utils/soc_sdw_dmic.c} (71%)
 rename sound/soc/{intel/boards/sof_sdw_maxim.c => sdw_utils/soc_sdw_maxim.c} (63%)
 rename sound/soc/{intel/boards/sof_sdw_rt5682.c => sdw_utils/soc_sdw_rt5682.c} (82%)
 rename sound/soc/{intel/boards/sof_sdw_rt700.c => sdw_utils/soc_sdw_rt700.c} (81%)
 rename sound/soc/{intel/boards/sof_sdw_rt711.c => sdw_utils/soc_sdw_rt711.c} (70%)
 rename sound/soc/{intel/boards/sof_sdw_rt712_sdca.c => sdw_utils/soc_sdw_rt712_sdca.c} (74%)
 rename sound/soc/{intel/boards/sof_sdw_rt722_sdca.c => sdw_utils/soc_sdw_rt722_sdca.c} (68%)
 rename sound/soc/{intel/boards/sof_sdw_rt_amp.c => sdw_utils/soc_sdw_rt_amp.c} (87%)
 rename sound/soc/{intel/boards/sof_sdw_amp_coeff_tables.h => sdw_utils/soc_sdw_rt_amp_coeff_tables.h} (97%)
 rename sound/soc/{intel/boards/sof_sdw_rt_dmic.c => sdw_utils/soc_sdw_rt_dmic.c} (70%)
 rename sound/soc/{intel/boards/sof_sdw_rt_sdca_jack_common.c => sdw_utils/soc_sdw_rt_sdca_jack_common.c} (78%)
 create mode 100644 sound/soc/sdw_utils/soc_sdw_utils.c

Comments

Vijendar Mukunda Aug. 1, 2024, 11:22 a.m. UTC | #1
On 01/08/24 16:27, Charles Keepax wrote:
> On Thu, Aug 01, 2024 at 02:44:15PM +0530, Vijendar Mukunda wrote:
>> This patch series majorly consists of below changes.
>> - Rename structures, macros and codec helper names used in Intel
>> SoundWire generic driver to make it generic.
>> - Move Intel SoundWire driver common structures, macros and codec
>> helper functions to common placeholder so that it can be used by
>> other platform machine driver.
>> - Refactor few SoundWire common codec helper functions.
>> - AMD SOF based generic SoundWire machine driver for ACP 6.3 variant.
>>
>> This work started a couple of months ago to avoid duplication of code
>> that wasn't really Intel-specific in the "sof_sdw" machine driver.
>> The code went through multiple iterations, was tested for multiple weeks
>> and a couple of build issues reported by the Intel kbuild bots were
>> corrected.
>>
>> This is the initial version of SoundWire machine driver for AMD
>> platforms. Additional code refactoring will be done in the next step on
>> the AMD side.
>>
>> Link: https://github.com/thesofproject/linux/pull/5068
>> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
>> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>>
> Would be good to also include the linux-sound mailing list on the
> cover letter, if not the individuals given they are basically the
> same on each patch.
>
> Also assuming your mail timed out again, you should be able to do
> a separate git send-email for the later patches using the
> --in-reply-to option to give the Message-ID of the cover letter
> and they should append to the same chain.
>
> Thanks,
> Charles

Thanks, Charles, for your suggestion. I have shared the rest of the
Patch series.

-
Vijendar
Mark Brown Aug. 2, 2024, 5:35 p.m. UTC | #2
On Thu, 01 Aug 2024 14:44:15 +0530, Vijendar Mukunda wrote:
> This patch series majorly consists of below changes.
> - Rename structures, macros and codec helper names used in Intel
> SoundWire generic driver to make it generic.
> - Move Intel SoundWire driver common structures, macros and codec
> helper functions to common placeholder so that it can be used by
> other platform machine driver.
> - Refactor few SoundWire common codec helper functions.
> - AMD SOF based generic SoundWire machine driver for ACP 6.3 variant.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[01/31] ASoC: intel: rename codec_info and dai_info structures names
        commit: 6588fcc8833d8338b994edd97a4446bae95ff12c
[02/31] ASoC: intel: rename soundwire common header macros
        commit: 408a454ee8886912cc8a64fcd012e0a1eb30fd0b
[03/31] ASoC: intel: rename soundwire machine driver soc ops
        commit: 96990cfeff61d0a1053dded6d1a4dceafb2f1562
[04/31] ASoC: intel: rename soundwire codec helper functions
        commit: bd5838c8999838059a25a963730bba1face1e53b
[05/31] ASoC: intel: rename maxim codec macros
        commit: a2b5ec0ca5fcd6f609733b37c52e23ddb7328ffd
[06/31] ASoC: intel: rename ignore_pch_dmic variable name
        commit: b1f7cbf0d5746ba270bc090f6f85a4b176410854
[07/31] ASoC: intel/sdw-utils: move soundwire machine driver soc ops
        commit: d39388e6555cb805beb985a7ece1c771c611037c
[08/31] ASoC: intel: move soundwire machine driver common structures
        commit: 73619137c633a89a90f8c8c5fa59171aaff6e913
[09/31] ASoC: intel/sdw_utils: move soundwire machine driver helper functions
        commit: 941d6933eb31b13d09a7293bc92d9d494513a372
[10/31] ASoC: intel/sdw_utils: move dmic codec helper function
        commit: 4776d0c9088634677749e42ae8b36b4da46226db
[11/31] ASoC: intel/sdw_utils: move rtk dmic helper functions
        commit: a9831fd1c0e6353366bbde6e1dd7b15a2dd6d825
[12/31] ASoC: intel/sdw_utils: move rt712 sdca helper functions
        commit: 09c60bc9da91f188e2aedb0bac94d3e129fa20f9
[13/31] ASoC: intel/sdw_utils: move rt722 sdca helper functions
        commit: 89b3456e9afa4c61879f6d744f6d2c6fadc2b2fc
[14/31] ASoC: intel: split soundwire machine driver private data
        commit: 4f54856b4ea460e9048c11e3f698c38fb072529d
[15/31] ASoC: intel/sdw_utils: move rt5682 codec helper function
        commit: 139e17740200d8e92677942bfee6c8cfe4da3009
[16/31] ASoC: intel/sdw_utils: move rtk jack common helper functions
        commit: da5b1831673208e235cadc9107207adb092c2eb9
[17/31] ASoC: intel/sdw_utils: move rt700 and rt711 codec helper functions
        commit: 8e84fd22dc425fd0b005a20156eeb67f019ae39f
[18/31] ASoC: intel/sdw_utils: move rtk amp codec helper functions
        commit: ccc96ae2814a7faad591af68bd0115e4d2b256b4
[19/31] ASoC: intel/sdw_utils: move cirrus soundwire codec helper functions
        commit: 5fa46627d5118bf58b80df45489f49e1e316473a
[20/31] ASoC: intel/sdw_utils: move maxim codec helper functions
        commit: 051b7cb3fde16fd8788078d697d84069b0e50e03
[21/31] ASoC: intel/sdw_utils: move dai id common macros
        commit: 8f87e292a34813e4551e1513c62b7222900481cb
[22/31] ASoC: intel/sdw_utils: move soundwire dai type macros
        commit: 6e7af1fdf7da7f0b79475f573d3c1f49a826bd68
[23/31] ASoC: intel/sdw_utils: move soundwire codec_info_list structure
        commit: e377c94773171e8a97e716e57ec67d49b02ded0b
[24/31] ASoC: intel/sdw_utils: move machine driver dai link helper functions
        commit: 778dcb08832a5e526e447971f7ca72cb6dd2307b
[25/31] ASoC: sdw_utils: refactor sof_sdw_card_late_probe function
        commit: 5bd414c7b80e39ef11bd86db76e726962c1bfc92
[26/31] ASoC: intel/sdw_utils: refactor init_dai_link() and init_simple_dai_link()
        commit: 59f8b622d52e30c5be7f14212c26ca37e810ece9
[27/31] ASoC: soc-acpi: add pci revision id field in mach params structure
        commit: 0b8f009ae92fa94ab3c0ca881fce02c336056a73
[28/31] ASoC: amd: acp: add soundwire machines for acp6.3 based platform
        commit: 57677ccde7522170c50eb44258d54c6584356f47
[29/31] ASoC: SOF: amd: add alternate machines for acp6.3 based platform
        commit: 15049b6a6c19d799095e5dbe9a4772862b11ee23
[30/31] ASoC: SOF: amd: update mach params subsystem_rev variable
        commit: b7cdb4a89cc864ead6470a57947815c49870b09a
[31/31] ASoC: amd/sdw_utils: add sof based soundwire generic machine driver
        commit: cb8ea62e6402067ba092d4c1d66a9440513a572b

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark