summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2023-02-22Merge tag 'sound-6.3-rc1' of ↵Linus Torvalds281-2465/+30441
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "The majority of works in this cycle are about ASoC spread over trees. Most of them are for new devices and cleanups / refactoring works, and not much significant changes are seen in the core side. Below are some highlights: ASoC: - Continued refactoring to move into common helper functions - Lots of DT schema conversons and stylistic nits - Continued work on building out the new SOF IPC4 scheme - Continued work for Intel AVS - New drivers for Awinc AT88395, Infineon PEB2466, Iron Device SMA1303, Mediatek MT8188, Realtek RT712, Renesas IDT821034, Samsung/Tesla FSD SoC I2S, and TI TAS5720A-Q1 ALSA: - A few cleanups to make the remove callbacks to void returns - FireWire refactoring and enhancements - PCM kselftest enhancements" * tag 'sound-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (398 commits) ALSA: hda/hdmi: Register with vga_switcheroo on Dual GPU Macbooks ASoC: soc-ac97: Return correct error codes ASoC: soc-dapm.h: fixup warning struct snd_pcm_substream not declared ASoC: cs35l45: Remove separate namespace for tables ASoC: cs35l45: Remove separate tables module ASoC: soc-ac97: Convert to agnostic GPIO API ASoC: dt-bindings: renesas,rsnd.yaml: drop "dmas/dma-names" from "rcar_sound,ssi" ALSA: hda: cs35l41: Enable Amp High Pass Filter ALSA: hda: cs35l41: Ensure firmware/tuning pairs are always loaded ALSA: hda: cs35l41: Correct error condition handling ASoC: codecs: wcd934x: Use min macro for comparison and assignment ASoC: Intel: Skylake: Fix struct definition ASoC: tlv320adcx140: extend list of supported samplerates ASoC: imx-pcm-rpmsg: Remove unused variable SoC: rt5682s: Disable jack detection interrupt during suspend ASoC: SOF: Intel: hda-dsp: Set streaming flag for d0i3 ASoC: SOF: Intel: Enable d0i3 work for ipc4 ASoC: SOF: ipc4: Wake up dsp core before sending ipc msg ASoC: SOF: Intel: hda-dsp: use set_pm_gate according to ipc version ASoC: SOF: Introduce a new set_pm_gate() IPC PM op ...
2023-02-21Merge tag 'arm-boardfile-remove-6.3' of ↵Linus Torvalds51-9001/+3
git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC boardfile updates from Arnd Bergmann "Unused boardfile removal for 6.3 This is a follow-up to the deprecation of most of the old-style board files that was merged in linux-6.0, removing them for good. This branch is almost exclusively dead code removal based on those annotations. Some device driver removals went through separate subsystem trees, but the majority is in the same branch, in order to better handle dependencies between the patches and avoid breaking bisection. Unfortunately that leads to merge conflicts against other changes in the subsystem trees, but they should all be trivial to resolve by removing the files. See commit 7d0d3fa7339e ("Merge tag 'arm-boardfiles-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc") for the description of which machines were marked unused and are now removed. The only removals that got postponed are Terastation WXL (mv78xx0) and Jornada720 (StrongARM1100), which turned out to still have potential users" * tag 'arm-boardfile-remove-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (91 commits) mmc: omap: drop TPS65010 dependency ARM: pxa: restore mfp-pxa320.h usb: ohci-omap: avoid unused-variable warning ARM: debug: remove references in DEBUG_UART_8250_SHIFT to removed configs ARM: s3c: remove obsolete s3c-cpu-freq header MAINTAINERS: adjust SAMSUNG SOC CLOCK DRIVERS after s3c24xx support removal MAINTAINERS: update file entries after arm multi-platform rework and mach-pxa removal ARM: remove CONFIG_UNUSED_BOARD_FILES mfd: remove htc-pasic3 driver w1: remove ds1wm driver usb: remove ohci-tmio driver fbdev: remove w100fb driver fbdev: remove tmiofb driver mmc: remove tmio_mmc driver mfd: remove ucb1400 support mfd: remove toshiba tmio drivers rtc: remove v3020 driver power: remove pda_power supply driver ASoC: pxa: remove unused board support pcmcia: remove unused pxa/sa1100 drivers ...
2023-02-18Merge tag 'sound-fix-6.2' of ↵Linus Torvalds5-7/+15
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A few last-minute fixes. The significant ones are two ASoC SOF regression fixes while the rest are trivial HD-audio quirks. All are small / one-liners and should be pretty safe to take" * tag 'sound-fix-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: SOF: Intel: hda-dai: fix possible stream_tag leak ALSA: hda/realtek: Enable mute/micmute LEDs and speaker support for HP Laptops ALSA: hda/realtek: fix mute/micmute LEDs don't work for a HP platform. ALSA: hda/realtek - fixed wrong gpio assigned ALSA: hda: Fix codec device field initializan ALSA: hda/conexant: add a new hda codec SN6180 ASoC: SOF: ops: refine parameters order in function snd_sof_dsp_update8
2023-02-17Merge tag 'asoc-fix-v6.2-rc8-2' of ↵Takashi Iwai1-4/+4
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: One more fix for v6.2 One more fix from Peter which he'd very much like to get into v6.2.
2023-02-16ASoC: SOF: Intel: hda-dai: fix possible stream_tag leakPierre-Louis Bossart1-4/+4
The HDaudio stream allocation is done first, and in a second step the LOSIDV parameter is programmed for the multi-link used by a codec. This leads to a possible stream_tag leak, e.g. if a DisplayAudio link is not used. This would happen when a non-Intel graphics card is used and userspace unconditionally uses the Intel Display Audio PCMs without checking if they are connected to a receiver with jack controls. We should first check that there is a valid multi-link entry to configure before allocating a stream_tag. This change aligns the dma_assign and dma_cleanup phases. Complements: b0cd60f3e9f5 ("ALSA/ASoC: hda: clarify bus_get_link() and bus_link_get() helpers") Link: https://github.com/thesofproject/linux/issues/4151 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230216162340.19480-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-16Merge branch 'for-linus' into for-nextTakashi Iwai4-3/+11
Pull the pending fixes for 6.3 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-16Merge tag 'asoc-v6.3' of ↵Takashi Iwai252-2080/+29761
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.3 There's been quite a lot of activity this release, but not really one big feature - lots of new devices, plus a lot of cleanup and modernisation work spread throughout the subsystem: - More factoring out of common operations into helper functions by Morimoto-san. - DT schema conversons and stylistic nits. - Continued work on building out the new SOF IPC4 scheme. - Support for Awinc AT88395, Infineon PEB2466, Iron Device SMA1303, Mediatek MT8188, Realtek RT712, Renesas IDT821034, Samsung/Tesla FSD SoC I2S, and TI TAS5720A-Q1.
2023-02-16Merge tag 'asoc-fix-v6.2-rc8' of ↵Takashi Iwai1-1/+1
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fix for v6.2 One non-urgent fix for v6.2, this could possibly wait till the merge window.
2023-02-16Merge branch 'topic/apple-gmux' into for-nextTakashi Iwai30-143/+314
Pull vga_switcheroo fix for Macs Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-16ALSA: hda/hdmi: Register with vga_switcheroo on Dual GPU MacbooksOrlando Chamberlain1-1/+2
Commit 586bc4aab878 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD") caused only AMD gpu's with PX to have their audio component register with vga_switcheroo. This meant that Apple Macbooks with apple-gmux as the gpu switcher no longer had the audio client registering, so when the gpu is powered off by vga_switcheroo snd_hda_intel is unaware that it should have suspended the device: amdgpu: switched off snd_hda_intel 0000:03:00.1: Unable to change power state from D3hot to D0, device inaccessible snd_hda_intel 0000:03:00.1: CORB reset timeout#2, CORBRP = 65535 To resolve this, we use apple_gmux_detect() and register a vga_switcheroo audio client when apple-gmux is detected. Fixes: 586bc4aab878 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD") Link: https://lore.kernel.org/all/20230210044826.9834-9-orlandoch.dev@gmail.com/ Signed-off-by: Orlando Chamberlain <orlandoch.dev@gmail.com> Link: https://lore.kernel.org/r/20230216103450.12925-1-orlandoch.dev@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-15ASoC: soc-ac97: Return correct error codesAndy Shevchenko1-2/+2
With the switching to dev_err_probe(), during the conversion of GPIO calls, the return code is passed is a paratemer to it. At the same time a copy'n'paste mistake was made, so the wrong variable has been taken for the error reporting. Fix this. Fixes: 3ee0d39c50dc ("ASoC: soc-ac97: Convert to agnostic GPIO API") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230215132343.35547-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-15ASoC: cs35l45: Remove separate namespace for tablesCharles Keepax4-7/+4
Now tables isn't a separate module, definitely no need to have a separate namespace for it. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230215105818.3315925-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-15ASoC: cs35l45: Remove separate tables moduleCharles Keepax3-12/+1
There is no reason to have a separate module for the tables file it just holds regmap callbacks and register patches used by the main part of the driver. Remove the separate module and merge it into the main driver module. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230215105818.3315925-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-15ASoC: soc-ac97: Convert to agnostic GPIO APIAndy Shevchenko1-46/+22
The of_gpio.h is going to be removed. In preparation of that convert the driver to the agnostic API. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230213161713.1450-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-14ASoC: SOF: Intel/ipc4: Support for low power playbackMark Brown8-11/+113
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: The following series will enable the the Low Power Audio (LPA) playback on Intel platforms when using IPC4. The support is closely follows how IPC3 supports similar use case. All depending patches are upstream and our CI have been testing this feature for some time without issues.
2023-02-14ALSA: hda/realtek: Enable mute/micmute LEDs and speaker support for HP LaptopsAndy Chi1-0/+6
On HP Laptops, requires the ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED quirk to make its audio LEDs and speaker work. Signed-off-by: Andy Chi <andy.chi@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230214140432.39654-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-14ALSA: hda: cs35l41: Enable Amp High Pass FilterStefan Binding1-3/+3
This helps smooth out pops and clicks in the amps. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230213145008.1215849-4-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-14ALSA: hda: cs35l41: Ensure firmware/tuning pairs are always loadedStefan Binding1-52/+51
To ensure firmware for cs35l41 is correctly running, it is necessary that a corresponding tuning file is also loaded. Without both, the firmware may not be performing correctly Ensure that if we load the firmware, we have also loaded the correct tuning file. Otherwise, fall back to default firmware and tuning. If default tuning is also missing, then disable DSP firmware. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230213145008.1215849-3-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-14ALSA: hda: cs35l41: Correct error condition handlingVitaly Rodionov1-2/+2
Function cs_dsp_coeff_write_ctrl() can return 3 possible values: 0 - no change, 1 - value has changed and -1 - error, so positive value is not an error. Fixes: 7406bdbc4fb8 ("ASoC: wm_adsp: Return whether changed when writing controls") Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230213145008.1215849-2-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-14ASoC: codecs: wcd934x: Use min macro for comparison and assignmentDeepak R Varma1-7/+3
Simplify code by using min helper macro for logical evaluation and value assignment. The change also facilitates code realignment for improved readability. Proposed change is identified using minmax.cocci Coccinelle script. Signed-off-by: Deepak R Varma <drv@mailo.com> Link: https://lore.kernel.org/r/Y+p2Hn0nrtHiKwPR@ubun2204.myguest.virtualbox.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-14ASoC: Intel: Skylake: Fix struct definitionAmadeusz Sławiński2-2/+5
The kernel is globally removing the ambiguous 0-length and 1-element arrays in favor of flexible arrays, so that we can gain both compile-time and run-time array bounds checking[1]. In this instance, struct skl_cpr_cfg contains struct skl_cpr_gtw_cfg, which defined "config_data" as a 1-element array. However, case present in sound/soc/intel/skylake/skl-topology.h is not a simple one as the structure takes part in IPC communication. Apparently original definition missed one field, which while not used by AudioDSP firmware when there is no additional data, is still expected to be part of an IPC message. Currently this works because of how 'config_data' is declared: 'config_data[1]'. Now when one replaces it with a flexible array there would be one field missing. Update struct declaration to fix this. Reported-by: Sasa Ostrouska <casaxa@gmail.com> Link: https://lore.kernel.org/all/CALFERdwvq5day_sbDfiUsMSZCQu9HG8-SBpOZDNPeMdZGog6XA@mail.gmail.com/ Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com> Cc: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Cc: Bard Liao <yung-chuan.liao@linux.intel.com> Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org> Cc: alsa-devel@alsa-project.org CC: Kees Cook <keescook@chromium.org> Reviewed-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/20230213205223.2679357-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-14ASoC: tlv320adcx140: extend list of supported sampleratesSteffen Aschbacher1-1/+3
The 'tlv320adcx140' driver currently supports 3 devices: TLV320ADC3140, TLV320ADC5140 and TLV320ADC6140. All 3 devices, support higher samplerates, up to 768-kHz according to their datasheets. In our applications, we only tested (and worked) with 96 kHz and 192 kHz. This change extends the list of supported sample-rates for these devices with 96 & 192 kHz. References: https://www.ti.com/product/TLV320ADC3140 https://www.ti.com/product/TLV320ADC5140 https://www.ti.com/product/TLV320ADC6140 Signed-off-by: Steffen Aschbacher <steffen.aschbacher@stihl.de> Signed-off-by: Alexandru Ardelean <alex@shruggie.ro> Link: https://lore.kernel.org/r/20230214091051.16323-1-alex@shruggie.ro Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-14ASoC: imx-pcm-rpmsg: Remove unused variableDeepak R Varma1-4/+2
Variable ret is initialed but is never modified or used except for returning the initial value 0. The value can be directly returned instead and the variable definition can be dropped. Issue identified using returnvar.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma <drv@mailo.com> Link: https://lore.kernel.org/r/Y+p9r5y9DPSJkPVf@ubun2204.myguest.virtualbox.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-14SoC: rt5682s: Disable jack detection interrupt during suspendMatthias Kaehlcke2-1/+10
The rt5682s driver switches its regmap to cache-only when the device suspends and back to regular mode on resume. When the jack detect interrupt fires rt5682s_irq() schedules the jack detect work. This can result in invalid reads from the regmap in cache-only mode if the work runs before the device has resumed: [ 19.672162] rt5682s 2-001a: ASoC: error at soc_component_read_no_lock on rt5682s.2-001a for register: [0x000000f0] -16 Disable the jack detection interrupt during suspend and re-enable it on resume. The driver already schedules the jack detection work on resume, so any state change during suspend is still handled. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Link: https://lore.kernel.org/r/20230209012002.1.Ib4d6481f1d38a6e7b8c9e04913c02ca88c216cf6@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-14ASoC: SOF: Intel: hda-dsp: Set streaming flag for d0i3Rander Wang1-0/+31
Enable d0i3 streaming if all the active streams can work in d0i3 state and playback is enabled. Signed-off-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230214103345.30669-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-14ASoC: SOF: Intel: Enable d0i3 work for ipc4Rander Wang4-0/+34
Schedule a delayed work for d0i3 entry after every non-pm ipc msg. Signed-off-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230214103345.30669-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-14ASoC: SOF: ipc4: Wake up dsp core before sending ipc msgRander Wang1-0/+11
The driver shall update the power state to D0i0 before sending a generic IPC. Power-related IPCs are the exception to the rule, they may be sent even when the power-state is D0i3 Signed-off-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230214103345.30669-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-14ASoC: SOF: Intel: hda-dsp: use set_pm_gate according to ipc versionRander Wang1-11/+4
Use set_pm_gate to unify pm gate setting for different ipc version. Signed-off-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230214103345.30669-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-14ASoC: SOF: Introduce a new set_pm_gate() IPC PM opRander Wang3-0/+33
Set_pm_gate depends on ipc version. This patch defines the ops for both IPC3 and IPC4. Signed-off-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230214103345.30669-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-14ALSA: hda/realtek: fix mute/micmute LEDs don't work for a HP platform.Andy Chi1-0/+1
There is a HP platform needs ALC236_FIXUP_HP_GPIO_LED quirk to make mic-mute/audio-mute working. Signed-off-by: Andy Chi <andy.chi@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230214035853.31217-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-13ASoC: codecs: Remove unneeded semicolonYang Li1-2/+2
./sound/soc/codecs/peb2466.c:1851:2-3: Unneeded semicolon ./sound/soc/codecs/peb2466.c:1887:2-3: Unneeded semicolon Reported-by: Abaci Robot <abaci@linux.alibaba.com> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4045 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Acked-by: Herve Codina <herve.codina@bootlin.com> Link: https://lore.kernel.org/r/20230213010547.105312-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-13ASoC: tlv320adcx140: fix 'ti,gpio-config' DT property initSteffen Aschbacher1-1/+1
When the 'ti,gpio-config' property is not defined, the device_property_count_u32() will return an error, rather than zero. The current check, only handles a return value of zero, which assumes that the property is defined and has nothing defined. This change extends the check to also check for an error case (most likely to be hit by the case that the 'ti,gpio-config' is not defined). In case that the 'ti,gpio-config' and the returned 'gpio_count' is not correct, there is a 'if (gpio_count != ADCX140_NUM_GPIO_CFGS)' check, a few lines lower that will return -EINVAL. This means that someone tried to define 'ti,gpio-config', but with the wrong number of GPIOs. Fixes: d5214321498a ("ASoC: tlv320adcx140: Add support for configuring GPIO pin") Signed-off-by: Steffen Aschbacher <steffen.aschbacher@stihl.de> Signed-off-by: Alexandru Ardelean <alex@shruggie.ro> Link: https://lore.kernel.org/r/20230213073805.14640-1-alex@shruggie.ro Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-13ASoC: codecs: Modify error implicit declaration of function ↵Weidong Wang1-0/+1
'gpiod_set_value_cansleep' Add select GPIOLIB to the sound/soc/codecs/Kconfig file Signed-off-by: Ben Yi <yijiangtao@awinic.com> Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://lore.kernel.org/r/20230213093649.22928-4-wangweidong.a@awinic.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-13ASoC: codecs: Modify the log print statementWeidong Wang1-1/+1
Change hdrlen to hdr_len Signed-off-by: Ben Yi <yijiangtao@awinic.com> Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://lore.kernel.org/r/20230213093649.22928-3-wangweidong.a@awinic.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-13ASoC: codecs: Fixed a spelling error in the function nameWeidong Wang1-2/+2
Change the function name aw88395_plack_event to aw88395_playback_event Signed-off-by: Ben Yi <yijiangtao@awinic.com> Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://lore.kernel.org/r/20230213093649.22928-2-wangweidong.a@awinic.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-13ASoC: ep93xx: ignore 0 Hz sysclkAlexander Sverdlin1-0/+2
Commit 2458adb8f92a ("SoC: simple-card-utils: set 0Hz to sysclk when shutdown") added a call to snd_soc_dai_set_sysclk() with 0 Hz frequency. Being propagated further it causes a division by zero in clk-ep93xx driver: Division by zero in kernel. CPU: 0 PID: 52 Comm: aplay Tainted: G W 6.2.0-rc4-... #1 Hardware name: Generic DT based system unwind_backtrace from show_stack+0x10/0x18 show_stack from dump_stack_lvl+0x28/0x34 dump_stack_lvl from __div0+0x10/0x1c __div0 from Ldiv0+0x8/0x1c Ldiv0 from ep93xx_mux_determine_rate+0x78/0x1d0 ep93xx_mux_determine_rate from clk_core_round_rate_nolock+0x48/0xc8 clk_core_round_rate_nolock from clk_core_set_rate_nolock+0x48/0x160 clk_core_set_rate_nolock from clk_set_rate+0x30/0x8c clk_set_rate from ep93xx_i2s_set_sysclk+0x30/0x6c ep93xx_i2s_set_sysclk from snd_soc_dai_set_sysclk+0x3c/0xa4 snd_soc_dai_set_sysclk from asoc_simple_shutdown+0xb8/0x164 asoc_simple_shutdown from snd_soc_link_shutdown+0x44/0x54 snd_soc_link_shutdown from soc_pcm_clean+0x78/0x180 soc_pcm_clean from soc_pcm_close+0x28/0x40 soc_pcm_close from snd_pcm_release_substream.part.0+0x3c/0x84 snd_pcm_release_substream.part.0 from snd_pcm_release+0x40/0x88 snd_pcm_release from __fput+0x74/0x278 There has been commit f1879d7b98dc ("ASoC: rockchip: ignore 0Hz sysclk"), but it prepared by far not all drivers. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Link: https://lore.kernel.org/r/20230212220923.258414-1-alexander.sverdlin@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-13ALSA: hda/realtek - fixed wrong gpio assignedKailang Yang1-1/+1
GPIO2 PIN use for output. Mask Dir and Data need to assign for 0x4. Not 0x3. This fixed was for Lenovo Desktop(0x17aa1056). GPIO2 use for AMP enable. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/8d02bb9ac8134f878cd08607fdf088fd@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-11ALSA: hda: make kobj_type structure constantThomas Weißschuh1-1/+1
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20230211-kobj_type-sound-v1-1-17107ceb25b7@weissschuh.net Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-11ALSA: hda: Fix codec device field initializanCezary Rojewski1-1/+1
Commit f2bd1c5ae2cb ("ALSA: hda: Fix page fault in snd_hda_codec_shutdown()") relocated initialization of several codec device fields. Due to differences between codec_exec_verb() and snd_hdac_bus_exec_bus() in how they handle VERB execution - the latter does not touch PM - assigning ->exec_verb to codec_exec_verb() causes PM to be engaged before it is configured for the device. Configuration of PM for the ASoC HDAudio sound card is done with snd_hda_set_power_save() during skl_hda_audio_probe() whereas the assignment happens early, in snd_hda_codec_device_init(). Revert to previous behavior to avoid problems caused by too early PM manipulation. Suggested-by: Jason Montleon <jmontleo@redhat.com> Link: https://lore.kernel.org/regressions/CALFERdzKUodLsm6=Ub3g2+PxpNpPtPq3bGBLbff=eZr9_S=YVA@mail.gmail.com Fixes: f2bd1c5ae2cb ("ALSA: hda: Fix page fault in snd_hda_codec_shutdown()") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20230210165541.3543604-1-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-10Merge tag 'sound-6.2-rc8' of ↵Linus Torvalds9-73/+134
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Hopefully the last one for 6.2, a collection of the fixes that have been gathered since the last pull. All changes are small and trivial device-specific fixes" * tag 'sound-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Add Positivo N14KP6-TG ASoC: topology: Return -ENOMEM on memory allocation failure ALSA: emux: Avoid potential array out-of-bound in snd_emux_xg_control() ASoC: fsl_sai: fix getting version from VERID ALSA: hda/realtek: fix mute/micmute LEDs don't work for a HP platform. ALSA: hda/realtek: Add quirk for ASUS UM3402 using CS35L41 ASoC: codecs: es8326: Fix DTS properties reading ASoC: tas5805m: add missing page switch. ASoC: tas5805m: rework to avoid scheduling while atomic. ALSA: hda/realtek: Enable mute/micmute LEDs on HP Elitebook, 645 G9 ASoC: SOF: amd: Fix for handling spurious interrupts from DSP ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 Pro 360 ALSA: pci: lx6464es: fix a debug loop ASoC: rt715-sdca: fix clock stop prepare timeout issue
2023-02-10ASoC: rt712-sdca: fix coding style and unconditionally return issuesShuming Fan1-5/+17
This patch fixes 1. coding style issues 2. check if the setting was set already in rt712_sdca_mux_put callback Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://lore.kernel.org/r/20230210082141.24077-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-10ASoC: rsnd: core.c: indicate warning if strange TDM width was setKuninori Morimoto1-0/+7
Current rsnd silently uses default TDM width if it was strange settings. It is difficult to notice about it. This patch indicates warning for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87lel6ksqn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-10ALSA: hda: remove redundant variable in snd_hdac_stream_start()Zhang Yiqun5-10/+7
This 2nd variables are all set as true in treewide. So I think it can be removed for easy understanding. Signed-off-by: Zhang Yiqun <zhangyiqun@phytium.com.cn> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230209121723.14328-1-zhangyiqun@phytium.com.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-10ALSA: hda/conexant: add a new hda codec SN6180Bo Liu1-0/+1
The current kernel does not support the SN6180 codec chip. Add the SN6180 codec configuration item to kernel. Signed-off-by: Bo Liu <bo.liu@senarytech.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/1675908828-1012-1-git-send-email-bo.liu@senarytech.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-02-09ASoC: qcom: q6dsp and lpass codec stablity fixesMark Brown7-69/+101
Merge series from Srinivas Kandagatla <srinivas.kandagatla@linaro.org> From q6dsp side issues are around locking of position pointer and handle From LPASS codec side most of the staiblity issues were around runtime pm,: While testing X13s audio, we found multiple stablity issues this patchset fixes these issues. From q6dsp side issues are around locking of position pointer and handle multiple prepare cases along with pulse audio timerbased scheduling workaround. From LPASS codec side most of the staiblity issues were around runtime pm, hitting various issues as the codec was firstly resetting the soundwire block for every clk disable/enable which is taking the slaves out of sync and resulting in re-enumerating. Second issue was around fsgen clk is not brining up the codec out of suspend as it was not added after runtime pm enabled. Final issue was with codec mclk rate which should have been 192KHz same as npl instead of 96KHz. We were getting lucky as wsa drivers are setting the same clk to 192KHz. With this patches, x13s audio is pretty stable.
2023-02-09ASoC: SOF: ipc4-topology: Configure copier sink formatMark Brown3-9/+119
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: In a course of creating complicated topologies where multiple output pins of a copier is enabled, we have discovered that additional configuration needs to be sent to the firmware to make the use cases working.
2023-02-09Add the Infineon PEB2466 codec supportMark Brown3-0/+2085
Merge series from Herve Codina <herve.codina@bootlin.com>: The Infineon PEB2466 codec is a programmable DSP-based four channels codec with filters capabilities. It also provides signals as GPIOs.
2023-02-09ASoC: rt712-sdca: Add RT712 SDCA driver for Jack and Amp topologyShuming Fan6-0/+2150
This is the initial codec driver for rt712 SDCA (Jack+Amp topology). The host should connect with rt712 SdW1 interface. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://lore.kernel.org/r/20230207090946.20659-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-09ASoC: rt5640: Update MCLK rate in set_sysclk()Sameer Pujar1-0/+5
Simple-card/audio-graph-card drivers do not handle MCLK clock when it is specified in the codec device node. The expectation here is that, the codec should actually own up the MCLK clock and do necessary setup in the driver. This is inspired from, commit dbf54a953435 ("ASoC: rt5659: Update MCLK rate in set_sysclk()"). Cc: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1675953417-8686-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-09ASoC: codecs: Add support for the Infineon PEB2466 codecHerve Codina3-0/+2085
The Infineon PEB2466 codec is a programmable DSP-based four channels codec with filters capabilities. It also provides signals as GPIOs. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://lore.kernel.org/r/20230206144904.91078-3-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>