aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/amd/acp/acp-legacy-mach.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-25ASoC: amd: acp: add machine driver support for pdm use caseSyed Saba Kareem1-0/+12
add pdm use case machine driver support Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-9-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11ASoC: amd: acp: Add machine driver that enables sound for systems with a ES8336 codecMarian Postevca1-1/+21
This commit enables sound for a line of Huawei laptops that use the ES8336 codec which is connected to the ACP3X module. Signed-off-by: Marian Postevca <posteuca@mutex.one> Link: https://lore.kernel.org/r/20230829220116.1159-6-posteuca@mutex.one Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11ASoC: amd: acp: Add support for splitting the codec specific code from the ACP driverMarian Postevca1-11/+71
This commit adds support for splitting more complicated machine drivers, that need special handling, from the generic ACP code. By adding support for callbacks to configure and handle codec specific implementation details, we can split them in separate files that don't clutter the ACP code. Signed-off-by: Marian Postevca <posteuca@mutex.one> Link: https://lore.kernel.org/r/20230829220116.1159-5-posteuca@mutex.one Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-18ASoC: amd: acp: Add kcontrols and widgets per-codec in common codeAlper Nebi Yasak1-21/+1
Commit 7ac3404c2e21 ("ASoC: amd: acp: Map missing jack kcontrols") adds card kcontrols and DAPM widgets corresponding to jacks for Headphone and Headset Mic. But these were already being added in acp-legacy-mach.c and acp-sof-mach.c, so this causes a probe error: sof_mach rt5682s-hs-rt1019: control 2:0:0:Headphone Jack Switch:0 is already present sof_mach rt5682s-hs-rt1019: ASoC: Failed to add Headphone Jack Switch: -16 sof_mach rt5682s-hs-rt1019: devm_snd_soc_register_card(sof-rt5682s-hs-rt1019) failed: -16 sof_mach: probe of rt5682s-hs-rt1019 failed with error -16 Removing the new duplicates from the common code might be enough to fix the issue. But some of the codecs use different kcontrols and widgets. NAU8821 alone has an "Int Mic". MAX98360A has a single "Spk", while RT1019 has "Left Spk" and "Right Spk" (and two codec instances with name prefixes). Since there are per-codec differences, add the kcontrols and widgets in the common code as each dai-link is being initialized, instead of in the two machine drivers' probe(). Also, MAX98388 has Left and Right instances, but uses a single "SPK" widget. That seems weird, so normalize it to use two widgets (one per each instance like RT1019) while we're adding controls. Fixes: 7ac3404c2e21 ("ASoC: amd: acp: Map missing jack kcontrols") Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20230818080314.32991-1-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-01-11ASoC: amd: acp: Enable i2s tdm support for skyrim platformsVenkata Prasad Potturu1-0/+8
Enable i2s tdm support for skyrim platform using dmi quirks. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://lore.kernel.org/r/20230109132104.1259479-6-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-01-11ASoC: amd: acp: Add i2s tdm support in machine driverVenkata Prasad Potturu1-0/+5
Add i2s tdm support for amd platforms. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://lore.kernel.org/r/20230109132104.1259479-5-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-08ASoC: amd: acp: Add legacy audio driver support for Rembrandt platformV sujith kumar Reddy1-0/+32
Add i2s and dmic support for Rembrandt platform, Add machine support for nau8825, max98360 and rt5682s,rt1019 codec in legacy driver for rembrandt platform. Here codec is in a slave mode. Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20220707161142.491034-4-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-19ASoC: amd: acp: Set Speaker enable/disable pin through rt1019 codec driver.V sujith kumar Reddy1-18/+3
RT1019 codec has two ways of controlling the en_spkr. one way is controlling through gpio pin method the another way is through codec register update through driver. Now Speaker enable/disable is controlled through codec register updated by codec driver. This patch reverts gpio logic. This reverts commit 5c5f08f7fc0bee9a1bc3fbdcb7a21cfd0648ab14 ("ASoC: amd: acp: Power on/off the speaker enable gpio pin based on DAPM callback.") Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20220516160619.17832-2-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-20ASoC: amd: acp: Add pm ops callback in machine driverAjit Kumar Pandey1-0/+1
Add alsa snd_soc_pm_ops callback in ACP machine driver to support suspend and resume operation of sound card components Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220420094442.1352717-1-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: amd: acp-legacy: Add legacy card support for new machinesAjit Kumar Pandey1-0/+30
We have newer renoir platforms with different codecs combinations. Add struct in legacy machine driver and add to list of supported renoir machine to support sound card registration on platform with rt5682s as primary headset codec and max98360 and rt1019 as speaker amp codec. This also fixes error reported by kernel robot: "error: 'EN_SPKR_GPIO_DW' undeclared here" Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220222124213.721224-3-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: amd: acp: Change card name for Guybrush MachineAjit Kumar Pandey1-2/+2
Change sound card name for guybrush machine with rt5682 as primary codec and rt1019 amp to align with names given in UCM config. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220222124213.721224-2-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-01-28ASoC: amd: acp: acp-legacy: Add DMIC dai link support for RenoirAjit Kumar Pandey1-2/+2
Add DMIC related dai link for pdm-dmic dai on Renoir platform with generic dmic codec dai. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220117115854.455995-6-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-12-24ASoC: amd: acp: Power on/off the speaker enable gpio pin based on DAPM callback.V sujith kumar Reddy1-3/+16
Configure the speaker gpio pin based on power sequence of the DAPM speaker events. Enable speaker after widget power up and Disable before widget powerdown. Signed-off-by: V sujith kumar Reddy <vsujithkumar.reddy@amd.com> Link: https://lore.kernel.org/r/20211224150058.2444776-1-vsujithkumar.reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-20ASoC: amd: acp: Add legacy sound card support for Chrome audioAjit Kumar Pandey1-0/+104
Renoir based Chrome board has RT5682 as primary headset codec and RT1019 amp device connected to I2SSP ACP i2s controller. Add driver to register legacy sound card devices on Chrome board. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20211019070938.5076-6-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>