History log of /linux-master/sound/soc/amd/ps/acp63.h
Revision Date Author Comments
# 253ce07d 22-Feb-2024 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: modify ACP register end address macro

Modify ACP63_REG_END macro to access all ACP registers.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240222102656.631144-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# bbf3e614 14-Feb-2024 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: add machine select and register code

Add machine select logic for SoundWire interface and create a machine
device node based on ACP PDM/SoundWire configuration.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240214104014.1144668-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3c697ced 14-Feb-2024 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: remove acp_reset flag

The earlier acp_reset flag is set to true in two instances as mentioned
below.
1. When active SoundWire manager instances power mode is set to
Power off mode when SoundWire configuration is selected.
2. For other acp configurations

As code being refactored and common function being used for scanning
SoundWire controller, acp_reset flag update logic is dropped.

Instead of it, check the SoundWire manager instance enable state, based on
it update sdw_en_stat flag which will be used to apply ACP init/de-init
sequence during suspend/resume callbacks based on flag set value when
SoundWire configuration is selected.
For other acp configurations, acp init/de-init will be called by default.

Refactor existing pm ops logic for SoundWire configuration and use
sdw_en_stat flag for invoking acp init/de-init sequence.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240214104014.1144668-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# eaf82503 14-Feb-2024 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: refactor acp child platform device creation code

Refactor ACP child platform device creation code based on acp config.
Use common SoundWire manager functions for device probe and exit
sequences.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240214104014.1144668-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0386d765 14-Feb-2024 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: refactor acp device configuration read logic

Refactor acp device configuration read logic and use common function
to scan SoundWire devices.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240214104014.1144668-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 322a163e 26-Jun-2023 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: add fix for dma irq mask for rx streams for SDW0 instance

Correct the DMA irq mask macro to program DMA irq bits correctly for
SDW0 instance rx streams.

Fixes: 298d4f7b1765 ("ASoC: amd: ps: add support for SoundWire DMA interrupts")

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230626105356.2580125-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 7beda6a2 26-Jun-2023 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: add comments for DMA irq bits mapping

Add comments for DMA stream id and IRQ bit mapping in
ACP_EXTERNAL_CNTL & ACP_EXTERNAL_CNTL1 registers for
SDW0 and SDW1 manager instances.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230626105356.2580125-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 298d4f7b 12-Jun-2023 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: add support for SoundWire DMA interrupts

Move to request_threaded_irq and use thread for handling
SoundWire DMA interrupts.
Whenever audio data equal to the SoundWire FIFO watermark level
are produced/consumed, interrupt is generated.
Acknowledge the interrupt and wake up the irq thread.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# f7229173 12-Jun-2023 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: add SoundWire dma driver dma ops

Add SoundWire DMA driver dma ops for Pink Sardine platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 665dd181 12-Jun-2023 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: add SoundWire dma driver

SoundWire DMA platform driver binds to the platform device created by
ACP PCI device. SoundWire DMA driver registers ALSA DMA component
with ASoC framework.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# e1cb3506 12-Jun-2023 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: handle SoundWire interrupts in acp pci driver

Handle SoundWire manager related interrupts in ACP PCI driver
interrupt handler and schedule SoundWire manager work queue for
further processing.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# d1351c30 12-Jun-2023 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: create platform devices based on acp config

Based on ACP pin configuration and scanning child devices
under ACP pci device ACPI scope, platform device configuration
(pdev_config) and platform device count(pdev_count) will be
calculated.

Using pdev_config and pdev_count values, ACP PCI driver will
create platform devices for Pink Sardine platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# ea79b0a6 26-Apr-2023 Syed Saba Kareem <Syed.SabaKareem@amd.com>

ASoC: amd: ps: refactor acp power on and reset functions.

Instead of a busy waiting while loop using udelay in
acp63_power_on and acp63_reset functions use readl_poll_timeout
function to check the condition.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com
Link: https://lore.kernel.org/r/20230426122219.3745586-2-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org


# ec54f810 26-Apr-2023 Syed Saba Kareem <Syed.SabaKareem@amd.com>

ASoC: amd: ps: remove the register read and write wrappers.

