summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2023-10-26sc7180: Add qdsp based soundcardMark Brown1-22/+173
Merge series from Nikita Travkin <nikita@trvn.ru>: Some devices, such as Acer Aspire 1, can't use lpass dirrectly, but instead must use adsp core to play sound. Since otherwise the hardware is, usually, very similar across the devices on the same platform, it makes sense to reuse the same boardfile. This series refactors the sc7180.c slightly and adds the functions to control clocks via adsp instead of controlling the hardware directly.
2023-10-26ASoC: fix widget name comparisons (consider DAI nameMark Brown21-49/+53
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>: Some codec drivers compare widget names with strcmp, ignoring the component name prefix. If prefix is used, the comparisons start failing. Except Qualcomm lpass-rx-macro, none of the patches were tested on hardware.
2023-10-26ASoC: codecs: Add aw88399 amplifier driverMark Brown6-0/+2530
Merge series from wangweidong.a@awinic.com: Add the awinic,aw88399 property to the awinic,aw88395.yaml file. Add i2c and amplifier registration for aw88399 and their associated operation functions.
2023-10-26ASoC: cs35l41: Detect CSPL errors when sending CSPL commandsStefan Binding1-0/+5
The existing code checks for the correct state transition after sending a command. However, it is possible for the message box to return -1, which indicates an error, if an error has occurred in the firmware. We can detect if the error has occurred, and return a different error. In addition, there is no recovering from a CSPL error, so the retry mechanism is not needed in this case, and we can return immediately. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20231026150558.2105827-9-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: hda: cs35l41: Check CSPL state after loading firmwareStefan Binding1-0/+18
CSPL firmware should be in RUNNING or PAUSED state after loading. If not, the firmware has not been loaded correctly, and we can unload it and pass the error up. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231026150558.2105827-8-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: hda: cs35l41: Do not unload firmware before reset in system suspendStefan Binding1-29/+4
Given the part is about to reset due to system suspend, and we are already in hibernate, there is no need to wake up the amp, just to get it ready to be reset. We just need to ensure cs_dsp is ready for reset by resetting the states. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231026150558.2105827-7-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: hda: cs35l41: Force a software reset after hardware resetStefan Binding2-0/+6
To ensure the chip has correctly reset during probe and system suspend, we need to force a software reset, in case of systems where the hardware reset is not available. The software reset register was labelled as volatile but not readable, however, it is readable, (just returns 0x0). Adding it to readable registers means it will be correctly treated as volatile, and thus will not be cached. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231026150558.2105827-6-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: hda: cs35l41: Run boot process during resume callbacksStefan Binding1-33/+72
During initial probe, after reset is asserted for the first time, the driver goes through a boot process to ensure the amp is ready to be used. This involves verifying a boot flag, as well as verifying the chip ids. This is necessary since it is possible for the amp to have been fully reset by the system suspend calls. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231026150558.2105827-5-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: hda: cs35l41: Assert Reset prior to de-asserting in probe and system ↵Stefan Binding1-0/+2
resume To ensure we are in a known state, exiting from reset at the point of probe or in system resume, assert reset before we de-assert it. Since the BIOS may enter into a pre-boot environment to control the amps (for example for boot beep), we need to ensure we start from a known, reset state prior to probe or system resume. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231026150558.2105827-4-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: hda: cs35l41: Assert reset before system suspendStefan Binding1-5/+8
Some system suspend modes may remove power supplies. To ensure we are not running during this time, we should assert reset. Note: since the amps use a shared reset, asserting reset prior to system suspend only works if the amps are suspended in the reverse order to probe. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231026150558.2105827-3-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: hda: cs35l41: Use reset label to get GPIO for HP Zbook Fury 17 G9Stefan Binding1-2/+9
This laptop has an incorrect setting in its _DSD for boost type, but the rest of the _DSD is correct, and we can still use the reset label to obtain the reset gpio. Also fix channel map so that amp 0 is right, and amp 1 is left. Fixes: 581523ee3652 ("ALSA: hda: cs35l41: Override the _DSD for HP Zbook Fury 17 G9 to correct boost type") Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231026150558.2105827-2-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ASoC: Intel: Skylake: Fix mem leak when parsing UUIDs failsCezary Rojewski1-0/+1
Error path in snd_skl_parse_uuids() shall free last allocated module if its instance_id allocation fails. Fixes: f8e066521192 ("ASoC: Intel: Skylake: Fix uuid_module memory leak in failure case") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20231026082558.1864910-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: tegra: machine: Handle component name prefixKrzysztof Kozlowski1-4/+8
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231023095428.166563-18-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: samsung: speyside: Handle component name prefixKrzysztof Kozlowski1-2/+2
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231023095428.166563-17-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: mediatek: mt8192: Handle component name prefixKrzysztof Kozlowski2-4/+4
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231023095428.166563-16-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: mediatek: mt8188: Handle component name prefixKrzysztof Kozlowski1-2/+2
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20231023095428.166563-15-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: mediatek: mt8186: Handle component name prefixKrzysztof Kozlowski4-6/+6
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231023095428.166563-14-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: mediatek: mt8183: Handle component name prefixKrzysztof Kozlowski1-2/+2
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231023095428.166563-13-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: codecs: wm8995: Handle component name prefixKrzysztof Kozlowski1-1/+1
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231023095428.166563-12-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: codecs: wm8994: Handle component name prefixKrzysztof Kozlowski1-1/+1
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231023095428.166563-11-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: codecs: wm8962: Handle component name prefixKrzysztof Kozlowski1-2/+2
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231023095428.166563-10-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: codecs: wcd9335: Handle component name prefixKrzysztof Kozlowski1-9/+9
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231023095428.166563-9-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: codecs: rtq9128: Handle component name prefixKrzysztof Kozlowski1-3/+3
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231023095428.166563-8-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: codecs: rt5682s: Handle component name prefixKrzysztof Kozlowski1-2/+2
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231023095428.166563-7-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: codecs: max9867: Handle component name prefixKrzysztof Kozlowski1-4/+4
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20231023095428.166563-6-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: codecs: lpass-rx-macro: Handle component name prefixKrzysztof Kozlowski1-3/+3
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231023095428.166563-5-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: codecs: adav80x: Handle component name prefixKrzysztof Kozlowski1-1/+1
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20231023095428.166563-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: codecs: adau1373: Handle component name prefixKrzysztof Kozlowski1-1/+1
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20231023095428.166563-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: codecs: 88pm860x: Handle component name prefixKrzysztof Kozlowski1-2/+2
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231023095428.166563-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ALSA: aoa: Replace with __packed attributeTakashi Iwai1-1/+1
Replace the old __attribute__((packed)) with the new __packed. Only cleanup, no functional changes. Link: https://lore.kernel.org/r/20231025132314.5878-8-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: caiaq: Replace with __packed attributeTakashi Iwai1-1/+1
Replace the old __attribute__((packed)) with the new __packed. Only cleanup, no functional changes. Link: https://lore.kernel.org/r/20231025132314.5878-7-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: mixart: Replace with __packed attributeTakashi Iwai1-35/+35
Replace the old __attribute__((packed)) with the new __packed. Only cleanup, no functional changes. Link: https://lore.kernel.org/r/20231025132314.5878-6-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: azt3328: Replace with __packed attributeTakashi Iwai1-1/+1
Replace the old __attribute__((packed)) with the new __packed. Only cleanup, no functional changes. Link: https://lore.kernel.org/r/20231025132314.5878-5-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: rawmidi: Replace with __packed attributeTakashi Iwai1-2/+2
Replace the old __attribute__((packed)) with the new __packed. Only cleanup, no functional changes. Link: https://lore.kernel.org/r/20231025132314.5878-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: pcm: Replace with __packed attributeTakashi Iwai1-2/+2
Replace the old __attribute__((packed)) with the new __packed. Only cleanup, no functional changes. Link: https://lore.kernel.org/r/20231025132314.5878-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ALSA: control: Replace with __packed attributeTakashi Iwai1-1/+1
Replace the old __attribute__((packed)) with the new __packed. Only cleanup, no functional changes. Link: https://lore.kernel.org/r/20231025132314.5878-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-25ASoC: amd: acp: add machine driver support for acp7.0Syed Saba Kareem1-0/+9
add machine driver support for ACP7.0 on legacy stack. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-13-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25ASoC: amd: acp: Add pci legacy driver support for acp7.0 platformSyed Saba Kareem5-1/+273
Add pci legacy driver support and create platform driver for acp7.0 platform. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-12-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25ASoC: amd: acp: change acp power on mask macro valueSyed Saba Kareem1-1/+1
change acp power on mask macro value so that same macro can be used for all amd platforms. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-11-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25ASoC: amd: acp: change acp-deinit function argumentsSyed Saba Kareem3-6/+6
acp-deinit function will not be same for all platforms. To make platform specific changes in acp-deinit function, instead of passing base address pass chip structure which contains acp_rev feild. chip->acp_rev will be used to add platform specific code in acp-deinit(). Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-10-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25ASoC: amd: acp: add machine driver support for pdm use caseSyed Saba Kareem2-11/+30
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-10-25ASoC: amd: acp: add condition check for i2s clock generationSyed Saba Kareem2-6/+18
for only PDM endpoint i2s master clock is not required. Add a condition check for the same based on chip flag value. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-8-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25ASoC: amd: acp: add platform and flag data to acp data structureSyed Saba Kareem4-1/+13
add name of the platform and flag data in private data structure. name of the platform will be used to differentiate platforms where as flag will be used to know what kind of endpoint configuration is selected where its legacy(I2S + PDM) or only ACP PDM. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-7-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25ASoC: amd: acp: add code for scanning acp pdm controllerSyed Saba Kareem5-1/+86
Add common code for scanning acp pdm controller and create platform device for the same. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-6-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25ASoC: amd: acp: add Kconfig options for acp6.3 based platform driverSyed Saba Kareem2-0/+13
ACP6.3 based platform legacy drivers can be built by selecting necessary kernel config option. This patch enables build support of the same. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-5-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25ASoC: amd: acp: add machine driver support for acp6.3 platformSyed Saba Kareem2-0/+16
add legacy machine driver support for acp6.3 based platform. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-4-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25ASoC: amd: acp: add i2s clock generation support for acp6.3 based platformsSyed Saba Kareem1-3/+16
Add I2S LRCLK & BCLK generation code for ACP6.3 based platforms. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-3-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25ASoC: amd: acp: refactor acp i2s clock generation codeSyed Saba Kareem2-39/+32
Refactor acp i2s LRCLK,BCLK generation code and move to commnon file. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-2-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25ASoC: amd: acp: Add acp6.3 pci legacy driver supportSyed Saba Kareem4-0/+326
Add pci legacy driver support and create platform driver for acp6.3 based platforms. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20231021145110.478744-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-25ASoC: Intel: Skylake: add an error code check in skl_pcm_triggerSu Hui1-0/+3
skl_decoupled_trigger() can return error code like -EPIPE if failed, add check for this. Signed-off-by: Su Hui <suhui@nfschina.com> Link: https://lore.kernel.org/r/20231020092619.210520-1-suhui@nfschina.com Signed-off-by: Mark Brown <broonie@kernel.org>