Skip to content

AMD SOF based generic SoundWire machine driver - #5068

Merged
plbossart merged 31 commits into
thesofproject:topic/sof-devfrom
vijendarmukunda:topic/sof-dev
Jul 5, 2024
Merged

AMD SOF based generic SoundWire machine driver #5068
plbossart merged 31 commits into
thesofproject:topic/sof-devfrom
vijendarmukunda:topic/sof-dev

Conversation

@vijendarmukunda

Copy link
Copy Markdown

This patch series is rebase version of PR#5034

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me @vijendarmukunda

I only have minor comments, time for others to comment as well. @bardliao @charleskeepax on your mark, set, go!

Comment thread sound/soc/sdw_utils/soc_sdw_rt712_sdca.c Outdated
Comment thread sound/soc/sof/amd/Kconfig
Comment thread sound/soc/amd/acp/soc_amd_sdw_common.h Outdated

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last patch needs a bit more work IMHO, still too much duplication of complicated code that we don't want to fork.

The rest looks ok, thanks!

Comment thread sound/soc/amd/acp/acp-sdw-sof-mach.c
Comment thread sound/soc/amd/acp/soc_amd_sdw_common.h Outdated
Comment thread sound/soc/amd/acp/acp-sdw-sof-mach.c Outdated
Comment thread sound/soc/amd/acp/acp-sdw-sof-mach.c
Comment thread sound/soc/amd/acp/acp-sdw-sof-mach.c
Comment thread sound/soc/amd/acp/acp-sdw-sof-mach.c
Comment thread sound/soc/amd/acp/acp-sdw-sof-mach.c Outdated
Comment thread sound/soc/amd/acp/acp-sdw-sof-mach.c Outdated
Comment thread sound/soc/amd/acp/acp-sdw-sof-mach.c
Comment thread sound/soc/amd/acp/acp-sdw-sof-mach.c
@plbossart

Copy link
Copy Markdown
Member

SOFCI TEST

Comment thread sound/soc/intel/boards/bridge_cs35l56.c Outdated
@vijendarmukunda

vijendarmukunda commented Jun 25, 2024

Copy link
Copy Markdown
Author

The last patch needs a bit more work IMHO, still too much duplication of complicated code that we don't want to fork.

The rest looks ok, thanks!

Agreed. We are going to refactor the code . We need to add support for newer ACP variants. We are going to add support for legacy (NO DSP) machine driver support where we are going to refactor existing code.
We would like to implement as an incremental patch series.

To make it generic, rename structure 'sof_sdw_codec_info' as
'asoc_sdw_codec_info' and 'sof_sdw_dai_info' as 'asoc_sdw_dai_info'.
These structures will be moved to common header file so that it can
be used by other platform machine driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Rename sof quirk macros, dai type and dai link macros with "SOC_SDW" tag.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Rename Soundwire generic machine driver soc ops with tag "asoc".

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Rename SoundWire codec helper functions with "asoc_sdw" tag.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Rename maxim codec part id macros.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Rename 'ignore_pch_dmic' variable name as 'ignore_internal_dmic'.
This variable will be moved to common header file and will be used by other
platform machine driver code.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Move Intel SoundWire generic machine driver soc ops to common place
so that it can be used by other platform machine driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Move intel generic SoundWire machine driver common structures to
soc_sdw_utils.h file. These structures will be used in other platform
SoundWire machine driver code.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Move below Intel SoundWire machine driver helper functions to
soc_sdw_utils.c file so that it can be used by other platform machine
driver.
- asoc_sdw_is_unique_device()
- asoc_sdw_get_codec_name()

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Move generic dmic codec helper function implementation to
sdw_utils folder so that this function can be used by other platform
machine drivers.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Move rtk SoundWire dmic helper functions implementation to sdw_utils
folder to make it generic.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Move RT712 SDCA codec helper file to sdw_utils folder so that these
helper functions can be used by other platform machine drivers.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Move RT722 SDCA codec helper file to sdw_utils folder to make it generic.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Split intel generic SoundWire machine driver private data into two
structures. One structure is generic one which can be used by other
platform machine driver and the other one is intel specific one.
Move generic machine driver private data to soc_sdw_utils.h.
Define a void pointer in generic machine driver private data structure
and assign the vendor specific structure in mc_probe() call.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Move rt5682 sdw codec helper function to common place holder to make it
generic.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants