aboutsummaryrefslogtreecommitdiff
path: root/sound/pci
AgeCommit message (Collapse)AuthorFilesLines
2024-05-27ALSA: hda/realtek: Adjust G814JZR to use SPI init for ampGravatar Luke D. Jones 1-1/+1
The 2024 ASUS ROG G814J model is much the same as the 2023 model and the 2023 16" version. We can use the same Cirrus Amp quirk. Fixes: 811dd426a9b1 ("ALSA: hda/realtek: Add quirks for Asus ROG 2024 laptops using CS35L41") Signed-off-by: Luke D. Jones <luke@ljones.dev> Link: https://lore.kernel.org/r/20240526091032.114545-1-luke@ljones.dev Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-24Merge tag 'sound-fix-6.10-rc1' of ↵Gravatar Linus Torvalds 1-0/+12
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes for 6.10-rc1. Most of changes are various device-specific fixes and quirks, while there are a few small changes in ALSA core timer and module / built-in fixes" * tag 'sound-fix-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: fix mute/micmute LEDs don't work for ProBook 440/460 G11. ALSA: core: Enable proc module when CONFIG_MODULES=y ALSA: core: Fix NULL module pointer assignment at card init ALSA: hda/realtek: Enable headset mic of JP-IK LEAP W502 with ALC897 ASoC: dt-bindings: stm32: Ensure compatible pattern matches whole string ASoC: tas2781: Fix wrong loading calibrated data sequence ASoC: tas2552: Add TX path for capturing AUDIO-OUT data ALSA: usb-audio: Fix for sampling rates support for Mbox3 Documentation: sound: Fix trailing whitespaces ALSA: timer: Set lower bound of start tick time ASoC: codecs: ES8326: solve hp and button detect issue ASoC: rt5645: mic-in detection threshold modification ASoC: Intel: sof_sdw_rt_sdca_jack_common: Use name_prefix for `-sdca` detection
2024-05-23ALSA: hda/realtek: fix mute/micmute LEDs don't work for ProBook 440/460 G11.Gravatar Andy Chi 1-0/+3
HP ProBook 440/460 G11 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/20240523061832.607500-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-21ALSA: hda/realtek: Enable headset mic of JP-IK LEAP W502 with ALC897Gravatar Jian-Hong Pan 1-0/+9
JP-IK LEAP W502 laptop's headset mic is not enabled until ALC897_FIXUP_HEADSET_MIC_PIN3 quirk is applied. Here is the original pin node values: 0x11 0x40000000 0x12 0xb7a60130 0x14 0x90170110 0x15 0x411111f0 0x16 0x411111f0 0x17 0x411111f0 0x18 0x411111f0 0x19 0x411111f0 0x1a 0x411111f0 0x1b 0x03211020 0x1c 0x411111f0 0x1d 0x4026892d 0x1e 0x411111f0 0x1f 0x411111f0 Signed-off-by: Jian-Hong Pan <jhp@endlessos.org> Link: https://lore.kernel.org/r/20240520055008.7083-2-jhp@endlessos.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-19Merge tag 'mm-stable-2024-05-17-19-19' of ↵Gravatar Linus Torvalds 1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull mm updates from Andrew Morton: "The usual shower of singleton fixes and minor series all over MM, documented (hopefully adequately) in the respective changelogs. Notable series include: - Lucas Stach has provided some page-mapping cleanup/consolidation/ maintainability work in the series "mm/treewide: Remove pXd_huge() API". - In the series "Allow migrate on protnone reference with MPOL_PREFERRED_MANY policy", Donet Tom has optimized mempolicy's MPOL_PREFERRED_MANY mode, yielding almost doubled performance in one test. - In their series "Memory allocation profiling" Kent Overstreet and Suren Baghdasaryan have contributed a means of determining (via /proc/allocinfo) whereabouts in the kernel memory is being allocated: number of calls and amount of memory. - Matthew Wilcox has provided the series "Various significant MM patches" which does a number of rather unrelated things, but in largely similar code sites. - In his series "mm: page_alloc: freelist migratetype hygiene" Johannes Weiner has fixed the page allocator's handling of migratetype requests, with resulting improvements in compaction efficiency. - In the series "make the hugetlb migration strategy consistent" Baolin Wang has fixed a hugetlb migration issue, which should improve hugetlb allocation reliability. - Liu Shixin has hit an I/O meltdown caused by readahead in a memory-tight memcg. Addressed in the series "Fix I/O high when memory almost met memcg limit". - In the series "mm/filemap: optimize folio adding and splitting" Kairui Song has optimized pagecache insertion, yielding ~10% performance improvement in one test. - Baoquan He has cleaned up and consolidated the early zone initialization code in the series "mm/mm_init.c: refactor free_area_init_core()". - Baoquan has also redone some MM initializatio code in the series "mm/init: minor clean up and improvement". - MM helper cleanups from Christoph Hellwig in his series "remove follow_pfn". - More cleanups from Matthew Wilcox in the series "Various page->flags cleanups". - Vlastimil Babka has contributed maintainability improvements in the series "memcg_kmem hooks refactoring". - More folio conversions and cleanups in Matthew Wilcox's series: "Convert huge_zero_page to huge_zero_folio" "khugepaged folio conversions" "Remove page_idle and page_young wrappers" "Use folio APIs in procfs" "Clean up __folio_put()" "Some cleanups for memory-failure" "Remove page_mapping()" "More folio compat code removal" - David Hildenbrand chipped in with "fs/proc/task_mmu: convert hugetlb functions to work on folis". - Code consolidation and cleanup work related to GUP's handling of hugetlbs in Peter Xu's series "mm/gup: Unify hugetlb, part 2". - Rick Edgecombe has developed some fixes to stack guard gaps in the series "Cover a guard gap corner case". - Jinjiang Tu has fixed KSM's behaviour after a fork+exec in the series "mm/ksm: fix ksm exec support for prctl". - Baolin Wang has implemented NUMA balancing for multi-size THPs. This is a simple first-cut implementation for now. The series is "support multi-size THP numa balancing". - Cleanups to vma handling helper functions from Matthew Wilcox in the series "Unify vma_address and vma_pgoff_address". - Some selftests maintenance work from Dev Jain in the series "selftests/mm: mremap_test: Optimizations and style fixes". - Improvements to the swapping of multi-size THPs from Ryan Roberts in the series "Swap-out mTHP without splitting". - Kefeng Wang has significantly optimized the handling of arm64's permission page faults in the series "arch/mm/fault: accelerate pagefault when badaccess" "mm: remove arch's private VM_FAULT_BADMAP/BADACCESS" - GUP cleanups from David Hildenbrand in "mm/gup: consistently call it GUP-fast". - hugetlb fault code cleanups from Vishal Moola in "Hugetlb fault path to use struct vm_fault". - selftests build fixes from John Hubbard in the series "Fix selftests/mm build without requiring "make headers"". - Memory tiering fixes/improvements from Ho-Ren (Jack) Chuang in the series "Improved Memory Tier Creation for CPUless NUMA Nodes". Fixes the initialization code so that migration between different memory types works as intended. - David Hildenbrand has improved follow_pte() and fixed an errant driver in the series "mm: follow_pte() improvements and acrn follow_pte() fixes". - David also did some cleanup work on large folio mapcounts in his series "mm: mapcount for large folios + page_mapcount() cleanups". - Folio conversions in KSM in Alex Shi's series "transfer page to folio in KSM". - Barry Song has added some sysfs stats for monitoring multi-size THP's in the series "mm: add per-order mTHP alloc and swpout counters". - Some zswap cleanups from Yosry Ahmed in the series "zswap same-filled and limit checking cleanups". - Matthew Wilcox has been looking at buffer_head code and found the documentation to be lacking. The series is "Improve buffer head documentation". - Multi-size THPs get more work, this time from Lance Yang. His series "mm/madvise: enhance lazyfreeing with mTHP in madvise_free" optimizes the freeing of these things. - Kemeng Shi has added more userspace-visible writeback instrumentation in the series "Improve visibility of writeback". - Kemeng Shi then sent some maintenance work on top in the series "Fix and cleanups to page-writeback". - Matthew Wilcox reduces mmap_lock traffic in the anon vma code in the series "Improve anon_vma scalability for anon VMAs". Intel's test bot reported an improbable 3x improvement in one test. - SeongJae Park adds some DAMON feature work in the series "mm/damon: add a DAMOS filter type for page granularity access recheck" "selftests/damon: add DAMOS quota goal test" - Also some maintenance work in the series "mm/damon/paddr: simplify page level access re-check for pageout" "mm/damon: misc fixes and improvements" - David Hildenbrand has disabled some known-to-fail selftests ni the series "selftests: mm: cow: flag vmsplice() hugetlb tests as XFAIL". - memcg metadata storage optimizations from Shakeel Butt in "memcg: reduce memory consumption by memcg stats". - DAX fixes and maintenance work from Vishal Verma in the series "dax/bus.c: Fixups for dax-bus locking"" * tag 'mm-stable-2024-05-17-19-19' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (426 commits) memcg, oom: cleanup unused memcg_oom_gfp_mask and memcg_oom_order selftests/mm: hugetlb_madv_vs_map: avoid test skipping by querying hugepage size at runtime mm/hugetlb: add missing VM_FAULT_SET_HINDEX in hugetlb_wp mm/hugetlb: add missing VM_FAULT_SET_HINDEX in hugetlb_fault selftests: cgroup: add tests to verify the zswap writeback path mm: memcg: make alloc_mem_cgroup_per_node_info() return bool mm/damon/core: fix return value from damos_wmark_metric_value mm: do not update memcg stats for NR_{FILE/SHMEM}_PMDMAPPED selftests: cgroup: remove redundant enabling of memory controller Docs/mm/damon/maintainer-profile: allow posting patches based on damon/next tree Docs/mm/damon/maintainer-profile: change the maintainer's timezone from PST to PT Docs/mm/damon/design: use a list for supported filters Docs/admin-guide/mm/damon/usage: fix wrong schemes effective quota update command Docs/admin-guide/mm/damon/usage: fix wrong example of DAMOS filter matching sysfs file selftests/damon: classify tests for functionalities and regressions selftests/damon/_damon_sysfs: use 'is' instead of '==' for 'None' selftests/damon/_damon_sysfs: find sysfs mount point from /proc/mounts selftests/damon/_damon_sysfs: check errors from nr_schemes file reads mm/damon/core: initialize ->esz_bp from damos_quota_init_priv() selftests/damon: add a test for DAMOS quota goal ...
2024-05-13ALSA: hda/realtek: Drop doubly quirk entry for 103c:8a2eGravatar Takashi Iwai 1-1/+0
There are two quirk entries for SSID 103c:8a2e. Drop the latter one that isn't applied in anyway. As both point to the same quirk action, there is no actual behavior change. Fixes: aa8e3ef4fe53 ("ALSA: hda/realtek: Add quirks for various HP ENVY models") Link: https://lore.kernel.org/r/20240513064010.17546-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-13ALSA: hda/realtek - fixed headset Mic not showGravatar Kailang Yang 1-0/+22
ALC256 run on SOF mode. Boot with plugged headset, the Headset Mic will be gone. Plugged headset after boot. It had partial fail with Headset Mic detect. Add spec->en_3kpull_low = false will solve all issues. Signed-off-by: Kailang Yang <kailang@realtek.com> Link: https://lore.kernel.org/r/c8b638590c5f45a6a5c6aeb20c31fd5b@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-13Merge tag 'asoc-v6.10' of ↵Gravatar Takashi Iwai 1-20/+2
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.10 This is a very big update, in large part due to extensive work the Intel people have been doing in their drivers though it's also been busy elsewhere. There's also a big overhaul of the DAPM documentation from Luca Ceresoli arising from the work he did putting together his recent ELC talk, and he also contributed a new tool for visualising the DAPM state. - A new tool dapm-graph for visualising the DAPM state. - Substantial fixes and clarifications for the DAPM documentation. - Very large updates throughout the Intel audio drivers. - Cleanups of accessors for driver data, module labelling, and for constification. - Modernsation and cleanup work in the Mediatek drivers. - Several fixes and features for the DaVinci I2S driver. - New drivers for several AMD and Intel platforms, Nuvoton NAU8325, Rockchip RK3308 and Texas Instruments PCM6240.
2024-05-09ALSA: hda: clarify Copyright informationGravatar Pierre-Louis Bossart 3-3/+3
For some reason a number of files included the "All rights reserved" statement. Good old copy-paste made sure this mistake proliferated. Remove the "All rights reserved" in all Intel-copyright to align with internal guidance. Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20240503140359.259762-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-09ALSA: hda: cirrus_scodec_test: Add missing module descriptionsGravatar Takashi Iwai 1-0/+1
Now that make W=1 starts complaining the lack of MODULE_DESCRIPTION(), let's add the missing information. Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Closes: https://lore.kernel.org/r/ZjpQm-hxLQtpgkUx@smile.fi.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Dragan Simic <dsimic@manjaro.org> Link: https://lore.kernel.org/r/20240508091128.25274-7-tiwai@suse.de
2024-05-08ALSA: hda: cs35l56: Fix lifetime of cs_dsp instanceGravatar Richard Fitzgerald 1-3/+5
The cs_dsp instance is initialized in the driver probe() so it should be freed in the driver remove(). Also fix a missing call to cs_dsp_remove() in the error path of cs35l56_hda_common_probe(). The call to cs_dsp_remove() was being done in the component unbind callback cs35l56_hda_unbind(). This meant that if the driver was unbound and then re-bound it would be using an uninitialized cs_dsp instance. It is best to initialize the cs_dsp instance in probe() so that it can return an error if it fails. The component binding API doesn't have any error handling so there's no way to handle a failure if cs_dsp was initialized in the bind. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") Link: https://lore.kernel.org/r/20240508100811.49514-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-08ALSA: hda: hda_component: Initialize shared data during bind callbackGravatar Richard Fitzgerald 3-7/+18
Move the initialization of the shared struct hda_component array into hda_component_manager_bind(). The purpose of the manager bind() callback is to allow it to perform initialization before binding in the component drivers. This is the correct place to initialize the shared data. The original implementation initialized the shared data in hda_component_manager_init(). This is only done once during probe() of the manager driver. So if the component binding was unbound and then rebound, the shared data would not be re-initialized. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: fd895a74dc1d ("ALSA: hda: realtek: Move hda_component implementation to module") Link: https://lore.kernel.org/r/20240508100347.47283-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-08ALSA: hda/cs_dsp_ctl: Use private_free for control cleanupGravatar Richard Fitzgerald 1-16/+31
Use the control private_free callback to free the associated data block. This ensures that the memory won't leak, whatever way the control gets destroyed. The original implementation didn't actually remove the ALSA controls in hda_cs_dsp_control_remove(). It only freed the internal tracking structure. This meant it was possible to remove/unload the amp driver while leaving its ALSA controls still present in the soundcard. Obviously attempting to access them could cause segfaults or at least dereferencing stale pointers. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: 3233b978af23 ("ALSA: hda: hda_cs_dsp_ctl: Add Library to support CS_DSP ALSA controls") Link: https://lore.kernel.org/r/20240508095627.44476-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-08ALSA: pci: Use *-y instead of *-objs in MakefileGravatar Takashi Iwai 22-94/+94
*-objs suffix is reserved rather for (user-space) host programs while usually *-y suffix is used for kernel drivers (although *-objs works for that purpose for now). Let's correct the old usages of *-objs in Makefiles. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20240507135513.14919-3-tiwai@suse.de
2024-05-08ALSA: hda/realtek: Add support for ASUS Zenbook 2024 HN7306WGravatar Stefan Binding 1-0/+1
This laptop uses CS35L41 HDA with 2 amps using I2C and Internal Boost. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20240507160131.356114-1-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-08ALSA: hda/realtek: Fix internal speakers for Legion Y9000X 2022 IAH7Gravatar Junhao Pei 2-0/+3
This fixes the sound not working from internal speakers on Lenovo Legion Y9000X 2022 IAH7 models. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218744 Signed-off-by: Junhao Pei <ArcticLampyrid@outlook.com> Link: https://lore.kernel.org/r/TYCP286MB2535ACD5188A91C000B7CD13C41C2@TYCP286MB2535.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-08Merge branch 'topic/hda-config-pm-cleanup' into for-nextGravatar Takashi Iwai 17-133/+102
Pull HD-audio CONFIG_PM cleanup. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-08ALSA: hda: Add Intel BMG PCI ID and HDMI codec vidGravatar Chaitanya Kumar Borah 2-0/+3
Add HD Audio PCI ID and HDMI codec vendor ID for Intel Battlemage. Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Link: https://lore.kernel.org/r/20240506052531.1150062-1-chaitanya.kumar.borah@intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-08ALSA: hda: cs35l41: Add support for ASUS ROG 2024 LaptopsGravatar Stefan Binding 1-0/+10
All of these laptops do not have _DSD, so need to be added to the configuration table. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240429154853.9393-3-sbinding@opensource.cirrus.com
2024-05-08ALSA: hda: cs35l41: Ignore errors when configuring IRQsGravatar Stefan Binding 1-22/+47
IRQs used for CS35L41 HDA are used to detect and attempt to recover from errors. Without these interrupts, the driver should behave as normal. For laptops which contain a bad configuration for the interrupt in the BIOS, the current behaviour of failing when trying to configure the interrupt means the probe fails, and audio is broken. It is better for the user experience if the driver instead warns that no interrupt is configured rather than simply failing. The drawback is that if an error occurs without the interrupt, we firstly would not be able to trace the issue, and secondly would not be able to attempt to recover from the issue, but this is better than failing immediately. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240429154853.9393-2-sbinding@opensource.cirrus.com
2024-05-08ALSA: hda: via: Reduce CONFIG_PM dependenciesGravatar Takashi Iwai 1-6/+0
CONFIG_PM dependencies got reduced in HD-audio codec core driver, and now it's time to reduce in HD-audio via codec driver, too. Simply drop CONFIG_PM ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-13-tiwai@suse.de
2024-05-08ALSA: hda: sigmantel: Reduce CONFIG_PM dependenciesGravatar Takashi Iwai 1-8/+0
CONFIG_PM dependencies got reduced in HD-audio codec core driver, and now it's time to reduce in HD-audio sigmatel codec driver, too. Simply drop CONFIG_PM ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-12-tiwai@suse.de
2024-05-08ALSA: hda: realtek: Reduce CONFIG_PM dependenciesGravatar Takashi Iwai 1-15/+1
CONFIG_PM dependencies got reduced in HD-audio codec core driver, and now it's time to reduce in HD-audio realtek codec driver, too. Simply drop CONFIG_PM ifdefs. A superfluous __maybe_unused attribute was dropped as well. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-11-tiwai@suse.de
2024-05-08ALSA: hda: hdmi: Reduce CONFIG_PM dependenciesGravatar Takashi Iwai 1-8/+0
CONFIG_PM dependencies got reduced in HD-audio codec core driver, and now it's time to reduce in HD-audio HDMI codec driver, too. Simply drop CONFIG_PM ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-10-tiwai@suse.de
2024-05-08ALSA: hda: cs4809: Reduce CONFIG_PM dependenciesGravatar Takashi Iwai 1-8/+0
CONFIG_PM dependencies got reduced in HD-audio codec core driver, and now it's time to reduce in HD-audio generic cs8409 driver, too. Simply drop CONFIG_PM ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-9-tiwai@suse.de
2024-05-08ALSA: hda: conexant: Reduce CONFIG_PM dependenciesGravatar Takashi Iwai 1-4/+0
CONFIG_PM dependencies got reduced in HD-audio codec core driver, and now it's time to reduce in HD-audio conexant codec driver, too. Simply drop CONFIG_PM ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-8-tiwai@suse.de
2024-05-08ALSA: hda: cirrus: Reduce CONFIG_PM dependenciesGravatar Takashi Iwai 1-4/+0
CONFIG_PM dependencies got reduced in HD-audio codec core driver, and now it's time to reduce in HD-audio cirrus codec driver, too. Simply drop CONFIG_PM ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-7-tiwai@suse.de
2024-05-08ALSA: hda: ca0132: Reduce CONFIG_PM dependenciesGravatar Takashi Iwai 1-4/+0
CONFIG_PM dependencies got reduced in HD-audio codec core driver, and now it's time to reduce in HD-audio ca0132 codec driver, too. Simply drop CONFIG_PM ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-6-tiwai@suse.de
2024-05-08ALSA: hda: analog: Reduce CONFIG_PM dependenciesGravatar Takashi Iwai 1-4/+0
CONFIG_PM dependencies got reduced in HD-audio codec core driver, and now it's time to reduce in HD-audio analog codec driver, too. Simply drop CONFIG_PM ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-5-tiwai@suse.de
2024-05-08ALSA: hda: generic: Reduce CONFIG_PM dependenciesGravatar Takashi Iwai 2-6/+0
CONFIG_PM dependencies got reduced in HD-audio codec core driver, and now it's time to reduce in HD-audio generic codec driver, too. Simply drop CONFIG_PM ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-4-tiwai@suse.de
2024-05-08ALSA: hda: codec: Reduce CONFIG_PM dependenciesGravatar Takashi Iwai 3-33/+10
CONFIG_PM is almost mandatory nowadays for real systems, but we have lots of CONFIG_PM dependent code in snd-hda-codec helper code. Let's reduce the dependencies of CONFIG_PM now. The only visible drawback would be a couple of superfluous trace entries for runtime PM, but we can live with that. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-3-tiwai@suse.de
2024-05-08ALSA: hda: intel: Reduce CONFIG_PM dependenciesGravatar Takashi Iwai 2-34/+14
snd-hda-intel contains lots of CONFIG_PM dependent code although CONFIG_PM is almost mandatory nowadays, and it makes the code unnecessarily complex. Let's reduce the dependencies of CONFIG_PM in snd-hda-intel driver code. I left a few module options to be dependent on CONFIG_PM (which are visible to users), but other places are either enabled or optimized by compiler automatically. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-2-tiwai@suse.de
2024-05-02ALSA: hda/realtek: Fix build error without CONFIG_PMGravatar Takashi Iwai 1-1/+3
The alc_spec.power_hook is defined only with CONFIG_PM, and the recent fix overlooked it, resulting in a build error without CONFIG_PM. Fix it with the simple ifdef and set __maybe_unused for the function. We may drop the whole CONFIG_PM dependency there, but it should be done in a separate cleanup patch later. Fixes: 1e707769df07 ("ALSA: hda/realtek - Set GPIO3 to default at S4 state for Thinkpad with ALC1318") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202405012104.Dr7h318W-lkp@intel.com/ Message-ID: <20240502062442.30545-1-tiwai@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-01Merge tag 'asoc-fix-v6.9-rc6' of ↵Gravatar Takashi Iwai 1-0/+4
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.9 This is much larger than is ideal, partly due to your holiday but also due to several vendors having come in with relatively large fixes at similar times. It's all driver specific stuff. The meson fixes from Jerome fix some rare timing issues with blocking operations happening in triggers, plus the continuous clock support which fixes clocking for some platforms. The SOF series from Peter builds to the fix to avoid spurious resets of ChainDMA which triggered errors in cleanup paths with both PulseAudio and PipeWire, and there's also some simple new debugfs files from Pierre which make support a lot eaiser.
2024-04-30ALSA: hda/realtek: Fix conflicting PCI SSID 17aa:386f for Lenovo Legion modelsGravatar Takashi Iwai 1-1/+23
Unfortunately both Lenovo Legion Pro 7 16ARX8H and Legion 7i 16IAX7 got the very same PCI SSID while the hardware implementations are completely different (the former is with TI TAS2781 codec while the latter is with Cirrus CS35L41 codec). The former model got broken by the recent fix for the latter model. For addressing the regression, check the codec SSID and apply the proper quirk for each model now. Fixes: 24b6332c2d4f ("ALSA: hda: Add Lenovo Legion 7i gen7 sound quirk") Cc: <stable@vger.kernel.org> Link: https://bugzilla.suse.com/show_bug.cgi?id=1223462 Message-ID: <20240430163206.5200-1-tiwai@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-30ALSA: hda/realtek - Set GPIO3 to default at S4 state for Thinkpad with ALC1318Gravatar Kailang Yang 1-1/+50
There is a chance of damaging the IC when S4 resume. Add safe mode for no stream to disable GPIO3. Thinkpad with ALC1318 platform need to add this workaround. Signed-off-by: Kailang Yang <kailang@realtek.com> Link: https://lore.kernel.org/r/a853dc4f0a4e412381d5f60565181247@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-01ASoC: doc: dapm: various improvementsGravatar Mark Brown 2-6/+47
Merge series from Luca Ceresoli <luca.ceresoli@bootlin.com>: This series applies various improvements to the DAPM documentation: a rewrite of a few sections for clarity, style improvements and typo fixes. Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> --- Changes in v2: - avoid wrapping in patch 3 as suggested by Alex - Link to v1: https://lore.kernel.org/r/20240416-dapm-docs-v1-0-a818d2819bf6@bootlin.com --- Luca Ceresoli (12): ASoC: doc: dapm: fix typos ASoC: doc: dapm: fix struct name ASoC: doc: dapm: minor rewording ASoC: doc: dapm: remove dash after colon ASoC: doc: dapm: clarify it's an internal API ASoC: doc: dapm: replace "map" with "graph" ASoC: doc: dapm: extend initial descrption ASoC: doc: dapm: describe how widgets and routes are registered ASoC: doc: dapm: fix and improve section "Registering DAPM controls" ASoC: doc: dapm: improve section "Codec/DSP Widget Interconnections" ASoC: doc: dapm: update section "DAPM Widget Events" ASoC: doc: dapm: update event types Documentation/sound/soc/dapm-graph.svg | 375 +++++++++++++++++++++++++++++++++ Documentation/sound/soc/dapm.rst | 174 ++++++++++----- 2 files changed, 492 insertions(+), 57 deletions(-) --- base-commit: c942a0cd3603e34dd2d7237e064d9318cb7f9654 change-id: 20240315-dapm-docs-79bd51f267db Best regards, -- Luca Ceresoli <luca.ceresoli@bootlin.com>
2024-04-30ASoC: Merge up fixesGravatar Mark Brown 6-12/+91
Some new SOF changes depend on the fixes there.
2024-04-29ALSA: hda/realtek: Fix mute led of HP Laptop 15-da3001TUGravatar Aman Dhoot 1-0/+1
This patch simply add SND_PCI_QUIRK for HP Laptop 15-da3001TU to fixed mute led of laptop. Signed-off-by: Aman Dhoot <amandhoot12@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/CAMTp=B+3NG65Z684xMwHqdXDJhY+DJK-kuSw4adn6xwnG+b5JA@mail.gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-28Merge branch 'topic/emu10k1-fix' into for-nextGravatar Takashi Iwai 6-173/+231
Pull emu10k1 fixes from Oswald Buddenhagen Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-28ALSA: emu10k1: move code for entering E-MU card FPGA programming modeGravatar Oswald Buddenhagen 2-7/+7
... into snd_emu1010_load_firmware_entry(). This makes it clearer that these steps belong together tightly, as implied by prior commits. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093717.3198716-5-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: move snd_emu1010_load_firmware_entry() to io.cGravatar Oswald Buddenhagen 2-41/+48
It is a low-level I/O access function, so io.c is the natural place for it. While we're moving the code, reduce the scope of some variables, use compound assignment operators, and add/adjust some comments. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093717.3198716-4-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: make snd_emu1010_load_firmware_entry() voidGravatar Oswald Buddenhagen 1-7/+3
There is only one call site, and there we already know that we actually have a firmware. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093717.3198716-3-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: simplify E-MU card FPGA reset sequenceGravatar Oswald Buddenhagen 1-22/+3
Firstly, it is pointless to explicitly disable the power to the dock prior to resetting the FPGA, as the latter will do the former anyway. Secondly, it doesn't make much sense to check whether the FPGA is already programmed. It's much simpler to just presume it is, and issue the self-reset command. If it isn't, the effect isn't worse than the checks themselves. As a side effect, we lose the info if the reset fails, but there is no plausible way how that could happen unless the card burns out while operating, and in that case we'll detect a firmware upload failure a bit later anyway. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093717.3198716-2-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: make E-MU FPGA writes potentially more reliableGravatar Oswald Buddenhagen 1-0/+1
We did not delay after the second strobe signal, so another immediately following access could potentially corrupt the written value. This is a purely speculative fix with no supporting evidence, but after taking out the spinlocks around the writes, it seems plausible that a modern processor could be actually too fast. Also, it's just cleaner to be consistent. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093716.3198666-7-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: fix E-MU dock initializationGravatar Oswald Buddenhagen 1-0/+6
A side effect of making the dock monitoring interrupt-driven was that we'd be very quick to program a freshly connected dock. However, for unclear reasons, the dock does not work when we do that - despite the FPGA netlist upload going just fine. We work around this by adding a delay before programming the dock; for safety, the value is several times as much as was determined empirically. Note that a badly timed dock hot-plug would have triggered the problem even before the referenced commit - but now it would happen 100% instead of about 3% of the time, thus making it impossible to work around by re-plugging. Fixes: fbb64eedf5a3 ("ALSA: emu10k1: make E-MU dock monitoring interrupt-driven") Link: https://bugzilla.kernel.org/show_bug.cgi?id=218584 Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093716.3198666-6-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: use mutex for E-MU FPGA access lockingGravatar Oswald Buddenhagen 4-37/+57
The FPGA access through the GPIO port does not interfere with other sound processor register access, so there is no need to subject it to emu_lock. And after moving all FPGA access out of the interrupt handler, it does not need to be IRQ-safe, either. What's more, attaching the dock causes a firmware upload, which takes several seconds. We really don't want to disable IRQs for this long, and even less also have someone else spin with IRQs disabled waiting for us. Therefore, use a mutex for FPGA access locking. This makes the code somewhat more noisy, as we need to wrap bigger sections into the mutex, as it needs to enclose the spinlocks. The latter has the "side effect" of fixing dock FPGA programming in a corner case: a really badly timed mixer access right between entering FPGA programming mode and uploading the netlist would mess up the protocol. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093716.3198666-5-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: move the whole GPIO event handling to the workqueueGravatar Oswald Buddenhagen 2-30/+29
The actual event processing was already done by workqueue items. We can move the event dispatching there as well, rather than doing it already in the interrupt handler callback. This change has a rather profound "side effect" on the reliability of the FPGA programming: once we enter programming mode, we must not issue any snd_emu1010_fpga_{read,write}() calls until we're done, as these would badly mess up the programming protocol. But exactly that would happen when trying to program the dock, as that triggers GPIO interrupts as a side effect. This is mitigated by deferring the actual interrupt handling, as workqueue items are not re-entrant. To avoid scheduling the dispatcher on non-events, we now explicitly ignore GPIO IRQs triggered by "uninteresting" pins, which happens a lot as a side effect of calling snd_emu1010_fpga_{read,write}(). Fixes: fbb64eedf5a3 ("ALSA: emu10k1: make E-MU dock monitoring interrupt-driven") Link: https://bugzilla.kernel.org/show_bug.cgi?id=218584 Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093716.3198666-4-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: factor out snd_emu1010_load_dock_firmware()Gravatar Oswald Buddenhagen 1-30/+36
Pulled out of the next patch to improve its legibility. As the function is now available, call it directly from snd_emu10k1_emu1010_init(), thus making the MicroDock firmware loading synchronous - there isn't really a reason not to. Note that this does not affect the AudioDocks of rev1 cards, as these have no independent power supplies, and thus come up only a while after the main card is initialized. As a drive-by, adjust the priorities of two messages to better reflect their impact. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093716.3198666-3-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: fix E-MU card dock presence monitoringGravatar Oswald Buddenhagen 1-7/+10
While there are two separate IRQ status bits for dock attach and detach, the hardware appears to mix them up more or less randomly, making them useless for tracking what actually happened. It is much safer to check the dock status separately and proceed based on that, as the old polling code did. Note that the code assumes that only the dock can be hot-plugged - if other option card bits changed, the logic would break. Fixes: fbb64eedf5a3 ("ALSA: emu10k1: make E-MU dock monitoring interrupt-driven") Link: https://bugzilla.kernel.org/show_bug.cgi?id=218584 Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093716.3198666-2-oswald.buddenhagen@gmx.de>