summaryrefslogtreecommitdiffstats
path: root/sound/soc/amd/acp/acp-sof-mach.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: amd: acp: remove MODULE_ALIAS for sof based generic machine driverVijendar Mukunda2024-09-111-7/+0
| | | | | | | | | | As module device table added for AMD sof based generic machine driver, MODULE_ALIAS is not required. Remove MODULE_ALIAS for AMD sof based generic machine driver. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240911093554.2076872-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: allow module autoloading for table board_idsHongbo Li2024-08-211-0/+2
| | | | | | | | | Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from platform_device_id table. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Link: https://patch.msgid.link/20240821061955.2273782-3-lihongbo22@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Merge up fixesMark Brown2024-01-221-0/+4
|\ | | | | | | To facilitate testing get our current fixes into the branch.
| * ASoC: amd: acp: Update platform name for different boardsVenkata Prasad Potturu2024-01-221-0/+4
| | | | | | | | | | | | | | | | | | 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>
* | ASoC: amd: acp: Update MODULE_DESCRIPTION for sof-machCristian Ciocaltea2024-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: amd: acp: Add missing error handling in sof-machCristian Ciocaltea2024-01-221-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: amd: acp: Drop redundant initialization of machine driver dataCristian Ciocaltea2024-01-221-10/+0
|/ | | | | | | | | | 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>
* ASoC: amd: acp: Add i2s bt support for nau8821-max cardVenkata Prasad Potturu2023-12-061-1/+3
| | | | | | | | Add i2s bt support for sof-nau8821-max sound card. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://lore.kernel.org/r/20231206110620.1695591-5-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: acp: Add kcontrols and widgets per-codec in common codeAlper Nebi Yasak2023-08-181-20/+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>
* ASoC: amd: Add acpi machine id's for vangogh platformVenkata Prasad Potturu2023-07-091-0/+16
| | | | | | | | | Add acpi machine id's for vangogh platform and configure driver data to enable SOF sound card support on newer boards. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://lore.kernel.org/r/20230707120730.1948445-4-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: acp: Enable i2s tdm support for skyrim platformsVenkata Prasad Potturu2023-01-111-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>
* ASoC: amd: acp: Add i2s tdm support in machine driverVenkata Prasad Potturu2023-01-111-0/+6
| | | | | | | | 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>
* ASoC: amd: acp: Add support for rt5682s and rt1019 card with hs instanceV sujith kumar Reddy2022-06-061-0/+15
| | | | | | | | | | | | We have new platform with rt5682s as a primary codec and rt1019 as an amp codec. Add machine struct to register sof audio based sound card on such Chrome machine. Here we are configuring as a soc mclk master and codec slave. Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20220531120813.47116-3-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: acp: Add support for nau8825 and max98360 cardV sujith kumar Reddy2022-06-061-0/+15
| | | | | | | | | | | We have new platform with nau8825 as a primary codec and max98360 as an amp codec. Add machine struct to register sof audio based sound card on such Chrome machine. Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Reviewed-by: Akihiko Odaki <akihiko.odaki@gmail.com> Link: https://lore.kernel.org/r/20220531120813.47116-2-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: acp: Set Speaker enable/disable pin through rt1019 codec driver.V sujith kumar Reddy2022-05-191-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>
* ASoC: amd: acp: Set Speaker enable/disable pin through rt1019 codec driverV sujith kumar Reddy2022-05-191-2/+2
| | | | | | | | | | | | | | | | | 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 7fa5c33d043160eba3be9fb8e21588dff2a467c7 ("ASoC: amd: acp: Set gpio_spkr_en to None for max speaker amplifer in machine driver"). Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20220516160619.17832-1-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: acp: Add pm ops callback in machine driverAjit Kumar Pandey2022-04-201-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>
* Merge tag 'asoc-v5.18' of ↵Takashi Iwai2022-03-211-0/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.18 Quite a quiet release for ASoC, lots of work on drivers and platforms but nothing too groundbreaking but not much on the core itself: - Start of moving SoF to support multiple IPC mechanisms. - Use of NHLT ACPI table to reduce the amount of quirking required for Intel systems. - Some building blocks for use in forthcoming Intel AVS driver for legacy Intel DSP firmwares. - Support for AMD PDM, Atmel PDMC, Awinic AW8738, i.MX cards with TLV320AIC31xx, Intel machines with CS35L41 and ESSX8336, Mediatek MT8181 wideband bluetooth, nVidia Tegra234, Qualcomm SC7280, Renesas RZ/V2L, Texas Instruments TAS585M
| * ASoC: amd: sof-mach: Add support for RT5682S and RT1019 cardV sujith kumar Reddy2022-01-241-0/+14
| | | | | | | | | | | | | | | | | | | | | | We have new platform with rt5682s as a primary codec and rt1019 as an amp codec. Add machine struct to register sof audio based sound card on such Chrome machine. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Signed-off-by: V sujith kumar Reddy <vsujithkumar.reddy@amd.com> Link: https://lore.kernel.org/r/20220122194707.2661026-1-vsujithkumar.reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: amd: acp: Set gpio_spkr_en to None for max speaker amplifer in machine ↵V sujith kumar Reddy2022-02-021-2/+2
|/ | | | | | | | | | | driver Maxim codec driver already enabling/disabling spk_en_gpio in form of sd_mode gpio hence remove such gpio access control from machine driver to avoid conflict Signed-off-by: V sujith kumar Reddy <vsujithkumar.reddy@amd.com> Link: https://lore.kernel.org/r/20220131203225.1418648-1-vsujithkumar.reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: acp: Power on/off the speaker enable gpio pin based on DAPM callback.V sujith kumar Reddy2021-12-241-3/+18
| | | | | | | | | | 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>
* ASoC: amd: acp: Add support for RT5682-VS codecAjit Kumar Pandey2021-10-201-0/+14
| | | | | | | | | | In newer variants primary codec is rt5682vs. Add support for newer codec variants in generic machine driver module and define driver data to register SOF sound card. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20211019070938.5076-9-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: acp: Add support for Maxim amplifier codecAjit Kumar Pandey2021-10-201-0/+14
| | | | | | | | | | In newer chrome boards we have max98360a as an amplifier codec. Add support for max98360a in generic machine driver and configure driver data to enable SOF sound card support on newer boards . Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20211019070938.5076-8-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: acp: Add SOF audio support on Chrome boardAjit Kumar Pandey2021-10-201-0/+103
Chrome board has RT5682 codec and RT1019 amp connected to I2S SP controller on ACP hw. Also it support DMIC capture endpoints with inbuilt pdm controller on ACP hw block. Add driver module to create backend dai links for sof dsp core. We pass driver data with audio end points configuration to register sound cards and create device nodes for all audio endpoints. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20211019070938.5076-7-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>