Commit graph

54 commits

Author SHA1 Message Date
Vijendar Mukunda
70227e1574
ASoC: amd: ps: enable wake capability for acp pci driver
Enable wake capability for acp pci driver for Pink Sardine
platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20231017071939.953343-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-17 12:59:17 +01:00
Kuninori Morimoto
d4f23dcd69
ASoC: amd: convert not to use asoc_xxx()
ASoC is now unified asoc_xxx() into snd_soc_xxx().
This patch convert asoc_xxx() to snd_soc_xxx().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878r9cs25b.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-25 14:16:17 +02:00
Takashi Iwai
925819c796
ASoC: amd: ps: Fix -Wformat-truncation warning
The compile warning with -Wformat-truncation at
sdw_amd_scan_controller() is false-positive; the max loop size is
AMD_SDW_MAX_MANAGERS (= 2), hence it fits with the given size.

For suppressing the warning, replace snprintf() with scnprintf().
As stated in the above, truncation doesn't matter.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20230915082207.26200-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-15 13:16:25 +01:00
Mark Brown
de1b43a57a Linux 6.5-rc3
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmS9qIoeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGH6EH/2EnB8lLGOl8QINL
 E8eTWj6e7hdXXEX42j5h+TeGZZgBbTwogzE08uHBOP7lO0h31GVa97D5xkjS8UIa
 CzjYcnAuvf36nexakdC/0T8WgGzWwzKo0MIVraPBbq/pPRyrJ0CXPzB0Sl4Z2XlL
 W3N12a1N655FRx/tjaXgUB+aMPGrdBA2t0k6eXwFWyBdQhmt7O8Y3xy0rTVA+qHZ
 F6D4fZI2Ej9WbxX+tBs+DLEk+ZUz+0fABUqvgJRNofjgm71CpGhbv4ZGUFQaJT+I
 5S7cu3R8pS2YLP8TA3kJSj5GUEwPEDEZpxMIJAqkr5uvkNysGi55lYRxxULUw/sO
 EYHRBJE=
 =c8SQ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmS9qq8ACgkQJNaLcl1U
 h9CCAAf9FKLPWszdL/Do/OSnxh1qlgqg63f0BMUQCmPZRT2cWFDguN4Jnhr0hDtC
 Ul/SjzQzZaXalHG90yGmXZ9kBdBvnxX8XqyfVNg2sXM1TsqHrxItq7tlNd1UJlls
 zRAJo03xc9BeC9kdmBTt+Dqt41OqimQuccsHk1U/O9l7nhYwKB2xlpiu5XMZxvvZ
 IP1sb9MDONfz0K52Lz4U5QOBChA0VGhlOoduY/yTLQlzQBKNdVaLToNhy6RLQtZp
 xXhvQELB0NB2BMg9wbFQicmTb1kkMQF6HhqDfuvTeItoNYrM/APpGiPbRByotB+Z
 LanAEcsu4R70iSFvymaHI0oYeXcNHg==
 =Ye2o
 -----END PGP SIGNATURE-----

ASoC: Merge up fixes from mainline

There's several things here that will really help my CI.
2023-07-23 23:33:05 +01:00
Uwe Kleine-König
acb5c0b14b
ASoC: amd: ps-sdw-dma: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230707072830.3395789-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-07-09 22:47:13 +01:00
Mario Limonciello
cd710900ed
ASoC: amd: ps: Fix extraneous error messages
On Pink Sardine machines that don't have SdW controllers in use, the property
`mipi-sdw-manager-list` won't exist.  There is no point in showing an error
to a user when this situation is encountered.

Furthermore if the machine doesn't have a DMIC connected to the ACP, there
may be no platform devices created either.

Downgrade the associated message to debug.

Fixes: d1351c30ac ("ASoC: amd: ps: create platform devices based on acp config")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20230708025208.54272-1-mario.limonciello@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-07-09 22:42:57 +01:00
Vijendar Mukunda
68a653ab86
ASoC: amd: ps: fix byte count return value for invalid SoundWire manager instance
acp_get_byte_count() function should return zero bytes instead of
-EINVAL for invalid SoundWire manager instance.

Fixes: f722917350 ("ASoC: amd: ps: add SoundWire dma driver dma ops")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230626105356.2580125-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-26 13:29:00 +01:00
Vijendar Mukunda
46b50e514b
ASoC: amd: ps: add comments for DMA register mapping
Add comments for DMA register mapping for both the SoundWire manager
instances.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230626105356.2580125-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-26 13:28:59 +01:00
Vijendar Mukunda
f15f6b294d
ASoC: amd: ps: fix for position register set for AUDIO0 RX stream
For AUDIO0 RX stream, AUDIO0_RX position registers should be used.
DMA error is reported due to referring wrong position register set for
AUDIO0 RX stream.
Correct the position register set for AUDIO0 RX stream.