Instead of acp63_readl() and acp63_writel() wrappers
readl and writel functions can be used directly.
Remove acp63_readl() and acp63_writel() wrappers.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com
Link: https://lore.kernel.org/r/20230426122219.3745586-1-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org


# 501c2825 20-Apr-2023 Carlos Bilbao <carlos.bilbao@amd.com>

ASoC: amd: ps: Update copyright notice

The most recent changes to ASoC, such as new module parameters, date to the
year 2023. Update copyright statement accordingly.

Signed-off-by: Carlos Bilbao <carlos.bilbao@amd.com
Link: https://lore.kernel.org/r/20230420180212.3101178-1-carlos.bilbao@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org


# bddcfb08 12-Apr-2023 Syed Saba Kareem <Syed.SabaKareem@amd.com>

ASoC: amd: Add check for acp config flags

We have SOF and generic ACP support enabled for Rembrandt and
pheonix platforms on some machines. Since we have same PCI id
used for probing, add check for machine configuration flag to
avoid conflict with newer pci drivers. Such machine flag has
been initialized via dmi match on few Chrome machines. If no
flag is specified probe and register older platform device.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230412091638.1158901-1-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 5579a966 30-Jan-2023 Mario Limonciello <mario.limonciello@amd.com>

ASoC: amd: ps: Add a module parameter to influence pdm_gain

In case of regressions for any users that the new pdm_gain value is
too high and for additional debugging, introduce a module parameter
that would let them configure it.

This parameter should be removed in the future:
* If it's determined that the parameter is not needed, just hardcode
the correct value as before
* If users do end up using it to debug and report different values
we should introduce a config knob that can have policy set by ucm.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20230131184653.10216-7-mario.limonciello@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 99ecc788 30-Jan-2023 Mario Limonciello <mario.limonciello@amd.com>

ASoC: amd: ps: Adjust the gain for PDM DMIC

No issues have been reported yet for DMIC audio level on ps platforms,
but as problems were found both on YC (Rembrandt) and Renoir based
designs it's very likely they happen on ps too.

Increase the PDM gain to solve this problem.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20230131184653.10216-6-mario.limonciello@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 948f317f 03-Jan-2023 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: remove unused variable

Remove unused acp63_audio_mode variable.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230104055435.321327-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 45aa83cb 03-Jan-2023 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: use acp_lock to protect common registers in pdm driver

Retrieve acp_lock mutex as platform data and use it for protecting
ACP common registers access in acp pdm driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230104055435.321327-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# f763fb2f 03-Jan-2023 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: add mutex lock for accessing common registers

Add mutex lock for accessing ACP common registers across different
modules.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230104055435.321327-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1d325cda 21-Dec-2022 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: refactor platform device creation logic

Refactor platform device creation implementation.
Based on platform dev count and pdev mask create platform devices.
Use common API to fill platform dev information.
Use pdev count variable in remove callback for unregistering
platform devices.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20221221172855.1618766-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 2cdabbde 21-Dec-2022 Vijendar Mukunda <Vijendar.Mukunda@amd.com>

ASoC: amd: ps: implement api to retrieve acp device config

Implement API to retrieve acp device config and calculate platform
device count and dev mask for platform device node creation.

Currently for DMIC configuration, mask and dev count are calculated.
Same api will be used to extend support for different ACP device
configurations.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20221221172855.1618766-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 7d959775 16-Nov-2022 Syed Saba Kareem <Syed.SabaKareem@amd.com>

ASoC: amd: ps: Move acp63_dev_data strcture from PCI driver

Move acp63_dev_data structure from PCI driver to acp header file.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20221116105938.762550-2-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# d25ec74c 16-Nov-2022 Syed Saba Kareem <Syed.SabaKareem@amd.com>

ASoC: amd: ps: update macros with ps platform naming convention

Update macros using ps platform naming convention.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20221116105938.762550-1-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 4b192114 04-Nov-2022 syed saba kareem <syed.sabakareem@amd.com>

ASoC: amd: fix ACP version typo mistake

Pink Sardine is based on ACP6.3 architecture.
This patch fixes the typo mistake acp6.2 -> acp6.3

Signed-off-by: syed saba kareem <syed.sabakareem@amd.com>
Link: https://lore.kernel.org/r/20221104121001.207992-1-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>