summary refs log tree commit diff
path: root/sound/soc/sof
AgeCommit message (Collapse)Author
2023-09-08Merge tag 'v6.1.52' into 6.1/features/merge-fixesCristian Ciocaltea
Fix conflicts: drivers/gpu/drm/amd/amdgpu/amdgpu.h drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.h drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c drivers/gpu/drm/amd/display/dc/core/dc.c drivers/gpu/drm/amd/display/dc/core/dc_link.c drivers/gpu/drm/amd/display/dc/core/dc_resource.c drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.h drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c drivers/gpu/drm/amd/display/dc/inc/core_types.h drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c drivers/thunderbolt/quirks.c Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
2023-08-23ASoC: SOF: core: Free the firmware trace before calling snd_sof_shutdown()Peter Ujfalusi
[ Upstream commit d389dcb3a48cec4f03c16434c0bf98a4c635372a ] The shutdown is called on reboot/shutdown of the machine. At this point the firmware tracing cannot be used anymore but in case of IPC3 it is using and keeping a DMA channel active (dtrace). For Tiger Lake platforms we have a quirk in place to fix rare reboot issues when a DMA was active before rebooting the system. If the tracing is enabled this quirk will be always used and a print appears on the kernel log which might be misleading or not even correct. Release the fw tracing before executing the shutdown to make sure that this known DMA user is cleared away. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230616100039.378150-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-23ASoC: SOF: Intel: fix SoundWire/HDaudio mutual exclusionPierre-Louis Bossart
[ Upstream commit f751b99255cacd9ffe8c4bbf99767ad670cee1f7 ] The functionality described in Commit 61bef9e68dca ("ASoC: SOF: Intel: hda: enforce exclusion between HDaudio and SoundWire") does not seem to be properly implemented with two issues that need to be corrected. a) The test used is incorrect when DisplayAudio codecs are not supported. b) Conversely when only Display Audio codecs can be found, we do want to start the SoundWire links, if any. That will help add the relevant topologies and machine descriptors, and identify cases where the SoundWire information in ACPI needs to be modified with a quirk. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20230606222529.57156-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-23ASoC: SOF: amd: Add pci revision id checkVenkata Prasad Potturu
[ Upstream commit 1d4a84632b90d88316986b05bcdfe715399a33db ] Add pci revision id check for renoir and rembrandt platforms. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://lore.kernel.org/r/20230523072009.2379198-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-09Merge tag 'v6.1.43' into 6.1/features/merge-fixesCristian Ciocaltea
Fix conflicts: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c drivers/gpu/drm/amd/display/dc/core/dc.c drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c drivers/gpu/drm/amd/display/dc/dc.h drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h drivers/gpu/drm/amd/display/dmub/src/dmub_dcn314.c drivers/gpu/drm/amd/display/dmub/src/dmub_dcn314.h drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c drivers/gpu/drm/drm_fb_helper.c Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
2023-07-27ASoC: SOF: ipc3-dtrace: uninitialized data in dfsentry_trace_filter_write()Dan Carpenter
[ Upstream commit 469e2f28c2cbee2430058c1c9bb6d1675d7195fb ] This doesn't check how many bytes the simple_write_to_buffer() writes to the buffer. The only thing that we know is that the first byte is initialized and the last byte of the buffer is set to NUL. However the middle bytes could be uninitialized. There is no need to use simple_write_to_buffer(). This code does not support partial writes but instead passes "pos = 0" as the starting offset regardless of what the user passed as "*ppos". Just use the copy_from_user() function and initialize the whole buffer. Fixes: 671e0b90051e ("ASoC: SOF: Clone the trace code to ipc3-dtrace as fw_tracing implementation") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/74148292-ce4d-4e01-a1a7-921e6767da14@moroto.mountain Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-22Merge tag 'v6.1.39' into 6.1/features/merge-fixesCristian Ciocaltea
Fix conflicts: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c drivers/gpu/drm/amd/display/dc/core/dc_link.c drivers/gpu/drm/amd/display/dc/dc_types.h drivers/gpu/drm/i915/display/intel_tc.c drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
2023-06-09ASoC: SOF: pm: save io region state in case of errors in resumeKai Vehmanen
[ Upstream commit 171b53be635ac15d4feafeb33946035649b1ca14 ] If there are failures in DSP runtime resume, the device state will not reach active and this makes it impossible e.g. to retrieve a possible DSP panic dump via "exception" debugfs node. If CONFIG_SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE=y is set, the data in cache is stale. If debugfs cache is not used, the region simply cannot be read. To allow debugging these scenarios, update the debugfs cache contents in resume error handler. User-space can then later retrieve DSP panic and other state via debugfs (requires SOF debugfs cache to be enabled in build). Reported-by: Curtis Malainey <cujomalainey@chromium.org Link: https://github.com/thesofproject/linux/issues/4274 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com Reviewed-by: Curtis Malainey <cujomalainey@chromium.org Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com Link: https://lore.kernel.org/r/20230512104638.21376-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-09ASoC: SOF: sof-client-probes: fix pm_runtime imbalance in error handlingPierre-Louis Bossart
[ Upstream commit bc424273c74c1565c459c8f2a6ed95caee368d0a ] When an error occurs, we need to make sure the device can pm_runtime suspend instead of keeping it active. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com Link: https://lore.kernel.org/r/20230512103315.8921-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-09ASoC: SOF: pcm: fix pm_runtime imbalance in error handlingPierre-Louis Bossart
[ Upstream commit da0fe8fd515a471d373acc3682bfb5522cca4d55 ] When an error occurs, we need to make sure the device can pm_runtime suspend instead of keeping it active. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com Link: https://lore.kernel.org/r/20230512103315.8921-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-09ASoC: SOF: debug: conditionally bump runtime_pm counter on exceptionsPierre-Louis Bossart
[ Upstream commit 3de975862f985f1c9e225a0d13aa3d501373f7c3 ] When a firmware IPC error happens during a pm_runtime suspend, we ignore the error and suspend anyways. However, the code unconditionally increases the runtime_pm counter. This results in a confusing configuration where the code will suspend, resume but never suspend again due to the use of pm_runtime_get_noresume(). The intent of the counter increase was to prevent entry in D3, but if that transition to D3 is already started it cannot be stopped. In addition, there's no point in that case in trying to prevent anything, the firmware error is handled and the next resume will re-initialize the firmware completely. This patch changes the logic to prevent suspend when the device is pm_runtime active and has a use_count > 0. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com Link: https://lore.kernel.org/r/20230512103315.8921-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-05Merge tag 'v6.1.29' into amd-staging-drm-nextCristian Ciocaltea
Fix conflicts: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c drivers/gpu/drm/amd/amdgpu/soc21.c drivers/gpu/drm/amd/amdkfd/kfd_chardev.c drivers/gpu/drm/amd/amdkfd/kfd_crat.c drivers/gpu/drm/amd/amdkfd/kfd_device.c drivers/gpu/drm/amd/amdkfd/kfd_migrate.c drivers/gpu/drm/amd/amdkfd/kfd_topology.c drivers/gpu/drm/amd/amdkfd/kfd_topology.h drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c drivers/gpu/drm/amd/display/dc/core/dc_link.c drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c drivers/gpu/drm/amd/display/dc/dc_link.h drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dio_stream_encoder.c drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.h drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.h drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h drivers/gpu/drm/amd/display/modules/power/power_helpers.c drivers/gpu/drm/amd/display/modules/power/power_helpers.h drivers/gpu/drm/amd/pm/amdgpu_pm.c drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_4.h drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c drivers/gpu/drm/drm_edid.c drivers/gpu/drm/i915/display/intel_fbdev.c drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c drivers/gpu/drm/msm/msm_drv.c drivers/gpu/drm/nouveau/dispnv50/disp.c drivers/gpu/drm/ttm/ttm_pool.c drivers/gpu/drm/vmwgfx/vmwgfx_kms.c drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c drivers/thunderbolt/quirks.c Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
2023-05-24ASoC: SOF: topology: Fix logic for copying tuplesRanjani Sridharan
[ Upstream commit 41c5305cc3d827d2ea686533777a285176ae01a0 ] Topology could have more instances of the tokens being searched for than the number of sets that need to be copied. Stop copying token after the limit of number of token instances has been reached. This worked before only by chance as we had allocated more size for the tuples array than the number of actual tokens being parsed. Fixes: 7006d20e5e9d ("ASoC: SOF: Introduce IPC3 ops") Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com Link: https://lore.kernel.org/r/20230512114630.24439-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-28Add steam box offset and size before getting window offsetsVenkata Prasad Potturu
Add wrapper function to set window offsets based on platforms. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
2023-04-27ASOC: SOF: amd : Add support for signed fw image loadingVenkata Prasad Potturu
Add support for signed firmware code bin and data bin loading for vangogh platform. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
2023-04-26ASoC: SOF: pm: Tear down pipelines only if DSP was activeDaniel Baluta
commit 0b186bb06198653d74a141902a7739e0bde20cf4 upstream. With PCI if the device was suspended it is brought back to full power and then suspended again. This doesn't happen when device is described via DT. We need to make sure that we tear down pipelines only if the device was previously active (thus the pipelines were setup). Otherwise, we can break the use_count: [ 219.009743] sof-audio-of-imx8m 3b6e8000.dsp: sof_ipc3_tear_down_all_pipelines: widget PIPELINE.2.SAI3.IN is still in use: count -1 and after this everything stops working. Fixes: d185e0689abc ("ASoC: SOF: pm: Always tear down pipelines before DSP suspend") Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20230405092655.19587-1-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26ASoC: SoF: amd: Add support for Vangogh platformVenkata Prasad Potturu
Add pci driver and platform driver to enable SOF support on ACP5x architecture based Vangogh platform. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
2023-04-25BACKPORT: ASoC: SOF: fix compilation issue with readb/writeb helpersPierre-Louis Bossart
Replace them with read8/write8 to avoid compilation issue on ARM. In hindsight this is more consistent with the read64/write64 helpers already used in SOF. Reported-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/alsa-devel/Y1rTFrohLqaiZAy%2F@dev-arch.thelio-3990X/ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20221031195340.249868-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit f8fbf0dc702bf15b8b0ea1731a353bdb7faee8fd) Conflicts: sound/soc/sof/intel/hda.c Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
2023-04-25UPSTREAM: ASoC: SOF: Intel: hda-stream: use snd_sof_dsp_updateb() helperPierre-Louis Bossart
No functionality change, only code consistency. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221024165310.246183-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 847fd278610dda8568e1633b80abd56e08de5690) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-24UPSTREAM: ASoC: SOF: Intel: hda-dsp: use SOF helpers for consistencyPierre-Louis Bossart
No functionality change. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221024165310.246183-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 33ac4ca758b80421640cb5edb08b531f5be3da20) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-24UPSTREAM: ASoC: SOF: Drop the firmware and fw_offset from snd_sof_pdataPeter Ujfalusi
The SOF stack now uses the sdev->basefw to work with the SOF firmware, the information from plat_data can be dropped. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20221020121238.18339-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit e3775fda57d49984eaa2cfd86665a152806bfd81) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-24UPSTREAM: ASoC: SOF: Intel: hda-loader: Use the basefw firmware container ↵Peter Ujfalusi
directly Switch to access to the firmware struct via sdev->basefw container to unblock the removal of the firmware information from plat_data. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20221020121238.18339-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 410a321c9721bb3e839f64ffe60b45492d0f1f65) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-24UPSTREAM: ASoC: SOF: Intel: hda-loader-skl: Use the basefw firmware ↵Peter Ujfalusi
container directly Switch to access to the firmware struct via sdev->basefw container to unblock the removal of the firmware information from plat_data. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20221020121238.18339-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 4fd0f664bdcdd63ce95542227f65459447426aa4) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: Prepare ipc_msg_data to be used with compress APIDaniel Baluta
Make second parameter of ipc_msg_data generic in order to be able to support compressed streams. This patch doesn't hold any functional change. With this case we can use ipc_msg_data, to retrieve information from DSP for both PCM/Compress API. Reviewed-by: Paul Olaru <paul.olaru@nxp.com> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20230117122533.201708-2-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 1b905942d6cd182b7ef14e9f095178376d3847e6) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: amd: Fix for reading position updates from stream box.V sujith kumar Reddy
By default the position updates are read from dsp box when streambox size is not defined.if the streambox size is defined to some value then position updates can be read from the streambox. Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20221123121911.3446224-2-vsujithkumar.reddy@amd.corp-partner.google.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit aae7e412b0ec0378e392b18c50b612dae09cdb74) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
2023-04-23FROMGIT: ASoC: SOF: amd: refactor dmic codec platform device creationVijendar Mukunda
Under snd_sof_dev device scope, create platform device for dmic codec. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/168050621098.26.7486882101201297853@mailman-core.alsa-project.org Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit dd6bdd8b4d41b8f9db4b88dff2d10c0c62dbeb1d https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/ for-next) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
2023-04-23FROMGIT: ASoC: SOF: amd: refactor error checks in probe callVijendar Mukunda
Refactor error checks code in probe() callback. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230403071651.919027-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit c7a3662f14d7e0add7b50dc2f971e77bebb333cc https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/ for-next) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
2023-04-23FROMGIT: ASoC: SOF: amd: refactor get_chip_info callbackVijendar Mukunda
Move get_chip_info callback to the start of API. This should be first check in probe() call. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230403071651.919027-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 292b544ef4555ec5c69522e9c6eace6a90c4cd00 https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/ for-next) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
2023-04-23FROMGIT: ASoC: SOF: amd: remove unused variablesVijendar Mukunda
Remove unused variables - i2s_mode, i2s_pin_config_offset from code. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230403071651.919027-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 2675de62de702dbda936eb0f9a20ce3d8fed5ab5 https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/ for-next) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
2023-04-23FROMGIT: ASoC: SOF: amd: remove acp_dai_probe() functionVijendar Mukunda
ACP SOF driver supports different audio configurations. Explicit condition check for I2S configuration will break other audio endpoint configurations. acp_dai_probe() function is not required as we have machine select logic to select the exact machine. Remove acp_dai_probe() from existing AMD PCI driver code base. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230403071651.919027-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 9eb48aeddd8dcf2defd94a837a65e052576cf42b https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/ for-next) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
2023-04-23FROMGIT: ASoC: SOF: amd: remove unused codeVijendar Mukunda
During initial SOF driver bring up on AMD platforms, only DMIC support was added. As of today, we have a complete SOF solution for I2S endpoints along with DMIC endpoint. This code is no longer required. Remove unused code from RMB and RN platform ACP PCI driver. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230403071651.919027-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 56e008146e5b46059c5469a8b47478ab78f5b895 https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/ for-next) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
2023-04-23FROMGIT: ASoC: SOF: amd: Enable cont_update_posn variable in pcm hw_params.V sujith kumar Reddy
Enable cont_update_posn variable to update host position in streambox for every dma copy. Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20230308084509.1496256-3-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit b7f5c11761691a6f330411cb0490c6d0ee16c5f0 https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/ for-next) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
2023-04-23FROMGIT: ASoC: SOF: amd: Add pcm pointer callback for amd platforms.V sujith kumar Reddy
Add pcm pointer callback for amd platforms to read host position update from stream box. Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20230308084509.1496256-2-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit df6380dca2727bca62efdf332eaadd2e225f7c4d https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/ for-next) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: amd: Fix for handling spurious interrupts from DSPV sujith kumar Reddy
As interrupts are Level-triggered,unless and until we deassert the register the interrupts are generated which causes spurious interrupts unhandled. Now we deasserted the interrupt at top half which solved the below "nobody cared" warning. warning reported in dmesg: irq 80: nobody cared (try booting with the "irqpoll" option) CPU: 5 PID: 2735 Comm: irq/80-AudioDSP Not tainted 5.15.86-15817-g4c19f3e06d49 #1 1bd3fd932cf58caacc95b0504d6ea1e3eab22289 Hardware name: Google Skyrim/Skyrim, BIOS Google_Skyrim.15303.0.0 01/03/2023 Call Trace: <IRQ> dump_stack_lvl+0x69/0x97 __report_bad_irq+0x3a/0xae note_interrupt+0x1a9/0x1e3 handle_irq_event_percpu+0x4b/0x6e handle_irq_event+0x36/0x5b handle_fasteoi_irq+0xae/0x171 __common_interrupt+0x48/0xc4 </IRQ> handlers: acp_irq_handler [snd_sof_amd_acp] threaded [<000000007e089f34>] acp_irq_thread [snd_sof_amd_acp] Disabling IRQ #80 Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20230203123254.1898794-1-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 2e7c6652f9b86c01cbd4e988057a746a3a461969) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: amd: Enable cache for AMD Rembrandt platformV sujith kumar Reddy
Enable DSP cache for ACP memory Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20221213071640.3038853-1-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit b5ba646142195d63dd1aae69bc15457fca5aeb78) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
2023-04-23UPSTREAM: ASoC : SOF: amd: Add support for IPC and DSP dumpsV sujith kumar Reddy
Add support for IPC and DSP dumps for AMD platforms. Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20221205120649.1950576-3-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 41cfad23b5ebef2dbddecff2ddeb27ca973f98a8) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: amd: Use poll function instead to read ↵Ajye Huang
ACP_SHA_DSP_FW_QUALIFIER The Skyrim project and Whiterun met error when DSP loading during device boot. Ex, error in kernel log, ERR kernel: [ 16.124537] snd_sof_amd_rembrandt 0000:04:00.5: PSP validation failed. Use the snd_sof_dsp_read_poll_timeout function to successfully read the FW_QUALIFIER register Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com> Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20221205120649.1950576-2-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 2a2f5f2384b9791a028901aac3f49c488839d073) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: Add DAI configuration support for AMD platforms.V sujith kumar Reddy
Add support for configuring sp and hs DAI from topology. Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20221129100102.826781-1-vsujithkumar.reddy@amd.corp-partner.google.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 75af41991955205fa0958feb587ce22b35aaa7b0) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: amd: ADD HS and SP virtual DAI.V sujith kumar Reddy
ADD HS and SP virtual DAI driver to support AMD platforms. Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20221123121911.3446224-4-vsujithkumar.reddy@amd.corp-partner.google.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 9fd3b5b11db2fbbf0438324696de8233c0a78dad) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: amd: Fix for selecting clock source as external clock.V sujith kumar Reddy
By default clock source is selected as internal clock of 96Mhz which is not configurable. Now we select the clock source to external clock (ACLK) which can be configurable to different clock ranges depending on usecase. Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20221123121911.3446224-3-vsujithkumar.reddy@amd.corp-partner.google.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit f9ced7dbbb551885c63632f1594997bdaf2177ee) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
2023-04-23BACKPORT: ASoC: SOF: probes: Check ops before memory allocationAndy Shevchenko
We may check ops before spending resources on memory allocation. While at it, utilize dev_get_platdata() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221117103223.74425-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 82b21ca1912723a53534086864ee0daceb604cb5) Conflicts: sound/soc/sof/sof-client-probes.c Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: topology: Add helper to get/put widget queue idChao Song
Add get/put queue id helper to manage queue id in route setup and route free. The queue allocation rules are: - If widget only has one sink/source pin, zero will be returned as the queue ID directly. - If widget has more than one sink/source pins, and pin binding array is defined in topology, queue ID will be allocated according to the pin binding array. - If widget has more than one sink/sink pins, and pin binding array is not defined, Linux ID allocation will be used to allocate queue ID dynamically. Signed-off-by: Chao Song <chao.song@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Suggested-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221107085706.2550-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit c84443db0fddd188838faa9d71ebd6d9aa280068) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: Add support to parse pin binding array from topologyChao Song
Add support for parsing sink/source pin binding array per widget from topology. The pin binding arrays will be used to determine the source and sink queue IDs during widget binding for widget that requires special pin binding. An example of widget that requires special pin binding is the smart amplifier widget, its feedback sink pin has to be connected to a capture DAI copier for codec feedback, while the other sink pin has to be connected to a host DAI copier. Pin ID is required during widget binding for correct route setup. Conversely, the pin ID for 'generic' pins is not defined in the topology and will be allocated by the kernel dynamically. When only one pin is supported, the pin ID shall always be zero. When more than one pin is supported, the pin ID is determined with the ID allocation mechanism in the kernel. Signed-off-by: Chao Song <chao.song@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Suggested-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221107085706.2550-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 3b3acedbd0f30b822e05e5e51b646a67de0031fc) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: Add support for parsing the number of sink/source pinsChao Song
Add support for parsing the number of sink/source pins per widget from topology. They will be used to determine the sink/source queue IDs during widget binding. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Chao Song <chao.song@linux.intel.com> Suggested-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221107085706.2550-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 6327c7297fc86d2203ab31882152a9d0b049f7b2) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-23BACKPORT: ASoC: SOF: probes: Separate IPC3 operations to a separate fileJyri Sarha
Declare an IPC ops struct for probes client device and move IPC3 functions behind it. Signed-off-by: Jyri Sarha <jyri.sarha@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221031105141.19037-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit ccf06b148fc22e3a964308df1d158c87710a35bd) Conflicts: sound/soc/sof/sof-client-probes.c Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: ops: add snd_sof_dsp_updateb() helperPierre-Louis Bossart
Add missing helper in SOF toolbox. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221024165310.246183-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit c28a36b012f1fed177e787d242c592017d284538) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: ops: add readb/writeb helpersPierre-Louis Bossart
These will be used to add more consistency in the SOF core and drivers. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221024165310.246183-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 74fe0c4dcb41678543915cb97928c366ac1aaceb) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: ops: fallback to mmio in helpersPierre-Louis Bossart
Returning an error when a read/write is not implemented makes no sense, especially on read where no return value makes sense. Change the logic to directly fallback to mmio. If a platform truly wants other read/writes that are not plain vanilla mmio, it needs to implement its own routines. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221024165310.246183-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 01278cb6fa82083000a9e0b56c8b004caf5b6a73) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: loader: Add support for IPC dependent post firmware ↵Peter Ujfalusi
boot ops Add support for executing IPC dependent tasks after a successful firmware boot. The new post_fw_boot ops can make the fw_loader query_fw_configuration callback redundant as IPC code can handle the first boot internally. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20221020121238.18339-17-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit cbb984b68b8d03aa423a3a0bf2946175b9e25345) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
2023-04-23UPSTREAM: ASoC: SOF: ipc: ops: Add support for optional init and exit callbacksPeter Ujfalusi
Add support for IPC specific initialization (init) and cleanup (exit) callback. These callbacks can be used by IPC implementation to do basic initialization and cleanup. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20221020121238.18339-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit aa23b375363f6aba208761ff9985231cc69d00b8) Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>