summaryrefslogtreecommitdiff
path: root/sound/soc/amd
AgeCommit message (Collapse)Author
2024-05-13Merge tag 'asoc-v6.10' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.10 This is a very big update, in large part due to extensive work the Intel people have been doing in their drivers though it's also been busy elsewhere. There's also a big overhaul of the DAPM documentation from Luca Ceresoli arising from the work he did putting together his recent ELC talk, and he also contributed a new tool for visualising the DAPM state. - A new tool dapm-graph for visualising the DAPM state. - Substantial fixes and clarifications for the DAPM documentation. - Very large updates throughout the Intel audio drivers. - Cleanups of accessors for driver data, module labelling, and for constification. - Modernsation and cleanup work in the Mediatek drivers. - Several fixes and features for the DaVinci I2S driver. - New drivers for several AMD and Intel platforms, Nuvoton NAU8325, Rockchip RK3308 and Texas Instruments PCM6240.
2024-05-08ASoC: amd: Use *-y instead of *-objs in MakefileTakashi Iwai
*-objs suffix is reserved rather for (user-space) host programs while usually *-y suffix is used for kernel drivers (although *-objs works for that purpose for now). Let's correct the old usages of *-objs in Makefiles. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240507155540.24815-5-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06ASoC: amd: Use snd_soc_substream_to_rtd() for accessing private_dataKrzysztof Kozlowski
Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-5-6f8a8902b479@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-03ASoC: amd: acp: fix for acp platform device creation failureVijendar Mukunda
ACP pin configuration varies based on acp version. ACP PCI driver should read the ACP PIN config value and based on config value, it has to create a platform device in below two conditions. 1) If ACP PDM configuration is selected from BIOS and ACP PDM controller exists. 2) If ACP I2S configuration is selected from BIOS. Other than above scenarios, ACP PCI driver should skip the platform device creation logic, i.e. ACP PCI driver probe sequence should never fail if other acp pin configuration is selected. It should skip platform device creation logic. check_acp_pdm() function was implemented for ACP6.x platforms to check ACP PDM configuration. Previously, this code was safe guarded by FLAG_AMD_LEGACY_ONLY_DMIC flag check. This implementation breaks audio use cases for Huawei Matebooks which are based on ACP3.x varaint uses I2S configuration. In current scenario, check_acp_pdm() function returns -ENODEV value which results in ACP PCI driver probe failure without creating a platform device even in case of valid ACP pin configuration. Implement check_acp_config() as a common function which invokes platform specific acp pin configuration check functions for ACP3.x, ACP6.0 & ACP6.3 & ACP7.0 variants and checks for ACP PDM controller. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218780 Fixes: 4af565de9f8c ("ASoC: amd: acp: fix for acp pdm configuration check") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20240502140340.4049021-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-15ASoC: amd: acp-da7219-max98357a: Constify regulator_opsKrzysztof Kozlowski
Neither core nor the driver modifes 'struct regulator_ops', so it can be const for code safety. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240414164703.239851-1-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-15ASoC: amd: Support microphone from Acer Aspire A315-24Pend.to.start
Add support microphone from Acer Aspire A315-24P and for some other similar devices with such vendor Signed-off-by: "end.to.start" <end.to.start@mail.ru> Link: https://lore.kernel.org/r/20240412075533.10214-1-end.to.start@mail.ru Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09ASoC: amd: fix for soundwire build dependencies for legacy stackVijendar Mukunda
The SND_SOC_AMD_SOUNDWIRE Kconfig symbol has build dependency on SOUNDWIRE_AMD. It gets it wrong for a configuration involving SND_SOC_AMD_SOUNDWIRE_LINK_BASELINE=y,SND_SOC_AMD_PS=y and SOUNDWIRE_AMD=m, which results in a link failure: ld: vmlinux.o: in function `amd_sdw_probe': >> sound/soc/amd/ps/pci-ps.c:271:(.text+0x1d51eff): undefined reference to `sdw_amd_probe' ld: vmlinux.o: in function `acp63_sdw_machine_select': >> sound/soc/amd/ps/pci-ps.c:294:(.text+0x1d525d5): undefined reference to `sdw_amd_get_slave_info' ld: vmlinux.o: in function `amd_sdw_exit': >> sound/soc/amd/ps/pci-ps.c:280:(.text+0x1d538ce): undefined reference to `sdw_amd_exit' Add a top level check config that forbids any of the AMD ACP drivers with version >= 6.3 from being built-in with CONFIG_SOUNDWIRE_AMD=m. Move SND_AMD_ACP_CONFIG common dependency config to SND_SOC_AMD_ACP63_TOPLEVEL config. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202404061257.khJml82D-lkp@intel.com/ Fixes: a806793f231e ("ASoC: amd: simplify soundwire dependencies for legacy stack") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://msgid.link/r/20240408180229.3287220-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09ASoC: acp: Support microphone from device Acer 315-24pend.to.start
This patch adds microphone detection for the Acer 315-24p, after which a microphone appears on the device and starts working Signed-off-by: end.to.start <end.to.start@mail.ru> Link: https://msgid.link/r/20240408152454.45532-1-end.to.start@mail.ru Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03ASoC: Merge up fixesMark Brown
Some of these, particularly the wm_adsp one in the immediate case, are needed as a basis for new work.
2024-03-29ASoC: amd: acp: fix for acp_init function error handlingVijendar Mukunda
If acp_init() fails, acp pci driver probe should return error. Add acp_init() function return value check logic. Fixes: e61b415515d3 ("ASoC: amd: acp: refactor the acp init and de-init sequence") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20240329053815.2373979-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-27ASoC: amd: acp: fix for acp pdm configuration checkVijendar Mukunda
ACP PDM configuration has to be verified for all combinations. Remove FLAG_AMD_LEGACY_ONLY_DMIC check. Fixes: 3a94c8ad0aae ("ASoC: amd: acp: add code for scanning acp pdm controller") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://msgid.link/r/20240327104657.3537664-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: amd: simplify soundwire dependencies for legacy stackVijendar Mukunda
The CONFIG_SOUNDWIRE_AMD is a user-visible option, it should be never selected by another driver. So replace the extra complexity with a normal Kconfig dependency in SND_SOC_AMD_SOUNDWIRE. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://msgid.link/r/20240322112018.3063344-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-14ASoC: amd: yc: Revert "add new YC platform variant (0x63) support"Jiawei Wang
This reverts commit 316a784839b21b122e1761cdca54677bb19a47fa, that enabled Yellow Carp (YC) driver for PCI revision id 0x63. Mukunda Vijendar [1] points out that revision 0x63 is Pink Sardine platform, not Yellow Carp. The YC driver should not be enabled for this platform. This patch prevents the YC driver from being incorrectly enabled. Link: https://lore.kernel.org/linux-sound/023092e1-689c-4b00-b93f-4092c3724fb6@amd.com/ [1] Signed-off-by: Jiawei Wang <me@jwang.link> Link: https://msgid.link/r/20240313015853.3573242-3-me@jwang.link Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-14ASoC: amd: yc: Revert "Fix non-functional mic on Lenovo 21J2"Jiawei Wang
This reverts commit ed00a6945dc32462c2d3744a3518d2316da66fcc, which added a quirk entry to enable the Yellow Carp (YC) driver for the Lenovo 21J2 laptop. Although the microphone functioned with the YC driver, it resulted in incorrect driver usage. The Lenovo 21J2 is not a Yellow Carp platform, but a Pink Sardine platform, which already has an upstreamed driver. The microphone on the Lenovo 21J2 operates correctly with the CONFIG_SND_SOC_AMD_PS flag enabled and does not require the quirk entry. So this patch removes the quirk entry. Thanks to Mukunda Vijendar [1] for pointing this out. Link: https://lore.kernel.org/linux-sound/023092e1-689c-4b00-b93f-4092c3724fb6@amd.com/ [1] Signed-off-by: Jiawei Wang <me@jwang.link> Link: https://lore.kernel.org/linux-sound/023092e1-689c-4b00-b93f-4092c3724fb6@amd.com/ [1] Link: https://msgid.link/r/20240313015853.3573242-2-me@jwang.link Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-13ASoC: Merge up releaseMark Brown
In order to apply additional fixes that depend on the fixes merged for v6.8 merge up the final release.
2024-03-11ASoC: amd: yc: Fix non-functional mic on ASUS M7600REM Cooley
The ASUS M7600RE (Vivobook Pro 16X OLED) needs a quirks-table entry for the internal microphone to function properly. Signed-off-by: Mitch Cooley <m.cooley.198@gmail.com> Link: https://msgid.link/r/CALijGznExWW4fujNWwMzmn_K=wo96sGzV_2VkT7NjvEUdkg7Gw@mail.gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-04ASoC: amd: yc: Add HP Pavilion Aero Laptop 13-be2xxx(8BD6) into DMI quirk tableAl Raj Hassain
The HP Pavilion Aero Laptop 13-be2xxx(8BD6) requires a quirk entry for its internal microphone to function. Signed-off-by: Al Raj Hassain <alrajhassain@gmail.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://msgid.link/r/20240304103924.13673-1-alrajhassain@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-28ASoC: amd: yc: Fix non-functional mic on Lenovo 21J2Jiawei Wang
Like many other models, the Lenovo 21J2 (ThinkBook 16 G5+ APO) needs a quirk entry for the internal microphone to function. Signed-off-by: Jiawei Wang <me@jwang.link> Link: https://msgid.link/r/20240228073914.232204-2-me@jwang.link Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-28ASoC: amd: yc: add new YC platform variant (0x63) supportJiawei Wang
The Lenovo 21J2 (ThinkBook 16 G5+ APO) has this new variant, as detected with lspci: 64:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 63) Signed-off-by: Jiawei Wang <me@jwang.link> Link: https://msgid.link/r/20240228073914.232204-1-me@jwang.link Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-26ASoC: amd: yc: Add Lenovo ThinkBook 21J0 into DMI quirk tableJohnny Hsieh
This patch adds Lenovo 21J0 (ThinkBook 16 G5+ ARP) to the DMI quirks table to enable internal microphone array. Cc: linux-sound@vger.kernel.org Signed-off-by: Johnny Hsieh <mnixry@outlook.com> Link: https://msgid.link/r/TYSPR04MB8429D62DFDB6727866ECF1DEC55A2@TYSPR04MB8429.apcprd04.prod.outlook.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-22ASoC: amd: ps: modify ACP register end address macroVijendar Mukunda
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>
2024-02-22ASoC: amd: ps: update licenseVijendar Mukunda
To align with AMD SoundWire manager driver license, update license as GPL-2.0-only for Pink Sardine ACP PCI driver and corresponding child drivers. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://msgid.link/r/20240222102656.631144-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-21ASoC: Intel: avs: Fixes and new platforms supportMark Brown
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: The avs-driver continues to be utilized on more recent Intel machines. As TGL-based (cAVS 2.5) e.g.: RPL, inherit most of the functionality from previous platforms: SKL <- APL <- CNL <- ICL <- TGL rather than putting everything into a single file, the platform-specific bits are split into cnl/icl/tgl.c files instead. Makes the division clear and code easier to maintain. Layout of the patchset: First are two changes combined together address the sound-clipping problem, present when only one stream is running - specifically one CAPTURE stream. Follow up is naming-scheme adjustment for some of the existing functions what improves code incohesiveness. As existing IPC/IRQ code operates solely on cAVS 1.5 architecture, it needs no abstraction. The situation changes when newer platforms come into the picture. Thus the next two patches abstract the existing IPC/IRQ handlers so that majority of the common code can be re-used. The ICCMAX change stands out a bit - the AudioDSP firmware loading procedure differs on ICL-based platforms (and onwards) and having a separate commit makes the situation clear to the developers who are going to support the solution from LTS perspective. For that reason I decided not to merge it into the commit introducing the icl.c file.
2024-02-19ASoC: amd: ps: add machine select and register codeVijendar Mukunda
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>
2024-02-19ASoC: amd: ps: fix for acp pme wake for soundwire configurationVijendar Mukunda
Consider the below scenario, When ACP and SoundWire managers are in D3 state and SoundWire manager power off mode is selected and acp and SoundWire manager instances are in runtime suspended state. In this case, for the ACP PME wake event, the ACP PCI driver should resume SoundWire manager devices based on wake enable status set. Add code for handling ACP PME wake event for runtime suspend scenario when SoundWire power off mode is selected. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://msgid.link/r/20240214104014.1144668-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-19ASoC: amd: ps: remove acp_reset flagVijendar Mukunda
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>
2024-02-19ASoC: amd: ps: refactor acp child platform device creation codeVijendar Mukunda
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>
2024-02-19ASoC: amd: ps: refactor acp device configuration read logicVijendar Mukunda
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>
2024-02-12ASoC: amd: yc: Fix non-functional mic on Lenovo 82UUAttila Tőkés
Like many other models, the Lenovo 82UU (Yoga Slim 7 Pro 14ARH7) needs a quirk entry for the internal microphone to function. Signed-off-by: Attila Tőkés <attitokes@gmail.com> Link: https://msgid.link/r/20240210193638.144028-1-attitokes@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-06ASoC: amd: yc: Add DMI quirk for Lenovo Ideapad Pro 5 16ARP8Mario Limonciello
The laptop requires a quirk ID to enable its internal microphone. Add it to the DMI quirk table. Reported-by: Stanislav Petrov <stanislav.i.petrov@gmail.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=216925 Cc: stable@vger.kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20240205214853.2689-1-mario.limonciello@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-05ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependenciesArnd Bergmann
The snd-amd-sdw-acpi.ko module is under CONFIG_SND_SOC_AMD_ACP_COMMON but selected from SoF, which causes build failures in some randconfig builds that enable SOF but not ACP: WARNING: unmet direct dependencies detected for SND_AMD_SOUNDWIRE_ACPI Depends on [n]: SOUND [=m] && SND [=m] && SND_SOC [=m] && SND_SOC_AMD_ACP_COMMON [=n] && ACPI [=y] Selected by [m]: - SND_SOC_SOF_AMD_SOUNDWIRE_LINK_BASELINE [=m] && SOUND [=m] && SND [=m] && SND_SOC [=m] && SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_AMD_TOPLEVEL [=m] && ACPI [=y] ERROR: modpost: "amd_sdw_scan_controller" [sound/soc/sof/amd/snd-sof-amd-acp.ko] undefined! Change the Makefile and Kconfig to allow it to get built regardless of CONFIG_SND_SOC_AMD_ACP_COMMON. Fixes: d948218424bf ("ASoC: SOF: amd: add code for invoking soundwire manager helper functions") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20240204212207.3158914-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-31soundwire/SOF: add SoundWire Interface support forMark Brown
Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>: This patch series is to redesign existing platform device creation logic for SoundWire managers and Implement generic functions for SoundWire manager probe, start and exit sequence which are common for both Legacy (NO DSP enabled) and SOF stack, and add SoundWire Interface support for AMD SOF stack (ACP 6.3 based platform). The patch series was reviewed in https://github.com/thesofproject/linux/pull/4699
2024-01-30ASoC/soundwire: implement generic api for scanning amd soundwire controllerVijendar Mukunda
Implement generic function for scanning SoundWire controller. Same function will be used for legacy and sof stack for AMD platforms. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Acked-by: Vinod Koul <vkoul@kernel.org> Link: https://msgid.link/r/20240129055147.1493853-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-29ASoC: amd: acp: Fix support for a Huawei Matebook laptopMarian Postevca
Previous commit that added support for Huawei MateBook D16 2021 with Ryzen 4600H (HVY-WXX9 M1010) was incomplete. To activate support for this laptop, the DMI table in acp3x-es83xx machine driver must also be updated. Fixes: b5338b1b901e ("ASoC: amd: acp: Add support for a new Huawei Matebook laptop") Signed-off-by: Marian Postevca <posteuca@mutex.one> Link: https://msgid.link/r/20240128172229.657142-1-posteuca@mutex.one Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-29ASoC: amd: yc: Add DMI quirk for MSI Bravo 15 C7VFTechno Mooney
The laptop requires a quirk ID to enable its internal microphone. Add it to the DMI quirk table. Reported-by: Techno Mooney <techno.mooney@gmail.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218402 Cc: stable@vger.kernel.org Signed-off-by: Techno Mooney <techno.mooney@gmail.com> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Link: https://msgid.link/r/20240129081148.1044891-1-bagasdotme@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-22ASoC: Merge up fixesMark Brown
To facilitate testing get our current fixes into the branch.
2024-01-22ASoC: amd: acp: Add check for cpu dai link initializationVenkata Prasad Potturu
Add condition check for cpu dai link initialization for amplifier codec path, as same pcm id uses for both headset and speaker path for RENOIR platforms. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://msgid.link/r/20240118143023.1903984-3-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-22ASoC: amd: acp: Update platform name for different boardsVenkata Prasad Potturu
Update platform name for various boards based on rembrandt and renoir platforms. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://msgid.link/r/20240118143023.1903984-2-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-22ASoC: amd: acp: Enable rt5682s clocks in acp slave modeVenkata Prasad Potturu
Set and enable rt5682s codec bclk and lrclk rates when acp is in slave mode. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://msgid.link/r/20240118143023.1903984-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-22ASoC: amd: acp: Update MODULE_DESCRIPTION for sof-machCristian Ciocaltea
The current MODULE_DESCRIPTION relates to a Chrome board, as that was what the driver initially supported. Nonetheless, it has since progressed incrementally and evolved into a more comprehensive machine driver. Hence, update MODULE_DESCRIPTION to better reflect this. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://msgid.link/r/20231219030728.2431640-5-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-22ASoC: amd: acp: Add missing error handling in sof-machCristian Ciocaltea
Handle potential acp_sofdsp_dai_links_create() errors in ACP SOF machine driver's probe function. Note there is no need for an undo. While at it, switch to dev_err_probe(). Fixes: 9f84940f5004 ("ASoC: amd: acp: Add SOF audio support on Chrome board") Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://msgid.link/r/20231219030728.2431640-4-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-22ASoC: amd: acp: Make use of existing *_CODEC_DAI macrosCristian Ciocaltea
The generic ACP machine driver provides macros for NAU88221 and MAX98388 codec DAI names, but in places it is still using directly the related strings. For consistency, replace all strings with the equivalent macros. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://msgid.link/r/20231219030728.2431640-3-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-22ASoC: amd: acp: Drop redundant initialization of machine driver dataCristian Ciocaltea
Simplify driver data configuration by removing redundant initialization of members in static structs. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://msgid.link/r/20231219030728.2431640-2-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-08Merge tag 'asoc-v6.8' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.8 This is a relatively quiet release, there's a lot of driver specific changes and the usual high level of activity in the SOF core but the one big core change was Mormioto-san's work to support more N:M CPU:CODEC mapping cases. Highlights include: - Enhanced support for N:M CPU:CODEC mappings in the core and in audio-graph-card2. - Support for falling back to older SOF IPC versions where firmware for new versions is not available. - Support for notification of control changes generated by SOF firmware with IPC4. - Device tree support for describing parts of the card which can be active over suspend (for very low power playback or wake word use cases). - ACPI parsing support for the ES83xx driver, reducing the number of quirks neede for x86 systems. - Support for more AMD and Intel systems, NXP i.MX8m MICFIL, Qualcomm SM8250, SM8550, SM8650 and X1E80100. - Removal of Freescale MPC8610 support, the SoC is no longer supported by Linux.
2023-12-19Improve AMD ACP Vangogh audio support for Steam DeckMark Brown
Merge series from Cristian Ciocaltea <cristian.ciocaltea@collabora.com>: This patch series provides several fixes and improvements to AMD ACP drivers targeting the Vangogh platform, as found on the Valve's new Steam Deck OLED. Although in theory the board should have been supported by both SOF and legacy ACP drivers, as of next-20231208 the audio seems to be completely broken. Please note this only restores the legacy support, while SOF will be handled in a separate series.
2023-12-18ASoC: amd: acp: Remove redundant ret variableHimanshu Bhavani
Removed Unneeded variable: "ret" Signed-off-by: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io> Link: https://msgid.link/r/20231218143214.939885-1-himanshu.bhavani@siliconsignals.io Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18ASoC: amd: acp: Add missing MODULE_DESCRIPTION in mach-commonCristian Ciocaltea
Add a MODULE_DESCRIPTION() in the generic ACP machine driver to avoid the following warning when building with W=1: WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-mach.o Fixes: d4c750f2c7d4 ("ASoC: amd: acp: Add generic machine driver support for ACP cards") Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://msgid.link/r/20231209203229.878730-6-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18ASoC: amd: acp-config: Add missing MODULE_DESCRIPTIONCristian Ciocaltea
Add the missing MODULE_DESCRIPTION() to avoid the following warning when building with W=1: WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/snd-acp-config.o Fixes: f1bdd8d385a8 ("ASoC: amd: Add module to determine ACP configuration") Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://msgid.link/r/20231209203229.878730-5-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPSCristian Ciocaltea
Replace the old SET_{RUNTIME,SYSTEM_SLEEP}_PM_OPS() helpers with their modern alternatives and drop the now unnecessary __maybe_unused qualifier in the suspend and resume functions. Additionally, make use of pm_ptr() to ensure the PM ops are dropped when building with CONFIG_PM disabled. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://msgid.link/r/20231209203229.878730-4-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18ASoC: amd: vangogh: Allow probing ACP PCI when SOF is disabledCristian Ciocaltea
Since commit e89f45edb747 ("ASoC: amd: vangogh: Add check for acp config flags in vangogh platform"), the Vangogh ACP PCI driver could not be used anymore for boards which happen to have a matching entry in acp-config list. Commit f18818eb0dbe ("ASoC: amd: vangogh: Add condition check for acp config flag") slightly changed the behaviour to permit loading the driver if AMD_LEGACY flag is set. However, for AMD_SOF flag the probing is still denied, even if SOF support is disabled in kernel configuration. While this helps preventing conflicts between SOF and generic ACP drivers, there are cases where a fallback to the generic non-SOF support would still be needed or useful, e.g. SOF firmware is not available or doesn't work properly, SOF driver is broken or doesn't provide full support for a particular hardware, or simply for testing/debugging the alternative solution. A real-life example is Steam Deck OLED, which works with both drivers. Prevent returning from probe() when ACP config indicates SOF support for the current board *and* the Vangogh SOF driver is not enabled in kernel configuration. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://msgid.link/r/20231209203229.878730-3-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>