summaryrefslogtreecommitdiffstats
path: root/sound/soc/amd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: SOF: amd: Fixed Build errorSyed Saba kareem2022-05-231-0/+1
| | | | | | | | | | | | | | | | | Add linux/module.h in acp-pci.c to solve the below dependency All error/warnings (new ones prefixed by >>): >> sound/soc/amd/acp/acp-pci.c:148:1: warning: data definition has no type or storage class 148 | MODULE_DEVICE_TABLE(pci, acp_pci_ids); | ^~~~~~~~~~~~~~~~~~~ >> sound/soc/amd/acp/acp-pci.c:148:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int] ... Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Syed Saba Kareem<ssabakar@amd.com> Link: https://lore.kernel.org/r/20220523112956.3087604-1-ssabakar@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-195-73/+10
| | | | | | | | | | | | | | | | | 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-192-2/+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 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: vangogh: Remove duplicate include filesYueHaibing2022-05-161-2/+0
| | | | | | | | Remove duplicated includes. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20220514023806.34768-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: acp: Add pm ops callback in machine driverAjit Kumar Pandey2022-04-202-0/+2
| | | | | | | | | 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>
* ASoC: soc-card: Create jack kcontrol without pinsAkihiko Odaki2022-04-145-10/+10
| | | | | | | | | | | | | | | snd_soc_card_jack_new() allowed to create jack kcontrol without pins, but did not create kcontrols. The jack would not have kcontrols if pins were not going to be added. This renames the old snd_soc_card_jack_new() to snd_soc_card_jack_new_pins() for use when pins are provided or will be added later. The new snd_soc_card_jack_new() appropriately creates a jack for use without pins and adds a kcontrol. Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Link: https://lore.kernel.org/r/20220408041114.6024-1-akihiko.odaki@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* Allow detecting ACP6x DMIC via _DSDMark Brown2022-04-121-4/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Mario Limonciello <mario.limonciello@amd.com>: It's not possible to probe for the presence of a DMIC, so the ACP6x machine driver currently has a hardcoded list of all the systems known to have a DMIC connected to the ACP. Although this design works it means that the acp6x driver needs to always grow with more systems and worse, if an OEM introduces a new system there will be a mismatch in time that even if the driver (otherwise) works fine it needs their system added to the list to work. So this series introduces a _DSD that OEMs can populate into the BIOS to indicate presence of a DMIC.
| * ASoC: amd: Add support for enabling DMIC on acp6x via _DSDMario Limonciello2022-04-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the acp6x machine driver requires a hardcoded list of systems that physically have DMIC connected. To avoid having to continually add to an evergrowing list of systems add support for a _DSD that can advertise this. OEMs can add this _DSD to their BIOS under the ACP device to automatically add the device to this driver without requiring any driver modifications. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20220411134532.13538-3-mario.limonciello@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: Add driver data to acp6x machine driverMario Limonciello2022-04-111-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently all of the quirked systems use the same card and so the DMI quirk list doesn't contain driver data. Add driver data to these quirks and then check the data was present or not. This will allow potentially setting quirks for systems with faulty firmware that claims to have a DMIC but doesn't really. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20220411134532.13538-2-mario.limonciello@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: amd: yc: add new YC platform varaint supportVijendar Mukunda2022-04-111-2/+7
|/ | | | | | | | Update PCI revision id check for the new YC platform varaint. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220411134119.1767646-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge tag 'asoc-v5.18' of ↵Takashi Iwai2022-03-2122-82/+774
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix reference to PCM buffer addressMeng Tang2022-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | PCM buffers might be allocated dynamically when the buffer preallocation failed or a larger buffer is requested, and it's not guaranteed that substream->dma_buffer points to the actually used buffer. The driver needs to refer to substream->runtime->dma_addr instead for the buffer address. Fixes: cab396d8b22c1 ("ASoC: amd: add ACP5x pcm dma driver ops") Signed-off-by: Meng Tang <tangmeng@uniontech.com> Link: https://lore.kernel.org/r/20220316091303.9745-1-tangmeng@uniontech.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: acp3x: Fix signedness bug in acp3xYueHaibing2022-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | In acp3x_audio_probe() platform_get_irq() may return error, but i2s_irq now is unsigned int so the error handling is never triggered. Fixes: 87d71a128771 ("ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20220305123613.6324-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: acp5x-pcm-dma: Fix signedness bugYueHaibing2022-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | In acp5x_audio_probe() platform_get_irq() may return error, but i2s_irq now is unsigned int so the error handling is never triggered. Fixes: 87d71a128771 ("ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20220305123705.3708-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: vg: fix signedness bug in acp5x_audio_probe()Dan Carpenter2022-03-071-3/+4
| | | | | | | | | | | | | | | | | | | | The "adata->i2s_irq" variable is unsigned so the error handling will not work. Fixes: 87d71a128771 ("ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220304131256.GA28739@kili Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: pcm-dma: Fix signedness bug in acp3x_audio_probe()Dan Carpenter2022-03-071-3/+4
| | | | | | | | | | | | | | | | | | | | The "adata->i2s_irq" variable is unsigned so this error handling code will not work. Fixes: 87d71a128771 ("ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220304131534.GD28739@kili Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: pcm-dma: Fix signedness bug in acp_pdm_audio_probe()Dan Carpenter2022-03-071-3/+4
| | | | | | | | | | | | | | | | | | | | The "adata->pdm_irq" variable is unsigned so the error handling will not work. Fixes: 87d71a128771 ("ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220304131335.GB28739@kili Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: acp: Fix signedness bug in renoir_audio_probe()Dan Carpenter2022-03-071-3/+4
| | | | | | | | | | | | | | | | | | | | The "adata->i2s_irq" is unsigned so this error handling will not work. Fixes: 3304a242f45a ("ASoC: amd: Use platform_get_irq_byname() to get the interrupt") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220304131449.GC28739@kili Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: use asoc_substream_to_rtd()Zhen Ni2022-03-021-4/+4
| | | | | | | | | | | | | | | | Uses asoc_substream_to_rtd() helper. Signed-off-by: Zhen Ni <nizhen@uniontech.com> Link: https://lore.kernel.org/r/20220302081502.25367-1-nizhen@uniontech.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: vangogh: fix uninitialized symbol warning in machine driverVijendar Mukunda2022-02-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | Fixed below smatch static checker warning. sound/soc/amd/vangogh/acp5x-mach.c:190 acp5x_cs35l41_hw_params() error: uninitialized symbol 'ret'. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220225193054.24916-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: vg: remove warnings and errors pointed out by checkpatch plVijendar Mukunda2022-02-281-2/+1
| | | | | | | | | | | | | | | | Fix checkpatch pl errors and warnings in vangogh machine driver. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220225193054.24916-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: vg: update DAI link nameVijendar Mukunda2022-02-281-1/+1
| | | | | | | | | | | | | | | | Update DAI link name as "acp5x-8821-play". Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220225193054.24916-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: vg: fix for pm resume callback sequenceVijendar Mukunda2022-02-281-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous condition is used to cross check only the active stream status for I2S HS instance playback and capture use cases. Modified logic to invoke sequence for two i2s controller instances. This also fixes warnings reported by kernel robot: "warning: variable 'frmt_val' set but not used" "warning: variable 'reg_val' set but not used" Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220225193054.24916-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: pcm-dma: Use platform_get_irq() to get the interruptMeng Tang2022-02-284-23/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypassed the hierarchical setup and messed up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq(). Signed-off-by: Meng Tang <tangmeng@uniontech.com> Link: https://lore.kernel.org/r/20220227050928.32270-1-tangmeng@uniontech.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: acp: check the return value of devm_kzalloc() in ↵Jia-Ju Bai2022-02-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | acp_legacy_dai_links_create() The function devm_kzalloc() in acp_legacy_dai_links_create() can fail, so its return value should be checked. Fixes: d4c750f2c7d4 ("ASoC: amd: acp: Add generic machine driver support for ACP cards") Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Link: https://lore.kernel.org/r/20220225131645.27556-1-baijiaju1990@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: Use platform_get_irq_byname() to get the interruptMeng Tang2022-02-251-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platform_get_resource_byname(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypasses the hierarchical setup and messes up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq_byname(). Signed-off-by: Meng Tang <tangmeng@uniontech.com> Link: https://lore.kernel.org/r/20220225112358.19403-1-tangmeng@uniontech.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: acp: Add DMIC machine driver opsAjit Kumar Pandey2022-02-241-0/+27
| | | | | | | | | | | | | | | | | | Add dmic ops and startup callback to add snd_pcm_hw_constraint for pdm related device node. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220222124213.721224-4-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: acp-legacy: Add legacy card support for new machinesAjit Kumar Pandey2022-02-242-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ASoC: amd: acp: Change card name for Guybrush MachineAjit Kumar Pandey2022-02-242-3/+3
| | | | | | | | | | | | | | | | | | 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>
| * ASoC: amd: renoir: Add check for acp configuration flagsAjit Kumar Pandey2022-01-283-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | We have SOF and generic ACP support enabled for Renoir platforms on some machines. Since we have same PCI id used for probing, add check for machine configuration flag to avoid conflict with newer pci drivers. Such machine flag has been initialized via dmi match on few Chrome machines. If no flag is specified probe and register older platform device. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220117115854.455995-7-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: acp: acp-legacy: Add DMIC dai link support for RenoirAjit Kumar Pandey2022-01-282-2/+23
| | | | | | | | | | | | | | | | | | 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>
| * ASoC: amd: acp: Add ACP init()/deinit() callback for Renoir.Ajit Kumar Pandey2022-01-282-0/+153
| | | | | | | | | | | | | | | | | | | | | | ACP hardware has PGFSM control registers that can be configured to power On/Off the ACP IP block. Add acp init()/de_init() callbacks in renoir platform driver probe()/remove() respectively to power on and off ACP IP block on ACP3X device. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220117115854.455995-5-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: acp: Add generic PCI driver module for ACP deviceAjit Kumar Pandey2022-01-285-0/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Audio Co-processor or ACP IP block on AMD's SOC is connected via PCI bus interface, hence needs to be register as a PCI device. We have same PCI device ID across multiple SOC's but with different revision id for PCI hw. Add a generic PCI driver module for ACP that registers ACP as a PCI device and also register a platform device based on pci revision id. Any SOC's specific configuration for ACP block will be done in platform driver probe. We have added an initial support for ACP revision id 3 or ACP3X device. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220117115854.455995-4-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: acp: Add PDM controller based dmic dai for RenoirAjit Kumar Pandey2022-01-282-0/+14
| | | | | | | | | | | | | | | | | | Renoir ACP IP has a PDM controller block. Add DMIC dai instance in dai_driver struct to enable dmic capture support on Renoir platform. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220117115854.455995-3-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: acp: Add generic support for PDM controller on ACPAjit Kumar Pandey2022-01-285-1/+226
| | | | | | | | | | | | | | | | | | | | | | Add driver module for PDM controller on ACP IP block. Expose dai ops to configure ACP_WOV_PDM_BLOCK registers on ACP. Such dai ops will be used by platform specific driver module to register dmic related dai with ASoC. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220117115854.455995-2-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: amd: sof-mach: Add support for RT5682S and RT1019 cardV sujith kumar Reddy2022-01-242-0/+23
| | | | | | | | | | | | | | | | | | | | | | 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: vg: update acp init and deinit sequenceVijendar Mukunda2022-02-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | As part of ACP programming sequence, ACP_CONTROL and ACP_CLKMUX_SEL registers should be updated during acp init and de-init sequence. This patch updates register sequence during ACP init and deinit. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220223071959.13539-6-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: amd: vg: apply sample bits pcm constraintVijendar Mukunda2022-02-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | ACP I2S controller has limitation to program different BCLK for TX and RX paths. Headset path uses I2S SP controller instance. As per requirement, Restricted 32 bits as sample bits by applying pcm constraint in startup calabck for Headset path. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220223071959.13539-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: amd: vg: update platform clock control sequenceVijendar Mukunda2022-02-241-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | Add pre power on widget event. Based on this event update platform clock control sequence. This will fix Codec clock and pll restoration issue during system level resume. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220223071959.13539-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: amd: vangogh: refactor i2s master mode clock sequence codeVijendar Mukunda2022-02-242-19/+36
| | | | | | | | | | | | | | | | | | | | Refactor I2S Master mode clock programming sequence code. This will also fix the i2s clocks restore issue during system level resume. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220223071959.13539-2-Vijendar.Mukunda@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-022-3/+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-mach: Fix Left and Right rt1019 amp devicesAjit Kumar Pandey2022-01-211-2/+2
|/ | | | | | | | | | | | We're setting wrong card codec conf for rt1019 amp devices in our machine driver. Due to this left and right amp channels data are reversed in our machines as wrong device prefix results in wrong value for "Mono LR Select" rt1019 mixer control. Reverse dev ids in codec conf with Left and Right name_prefix to fix such issue. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220120133605.476138-1-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: acp: acp-mach: Change default RT1019 amp dev idAjit Kumar Pandey2022-01-061-4/+4
| | | | | | | | | | | | | | RT1019 components was initially registered with i2c1 and i2c2 but now changed to i2c0 and i2c1 in most of our AMD platforms. Change default rt1019 components to 10EC1019:00 and 10EC1019:01 which is aligned with most of AMD machines. Any exception to rt1019 device ids in near future board design can be handled using dmi based quirk for that machine. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220106150525.396170-1-AjitKumar.Pandey@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-245-10/+71
| | | | | | | | | | 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: Remove duplicate dependency in KconfigAjit Kumar Pandey2021-12-211-2/+0
| | | | | | | | Remove duplicate depends on statement in Kconfig file. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20211221171912.237792-1-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: acp-config: Update sof_tplg_filename for SOF machinesAjit Kumar Pandey2021-12-211-3/+3
| | | | | | | | | | | | SOF machines support different codec end points and hence required different topologies configuration. Update tplg filename in machine struct to load different topology files for SOF machines. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Reviewed-by: Curtis Malainey <curtis@malainey.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20211221161814.236318-3-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: acp-config: Enable SOF audio for Google chrome boards.Ajit Kumar Pandey2021-12-211-0/+53
| | | | | | | | | | | | | We need to support sof audio on different variants of Google boards. Add new entry in dmi table to enable SOF flag on Google chrome boards. Also add newer machines to sof_machines list with codecs and amps acpi id check to register sof sound cards on different variants. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@intel.com> Link: https://lore.kernel.org/r/20211221161814.236318-2-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: AMD: fix depend/select mistake on SND_AMD_ACP_CONFIGPierre-Louis Bossart2021-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | on i386 or x86_64: when # CONFIG_ACPI is not set, so SND_SOC_ACPI is not set: WARNING: unmet direct dependencies detected for SND_AMD_ACP_CONFIG Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_ACPI [=n] Selected by [y]: - SND_SOC_AMD_ACP_COMMON [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && X86 [=y] && PCI [=y] This problem is due to the unconditional selection of SND_AMD_ACP_CONFIG in other options. Using 'depends on' solved an initial problem but exposed another, let's use select instead. Reported-by: Randy Dunlap <rdunlap@infradead.org> Fixes: d9b994cd7641 ('ASoC: AMD: acp-config: fix missing dependency on SND_SOC_ACPI') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@intel.com> Reviewed-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20211215163511.151286-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: Convert to new style DAI format definitionsMark Brown2021-12-083-16/+16
| | | | | | | | | Convert the AMD machine drivers to use the new style defines for clocking in DAI formats. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210915180957.39996-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: AMD: acp-config: fix missing dependency on SND_SOC_ACPIPierre-Louis Bossart2021-12-081-0/+1
| | | | | | | | | | | | | | | With a custom .config, the following error is thrown: ERROR: modpost: "snd_soc_acpi_codec_list" [sound/soc/amd/snd-acp-config.ko] undefined! Fix by adding a clear dependency on SND_SOC_ACPI Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211207192309.43883-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>