Fixes: f722917350 ("ASoC: amd: ps: add SoundWire dma driver dma ops")

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230626105356.2580125-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-26 13:28:58 +01:00
Vijendar Mukunda
322a163ea6
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: 298d4f7b17 ("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>
2023-06-26 13:28:57 +01:00
Vijendar Mukunda
7beda6a256
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>
2023-06-26 13:28:56 +01:00
Arun Gopal Kondaveeti
154756319c
ASoC: amd: update pm_runtime enable sequence
pm_runtime_allow() is not needed for ACP child platform devices.
Replace pm_runtime_allow() with pm_runtime_mark_last_busy()
& pm_runtime_set_active() in pm_runtime enable sequence for
ACP child platform drivers.

Signed-off-by: Arun Gopal <arungopal.kondaveeti@amd.com>
Link: https://lore.kernel.org/r/Message-Id: <20230623214150.4058721-1-arungopal.kondaveeti@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-23 11:07:39 +01:00
Vijendar Mukunda
198c93e2fc
ASoC: amd: ps: add acp_reset flag check in acp pci driver pm ops.
AMD SoundWire manager supports different power modes.
acp_reset flag will be set to false only when SoundWire manager power
mode is selected as ClockStop Mode. For rest of the combinations
(ACP PDM + SDW), acp_reset flag will be set to true.
When acp_reset flag is set, acp de-init and acp init sequence should
be invoked during suspend/resume callbacks.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-10-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-20 23:30:32 +01:00
Vijendar Mukunda
7b33594130
ASoC: amd: ps: enable SoundWire dma driver build
Enable SoundWire dma driver build for PS platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-8-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-20 23:30:30 +01:00
Vijendar Mukunda
5a06c3ac4c
ASoC: amd: ps: add pm ops support for SoundWire dma driver
Add support pm ops support for SoundWire dma driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-7-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-20 23:30:30 +01:00
Vijendar Mukunda
298d4f7b17
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>
2023-06-20 23:30:29 +01:00
Vijendar Mukunda
f722917350
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>
2023-06-20 23:30:28 +01:00
Vijendar Mukunda
665dd181a9
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>
2023-06-20 23:30:27 +01:00
Vijendar Mukunda
e1cb350610
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>
2023-06-20 23:30:26 +01:00
Vijendar Mukunda
d1351c30ac
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>
2023-06-20 23:30:25 +01:00
Mark Brown
1a32b4b9a6
ASoC: Merge fixes due to dependencies
So we can apply the tlv320aic3xxx DT conversion.
2023-06-16 14:55:20 +01:00
Vijendar Mukunda
b6b5c6426e
ASoC: amd: ps: fix for acp_lock access in pdm driver
Sending the mutex address(acp_lock) as platform
data during ACP PDM platform driver register sequence,
its creating copy of the platform data.
Referencing this platform data in ACP PDM driver results
incorrect reference to the common lock usage.

Instead of directly passing the lock address as platform
data, retrieve it from parent driver data structure
and use the same lock reference in ACP PDM driver.

Fixes: 45aa83cb93 ("ASoC: amd: ps: use acp_lock to protect common registers in pdm driver")

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230525113000.1290758-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-30 13:43:27 +01:00
Syed Saba Kareem
ea79b0a663
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
2023-05-08 08:48:50 +09:00
Syed Saba Kareem
ec54f8103d
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
2023-05-08 08:48:50 +09:00
Carlos Bilbao
501c282500
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
2023-05-08 08:48:48 +09:00
Syed Saba Kareem
bddcfb0802
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>
2023-04-12 12:52:01 +01:00
Syed Saba Kareem
a4d432e913
ASoC: amd: ps: update the acp clock source.
Updating the clock source from ACLK to default clock

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20230331052102.2211115-1-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-31 16:04:10 +01:00
Uwe Kleine-König
5b6bacfa1a
ASoC: amd: ps: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20230315150745.67084-19-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-20 13:07:14 +00:00
Mario Limonciello
5579a96622
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>
2023-02-02 11:42:26 +00:00
Mario Limonciello
99ecc7889b
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>
2023-02-02 11:42:25 +00:00
Nathan Chancellor
de1cae2289
ASoC: amd: ps: Fix uninitialized ret in create_acp64_platform_devs()
Clang warns:

  sound/soc/amd/ps/pci-ps.c:218:2: error: variable 'ret' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
          default:
          ^~~~~~~
  sound/soc/amd/ps/pci-ps.c:239:9: note: uninitialized use occurs here
          return ret;
                 ^~~
  sound/soc/amd/ps/pci-ps.c:190:9: note: initialize the variable 'ret' to silence this warning
          int ret;
                 ^
                  = 0
  1 error generated.

ret is used uninitialized if 'goto de_init' is taken. As this is not an
error nor should the ACP be deinitialized, just directly return 0 in
this case statement, which resolves the warning.

Fixes: 1d325cdaf7 ("ASoC: amd: ps: refactor platform device creation logic")
Link: https://github.com/ClangBuiltLinux/linux/issues/1779
Suggested-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Syed Saba Kareem <syed.sabakareem@amd.com>
Link: https://lore.kernel.org/r/20230105-wsometimes-uninitialized-pci-ps-c-v2-1-c50321676325@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-01-09 13:05:31 +00:00
Pierre-Louis Bossart
b118458936
ASoC: amd: ps: use static function
Sparse warning:

error: symbol 'acp63_fill_platform_dev_info' was not declared. Should
it be static?

Also reduce line lines below 100 characters.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230104145708.25051-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-01-05 11:15:35 +00:00
Vijendar Mukunda
948f317fac
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>
2023-01-05 11:15:34 +00:00
Vijendar Mukunda
45aa83cb93
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>
2023-01-05 11:15:33 +00:00
Vijendar Mukunda
f763fb2fc9
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>
2023-01-05 11:15:32 +00:00
Vijendar Mukunda
966ef755d3
ASoC: amd: ps: move irq handler registration
Move irq handler registration prior to platform device creation logic.
This will avoid irq handling missing scenario when platform device
raise interrrupts during it's probe sequence.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20221221172855.1618766-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-25 23:33:38 +00:00
Vijendar Mukunda
9d327a4443
ASoC: amd: ps: update dev index value in irq handler
Instead of using hard coded index value for platform device index,
retrieve the device index based on platform devices created.
In PDM config case, ACP PCI driver retrieves dev index from
pdm_dev_index variable.
This will avoid overhead when multiple endpoint combinations
support is added later.
platform device index will vary based on audio endpoint
configuration.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20221221172855.1618766-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-25 23:33:37 +00:00
Vijendar Mukunda
1d325cdaf7
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>
2022-12-25 23:33:36 +00:00
Vijendar Mukunda
2cdabbde0c
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>
2022-12-25 23:33:35 +00:00
Syed Saba Kareem
7d95977533
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>
2022-11-16 13:29:12 +00:00
Syed Saba Kareem
d25ec74c6c
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>
2022-11-16 13:29:11 +00:00
syed saba kareem
4b19211435
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>
2022-11-04 12:25:08 +00:00
Syed Saba Kareem
2a09cef652
ASoC: amd: enable Pink sardine platform machine driver build.
This patch enables Pink Sardine platform machine driver build.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-14-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-29 23:14:17 +01:00
Syed Saba Kareem
0c8327c07b
ASoC: amd: add Pink Sardine machine driver using dmic
Add Pink Sardine platform machine driver using dmic.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-13-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-29 23:14:16 +01:00
Syed Saba Kareem
76dd567591
ASoC: amd: create platform device for acp6.2 machine driver
Create platform device for acp6.2 machine driver.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-12-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-29 23:14:15 +01:00
Syed Saba Kareem
1e4366489e
ASoC: amd: enable Pink Sardine acp6.2 drivers build
Pink Sardine ACP6.2 drivers can be built by selecting necessary
kernel config option.
The patch enables build support of the same.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-11-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-29 23:14:14 +01:00
Syed Saba Kareem
28023a7879
ASoC: amd: add acp6.2 pdm driver pm ops
Add acp6.2 pdm driver pm ops.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-10-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-29 23:14:13 +01:00
Syed Saba Kareem
3a543d56e3
ASoC: amd: add acp6.2 pci driver pm ops
Add acp6.2 pci driver pm ops.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-9-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-29 23:14:13 +01:00
Syed Saba Kareem
5137305662
ASoC: amd: add acp6.2 pdm driver dma ops
This patch adds PDM driver DMA operations for Pink Sardine Platform.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-8-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-29 23:14:12 +01:00
Syed Saba Kareem
5bbeca60a5
ASoC: amd: add acp6.2 irq handler
Add ACP6.2 irq handler for handling irq events for ACP IP.
Add pdm irq events handling.
Whenever audio data equal to the PDM watermark level are consumed,
interrupt is generated. Acknowledge the interrupt.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220827165657.2343818-7-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-29 23:14:11 +01:00