summaryrefslogtreecommitdiff
path: root/sound/soc/amd
AgeCommit message (Collapse)AuthorFilesLines
2024-11-30Merge tag 'sound-fix-6.13-rc1' of ↵Linus Torvalds2-1/+39
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes. Majority of changes are device-specific fixes and quirks, while there are a few core fixes to address regressions and corner cases spotted by fuzzers. - Fix of spinlock range that wrongly covered kvfree() call in rawmidi - Fix potential NULL dereference at PCM mmap - Fix incorrectly advertised MIDI 2.0 UMP Function Block info - Various ASoC AMD quirks and fixes - ASoC SOF Intel, Mediatek, HDMI-codec fixes - A few more quirks and TAS2781 codec fix for HD-audio - A couple of fixes for USB-audio for malicious USB descriptors" * tag 'sound-fix-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (30 commits) ALSA: hda: improve bass speaker support for ASUS Zenbook UM5606WA ALSA: hda/realtek: Apply quirk for Medion E15433 ASoC: amd: yc: Add a quirk for microfone on Lenovo ThinkPad P14s Gen 5 21MES00B00 ASoC: SOF: ipc3-topology: Convert the topology pin index to ALH dai index ASoC: mediatek: Check num_codecs is not zero to avoid panic during probe ASoC: amd: yc: Fix for enabling DMIC on acp6x via _DSD entry ALSA: ump: Fix evaluation of MIDI 1.0 FB info ALSA: core: Fix possible NULL dereference caused by kunit_kzalloc() ALSA: hda: Show the codec quirk info at probing ALSA: asihpi: Remove unused variable ALSA: hda/realtek: Set PCBeep to default value for ALC274 ALSA: hda/tas2781: Add speaker id check for ASUS projects ALSA: hda/realtek: Update ALC225 depop procedure ALSA: hda/realtek: Enable speaker pins for Medion E15443 platform ALSA: hda/realtek: fix mute/micmute LEDs don't work for EliteBook X G1i ALSA: usb-audio: Fix out of bounds reads when finding clock sources ALSA: rawmidi: Fix kvfree() call in spinlock ALSA: hda/realtek: Fix Internal Speaker and Mic boost of Infinix Y4 Max ASoC: amd: yc: Add quirk for microphone on Lenovo Thinkpad T14s Gen 6 21M1CTO1WW ASoC: doc: dapm: Add location information for dapm-graph tool ...
2024-11-28Merge tag 'soundwire-6.13-rc1' of ↵Linus Torvalds2-0/+4
git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire updates from Vinod Koul: - structure optimization of few bus structures and header updates - support for 2.0 disco spec - amd driver updates for acp revision, refactoring code and support for acp6.3 - soft reset support for cadence driver * tag 'soundwire-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: (24 commits) soundwire: Minor formatting fixups in sdw.h header soundwire: Update the includes on the sdw.h header soundwire: cadence: clear MCP BLOCK_WAKEUP in init soundwire: cadence: add soft-reset on startup soundwire: intel_auxdevice: add kernel parameter for mclk divider soundwire: mipi-disco: add support for DP0/DPn 'lane-list' property soundwire: mipi-disco: add new properties from 2.0 spec soundwire: mipi-disco: add comment on DP0-supported property soundwire: mipi-disco: add support for peripheral channelprepare timeout soundwire: mipi_disco: add support for clock-scales property soundwire: mipi-disco: add error handling for property array read soundwire: mipi-disco: remove DPn audio-modes soundwire: optimize sdw_dpn_prop soundwire: optimize sdw_dp0_prop soundwire: optimize sdw_slave_prop soundwire: optimize sdw_bus structure soundwire: optimize sdw_master_prop soundwire: optimize sdw_stream_runtime memory layout soundwire: mipi_disco: add MIPI-specific property_read_bool() helpers soundwire: Correct some typos in comments ...
2024-11-27ASoC: amd: yc: Add a quirk for microfone on Lenovo ThinkPad P14s Gen 5 ↵Ilya Zverev1-0/+7
21MES00B00 New ThinkPads need new quirk entries. Ilya has tested this one. Laptop product id is 21MES00B00, though the shorthand 21ME works. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219533 Cc: stable@vger.kernel.org Signed-off-by: Ilya Zverev <ilya@zverev.info> Link: https://patch.msgid.link/20241127134420.14471-1-ilya@zverev.info Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-27ASoC: amd: yc: Fix for enabling DMIC on acp6x via _DSD entryVenkata Prasad Potturu1-1/+17
Add condition check to register ACP PDM sound card by reading _WOV acpi entry. Fixes: 5426f506b584 ("ASoC: amd: Add support for enabling DMIC on acp6x via _DSD") Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://patch.msgid.link/20241127112227.227106-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-25ASoC: amd: yc: Add quirk for microphone on Lenovo Thinkpad T14s Gen 6 21M1CTO1WWUwe Kleine-König1-0/+7
Add a quirk for Tova's Lenovo Thinkpad T14s with product name 21M1. Suggested-by: Tova <blueaddagio@laposte.net> Link: https://bugs.debian.org/1087673 Signed-off-by: Uwe Kleine-König <ukleinek@debian.org> Link: https://patch.msgid.link/20241122075606.213132-2-ukleinek@debian.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-19ASoC: amd: Fix build dependencies for `SND_SOC_AMD_PS`Mario Limonciello1-0/+1
The pci-ps module now must have `SND_SOC_ACPI_AMD_MATCH` selected to reference the `snd_soc_acpi_amd_acp63_sdw_machines` symbol. Fixes: 56d540befd59 ("ASoC: amd: ps: add soundwire machines for acp6.3 platform") Cc: Vijendar.Mukunda@amd.com Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202411180658.mIeWje2V-lkp@intel.com/ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patch.msgid.link/20241118025527.3318493-1-superm1@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-18ASoC: amd: yc: fix internal mic on Redmi G 2022Alex Far1-0/+7
This laptop model requires an additional detection quirk to enable the internal microphone Signed-off-by: Alex Far <anf1980@gmail.com> Link: https://patch.msgid.link/ZzjrZY3sImcqTtGx@RedmiG Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-14Add generic AMD Soundwire machine driver for Legacy(NoMark Brown10-48/+646
Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>: This patch series add SoundWire machines for RT711, RT714, RT1316 and RT722 codecs for ACP 6.3 platform. Also, it adds a generic SoundWire machine driver code for legacy(No DSP) stack.
2024-11-14ASoC: Merge up fixesMark Brown1-0/+21
Needed for new Intel board file changes.
2024-11-13ASoC: amd: ps: fix the pcm device numbering for acp 6.3 platformVijendar Mukunda1-0/+2
Fixed PCM device numbering is required for defining common alsa ucm changes for generic soundwire machine driver for legacy(No DSP) stack. Ex: For Headphone playback use case, use PCM device number as 0. For Headset mic Capture use case, PCM device number as 1. Set the 'use_dai_pcm_id' flag true in soundwire dma driver for acp 6.3 platform. This will fix the pcm device numbering based on dai_link->id. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20241113115223.3274868-7-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13ASoC: amd: acp: add soundwire machine driver for legacy stackVijendar Mukunda4-0/+512
Add SoundWire machine driver for legacy(No DSP) stack for ACP6.3 platform. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20241113115223.3274868-6-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13ASoC: amd: acp: move get_acp63_cpu_pin_id() to common fileVijendar Mukunda5-48/+76
get_acp63_cpu_pin_id() is the common SoundWire machine driver helper function will be used for AMD Legacy(No DSP) generic SoundWire machine driver as well. Move get_acp63_cpu_pin_id() function to common place holder. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20241113115223.3274868-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13ASoC: amd: ps: add soundwire machines for acp6.3 platformVijendar Mukunda1-0/+1
Add SoundWire machines for acp 6.3 platform for legacy(No DSP) stack. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20241113115223.3274868-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13ASoC: amd: acp: add RT711, RT714 & RT1316 support for acp 6.3 platformVijendar Mukunda1-0/+5
This patch add supports for corresponding codecs on acp6.3 platform hardware configuration. SDW0: RT711 Jack SDW0: RT1316 Left Speaker SDW0: RT1316 Right Speaker SDW1: RT714 DMIC Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20241113115223.3274868-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-13ASoC: amd: acp: add rt722 based soundwire machinesVijendar Mukunda2-0/+50
Add RT722 based soundwire machines for legacy(NO DSP) stack for acp 6.3 platform. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20241113115223.3274868-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-07ASoC: amd: yc: Support dmic on another model of Lenovo Thinkpad E14 Gen 6Markus Petri1-0/+7
Another model of Thinkpad E14 Gen 6 (21M4) needs a quirk entry for the dmic to be detected. Signed-off-by: Markus Petri <mp@mpetri.org> Link: https://patch.msgid.link/20241107094020.1050935-1-mp@localhost Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-06ASoC: amd: yc: fix internal mic on Xiaomi Book Pro 14 2022Mingcong Bai1-0/+7
Xiaomi Book Pro 14 2022 (MIA2210-AD) requires a quirk entry for its internal microphone to be enabled. This is likely due to similar reasons as seen previously on Redmi Book 14/15 Pro 2022 models (since they likely came with similar firmware): - commit dcff8b7ca92d ("ASoC: amd: yc: Add Xiaomi Redmi Book Pro 15 2022 into DMI table") - commit c1dd6bf61997 ("ASoC: amd: yc: Add Xiaomi Redmi Book Pro 14 2022 into DMI table") A quirk would likely be needed for Xiaomi Book Pro 15 2022 models, too. However, I do not have such device on hand so I will leave it for now. Signed-off-by: Mingcong Bai <jeffbai@aosc.io> Link: https://patch.msgid.link/20241106024052.15748-1-jeffbai@aosc.io Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-05Soundwire dai link init logic refactorMark Brown1-4/+4
Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>: This patch series refactors the SoundWire dai link init logic for Intel and AMD generic SoundWire machine driver and also updates the stream_name in dai_links structure. Link: https://github.com/thesofproject/linux/pull/5218
2024-11-05ASoC: amd: acp: Fix for ACP SOF dmic tplg component load failureVenkata Prasad Potturu1-1/+0
Stream name mismatch with topology file causes tplg load failure. As SOF framework assigns dailink->stream name, overriding stream name other than link name causes SOF dmic component load failure. [ 35.474995] snd_sof_amd_acp70 0000:c4:00.5: error: can't connect DAI ACPDMIC0.IN stream acp-dmic-codec [ 35.475001] snd_sof_amd_acp70 0000:c4:00.5: failed to add widget type 28 name : ACPDMIC0.IN stream acp-dmic-codec [ 35.475013] sof_mach acp70-dsp: ASoC: failed to load widget ACPDMIC0.IN [ 35.475018] sof_mach acp70-dsp: ASoC: topology: could not load header: -22 [ 35.475072] snd_sof_amd_acp70 0000:c4:00.5: error: tplg component load failed -22 [ 35.475083] snd_sof_amd_acp70 0000:c4:00.5: error: failed to load DSP topology -22 [ 35.475090] snd_sof_amd_acp70 0000:c4:00.5: ASoC: error at snd_soc_component_probe on 0000:c4:00.5: -22 [ 35.475117] sof_mach acp70-dsp: ASoC: failed to instantiate card -22 [ 35.475254] sof_mach acp70-dsp: error -EINVAL: Failed to register card(sof-acp70-dsp) [ 35.475261] sof_mach acp70-dsp: probe with driver sof_mach failed with error -22 Fixes: b2385de2ae11 ("ASoC: amd: acp: Add stream name to ACP PDM DMIC devices") Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://patch.msgid.link/20241104091312.1108299-1-venkataprasad.potturu@amd.com Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-01ASoC: sdw_utils/intel/amd: refactor dai link init logicVijendar Mukunda1-4/+4
Add 'no_pcm' as parameter for asoc_sdw_init_dai_link() so that same function can be used for SOF and legacy(No DSP) stack. Pass 'no_pcm' as 1 for Intel and AMD SOF based machine drivers. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20241101020802.1103181-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23ASoC: amd: remove dpcm_xxx flagsKuninori Morimoto5-39/+19
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to xxx_only if needed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87jze29vip.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-18ASoC/soundwire: add initial support for SDCAMark Brown1-2/+1
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: We need to get rt712 version by reading SDCA version and functions. This patch series adds initial support for SDCA and add a helper to tell if the codec is RT712_VB. This series may go via the ASoC tree with Vinod's Acked-by tag. Bard Liao (1): soundwire: sdw_intel: include linux/acpi.h Pierre-Louis Bossart (10): ASoC/soundwire: remove sdw_slave_extended_id ASoC: SDCA: add initial module soundwire: slave: lookup SDCA version and functions ASoC: SDCA: add quirk function for RT712_VB match ASoC: rt712-sdca: detect the SMART_MIC function during the probe stage ASoC: soc-acpi: introduce new 'machine check' callback ASoC: sdw_utils: add SmartMic DAI for RT712 VB ASoC: sdw_utils: add SmartMic DAI for RT713 VB ASoC: Intel: soc-acpi: add is_device_rt712_vb() helper ASoC: SOF: Intel: hda: use machine_check() for SoundWire drivers/soundwire/Kconfig | 1 + drivers/soundwire/amd_init.c | 12 +- drivers/soundwire/intel_init.c | 13 +- drivers/soundwire/slave.c | 14 ++ include/linux/soundwire/sdw.h | 9 +- include/linux/soundwire/sdw_amd.h | 7 +- include/linux/soundwire/sdw_intel.h | 8 +- include/sound/sdca.h | 62 +++++++ include/sound/sdca_function.h | 55 ++++++ include/sound/soc-acpi.h | 8 +- sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/amd/ps/pci-ps.c | 3 +- sound/soc/codecs/rt712-sdca-sdw.c | 1 + sound/soc/codecs/rt712-sdca.c | 38 +++- sound/soc/codecs/rt712-sdca.h | 1 + sound/soc/intel/Kconfig | 5 + sound/soc/intel/common/Makefile | 3 + .../intel/common/soc-acpi-intel-mtl-match.c | 51 ++++++ .../intel/common/soc-acpi-intel-sdca-quirks.c | 42 +++++ .../intel/common/soc-acpi-intel-sdca-quirks.h | 14 ++ sound/soc/sdca/Kconfig | 11 ++ sound/soc/sdca/Makefile | 5 + sound/soc/sdca/sdca_device.c | 67 +++++++ sound/soc/sdca/sdca_functions.c | 173 ++++++++++++++++++ sound/soc/sdw_utils/soc_sdw_utils.c | 18 +- sound/soc/soc-acpi.c | 30 +-- sound/soc/sof/amd/acp-common.c | 3 +- sound/soc/sof/intel/hda.c | 19 +- 29 files changed, 610 insertions(+), 65 deletions(-) create mode 100644 include/sound/sdca.h create mode 100644 include/sound/sdca_function.h create mode 100644 sound/soc/intel/common/soc-acpi-intel-sdca-quirks.c create mode 100644 sound/soc/intel/common/soc-acpi-intel-sdca-quirks.h create mode 100644 sound/soc/sdca/Kconfig create mode 100644 sound/soc/sdca/Makefile create mode 100644 sound/soc/sdca/sdca_device.c create mode 100644 sound/soc/sdca/sdca_functions.c -- 2.43.0
2024-10-18ASoC: amd: acp: Add stream name to ACP PDM DMIC devicesMario Limonciello1-0/+2
Add for sof and legacy dai links to dummy DMIC codec. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patch.msgid.link/20241017210952.3586713-1-superm1@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-17ASoC/soundwire: remove sdw_slave_extended_idPierre-Louis Bossart1-2/+1
This structure is used to copy information from the 'sdw_slave' structures, it's better to create a flexible array of 'sdw_slave' pointers and directly access the information. This will also help access additional information stored in the 'sdw_slave' structure, such as an SDCA context. This patch does not add new functionality, it only modified how the information is retrieved. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20241016102333.294448-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-17ASoC: Merge up fixesMark Brown1-0/+7
Some refactoring opportunities for the rcard driver were noticed while fixing a bug.
2024-10-17ASoC: amd: yc: Fix non-functional mic on ASUS E1404FAIlya Dudikov1-0/+7
ASUS Vivobook E1404FA needs a quirks-table entry for the internal microphone to function properly. Signed-off-by: Ilya Dudikov <ilyadud@mail.ru> Link: https://patch.msgid.link/20241016034038.13481-1-ilyadud25@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-10ASoC: amd: yc: Add quirk for ASUS Vivobook S15 M3502RAChristian Heusel1-0/+7
As reported the builtin microphone doesn't work on the ASUS Vivobook model S15 OLED M3502RA. Therefore add a quirk for it to make it work. Link: https://bugzilla.kernel.org/show_bug.cgi?id=219345 Signed-off-by: Christian Heusel <christian@heusel.eu> Link: https://patch.msgid.link/20241010-bugzilla-219345-asus-vivobook-v1-1-3bb24834e2c3@heusel.eu Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07ASoC: amd: acp: refactor sof_card_dai_links_create() functionVijendar Mukunda1-22/+11
Refactor sof_card_dai_links_create() function by replacing 'sof_ends' and 'sof_dais' structure declarations as struct asoc_sdw_endpoint *sof_ends __free(kfree) = NULL; struct asoc_sdw_dailink *sof_dais __free(kfree) = NULL; Use above declarations to eliminate goto statements usage. Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20241007085321.3991149-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07ASoC: amd: acp: fix for cpu dai index logicVijendar Mukunda1-7/+7
Multi link aggregation is not supported for acp6.3 platform. Below combinations are supported. - one sdw BE DAI <---> one-cpu DAI <---> one-codec DAI - one sdw BE DAI <---> one-cpu DAI <---> multi-codec DAIs As Single cpu dai is going to be created, In create_sdw_dailink() function cpu dai index won't be incremented. Refactor cpu dai index logic to fix below smatch static checker warning. sound/soc/amd/acp/acp-sdw-sof-mach.c:157 create_sdw_dailink() warn: iterator 'i' not incremented. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/all/a201e871-375e-43eb-960d-5c048956c2ff@amd.com/T/ Fixes: 6d8348ddc56e ("ASoC: amd: acp: refactor SoundWire machine driver code") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20241007085321.3991149-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07ASoC: amd: acp: fix for inconsistent indentingVijendar Mukunda1-1/+1
Fix below Smatch static checker warning: sound/soc/amd/acp/acp-sdw-sof-mach.c:365 sof_card_dai_links_create() warn: inconsistent indenting Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/all/a201e871-375e-43eb-960d-5c048956c2ff@amd.com/T/ Fixes: 6d8348ddc56e ("ASoC: amd: acp: refactor SoundWire machine driver code") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20241007085321.3991149-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-03ASoC: amd: ps: pass acp pci revision id as soundwire resource dataVijendar Mukunda2-0/+4
Add acp_rev as structure member in acp pci driver private data structure to store acp pci revision id and assign this variable to SoundWire resource data acp_rev variable. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20240924081846.1834612-5-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-10-02ASoC: amd: acp: drop bogus NULL check from i2s_irq_handlerMurad Masimov1-3/+0
When i2s_irq_handler is called, it's guaranteed that adata is not NULL, since IRQ handlers are guaranteed to be provided with a valid data pointer. Moreover, adata pointer is being dereferenced right before the NULL check, which makes the check pointless, even if adata could be NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Murad Masimov <m.masimov@maxima.ru> Link: https://patch.msgid.link/20241001190848.711-1-m.masimov@maxima.ru Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-30ASoC: amd: acp: remove unused variable from acp platform driverVijendar Mukunda6-17/+0
Remove 'platform' variable from acp platform driver private data structure. For platform differentiation, ACP pci revision id being used through out the code. As platform variable is no longer used in code, drop the code corresponding to 'platform' variable. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240924061821.1127054-10-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-30ASoC: amd: acp: replace adata->platform conditional checkVijendar Mukunda2-5/+5
Replace adata->platform condition check with acp pci revision id variable in config_acp_dma() & acp70_i2s_master_clock_generate() functions. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240924061821.1127054-9-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-30ASoC: amd: acp: remove unused variable from acp_card_drvdata structureVijendar Mukunda3-8/+0
Remove unused 'platform' variable from acp_card_drvdata structure. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240924061821.1127054-8-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-30ASoC: amd: acp: update mach_params subsystem_rev fieldVijendar Mukunda1-0/+1
Update mach_params subsystem_rev field in acp_machine_select() function with acp pci revision id value. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240924061821.1127054-7-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-30ASoC: amd: acp: pass acp pci revision id as platform dataVijendar Mukunda2-3/+4
Pass acp pci revision id as platform data to machine driver instead of 'platform' variable when ACP PDM configuration is selected. 'acp_rev' should be retrieved from mach params revision id for other configuration. Modify the conditional check for the same. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240924061821.1127054-6-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-30ASoC: amd: acp: store acp pci rev id in platform driver private structureVijendar Mukunda5-0/+5
Store acp pci revision id in platform driver private structure for all acp varaints. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240924061821.1127054-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-30ASoC: amd: acp: use acp pci revision id for platform differntiationVijendar Mukunda10-53/+43
Store acp pci revision id value in 'acp_rev' variable. Use common ACP PCI revision id macros throughout the code for acp_rev check and remove unused macros for platform differentiation from common header file for acp platform driver. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240924061821.1127054-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-30ASoC: amd: acp: use acp_rev for platform specific conditional checksVijendar Mukunda5-12/+38
Add 'acp_rev' as a member in machine driver private data structure to store acp pci revision id. Replace platform specific conditional checks by using 'acp_rev' variable. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240924061821.1127054-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-30ASoC: amd: acp: simplify platform conditional checks codeVijendar Mukunda1-10/+26
Simplify code with switch statements for platform conditional checks. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240924061821.1127054-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-30Merge existing fixes from asoc/for-6.12 into new branchMark Brown2-5/+7
2024-09-19ASoC: amd: yc: Add quirk for HP Dragonfly pro oneDavid Lawrence Glanzman1-0/+7
Adds a quirk entry to enable the mic on HP Dragonfly pro one laptop Signed-off-by: David Lawrence Glanzman <davidglanzman@yahoo.com> Link: https://patch.msgid.link/1249c09bd6bf696b59d087a4f546ae397828656c.camel@yahoo.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-18ASoC: amd: acp: don't set card long_nameVijendar Mukunda1-5/+0
UCM can load a board-specific file based on the card long_name. Remove the constant "AMD Soundwire SOF" long_name so that the ASoC core can set the long_name based on DMI information. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240916061318.3147988-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-14Merge tag 'asoc-v6.12' of ↵Takashi Iwai29-167/+1107
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.12 This is a very large set of changes, almost all in drivers rather than the core. Even with the addition of several quite large drivers the overall diffstat is negative thanks to the removal of some old Intel board support which has been obsoleted by the AVS driver, helped a bit by some factoring out into helpers (especially around the Soundwire machine drivers for x86). Highlights include: - More simplifications and cleanups throughout the subsystem from Morimoto-san. - Extensive cleanups and refactoring of the Soundwire drivers to make better use of helpers. - Removal of Intel machine support obsoleted by the AVS driver. - Lots of DT schema conversions. - Machine support for many AMD and Intel x86 platforms. - Support for AMD ACP 7.1, Mediatek MT6367 and MT8365, Realtek RTL1320 SoundWire and rev C, and Texas Instruments TAS2563
2024-09-13ASoC: amd: acp: refactor SoundWire machine driver codeVijendar Mukunda1-386/+154
Refactor Soundwire machine driver code by using common SoundWire endpoint parsing helper functions. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20240913090631.1834543-6-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-11ASoC: amd: acp: remove MODULE_ALIAS for sof based generic machine driverVijendar Mukunda1-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>
2024-09-11ASoC: amd: acp: remove MODULE_ALIAS for legacy machine driverVijendar Mukunda1-7/+0
As module device table added for AMD legacy machine driver, MODULE_ALIAS is not required. Remove MODULE_ALIAS for AMD legacy machine driver. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240911093554.2076872-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-09ASoC: Switch back to struct platform_driver::remove()Uwe Kleine-König12-12/+12
After commit 0edb555a65d1 ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers. Convert all drivers below sound/soc to use .remove(), with the eventual goal to drop struct platform_driver::remove_new(). As .remove() and .remove_new() have the same prototypes, conversion is done by just changing the structure member name in the driver initializer. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20240909151230.909818-2-u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-06ASoC: amd: acp: Return in-case of errorMuhammad Usama Anjum1-1/+1
Return when error occurs instead of proceeding to for loop which will use val uninitialized. Fixes: f6f7d25b1103 ("ASoC: amd: acp: Add pte configuration for ACP7.0 platform") Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Link: https://patch.msgid.link/20240906103727.222749-1-usama.anjum@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>