summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2023-10-27ALSA: scarlett2: Rename Gen 3 config setsGeoffrey D. Bennett
The config sets are named NO_MIXER, GEN_2, GEN_3, and CLARETT currently. Rename NO_MIXER and GEN_3 to GEN_3A and GEN_3B respectively as NO_MIXER is only for the smaller Gen 3 devices. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/19ae5eea7fc499945efa8eeda7fcd8afe73f62d9.1698342632.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-27ALSA: scarlett2: Rename scarlett_gen2 to scarlett2Geoffrey D. Bennett
This driver was originally developed for the Focusrite Scarlett Gen 2 series. Since then Focusrite have used a similar protocol for their Gen 3, Gen 4, Clarett USB, Clarett+, and Vocaster series. Let's call this common protocol the "Scarlett 2 Protocol" and rename the driver to scarlett2 to not imply that it is restricted to Gen 2 series devices. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/e1ad7f69a1e20cdb39094164504389160c1a0a0b.1698342632.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-26ASoC: cs35l41: Detect CSPL errors when sending CSPL commandsStefan Binding
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 Binding
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 Binding
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 Binding
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 Binding
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 Binding
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 Binding
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 Binding
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-26ALSA: aoa: Replace with __packed attributeTakashi Iwai
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 Iwai
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 Iwai
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 Iwai
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 Iwai
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 Iwai
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 Iwai
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: SOF: Make return of remove_late void, tooTakashi Iwai
Like the change we've done for remove callback, the newly introduced remove_late callback should be changed to void return, too. Fixes: 17baaa1f950b ("ASoC: SOF: core: Add probe_early and remove_late callbacks") Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20231023153605.863-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-21Merge tag 'asoc-v6.7' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.7 This is quite a large set of changes but mostly due to API cleanups and in driver specific ways rather than due to anything subsystem wide. Highlights include: - Standardisation of API prefixes on snd_soc_, removing asoc_. - GPIO API usage improvements. - Support for HDA patches. - Lots of work on SOF, including crash dump support. - Support for AMD platforms with es83xx, Awinc AT87390, many Intel platforms, many Mediatek platforms, Qualcomm SM6115, Richtek RTQ9128 and Texas Instruments TAS575x. [ the merge conflicts around SOF Intel HD-audio and CS35L41 subcodec drivers are resolved here -- tiwai ]
2023-10-19ASoC: Intel: more machine driver updates for 6.7Mark Brown
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Two nice cleanups from Brent Lu and Charles Keepax, and one RaptorLake update.
2023-10-19ASoC: Intel: sof_ssp_amp: use common module for DMIC linksBrent Lu
Use intel_board module for dmic01 and dmic16k DAI link initialization. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231019173411.166759-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-19ASoC: Intel: sof_rt5682: use common module for DMIC linksBrent Lu
Use intel_board module for dmic01 and dmic16k DAI link initialization. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231019173411.166759-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-19ASoC: Intel: sof_nau8825: use common module for DMIC linksBrent Lu
Use intel_board module for dmic01 and dmic16k DAI link initialization. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231019173411.166759-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-19ASoC: Intel: sof_cs42l42: use common module for DMIC linksBrent Lu
Use intel_board module for dmic01 and dmic16k DAI link initialization. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231019173411.166759-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-19ASoC: Intel: board_helpers: support dmic link initializationBrent Lu
Add functions for machine drivers to initialize dmic01 and dmic16k DAI links. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231019173411.166759-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-19ASoC: Intel: sof_nau8825: add RPL support for MAX98360A ampTerry Cheong
Adding support back to RPL devices that lost audio after the RPL/ADL split. The hardware configuration is: SSP0: NAU88L25/NAU88L25YGB codec SSP1: MAX98360A amplifier Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Terry Cheong <htcheong@chromium.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231019173411.166759-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-19ASoC: intel: sof_sdw: Move the builtin microphones to dataport 1Charles Keepax
cs42l43 supports 4 hardwired microphones, but only supports up to 2 microphone headsets. Only dataport 1 can support 4 channel capture, but that is currently used for the headset microphone. Switch things around such that DP1 is used for the builtin mics and DP2 is used for the headset microphones. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231019173411.166759-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-19ASoC: intel: sof_sdw_cs42l43: Create separate jacks for hp and micCharles Keepax
It makes sense to report the microphone separately from the headphones, that way ALSA UCM can differentiate between switching the playback and the capture. For example, still using the built-in microphone path when a 3-pole headset is inserted. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231019173411.166759-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-19ASoC: intel: sof_sdw_cs42l43: Some trivial formatting clean upsCharles Keepax
No functional change, just some trivial whitespace fixups. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231019173411.166759-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-19ASoC: intel: sof_sdw: Stop processing CODECs when enough are foundCharles Keepax
When adding CODECs to a DAI link, the code should stop processing more CODECs when the expected number of CODECs are discovered. This fixes a small corner case issue introduced when support for different devices on the same SoundWire link was added. In the case of aggregated devices everything is fine, as all devices intended for the DAI link will be marked with the same group and any not intended for that DAI are skipped by the group check. However for non-aggregated devices the group check is bypassed and the current code does not stop after it has found the first device. Meaning if additional non-aggregated devices are present on the same SoundWire link they will be erroneously added into the DAI link. Fix this issue, and provide a small optimisation by ceasing to process devices once we have reached the required number of devices for the current DAI link. Fixes: 317dcdecaf7a ("ASoC: intel: sof_sdw: Allow different devices on the same link") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231019173411.166759-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-19ASoC: tlv320aic31xx: switch to gpiod_set_value_cansleepMarco Felsch
Switch to gpiod_set_value_cansleep() to support gpiochips which can sleep like i2c gpio expanders. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.kernel.org/r/20231019131806.381280-1-m.felsch@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-19ASoC: mediatek: mt8186_mt6366_rt1019_rt5682s: addMark Brown
Merge series from xiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com>: To use RT5650 as the codec and the amp, add a new sound card named mt8186_rt5650.
2023-10-19ALSA: hda: i915: Remove extra argument from snd_hdac_i915_initMaarten Lankhorst
Now that all drivers have moved from modprobe loading to handling -EPROBE_DEFER, we can remove the argument again. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-14-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ASoC: SOF: Intel: Move binding to display driver outside of deferred probeMaarten Lankhorst
Now that we can use -EPROBE_DEFER, it's no longer required to spin off the snd_hdac_i915_init into a workqueue. Use the -EPROBE_DEFER mechanism instead, which must be returned in the probe function. The previously added probe_early can be used for this, and we also use the newly added remove_late for unbinding afterwards. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-13-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ASoC: Intel: Skylake: Move snd_hdac_i915_init to before probe_work.Maarten Lankhorst
Now that we can use -EPROBE_DEFER, it's no longer required to spin off the snd_hdac_i915_init into a workqueue. It's likely the whole workqueue can be destroyed, but I don't have the means to test this. Removing the workqueue would simplify init even further, but is left as exercise for the reviewer. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-12-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ALSA: hda: Intel: Move snd_hdac_i915_init to before probe_work.Maarten Lankhorst
Now that we can use -EPROBE_DEFER, it's no longer required to spin off the snd_hdac_i915_init into a workqueue. Use the -EPROBE_DEFER mechanism instead, which must be returned in the probe function. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-11-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ASoC: Intel: avs: Move snd_hdac_i915_init to before probe_work.Maarten Lankhorst
Now that we can use -EPROBE_DEFER, it's no longer required to spin off the snd_hdac_i915_init into a workqueue. It's likely the whole workqueue can be destroyed, but I don't have the means to test this. Removing the workqueue would simplify init even further, but is left as exercise for the reviewer. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-10-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ALSA: hda: i915: Allow xe as match for i915_component_master_matchMaarten Lankhorst
Xe is a new driver for intel GPU's that shares the sound related code with i915. The modprobe mechanism is being replaced by the -EPROBE_DEFER mechanism, so we don't need to add a modprobe xe call. Adding this would have required a telepathy module to correctly guess whether to load i915 or xe. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-9-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ALSA: hda: i915: Add an allow_modprobe argument to snd_hdac_i915_initMaarten Lankhorst
Xe is a new GPU driver that re-uses the display (and sound) code from i915. It's no longer possible to load i915, as the GPU can be driven by the xe driver instead. The new behavior will return -EPROBE_DEFER, and wait for a compatible driver to be loaded instead of modprobing i915. Converting all drivers at the same time is a lot of work, instead we will convert each user one by one. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-8-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ALSA: hda: i915: Allow override of gpu binding.Maarten Lankhorst
Selecting CONFIG_DRM selects CONFIG_VIDEO_NOMODESET, which exports video_firmware_drivers_only(). This can be used as a first approximation on whether i915 will be available. It's safe to use as this is only built when CONFIG_SND_HDA_I915 is selected by CONFIG_I915. It's not completely fool proof, as you can boot with "nomodeset i915.modeset=1" to make i915 load regardless, or use "i915.force_probe=!*" to never load i915, but the common case of booting with nomodeset to disable all GPU drivers this will work as intended. Because of this, we add an extra module parameter, snd_hda_core.gpu_bind that can be used to signal users intent. -1 follows nomodeset, 0 disables binding, 1 forces wait/-EPROBE_DEFER on binding. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-7-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ALSA: hda: Intel: Fix error handling in azx_probe()Maarten Lankhorst
Add missing pci_set_drv to NULL call on error. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-6-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ASoC: SOF: Intel: Fix error handling in hda_init()Maarten Lankhorst
The hda_codec_i915_init() errors are ignored in hda_init() so it can never return -EPROBE_DEFER. Fix this before we move the call to hda_init() from the deferred probe to early probe. While at it, also fix error handling when hda_dsp_ctrl_get_caps fails. Suggested-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-5-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ASoC: SOF: Intel: hda: start splitting the probePierre-Louis Bossart
This patch moves the initial parts of the probe to the probe_early() callback, which provides a much faster decision on whether the SOF driver shall deal with a specific platform or yield to other Intel drivers. This is a limited functionality change, the bigger change is to move the i915/Xe initialization to the probe_early(). Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-4-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ASoC: SOF: core: Add probe_early and remove_late callbacksPierre-Louis Bossart
The existing DSP probe may be handled in a workqueue to allow for extra time, typically for the i915 request_module and HDAudio codec handling. With the upcoming changes for i915/Xe driver relying on the -EPROBE_DEFER mechanism, we need to have a first pass of the probe which cannot be pushed to a workqueue. Introduce 2 new optional callbacks. probe_early is called before the workqueue runs. remove_late may be called from the workqueue if load is unsuccesful, but will otherwise be called on module unload. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-3-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ASoC: SOF: core: Ensure sof_ops_free() is still called when probe never ran.Maarten Lankhorst
In an effort to not call sof_ops_free twice, we stopped running it when probe was aborted. Check the result of cancel_work_sync to see if this was the case. Fixes: 31bb7bd9ffee ("ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was successful") Cc: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://lore.kernel.org/r/20231009115437.99976-2-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19Merge branch 'for-linus' into for-nextTakashi Iwai
For applying HD-audio EPROBE_DEFER series cleanly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-10-19ASoC: mediatek: mt8186_mt6366_rt1019_rt5682s: add rt5650 supportxiazhengqiao
To use RT5650 as the codec and the amp, add a new sound card named mt8186_rt5650. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: xiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com> Link: https://lore.kernel.org/r/20231019100322.25425-3-xiazhengqiao@huaqin.corp-partner.google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-18Merge tag 'asoc-fix-v6.6-rc6' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.6 A fairly large set of fixes here but all driver specific, the biggest block is Johan's work shaking out issues with device setup and teardown for the wcd938x driver which is a relatively large but clearly broken down set of changes. There is one core helper function added as part of a fix for wsa-macro.
2023-10-18ASoC: da7213: Add new kcontrol for tonegenDavid Rau
Add new kcontrol for tone generator Signed-off-by: David Rau <David.Rau.opensource@dm.renesas.com> Link: https://lore.kernel.org/r/20231018064444.23186-1-David.Rau.opensource@dm.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-17ASoC: tas2781: make const read-only array magic_number staticColin Ian King
Don't populate the const read-only array magic_number on the stack, instead make it static const. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20231017170436.176615-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>