| 48afc07c | 02-Sep-2026 |
Cezary Rojewski <cezary.rojewski@intel.com> |
ALSA: hda: ext: Clean up streams if their initialization fails
snd_hdac_ext_stream_init_all() does not rollback changes done when the allocation fails. Fix that to simplify its usage.
Signed-off-by
ALSA: hda: ext: Clean up streams if their initialization fails
snd_hdac_ext_stream_init_all() does not rollback changes done when the allocation fails. Fix that to simplify its usage.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260902081814.1590883-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 36aa66de | 13-Aug-2026 |
Xu Rao <raoxu@uniontech.com> |
ALSA: hda/ext: preserve PPLCCTL bits when clearing reset
snd_hdac_ext_stream_reset() polls PPLCCTL for STRST by masking the register value with AZX_PPLCCTL_STRST:
val = readl(...) & AZX_PPLCCTL_ST
ALSA: hda/ext: preserve PPLCCTL bits when clearing reset
snd_hdac_ext_stream_reset() polls PPLCCTL for STRST by masking the register value with AZX_PPLCCTL_STRST:
val = readl(...) & AZX_PPLCCTL_STRST;
The same masked value is then used when clearing STRST. Since val contains no bits other than STRST, clearing STRST from it always produces zero. The subsequent writel() therefore writes zero to the entire PPLCCTL register instead of clearing only the reset bit.
PPLCCTL contains other stream control fields, including the stream tag in AZX_PPLCCTL_STRM_MASK. Those fields must not be modified as a side effect of clearing stream reset.
Use snd_hdac_updatel() to clear STRST, matching the existing set-reset path and preserving all unrelated PPLCCTL bits.
Fixes: df203a4e46f4 ("ALSA: hdac_ext: add extended stream capabilities") Cc: stable@vger.kernel.org Signed-off-by: Xu Rao <raoxu@uniontech.com> Link: https://patch.msgid.link/43BB7930B0F07C09+20260813065524.1955696-1-raoxu@uniontech.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
| f16eaa38 | 07-Jul-2026 |
Zhao Dongdong <zhaodongdong@kylinos.cn> |
ALSA: hda/core: add cleanup in snd_hdac_bus_alloc_stream_pages()
The current error handling in snd_hdac_bus_alloc_stream_pages() returns directly on failure without cleaning up already allocated res
ALSA: hda/core: add cleanup in snd_hdac_bus_alloc_stream_pages()
The current error handling in snd_hdac_bus_alloc_stream_pages() returns directly on failure without cleaning up already allocated resources. While callers are supposed to release those via snd_hdac_bus_free_stream_pages() at destructor, adding explicit cleanup makes the function more self-contained and safer against future misuse.
Add proper error cleanup path using goto labels to free previously allocated BDL DMA buffers, position buffer, and ring buffer in reverse allocation order.
Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn> Link: https://patch.msgid.link/tencent_8E5BBBD19D53B1EFCDB6E89F3B6246A70B06@qq.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
| 161a0c61 | 10-Dec-2025 |
Takashi Iwai <tiwai@suse.de> |
ALSA: hda: intel-dsp-config: Prefer legacy driver as fallback
When config table entries don't match with the device to be probed, currently we fall back to SND_INTEL_DSP_DRIVER_ANY, which means to a
ALSA: hda: intel-dsp-config: Prefer legacy driver as fallback
When config table entries don't match with the device to be probed, currently we fall back to SND_INTEL_DSP_DRIVER_ANY, which means to allow any drivers to bind with it.
This was set so with the assumption (or hope) that all controller drivers should cover the devices generally, but in practice, this caused a problem as reported recently. Namely, when a specific kconfig for SOF isn't set for the modern Intel chips like Alderlake, a wrong driver (AVS) got probed and failed. This is because we have entries like:
#if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) /* Alder Lake / Raptor Lake */ { .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .device = PCI_DEVICE_ID_INTEL_HDA_ADL_S, }, .... #endif
so this entry is effective only when CONFIG_SND_SOC_SOF_ALDERLAKE is set. If not set, there is no matching entry, hence it returns SND_INTEL_DSP_DRIVER_ANY as fallback. OTOH, if the kconfig is set, it explicitly falls back to SND_INTEL_DSP_DRIVER_LEGACY when no DMIC or SoundWire is found -- that was the working scenario. That being said, the current setup may be broken for modern Intel chips that are supposed to work with either SOF or legacy driver when the corresponding kconfig were missing.
For addressing the problem above, this patch changes the fallback driver to the legacy driver, i.e. return SND_INTEL_DSP_DRIVER_LEGACY type as much as possible. When CONFIG_SND_HDA_INTEL is also disabled, the fallback is set to SND_INTEL_DSP_DRIVER_ANY type, just to be sure.
Reported-by: Askar Safin <safinaskar@gmail.com> Closes: https://lore.kernel.org/all/20251014034156.4480-1-safinaskar@gmail.com/ Tested-by: Askar Safin <safinaskar@gmail.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20251210131553.184404-1-tiwai@suse.de
show more ...
|