AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/09/17 03:56 flow patch-triage
1m Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "KMSANReasoning": "",
  "NeedsKMSAN": false,
  "Reasoning": "The patch modifies wm8962_configure_bclk() in sound/soc/codecs/wm8962.c, an ASoC codec driver for the Wolfson WM8962 audio chip over I2C. This codec is designed for embedded ARM platforms (such as Nvidia Tegra, NXP i.MX, and Samsung Exynos) and is structurally unreachable on the target architecture (amd64). Standard QEMU/GCE amd64 environments do not emulate the WM8962 hardware (whose probe strictly validates hardware ID 0x6243) nor do they instantiate an ASoC machine driver linking to this codec. Thus, the modified code cannot be executed or fuzzed.",
  "WorthFuzzing": false
}

1/1 2026/09/17 03:56 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit 9844cf00923bdb2e5d74cac16fb731ba0293f0f0\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Thu Sep 17 03:56:41 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c\nindex af47160512202..c314af2c86093 100644\n--- a/sound/soc/codecs/wm8962.c\n+++ b/sound/soc/codecs/wm8962.c\n@@ -2472,6 +2472,8 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)\n \tint clocking2 = 0;\n \tint clocking4 = 0;\n \tint aif2 = 0;\n+\tint sysclk;\n+\tbool sysclk_was_ena;\n \n \tif (!wm8962-\u003esysclk_rate) {\n \t\tdev_dbg(component-\u003edev, \"No SYSCLK configured\\n\");\n@@ -2504,8 +2506,19 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)\n \t/* DSPCLK_DIV can be only generated correctly after enabling SYSCLK.\n \t * So we here provisionally enable it and then disable it afterward\n \t * if current bias_level hasn't reached SND_SOC_BIAS_ON.\n+\t *\n+\t * SYSCLK_ENA is owned by the \"SYSCLK\" DAPM supply widget, which may\n+\t * already have it set even below SND_SOC_BIAS_ON: wm8962_mic_detect()\n+\t * force-enables that pin, so on boards using it (the Tegra machine\n+\t * driver) the bit is set once at card init and DAPM never writes it\n+\t * again. If we unconditionally clear it here, SYSCLK stays off for\n+\t * every stream, DAPM still believes it is on, and the codec is\n+\t * silent with \"DC servo timed out\" errors. Only undo what we did.\n \t */\n-\tif (snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON)\n+\tsysclk = snd_soc_component_read(component, WM8962_CLOCKING2);\n+\tsysclk_was_ena = sysclk \u003e= 0 \u0026\u0026 (sysclk \u0026 WM8962_SYSCLK_ENA);\n+\tif (!sysclk_was_ena \u0026\u0026\n+\t    snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON)\n \t\tsnd_soc_component_update_bits(component, WM8962_CLOCKING2,\n \t\t\t\tWM8962_SYSCLK_ENA_MASK, WM8962_SYSCLK_ENA);\n \n@@ -2519,7 +2532,8 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)\n \tusleep_range(500, 1000);\n \tdspclk = snd_soc_component_read(component, WM8962_CLOCKING1);\n \n-\tif (snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON)\n+\tif (!sysclk_was_ena \u0026\u0026\n+\t    snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON)\n \t\tsnd_soc_component_update_bits(component, WM8962_CLOCKING2,\n \t\t\t\tWM8962_SYSCLK_ENA_MASK, 0);\n \n"
}

2/1 2026/09/17 03:56 agent patch-evaluator
1m Model:
core

Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies wm8962_configure_bclk() in sound/soc/codecs/wm8962.c, an ASoC codec driver for the Wolfson WM8962 audio chip over I2C. This codec is designed for embedded ARM platforms (such as Nvidia Tegra, NXP i.MX, and Samsung Exynos) and is structurally unreachable on the target architecture (amd64). Standard QEMU/GCE amd64 environments do not emulate the WM8962 hardware (whose probe strictly validates hardware ID 0x6243) nor do they instantiate an ASoC machine driver linking to this codec. Thus, the modified code cannot be executed or fuzzed.",
  "WorthFuzzing": false
}

Instruction:
You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.

IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.

================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.

- REACHABILITY IS THE PRIMARY GATE:
  Fuzzing can only discover bugs in code that can actually execute in standard virtualized
  environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
  If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
  regardless of whether it adds assertions or complex logic.

- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
  Patch authors routinely label changes as "cleanups", "refactorings", or state
  "No functional change intended". Do NOT take these claims at face value.
  Code refactorings that rearrange logic, introduce helper functions, or alter state management
  in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
  If reachable executable code is modified or refactored, it MUST be fuzzed.

- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
  When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
  BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
  Even if the author believes the invariant always holds, fuzzing is essential to verify whether
  an unusual sequence of operations can violate it.

================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:

- Non-kernel and non-executable changes:
  * Modifications to Documentation/, comments, or spelling fixes.
  * User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
    that do not affect the compiled kernel image (vmlinux) or kernel modules.
  * Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
    that do not alter control flow or data structures.
  * Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
  * Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
    ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
  * Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
    physical PCI hot-unplug or manual sysfs driver unbinding.
  * Code paths exclusive to architectures other than the target architecture.

================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
  * Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
    BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
  * Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
  * Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
  * Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).

================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:

- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
  Do NOT list generic, ubiquitous functions called by almost every program in the corpus
  (including, but not limited to: general memory allocators and deallocators, page fault
  and trap handlers, or core synchronization primitives; this is not an exhaustive list).
  Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
  which severely dilutes fuzzing effort away from the actual changes.

- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
  List functions that specifically implement the logic being added or altered, or direct API entrypoints
  for the subsystem feature under review.

- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
  Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
  distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
  If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
  functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).

================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
Target architecture: amd64

For your convenience, here is the diff of the changes:
commit 9844cf00923bdb2e5d74cac16fb731ba0293f0f0
Author: syz-cluster <triage@syzkaller.com>
Date:   Thu Sep 17 03:56:41 2026 +0000

    syz-cluster: applied patch under review

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index af47160512202..c314af2c86093 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -2472,6 +2472,8 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)
 	int clocking2 = 0;
 	int clocking4 = 0;
 	int aif2 = 0;
+	int sysclk;
+	bool sysclk_was_ena;
 
 	if (!wm8962->sysclk_rate) {
 		dev_dbg(component->dev, "No SYSCLK configured\n");
@@ -2504,8 +2506,19 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)
 	/* DSPCLK_DIV can be only generated correctly after enabling SYSCLK.
 	 * So we here provisionally enable it and then disable it afterward
 	 * if current bias_level hasn't reached SND_SOC_BIAS_ON.
+	 *
+	 * SYSCLK_ENA is owned by the "SYSCLK" DAPM supply widget, which may
+	 * already have it set even below SND_SOC_BIAS_ON: wm8962_mic_detect()
+	 * force-enables that pin, so on boards using it (the Tegra machine
+	 * driver) the bit is set once at card init and DAPM never writes it
+	 * again. If we unconditionally clear it here, SYSCLK stays off for
+	 * every stream, DAPM still believes it is on, and the codec is
+	 * silent with "DC servo timed out" errors. Only undo what we did.
 	 */
-	if (snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON)
+	sysclk = snd_soc_component_read(component, WM8962_CLOCKING2);
+	sysclk_was_ena = sysclk >= 0 && (sysclk & WM8962_SYSCLK_ENA);
+	if (!sysclk_was_ena &&
+	    snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON)
 		snd_soc_component_update_bits(component, WM8962_CLOCKING2,
 				WM8962_SYSCLK_ENA_MASK, WM8962_SYSCLK_ENA);
 
@@ -2519,7 +2532,8 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)
 	usleep_range(500, 1000);
 	dspclk = snd_soc_component_read(component, WM8962_CLOCKING1);
 
-	if (snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON)
+	if (!sysclk_was_ena &&
+	    snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON)
 		snd_soc_component_update_bits(component, WM8962_CLOCKING2,
 				WM8962_SYSCLK_ENA_MASK, 0);
 

3/2 2026/09/17 03:56 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 3535
							output: 32
							thoughts: 102
						

Thoughts:
**Analyzing the WM8962 Audio Codec Driver**

Okay, so the patch is located within `sound/soc/codecs/wm8962.c`. My first thought is to dive into that file and get a handle on what we're dealing with. I need to understand this driver—its structure, how it's instantiated, and, crucially, the bus it's attached to. Understanding the bus is key. I'm especially interested in whether this codec is even *reachable* in a typical virtualized environment. Can I trigger this in syzkaller, QEMU, GCE, or a standard amd64 setup? If not, it's going to make reproducing and debugging this patch significantly harder. I'll probably start with `grepper` or `read-file` to get a quick overview and then dig deeper as needed.



4/2 2026/09/17 03:57 tool grepper
0m Args:
{
  "Expression": "wm8962",
  "PathPrefix": "sound/soc/codecs/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 1091 lines.\nUse more precise expression if possible.\n\nsound/soc/codecs/Makefile=409=snd-soc-wm8961-y := wm8961.o\nsound/soc/codecs/Makefile:410:snd-soc-wm8962-y := wm8962.o\nsound/soc/codecs/Makefile-411-snd-soc-wm8971-y := wm8971.o\n--\nsound/soc/codecs/Makefile=862=obj-$(CONFIG_SND_SOC_WM8961)\t+= snd-soc-wm8961.o\nsound/soc/codecs/Makefile:863:obj-$(CONFIG_SND_SOC_WM8962)\t+= snd-soc-wm8962.o\nsound/soc/codecs/Makefile-864-obj-$(CONFIG_SND_SOC_WM8971)\t+= snd-soc-wm8971.o\n--\nsound/soc/codecs/wm8962.c-2-/*\nsound/soc/codecs/wm8962.c:3: * wm8962.c  --  WM8962 ALSA SoC Audio driver\nsound/soc/codecs/wm8962.c-4- *\n--\nsound/soc/codecs/wm8962.c-33-#include \u003csound/tlv.h\u003e\nsound/soc/codecs/wm8962.c:34:#include \u003csound/wm8962.h\u003e\nsound/soc/codecs/wm8962.c-35-#include \u003ctrace/events/asoc.h\u003e\nsound/soc/codecs/wm8962.c-36-\nsound/soc/codecs/wm8962.c:37:#include \"wm8962.h\"\nsound/soc/codecs/wm8962.c-38-\nsound/soc/codecs/wm8962.c-39-#define WM8962_NUM_SUPPLIES 8\nsound/soc/codecs/wm8962.c:40:static const char *wm8962_supply_names[WM8962_NUM_SUPPLIES] = {\nsound/soc/codecs/wm8962.c-41-\t\"DCVDD\",\n--\nsound/soc/codecs/wm8962.c-51-/* codec private data */\nsound/soc/codecs/wm8962.c:52:struct wm8962_priv {\nsound/soc/codecs/wm8962.c:53:\tstruct wm8962_pdata pdata;\nsound/soc/codecs/wm8962.c-54-\tstruct regmap *regmap;\n--\nsound/soc/codecs/wm8962.c-97-#define WM8962_REGULATOR_EVENT(n) \\\nsound/soc/codecs/wm8962.c:98:static int wm8962_regulator_event_##n(struct notifier_block *nb, \\\nsound/soc/codecs/wm8962.c-99-\t\t\t\t    unsigned long event, void *data)\t\\\nsound/soc/codecs/wm8962.c-100-{ \\\nsound/soc/codecs/wm8962.c:101:\tstruct wm8962_priv *wm8962 = container_of(nb, struct wm8962_priv, \\\nsound/soc/codecs/wm8962.c-102-\t\t\t\t\t\t  disable_nb[n]); \\\nsound/soc/codecs/wm8962.c-103-\tif (event \u0026 REGULATOR_EVENT_DISABLE) { \\\nsound/soc/codecs/wm8962.c:104:\t\tregcache_mark_dirty(wm8962-\u003eregmap);\t\\\nsound/soc/codecs/wm8962.c-105-\t} \\\n--\nsound/soc/codecs/wm8962.c=116=WM8962_REGULATOR_EVENT(7)\nsound/soc/codecs/wm8962.c-117-\nsound/soc/codecs/wm8962.c:118:static const struct reg_default wm8962_reg[] = {\nsound/soc/codecs/wm8962.c-119-\t{ 0, 0x009F },   /* R0     - Left Input volume */\n--\nsound/soc/codecs/wm8962.c-792-\nsound/soc/codecs/wm8962.c:793:static bool wm8962_volatile_register(struct device *dev, unsigned int reg)\nsound/soc/codecs/wm8962.c-794-{\n--\nsound/soc/codecs/wm8962.c-809-\nsound/soc/codecs/wm8962.c:810:static bool wm8962_readable_register(struct device *dev, unsigned int reg)\nsound/soc/codecs/wm8962.c-811-{\n--\nsound/soc/codecs/wm8962.c-1444-\nsound/soc/codecs/wm8962.c:1445:static int wm8962_reset(struct wm8962_priv *wm8962)\nsound/soc/codecs/wm8962.c-1446-{\n--\nsound/soc/codecs/wm8962.c-1448-\nsound/soc/codecs/wm8962.c:1449:\tret = regmap_write(wm8962-\u003eregmap, WM8962_SOFTWARE_RESET, 0x6243);\nsound/soc/codecs/wm8962.c-1450-\tif (ret != 0)\n--\nsound/soc/codecs/wm8962.c-1452-\nsound/soc/codecs/wm8962.c:1453:\treturn regmap_write(wm8962-\u003eregmap, WM8962_PLL_SOFTWARE_RESET, 0);\nsound/soc/codecs/wm8962.c-1454-}\n--\nsound/soc/codecs/wm8962.c=1476=static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);\nsound/soc/codecs/wm8962.c-1477-\nsound/soc/codecs/wm8962.c:1478:static int wm8962_dsp2_write_config(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-1479-{\nsound/soc/codecs/wm8962.c:1480:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-1481-\nsound/soc/codecs/wm8962.c:1482:\treturn regcache_sync_region(wm8962-\u003eregmap,\nsound/soc/codecs/wm8962.c-1483-\t\t\t\t    WM8962_HDBASS_AI_1, WM8962_MAX_REGISTER);\n--\nsound/soc/codecs/wm8962.c-1485-\nsound/soc/codecs/wm8962.c:1486:static int wm8962_dsp2_set_enable(struct snd_soc_component *component, u16 val)\nsound/soc/codecs/wm8962.c-1487-{\n--\nsound/soc/codecs/wm8962.c-1508-\nsound/soc/codecs/wm8962.c:1509:static int wm8962_dsp2_start(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-1510-{\nsound/soc/codecs/wm8962.c:1511:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-1512-\nsound/soc/codecs/wm8962.c:1513:\twm8962_dsp2_write_config(component);\nsound/soc/codecs/wm8962.c-1514-\n--\nsound/soc/codecs/wm8962.c-1516-\nsound/soc/codecs/wm8962.c:1517:\twm8962_dsp2_set_enable(component, wm8962-\u003edsp2_ena);\nsound/soc/codecs/wm8962.c-1518-\n--\nsound/soc/codecs/wm8962.c-1521-\nsound/soc/codecs/wm8962.c:1522:static int wm8962_dsp2_stop(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-1523-{\nsound/soc/codecs/wm8962.c:1524:\twm8962_dsp2_set_enable(component, 0);\nsound/soc/codecs/wm8962.c-1525-\n--\nsound/soc/codecs/wm8962.c-1532-{\t.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \\\nsound/soc/codecs/wm8962.c:1533:\t.info = wm8962_dsp2_ena_info, \\\nsound/soc/codecs/wm8962.c:1534:\t.get = wm8962_dsp2_ena_get, .put = wm8962_dsp2_ena_put, \\\nsound/soc/codecs/wm8962.c-1535-\t.private_value = xshift }\nsound/soc/codecs/wm8962.c-1536-\nsound/soc/codecs/wm8962.c:1537:static int wm8962_dsp2_ena_info(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1538-\t\t\t\tstruct snd_ctl_elem_info *uinfo)\n--\nsound/soc/codecs/wm8962.c-1548-\nsound/soc/codecs/wm8962.c:1549:static int wm8962_dsp2_ena_get(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1550-\t\t\t       struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c-1553-\tstruct snd_soc_component *component = snd_kcontrol_chip(kcontrol);\nsound/soc/codecs/wm8962.c:1554:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-1555-\nsound/soc/codecs/wm8962.c:1556:\tucontrol-\u003evalue.integer.value[0] = !!(wm8962-\u003edsp2_ena \u0026 1 \u003c\u003c shift);\nsound/soc/codecs/wm8962.c-1557-\n--\nsound/soc/codecs/wm8962.c-1560-\nsound/soc/codecs/wm8962.c:1561:static int wm8962_dsp2_ena_put(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1562-\t\t\t       struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c-1565-\tstruct snd_soc_component *component = snd_kcontrol_chip(kcontrol);\nsound/soc/codecs/wm8962.c:1566:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c:1567:\tint old = wm8962-\u003edsp2_ena;\nsound/soc/codecs/wm8962.c-1568-\tint dsp2_running = snd_soc_component_read(component, WM8962_DSP2_POWER_MANAGEMENT) \u0026\n--\nsound/soc/codecs/wm8962.c-1570-\nsound/soc/codecs/wm8962.c:1571:\tguard(mutex)(\u0026wm8962-\u003edsp2_ena_lock);\nsound/soc/codecs/wm8962.c-1572-\nsound/soc/codecs/wm8962.c-1573-\tif (ucontrol-\u003evalue.integer.value[0])\nsound/soc/codecs/wm8962.c:1574:\t\twm8962-\u003edsp2_ena |= 1 \u003c\u003c shift;\nsound/soc/codecs/wm8962.c-1575-\telse\nsound/soc/codecs/wm8962.c:1576:\t\twm8962-\u003edsp2_ena \u0026= ~(1 \u003c\u003c shift);\nsound/soc/codecs/wm8962.c-1577-\nsound/soc/codecs/wm8962.c:1578:\tif (wm8962-\u003edsp2_ena == old)\nsound/soc/codecs/wm8962.c-1579-\t\treturn 0;\n--\nsound/soc/codecs/wm8962.c-1581-\tif (dsp2_running) {\nsound/soc/codecs/wm8962.c:1582:\t\tif (wm8962-\u003edsp2_ena)\nsound/soc/codecs/wm8962.c:1583:\t\t\twm8962_dsp2_set_enable(component, wm8962-\u003edsp2_ena);\nsound/soc/codecs/wm8962.c-1584-\t\telse\nsound/soc/codecs/wm8962.c:1585:\t\t\twm8962_dsp2_stop(component);\nsound/soc/codecs/wm8962.c-1586-\t}\n--\nsound/soc/codecs/wm8962.c-1593- */\nsound/soc/codecs/wm8962.c:1594:static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1595-\t\t\t    struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c-1623- */\nsound/soc/codecs/wm8962.c:1624:static int wm8962_put_spk_sw(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1625-\t\t\t    struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c=1663=static SOC_ENUM_SINGLE_DECL(cap_lhpf_mode,\n--\nsound/soc/codecs/wm8962.c-1665-\nsound/soc/codecs/wm8962.c:1666:static const struct snd_kcontrol_new wm8962_snd_controls[] = {\nsound/soc/codecs/wm8962.c-1667-SOC_DOUBLE(\"Input Mixer Switch\", WM8962_INPUT_MIXER_CONTROL_1, 3, 2, 1, 1),\n--\nsound/soc/codecs/wm8962.c=1715=SOC_DOUBLE_EXT(\"Headphone Switch\", WM8962_PWR_MGMT_2, 1, 0, 1, 1,\nsound/soc/codecs/wm8962.c:1716:\t       snd_soc_get_volsw, wm8962_put_hp_sw),\nsound/soc/codecs/wm8962.c-1717-SOC_DOUBLE_R(\"Headphone ZC Switch\", WM8962_HPOUTL_VOLUME, WM8962_HPOUTR_VOLUME,\n--\nsound/soc/codecs/wm8962.c=1780=SND_SOC_BYTES_MASK(\"ALC Coefficients\", WM8962_ALC1, 4,\n--\nsound/soc/codecs/wm8962.c-1783-\nsound/soc/codecs/wm8962.c:1784:static const struct snd_kcontrol_new wm8962_spk_mono_controls[] = {\nsound/soc/codecs/wm8962.c-1785-SOC_SINGLE_TLV(\"Speaker Volume\", WM8962_SPKOUTL_VOLUME, 0, 127, 0, out_tlv),\nsound/soc/codecs/wm8962.c=1786=SOC_SINGLE_EXT(\"Speaker Switch\", WM8962_CLASS_D_CONTROL_1, 1, 1, 1,\nsound/soc/codecs/wm8962.c:1787:\t       snd_soc_get_volsw, wm8962_put_spk_sw),\nsound/soc/codecs/wm8962.c-1788-SOC_SINGLE(\"Speaker ZC Switch\", WM8962_SPKOUTL_VOLUME, 7, 1, 0),\n--\nsound/soc/codecs/wm8962.c=1801=SOC_SINGLE_TLV(\"Speaker Mixer DACR Volume\", WM8962_SPEAKER_MIXER_5,\n--\nsound/soc/codecs/wm8962.c-1804-\nsound/soc/codecs/wm8962.c:1805:static const struct snd_kcontrol_new wm8962_spk_stereo_controls[] = {\nsound/soc/codecs/wm8962.c-1806-SOC_DOUBLE_R_TLV(\"Speaker Volume\", WM8962_SPKOUTL_VOLUME,\n--\nsound/soc/codecs/wm8962.c=1808=SOC_DOUBLE_EXT(\"Speaker Switch\", WM8962_CLASS_D_CONTROL_1, 1, 0, 1, 1,\nsound/soc/codecs/wm8962.c:1809:\t       snd_soc_get_volsw, wm8962_put_spk_sw),\nsound/soc/codecs/wm8962.c-1810-SOC_DOUBLE_R(\"Speaker ZC Switch\", WM8962_SPKOUTL_VOLUME, WM8962_SPKOUTR_VOLUME,\n--\nsound/soc/codecs/wm8962.c=2030=static int dsp2_event(struct snd_soc_dapm_widget *w,\n--\nsound/soc/codecs/wm8962.c-2033-\tstruct snd_soc_component *component = snd_soc_dapm_to_component(w-\u003edapm);\nsound/soc/codecs/wm8962.c:2034:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2035-\n--\nsound/soc/codecs/wm8962.c-2037-\tcase SND_SOC_DAPM_POST_PMU:\nsound/soc/codecs/wm8962.c:2038:\t\tif (wm8962-\u003edsp2_ena)\nsound/soc/codecs/wm8962.c:2039:\t\t\twm8962_dsp2_start(component);\nsound/soc/codecs/wm8962.c-2040-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c-2042-\tcase SND_SOC_DAPM_PRE_PMD:\nsound/soc/codecs/wm8962.c:2043:\t\tif (wm8962-\u003edsp2_ena)\nsound/soc/codecs/wm8962.c:2044:\t\t\twm8962_dsp2_stop(component);\nsound/soc/codecs/wm8962.c-2045-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c=2161=SOC_DAPM_SINGLE(\"IN4R Switch\", WM8962_SPEAKER_MIXER_2, 0, 1, 0),\n--\nsound/soc/codecs/wm8962.c-2163-\nsound/soc/codecs/wm8962.c:2164:static const struct snd_soc_dapm_widget wm8962_dapm_widgets[] = {\nsound/soc/codecs/wm8962.c-2165-SND_SOC_DAPM_INPUT(\"IN1L\"),\n--\nsound/soc/codecs/wm8962.c=2234=SND_SOC_DAPM_PGA(\"SPKOUTR Output\", WM8962_CLASS_D_CONTROL_1, 7, 0, NULL, 0),\n--\nsound/soc/codecs/wm8962.c-2236-\nsound/soc/codecs/wm8962.c:2237:static const struct snd_soc_dapm_widget wm8962_dapm_spk_mono_widgets[] = {\nsound/soc/codecs/wm8962.c-2238-SND_SOC_DAPM_MIXER(\"Speaker Mixer\", WM8962_MIXER_ENABLES, 1, 0,\n--\nsound/soc/codecs/wm8962.c=2242=SND_SOC_DAPM_OUTPUT(\"SPKOUT\"),\n--\nsound/soc/codecs/wm8962.c-2244-\nsound/soc/codecs/wm8962.c:2245:static const struct snd_soc_dapm_widget wm8962_dapm_spk_stereo_widgets[] = {\nsound/soc/codecs/wm8962.c-2246-SND_SOC_DAPM_MIXER(\"SPKOUTL Mixer\", WM8962_MIXER_ENABLES, 1, 0,\n--\nsound/soc/codecs/wm8962.c=2257=SND_SOC_DAPM_OUTPUT(\"SPKOUTR\"),\n--\nsound/soc/codecs/wm8962.c-2259-\nsound/soc/codecs/wm8962.c:2260:static const struct snd_soc_dapm_route wm8962_intercon[] = {\nsound/soc/codecs/wm8962.c-2261-\t{ \"INPGAL\", \"IN1L Switch\", \"IN1L\" },\n--\nsound/soc/codecs/wm8962.c-2356-\nsound/soc/codecs/wm8962.c:2357:static const struct snd_soc_dapm_route wm8962_spk_mono_intercon[] = {\nsound/soc/codecs/wm8962.c-2358-\t{ \"Speaker Mixer\", \"IN4L Switch\", \"IN4L\" },\n--\nsound/soc/codecs/wm8962.c-2381-\nsound/soc/codecs/wm8962.c:2382:static const struct snd_soc_dapm_route wm8962_spk_stereo_intercon[] = {\nsound/soc/codecs/wm8962.c-2383-\t{ \"SPKOUTL Mixer\", \"IN4L Switch\", \"IN4L\" },\n--\nsound/soc/codecs/wm8962.c-2416-\nsound/soc/codecs/wm8962.c:2417:static int wm8962_add_widgets(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-2418-{\nsound/soc/codecs/wm8962.c:2419:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c:2420:\tstruct wm8962_pdata *pdata = \u0026wm8962-\u003epdata;\nsound/soc/codecs/wm8962.c-2421-\tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\nsound/soc/codecs/wm8962.c-2422-\nsound/soc/codecs/wm8962.c:2423:\tsnd_soc_add_component_controls(component, wm8962_snd_controls,\nsound/soc/codecs/wm8962.c:2424:\t\t\t     ARRAY_SIZE(wm8962_snd_controls));\nsound/soc/codecs/wm8962.c-2425-\tif (pdata-\u003espk_mono)\nsound/soc/codecs/wm8962.c:2426:\t\tsnd_soc_add_component_controls(component, wm8962_spk_mono_controls,\nsound/soc/codecs/wm8962.c:2427:\t\t\t\t     ARRAY_SIZE(wm8962_spk_mono_controls));\nsound/soc/codecs/wm8962.c-2428-\telse\nsound/soc/codecs/wm8962.c:2429:\t\tsnd_soc_add_component_controls(component, wm8962_spk_stereo_controls,\nsound/soc/codecs/wm8962.c:2430:\t\t\t\t     ARRAY_SIZE(wm8962_spk_stereo_controls));\nsound/soc/codecs/wm8962.c-2431-\nsound/soc/codecs/wm8962.c-2432-\nsound/soc/codecs/wm8962.c:2433:\tsnd_soc_dapm_new_controls(dapm, wm8962_dapm_widgets,\nsound/soc/codecs/wm8962.c:2434:\t\t\t\t  ARRAY_SIZE(wm8962_dapm_widgets));\nsound/soc/codecs/wm8962.c-2435-\tif (pdata-\u003espk_mono)\nsound/soc/codecs/wm8962.c:2436:\t\tsnd_soc_dapm_new_controls(dapm, wm8962_dapm_spk_mono_widgets,\nsound/soc/codecs/wm8962.c:2437:\t\t\t\t\t  ARRAY_SIZE(wm8962_dapm_spk_mono_widgets));\nsound/soc/codecs/wm8962.c-2438-\telse\nsound/soc/codecs/wm8962.c:2439:\t\tsnd_soc_dapm_new_controls(dapm, wm8962_dapm_spk_stereo_widgets,\nsound/soc/codecs/wm8962.c:2440:\t\t\t\t\t  ARRAY_SIZE(wm8962_dapm_spk_stereo_widgets));\nsound/soc/codecs/wm8962.c-2441-\nsound/soc/codecs/wm8962.c:2442:\tsnd_soc_dapm_add_routes(dapm, wm8962_intercon,\nsound/soc/codecs/wm8962.c:2443:\t\t\t\tARRAY_SIZE(wm8962_intercon));\nsound/soc/codecs/wm8962.c-2444-\tif (pdata-\u003espk_mono)\nsound/soc/codecs/wm8962.c:2445:\t\tsnd_soc_dapm_add_routes(dapm, wm8962_spk_mono_intercon,\nsound/soc/codecs/wm8962.c:2446:\t\t\t\t\tARRAY_SIZE(wm8962_spk_mono_intercon));\nsound/soc/codecs/wm8962.c-2447-\telse\nsound/soc/codecs/wm8962.c:2448:\t\tsnd_soc_dapm_add_routes(dapm, wm8962_spk_stereo_intercon,\nsound/soc/codecs/wm8962.c:2449:\t\t\t\t\tARRAY_SIZE(wm8962_spk_stereo_intercon));\nsound/soc/codecs/wm8962.c-2450-\n--\nsound/soc/codecs/wm8962.c=2462=static const int sysclk_rates[] = {\n--\nsound/soc/codecs/wm8962.c-2465-\nsound/soc/codecs/wm8962.c:2466:static void wm8962_configure_bclk(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-2467-{\nsound/soc/codecs/wm8962.c-2468-\tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\nsound/soc/codecs/wm8962.c:2469:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2470-\tint best, min_diff, diff;\n--\nsound/soc/codecs/wm8962.c-2477-\nsound/soc/codecs/wm8962.c:2478:\tif (!wm8962-\u003esysclk_rate) {\nsound/soc/codecs/wm8962.c-2479-\t\tdev_dbg(component-\u003edev, \"No SYSCLK configured\\n\");\n--\nsound/soc/codecs/wm8962.c-2482-\nsound/soc/codecs/wm8962.c:2483:\tif (!wm8962-\u003ebclk || !wm8962-\u003elrclk) {\nsound/soc/codecs/wm8962.c-2484-\t\tdev_dbg(component-\u003edev, \"No audio clocks configured\\n\");\n--\nsound/soc/codecs/wm8962.c-2488-\tfor (i = 0; i \u003c ARRAY_SIZE(sysclk_rates); i++) {\nsound/soc/codecs/wm8962.c:2489:\t\tif (sysclk_rates[i] == wm8962-\u003esysclk_rate / wm8962-\u003elrclk) {\nsound/soc/codecs/wm8962.c-2490-\t\t\tclocking4 |= i \u003c\u003c WM8962_SYSCLK_RATE_SHIFT;\n--\nsound/soc/codecs/wm8962.c-2496-\t\tdev_err(component-\u003edev, \"Unsupported sysclk ratio %d\\n\",\nsound/soc/codecs/wm8962.c:2497:\t\t\twm8962-\u003esysclk_rate / wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2498-\t\treturn;\n--\nsound/soc/codecs/wm8962.c-2510-\t * SYSCLK_ENA is owned by the \"SYSCLK\" DAPM supply widget, which may\nsound/soc/codecs/wm8962.c:2511:\t * already have it set even below SND_SOC_BIAS_ON: wm8962_mic_detect()\nsound/soc/codecs/wm8962.c-2512-\t * force-enables that pin, so on boards using it (the Tegra machine\n--\nsound/soc/codecs/wm8962.c-2547-\tcase 0:\nsound/soc/codecs/wm8962.c:2548:\t\tdspclk = wm8962-\u003esysclk_rate;\nsound/soc/codecs/wm8962.c-2549-\t\tbreak;\nsound/soc/codecs/wm8962.c-2550-\tcase 1:\nsound/soc/codecs/wm8962.c:2551:\t\tdspclk = wm8962-\u003esysclk_rate / 2;\nsound/soc/codecs/wm8962.c-2552-\t\tbreak;\nsound/soc/codecs/wm8962.c-2553-\tcase 2:\nsound/soc/codecs/wm8962.c:2554:\t\tdspclk = wm8962-\u003esysclk_rate / 4;\nsound/soc/codecs/wm8962.c-2555-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c-2557-\t\tdev_warn(component-\u003edev, \"Unknown DSPCLK divisor read back\\n\");\nsound/soc/codecs/wm8962.c:2558:\t\tdspclk = wm8962-\u003esysclk_rate;\nsound/soc/codecs/wm8962.c-2559-\t}\nsound/soc/codecs/wm8962.c-2560-\nsound/soc/codecs/wm8962.c:2561:\tdev_dbg(component-\u003edev, \"DSPCLK is %dHz, BCLK %d\\n\", dspclk, wm8962-\u003ebclk);\nsound/soc/codecs/wm8962.c-2562-\n--\nsound/soc/codecs/wm8962.c-2569-\nsound/soc/codecs/wm8962.c:2570:\t\tdiff = (dspclk / bclk_divs[i]) - wm8962-\u003ebclk;\nsound/soc/codecs/wm8962.c-2571-\t\tif (diff \u003c 0) /* Table is sorted */\n--\nsound/soc/codecs/wm8962.c-2577-\t}\nsound/soc/codecs/wm8962.c:2578:\twm8962-\u003ebclk = dspclk / bclk_divs[best];\nsound/soc/codecs/wm8962.c-2579-\tclocking2 |= best;\nsound/soc/codecs/wm8962.c-2580-\tdev_dbg(component-\u003edev, \"Selected BCLK_DIV %d for %dHz\\n\",\nsound/soc/codecs/wm8962.c:2581:\t\tbclk_divs[best], wm8962-\u003ebclk);\nsound/soc/codecs/wm8962.c-2582-\nsound/soc/codecs/wm8962.c:2583:\taif2 |= wm8962-\u003ebclk / wm8962-\u003elrclk;\nsound/soc/codecs/wm8962.c-2584-\tdev_dbg(component-\u003edev, \"Selected LRCLK divisor %d for %dHz\\n\",\nsound/soc/codecs/wm8962.c:2585:\t\twm8962-\u003ebclk / wm8962-\u003elrclk, wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2586-\n--\nsound/soc/codecs/wm8962.c-2592-\nsound/soc/codecs/wm8962.c:2593:static int wm8962_set_bias_level(struct snd_soc_component *component,\nsound/soc/codecs/wm8962.c-2594-\t\t\t\t enum snd_soc_bias_level level)\n--\nsound/soc/codecs/wm8962.c-2606-\nsound/soc/codecs/wm8962.c:2607:\t\twm8962_configure_bclk(component);\nsound/soc/codecs/wm8962.c-2608-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c-2625-\nsound/soc/codecs/wm8962.c:2626:static int wm8962_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,\nsound/soc/codecs/wm8962.c-2627-\t\t\t       unsigned int rx_mask, int slots, int slot_width)\n--\nsound/soc/codecs/wm8962.c-2629-\tstruct snd_soc_component *component = dai-\u003ecomponent;\nsound/soc/codecs/wm8962.c:2630:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2631-\nsound/soc/codecs/wm8962.c:2632:\twm8962-\u003etdm_width = slot_width;\nsound/soc/codecs/wm8962.c-2633-\t/* External is one slot one channel, but internal is one slot two channels */\nsound/soc/codecs/wm8962.c:2634:\twm8962-\u003etdm_slots = slots / 2;\nsound/soc/codecs/wm8962.c-2635-\n--\nsound/soc/codecs/wm8962.c=2639=static const struct {\n--\nsound/soc/codecs/wm8962.c-2655-\nsound/soc/codecs/wm8962.c:2656:static int wm8962_hw_params(struct snd_pcm_substream *substream,\nsound/soc/codecs/wm8962.c-2657-\t\t\t    struct snd_pcm_hw_params *params,\n--\nsound/soc/codecs/wm8962.c-2661-\tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\nsound/soc/codecs/wm8962.c:2662:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2663-\tint i;\n--\nsound/soc/codecs/wm8962.c-2667-\nsound/soc/codecs/wm8962.c:2668:\tif (wm8962-\u003etdm_width \u0026\u0026 wm8962-\u003etdm_slots) {\nsound/soc/codecs/wm8962.c:2669:\t\twm8962-\u003ebclk = snd_soc_calc_bclk(params_rate(params),\nsound/soc/codecs/wm8962.c:2670:\t\t\t\t\t\t wm8962-\u003etdm_width,\nsound/soc/codecs/wm8962.c-2671-\t\t\t\t\t\t params_channels(params),\nsound/soc/codecs/wm8962.c:2672:\t\t\t\t\t\t wm8962-\u003etdm_slots);\nsound/soc/codecs/wm8962.c:2673:\t\twidth = wm8962-\u003etdm_width;\nsound/soc/codecs/wm8962.c-2674-\t} else {\nsound/soc/codecs/wm8962.c:2675:\t\twm8962-\u003ebclk = snd_soc_params_to_bclk(params);\nsound/soc/codecs/wm8962.c-2676-\t\twidth = params_width(params);\n--\nsound/soc/codecs/wm8962.c-2678-\t\tif (params_channels(params) == 1)\nsound/soc/codecs/wm8962.c:2679:\t\t\twm8962-\u003ebclk *= 2;\nsound/soc/codecs/wm8962.c-2680-\t}\nsound/soc/codecs/wm8962.c-2681-\nsound/soc/codecs/wm8962.c:2682:\twm8962-\u003elrclk = params_rate(params);\nsound/soc/codecs/wm8962.c-2683-\nsound/soc/codecs/wm8962.c-2684-\tfor (i = 0; i \u003c ARRAY_SIZE(sr_vals); i++) {\nsound/soc/codecs/wm8962.c:2685:\t\tif (sr_vals[i].rate == wm8962-\u003elrclk) {\nsound/soc/codecs/wm8962.c-2686-\t\t\tadctl3 |= sr_vals[i].reg;\n--\nsound/soc/codecs/wm8962.c-2690-\tif (i == ARRAY_SIZE(sr_vals)) {\nsound/soc/codecs/wm8962.c:2691:\t\tdev_err(component-\u003edev, \"Unsupported rate %dHz\\n\", wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2692-\t\treturn -EINVAL;\n--\nsound/soc/codecs/wm8962.c-2694-\nsound/soc/codecs/wm8962.c:2695:\tif (wm8962-\u003elrclk % 8000 == 0)\nsound/soc/codecs/wm8962.c-2696-\t\tadctl3 |= WM8962_SAMPLE_RATE_INT_MODE;\n--\nsound/soc/codecs/wm8962.c-2720-\tdev_dbg(component-\u003edev, \"hw_params set BCLK %dHz LRCLK %dHz\\n\",\nsound/soc/codecs/wm8962.c:2721:\t\twm8962-\u003ebclk, wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2722-\nsound/soc/codecs/wm8962.c-2723-\tif (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_ON)\nsound/soc/codecs/wm8962.c:2724:\t\twm8962_configure_bclk(component);\nsound/soc/codecs/wm8962.c-2725-\n--\nsound/soc/codecs/wm8962.c-2728-\nsound/soc/codecs/wm8962.c:2729:static int wm8962_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,\nsound/soc/codecs/wm8962.c-2730-\t\t\t\t unsigned int freq, int dir)\n--\nsound/soc/codecs/wm8962.c-2732-\tstruct snd_soc_component *component = dai-\u003ecomponent;\nsound/soc/codecs/wm8962.c:2733:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2734-\tint src;\n--\nsound/soc/codecs/wm8962.c-2737-\tcase WM8962_SYSCLK_MCLK:\nsound/soc/codecs/wm8962.c:2738:\t\twm8962-\u003esysclk = WM8962_SYSCLK_MCLK;\nsound/soc/codecs/wm8962.c-2739-\t\tsrc = 0;\n--\nsound/soc/codecs/wm8962.c-2741-\tcase WM8962_SYSCLK_FLL:\nsound/soc/codecs/wm8962.c:2742:\t\twm8962-\u003esysclk = WM8962_SYSCLK_FLL;\nsound/soc/codecs/wm8962.c-2743-\t\tsrc = 1 \u003c\u003c WM8962_SYSCLK_SRC_SHIFT;\n--\nsound/soc/codecs/wm8962.c-2751-\nsound/soc/codecs/wm8962.c:2752:\twm8962-\u003esysclk_rate = freq;\nsound/soc/codecs/wm8962.c-2753-\n--\nsound/soc/codecs/wm8962.c-2756-\nsound/soc/codecs/wm8962.c:2757:static int wm8962_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)\nsound/soc/codecs/wm8962.c-2758-{\nsound/soc/codecs/wm8962.c-2759-\tstruct snd_soc_component *component = dai-\u003ecomponent;\nsound/soc/codecs/wm8962.c:2760:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2761-\tint aif0 = 0;\n--\nsound/soc/codecs/wm8962.c-2806-\nsound/soc/codecs/wm8962.c:2807:\twm8962-\u003emaster_flag = false;\nsound/soc/codecs/wm8962.c-2808-\tswitch (fmt \u0026 SND_SOC_DAIFMT_MASTER_MASK) {\n--\nsound/soc/codecs/wm8962.c-2810-\t\taif0 |= WM8962_MSTR;\nsound/soc/codecs/wm8962.c:2811:\t\twm8962-\u003emaster_flag = true;\nsound/soc/codecs/wm8962.c-2812-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c=2852=static int fll_factors(struct _fll_div *fll_div, unsigned int Fref,\n--\nsound/soc/codecs/wm8962.c-2928-\nsound/soc/codecs/wm8962.c:2929:static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int source,\nsound/soc/codecs/wm8962.c-2930-\t\t\t  unsigned int Fref, unsigned int Fout)\nsound/soc/codecs/wm8962.c-2931-{\nsound/soc/codecs/wm8962.c:2932:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2933-\tstruct _fll_div fll_div;\n--\nsound/soc/codecs/wm8962.c-2938-\t/* Any change? */\nsound/soc/codecs/wm8962.c:2939:\tif (source == wm8962-\u003efll_src \u0026\u0026 Fref == wm8962-\u003efll_fref \u0026\u0026\nsound/soc/codecs/wm8962.c:2940:\t    Fout == wm8962-\u003efll_fout)\nsound/soc/codecs/wm8962.c-2941-\t\treturn 0;\n--\nsound/soc/codecs/wm8962.c-2945-\nsound/soc/codecs/wm8962.c:2946:\t\twm8962-\u003efll_fref = 0;\nsound/soc/codecs/wm8962.c:2947:\t\twm8962-\u003efll_fout = 0;\nsound/soc/codecs/wm8962.c-2948-\n--\nsound/soc/codecs/wm8962.c-3003-\nsound/soc/codecs/wm8962.c:3004:\treinit_completion(\u0026wm8962-\u003efll_lock);\nsound/soc/codecs/wm8962.c-3005-\n--\nsound/soc/codecs/wm8962.c-3020-\t */\nsound/soc/codecs/wm8962.c:3021:\tif (wm8962-\u003eirq)\nsound/soc/codecs/wm8962.c-3022-\t\ttime_left = msecs_to_jiffies(5);\n--\nsound/soc/codecs/wm8962.c-3025-\nsound/soc/codecs/wm8962.c:3026:\ttime_left = wait_for_completion_timeout(\u0026wm8962-\u003efll_lock,\nsound/soc/codecs/wm8962.c-3027-\t\t\t\t\t\ttime_left);\nsound/soc/codecs/wm8962.c-3028-\nsound/soc/codecs/wm8962.c:3029:\tif (time_left == 0 \u0026\u0026 wm8962-\u003eirq) {\nsound/soc/codecs/wm8962.c-3030-\t\tdev_err(component-\u003edev, \"FLL lock timed out\");\n--\nsound/soc/codecs/wm8962.c-3036-\nsound/soc/codecs/wm8962.c:3037:\twm8962-\u003efll_fref = Fref;\nsound/soc/codecs/wm8962.c:3038:\twm8962-\u003efll_fout = Fout;\nsound/soc/codecs/wm8962.c:3039:\twm8962-\u003efll_src = source;\nsound/soc/codecs/wm8962.c-3040-\n--\nsound/soc/codecs/wm8962.c-3043-\nsound/soc/codecs/wm8962.c:3044:static int wm8962_mute(struct snd_soc_dai *dai, int mute, int direction)\nsound/soc/codecs/wm8962.c-3045-{\n--\nsound/soc/codecs/wm8962.c-3072-\nsound/soc/codecs/wm8962.c:3073:static const struct snd_soc_dai_ops wm8962_dai_ops = {\nsound/soc/codecs/wm8962.c:3074:\t.hw_params = wm8962_hw_params,\nsound/soc/codecs/wm8962.c:3075:\t.set_sysclk = wm8962_set_dai_sysclk,\nsound/soc/codecs/wm8962.c:3076:\t.set_fmt = wm8962_set_dai_fmt,\nsound/soc/codecs/wm8962.c:3077:\t.set_tdm_slot = wm8962_set_tdm_slot,\nsound/soc/codecs/wm8962.c:3078:\t.mute_stream = wm8962_mute,\nsound/soc/codecs/wm8962.c-3079-\t.no_capture_mute = 1,\n--\nsound/soc/codecs/wm8962.c-3081-\nsound/soc/codecs/wm8962.c:3082:static struct snd_soc_dai_driver wm8962_dai = {\nsound/soc/codecs/wm8962.c:3083:\t.name = \"wm8962\",\nsound/soc/codecs/wm8962.c-3084-\t.playback = {\n--\nsound/soc/codecs/wm8962.c-3097-\t},\nsound/soc/codecs/wm8962.c:3098:\t.ops = \u0026wm8962_dai_ops,\nsound/soc/codecs/wm8962.c-3099-\t.symmetric_rate = 1,\n--\nsound/soc/codecs/wm8962.c-3101-\nsound/soc/codecs/wm8962.c:3102:static void wm8962_mic_work(struct work_struct *work)\nsound/soc/codecs/wm8962.c-3103-{\nsound/soc/codecs/wm8962.c:3104:\tstruct wm8962_priv *wm8962 = container_of(work,\nsound/soc/codecs/wm8962.c:3105:\t\t\t\t\t\t  struct wm8962_priv,\nsound/soc/codecs/wm8962.c-3106-\t\t\t\t\t\t  mic_work.work);\nsound/soc/codecs/wm8962.c:3107:\tstruct snd_soc_component *component = wm8962-\u003ecomponent;\nsound/soc/codecs/wm8962.c-3108-\tint status = 0;\n--\nsound/soc/codecs/wm8962.c-3125-\t\t */\nsound/soc/codecs/wm8962.c:3126:\t\tif (!(wm8962-\u003emic_status \u0026 WM8962_MICDET_STS))\nsound/soc/codecs/wm8962.c-3127-\t\t\tstatus = 0;\n--\nsound/soc/codecs/wm8962.c-3129-\nsound/soc/codecs/wm8962.c:3130:\twm8962-\u003emic_status = status;\nsound/soc/codecs/wm8962.c-3131-\nsound/soc/codecs/wm8962.c:3132:\tsnd_soc_jack_report(wm8962-\u003ejack, status,\n\n"
}

5/2 2026/09/17 03:57 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 18100
							output: 51
							thoughts: 44
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**Analyzing the wm8962 Codec Driver Integration**

Right, let's dive into the `sound/soc/codecs/wm8962.c` file. I'm specifically interested in the end of the file, because that's usually where the crucial device registration and driver setup logic resides. My goal is to quickly pinpoint how the WM8962 codec integrates with the system. I need to understand whether it's using an I2C or SPI driver. Knowing this will give me a better understanding of the low-level hardware communication method being employed. Understanding the transport mechanism is the cornerstone of effective troubleshooting, performance optimization, and custom driver enhancements. Let's see what the registration code reveals.



6/2 2026/09/17 03:57 tool grepper
0m Args:
{
  "Expression": "module_i2c_driver|i2c_register_driver|probe",
  "PathPrefix": "sound/soc/codecs/wm8962.c"
}

Results:
{
  "Output": "sound/soc/codecs/wm8962.c=3534=static void wm8962_free_gpio(struct snd_soc_component *component)\n--\nsound/soc/codecs/wm8962.c-3538-\nsound/soc/codecs/wm8962.c:3539:static int wm8962_probe(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-3540-{\n--\nsound/soc/codecs/wm8962.c=3617=static const struct snd_soc_component_driver soc_component_dev_wm8962 = {\nsound/soc/codecs/wm8962.c:3618:\t.probe\t\t\t= wm8962_probe,\nsound/soc/codecs/wm8962.c-3619-\t.remove\t\t\t= wm8962_remove,\n--\nsound/soc/codecs/wm8962.c=3645=static int wm8962_set_pdata_from_of(struct i2c_client *i2c,\n--\nsound/soc/codecs/wm8962.c-3673-\nsound/soc/codecs/wm8962.c:3674:static int wm8962_i2c_probe(struct i2c_client *i2c)\nsound/soc/codecs/wm8962.c-3675-{\n--\nsound/soc/codecs/wm8962.c=4021=static struct i2c_driver wm8962_i2c_driver = {\n--\nsound/soc/codecs/wm8962.c-4026-\t},\nsound/soc/codecs/wm8962.c:4027:\t.probe =    wm8962_i2c_probe,\nsound/soc/codecs/wm8962.c-4028-\t.remove =   wm8962_i2c_remove,\n--\nsound/soc/codecs/wm8962.c-4031-\nsound/soc/codecs/wm8962.c:4032:module_i2c_driver(wm8962_i2c_driver);\nsound/soc/codecs/wm8962.c-4033-\n"
}

7/2 2026/09/17 03:57 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 18988
							output: 39
							thoughts: 44
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**Analyzing the `wm8962` Driver**

Alright, so `wm8962` is clearly a driver implementation for the Wolfson WM8962 audio codec, and it appears to be designed as an I2C client. That's good to know – efficient and common interface for an audio codec. My immediate thought is to check the Kconfig file associated with it, specifically the `SND_SOC_WM8962` option. I want to quickly understand its configuration possibilities and dependencies. This helps understand when and how the driver gets built into the kernel, what features are exposed as configurable options, and also the required configuration from the device tree and board. I want to see how the build system integrates it and whether it relies on any other sound system features. Any unusual dependencies are worth a closer look, especially any that might be new or not broadly adopted. I'm also looking for any hints on how this particular codec driver is integrated into the larger Sound subsystem; i.e. the common frameworks and abstractions employed in the Sound subsystem.



8/2 2026/09/17 03:57 tool grepper
0m Args:
{
  "Expression": "SND_SOC_WM8962",
  "PathPrefix": "sound/soc/codecs/Kconfig"
}

Results:
{
  "Output": "sound/soc/codecs/Kconfig=14=config SND_SOC_ALL_CODECS\n--\nsound/soc/codecs/Kconfig-349-\timply SND_SOC_WM8961\nsound/soc/codecs/Kconfig:350:\timply SND_SOC_WM8962\nsound/soc/codecs/Kconfig-351-\timply SND_SOC_WM8971\n--\nsound/soc/codecs/Kconfig=2691=config SND_SOC_WM8961\n--\nsound/soc/codecs/Kconfig-2694-\nsound/soc/codecs/Kconfig:2695:config SND_SOC_WM8962\nsound/soc/codecs/Kconfig-2696-\ttristate \"Wolfson Microelectronics WM8962 CODEC\"\n"
}

9/2 2026/09/17 03:57 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 19535
							output: 38
							thoughts: 25
						

Thoughts:
Here's my summary, as though I'm thinking it:

**Analyzing the Kconfig File**

Okay, let's dive into the `Kconfig` file, specifically around line 2695 within the `sound/soc/codecs` directory. I know that area generally deals with codec configurations within the Sound Subsystem for System on Chips (SoCs), so this is likely where a specific audio codec's configuration parameters are defined. I need to understand what's being enabled or disabled, any dependencies it has, and perhaps the logic behind its selection. This line probably marks an important conditional block for a particular codec or feature. Let's see what clues this section offers about its interaction with the broader audio framework. I anticipate seeing dependencies on specific hardware platforms, driver implementations, or features which influence the configuration of the codec. I'm hoping it's well-commented, as that will speed things up significantly!



10/2 2026/09/17 03:57 tool read-file
0m Args:
{
  "File": "sound/soc/codecs/Kconfig",
  "FirstLine": 2690,
  "LineCount": 20
}

Results:
{
  "Contents": "2690:\t\n2691:\tconfig SND_SOC_WM8961\n2692:\t\ttristate \"Wolfson Microelectronics WM8961 CODEC\"\n2693:\t\tdepends on I2C\n2694:\t\n2695:\tconfig SND_SOC_WM8962\n2696:\t\ttristate \"Wolfson Microelectronics WM8962 CODEC\"\n2697:\t\tdepends on I2C \u0026\u0026 INPUT\n2698:\t\n2699:\tconfig SND_SOC_WM8971\n2700:\t\ttristate\n2701:\t\tdepends on I2C\n2702:\t\n2703:\tconfig SND_SOC_WM8974\n2704:\t\ttristate \"Wolfson Microelectronics WM8974 codec\"\n2705:\t\tdepends on I2C\n2706:\t\n2707:\tconfig SND_SOC_WM8978\n2708:\t\ttristate \"Wolfson Microelectronics WM8978 codec\"\n2709:\t\tdepends on I2C\n"
}

11/2 2026/09/17 03:57 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 20089
							output: 37
							thoughts: 53
						

Thoughts:
Okay, here's my take on those thoughts, framed as my own mental process:

**WM8962 Usage: A Deep Dive**

Alright, time to get granular. Let's dig into the practical application of the WM8962 codec. My immediate thought is, "How is this thing actually being *used*?" Is it primarily integrated as an I2C device on typical embedded hardware? I need to understand its common instantiation patterns.

My focus now shifts to the kernel side of things. I need to see which specific machine drivers or, more importantly, board files explicitly call out or utilize the `SND_SOC_WM8962` symbol. That’s where the real usage details live. Understanding those dependencies will reveal the specific hardware and software configurations this codec is designed for. Let's see what the Linux kernel community is doing with this part.



12/2 2026/09/17 03:57 tool grepper
0m Args:
{
  "Expression": "CONFIG_SND_SOC_WM8962|SND_SOC_WM8962"
}

Results:
{
  "Output": "arch/arm/configs/imx_v6_v7_defconfig=320=CONFIG_SND_SOC_WM8960=y\narch/arm/configs/imx_v6_v7_defconfig:321:CONFIG_SND_SOC_WM8962=y\narch/arm/configs/imx_v6_v7_defconfig-322-CONFIG_SND_SIMPLE_CARD=y\n--\narch/arm/configs/multi_v7_defconfig=866=CONFIG_SND_SOC_WM8960=m\narch/arm/configs/multi_v7_defconfig:867:CONFIG_SND_SOC_WM8962=m\narch/arm/configs/multi_v7_defconfig-868-CONFIG_SND_SOC_WM8978=m\n--\narch/arm64/configs/defconfig=1186=CONFIG_SND_SOC_WM8960=m\narch/arm64/configs/defconfig:1187:CONFIG_SND_SOC_WM8962=m\narch/arm64/configs/defconfig-1188-CONFIG_SND_SOC_WM8978=m\n--\nsound/soc/codecs/Kconfig=14=config SND_SOC_ALL_CODECS\n--\nsound/soc/codecs/Kconfig-349-\timply SND_SOC_WM8961\nsound/soc/codecs/Kconfig:350:\timply SND_SOC_WM8962\nsound/soc/codecs/Kconfig-351-\timply SND_SOC_WM8971\n--\nsound/soc/codecs/Kconfig=2691=config SND_SOC_WM8961\n--\nsound/soc/codecs/Kconfig-2694-\nsound/soc/codecs/Kconfig:2695:config SND_SOC_WM8962\nsound/soc/codecs/Kconfig-2696-\ttristate \"Wolfson Microelectronics WM8962 CODEC\"\n--\nsound/soc/codecs/Makefile=862=obj-$(CONFIG_SND_SOC_WM8961)\t+= snd-soc-wm8961.o\nsound/soc/codecs/Makefile:863:obj-$(CONFIG_SND_SOC_WM8962)\t+= snd-soc-wm8962.o\nsound/soc/codecs/Makefile-864-obj-$(CONFIG_SND_SOC_WM8971)\t+= snd-soc-wm8971.o\n--\nsound/soc/codecs/wm8962.c=3140=static irqreturn_t wm8962_irq(int irq, void *data)\n--\nsound/soc/codecs/wm8962.c-3213-\nsound/soc/codecs/wm8962.c:3214:#ifndef CONFIG_SND_SOC_WM8962_MODULE\nsound/soc/codecs/wm8962.c-3215-\t\ttrace_snd_soc_jack_irq(dev_name(dev));\n--\nsound/soc/samsung/Kconfig=58=config SND_SOC_TOBERMORY\n--\nsound/soc/samsung/Kconfig-62-\tselect SND_SAMSUNG_I2S\nsound/soc/samsung/Kconfig:63:\tselect SND_SOC_WM8962\nsound/soc/samsung/Kconfig-64-\n--\nsound/soc/tegra/Kconfig=232=config SND_SOC_TEGRA_WM8962\n--\nsound/soc/tegra/Kconfig-235-\tselect SND_SOC_TEGRA_MACHINE_DRV\nsound/soc/tegra/Kconfig:236:\tselect SND_SOC_WM8962\nsound/soc/tegra/Kconfig-237-\thelp\n"
}

13/2 2026/09/17 03:57 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 21361
							output: 43
							thoughts: 217
						

Thoughts:
**Investigating I2C Audio Codec Compatibility on amd64**

Okay, so I'm looking at these Kconfig files: `sound/soc/samsung/Kconfig` concerning the TOBERMORY codec, `sound/soc/tegra/Kconfig` and the TEGRA_WM8962 codec, and then the default configurations for ARM and ARM64. My target architecture is amd64. The question is, can I even *reach* an I2C audio codec on amd64 when running in QEMU or GCE? This feels like it should be simpler to test in simulation!

Now, the WM8962 specifically: can I instantiate it through i2c-dev? Can I use something like `i2c_new_client_device` or the `new_device` sysfs attribute to make this happen? That's the key.

But hold on… even if I *can* create an I2C client, the real question is: will the I2C probe even succeed if there's no physical I2C device, or even a mock device present? This is where I'll need to check the probe function, `wm8962_i2c_probe`, in detail. This is where the magic happens.



14/2 2026/09/17 03:57 tool read-file
0m Args:
{
  "File": "sound/soc/codecs/wm8962.c",
  "FirstLine": 3673,
  "LineCount": 90
}

Results:
{
  "Contents": "3673:\t\n3674:\tstatic int wm8962_i2c_probe(struct i2c_client *i2c)\n3675:\t{\n3676:\t\tstruct wm8962_pdata *pdata = dev_get_platdata(\u0026i2c-\u003edev);\n3677:\t\tstruct wm8962_priv *wm8962;\n3678:\t\tunsigned int reg;\n3679:\t\tint ret, i, irq_pol, trigger;\n3680:\t\n3681:\t\twm8962 = devm_kzalloc(\u0026i2c-\u003edev, sizeof(*wm8962), GFP_KERNEL);\n3682:\t\tif (wm8962 == NULL)\n3683:\t\t\treturn -ENOMEM;\n3684:\t\n3685:\t\tmutex_init(\u0026wm8962-\u003edsp2_ena_lock);\n3686:\t\n3687:\t\ti2c_set_clientdata(i2c, wm8962);\n3688:\t\n3689:\t\tINIT_DELAYED_WORK(\u0026wm8962-\u003emic_work, wm8962_mic_work);\n3690:\t\tinit_completion(\u0026wm8962-\u003efll_lock);\n3691:\t\twm8962-\u003eirq = i2c-\u003eirq;\n3692:\t\n3693:\t\t/* If platform data was supplied, update the default data in priv */\n3694:\t\tif (pdata) {\n3695:\t\t\tmemcpy(\u0026wm8962-\u003epdata, pdata, sizeof(struct wm8962_pdata));\n3696:\t\t} else if (i2c-\u003edev.of_node) {\n3697:\t\t\tret = wm8962_set_pdata_from_of(i2c, \u0026wm8962-\u003epdata);\n3698:\t\t\tif (ret != 0)\n3699:\t\t\t\treturn ret;\n3700:\t\t}\n3701:\t\n3702:\t\tfor (i = 0; i \u003c ARRAY_SIZE(wm8962-\u003esupplies); i++)\n3703:\t\t\twm8962-\u003esupplies[i].supply = wm8962_supply_names[i];\n3704:\t\n3705:\t\tret = devm_regulator_bulk_get(\u0026i2c-\u003edev, ARRAY_SIZE(wm8962-\u003esupplies),\n3706:\t\t\t\t\t wm8962-\u003esupplies);\n3707:\t\tif (ret != 0) {\n3708:\t\t\tdev_err(\u0026i2c-\u003edev, \"Failed to request supplies: %d\\n\", ret);\n3709:\t\t\tgoto err;\n3710:\t\t}\n3711:\t\n3712:\t\tret = regulator_bulk_enable(ARRAY_SIZE(wm8962-\u003esupplies),\n3713:\t\t\t\t\t    wm8962-\u003esupplies);\n3714:\t\tif (ret != 0) {\n3715:\t\t\tdev_err(\u0026i2c-\u003edev, \"Failed to enable supplies: %d\\n\", ret);\n3716:\t\t\treturn ret;\n3717:\t\t}\n3718:\t\n3719:\t\twm8962-\u003eregmap = devm_regmap_init_i2c(i2c, \u0026wm8962_regmap);\n3720:\t\tif (IS_ERR(wm8962-\u003eregmap)) {\n3721:\t\t\tret = PTR_ERR(wm8962-\u003eregmap);\n3722:\t\t\tdev_err(\u0026i2c-\u003edev, \"Failed to allocate regmap: %d\\n\", ret);\n3723:\t\t\tgoto err_enable;\n3724:\t\t}\n3725:\t\n3726:\t\t/*\n3727:\t\t * We haven't marked the chip revision as volatile due to\n3728:\t\t * sharing a register with the right input volume; explicitly\n3729:\t\t * bypass the cache to read it.\n3730:\t\t */\n3731:\t\tregcache_cache_bypass(wm8962-\u003eregmap, true);\n3732:\t\n3733:\t\tret = regmap_read(wm8962-\u003eregmap, WM8962_SOFTWARE_RESET, \u0026reg);\n3734:\t\tif (ret \u003c 0) {\n3735:\t\t\tdev_err(\u0026i2c-\u003edev, \"Failed to read ID register\\n\");\n3736:\t\t\tgoto err_enable;\n3737:\t\t}\n3738:\t\tif (reg != 0x6243) {\n3739:\t\t\tdev_err(\u0026i2c-\u003edev,\n3740:\t\t\t\t\"Device is not a WM8962, ID %x != 0x6243\\n\", reg);\n3741:\t\t\tret = -EINVAL;\n3742:\t\t\tgoto err_enable;\n3743:\t\t}\n3744:\t\n3745:\t\tret = regmap_read(wm8962-\u003eregmap, WM8962_RIGHT_INPUT_VOLUME, \u0026reg);\n3746:\t\tif (ret \u003c 0) {\n3747:\t\t\tdev_err(\u0026i2c-\u003edev, \"Failed to read device revision: %d\\n\",\n3748:\t\t\t\tret);\n3749:\t\t\tgoto err_enable;\n3750:\t\t}\n3751:\t\n3752:\t\tdev_info(\u0026i2c-\u003edev, \"customer id %x revision %c\\n\",\n3753:\t\t\t (reg \u0026 WM8962_CUST_ID_MASK) \u003e\u003e WM8962_CUST_ID_SHIFT,\n3754:\t\t\t ((reg \u0026 WM8962_CHIP_REV_MASK) \u003e\u003e WM8962_CHIP_REV_SHIFT)\n3755:\t\t\t + 'A');\n3756:\t\n3757:\t\tregcache_cache_bypass(wm8962-\u003eregmap, false);\n3758:\t\n3759:\t\tret = wm8962_reset(wm8962);\n3760:\t\tif (ret \u003c 0) {\n3761:\t\t\tdev_err(\u0026i2c-\u003edev, \"Failed to issue reset\\n\");\n3762:\t\t\tgoto err_enable;\n"
}

15/2 2026/09/17 03:57 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 23549
							output: 29
							thoughts: 284
						

Thoughts:
**My Initial Assessment of the WM8962 Probe**

Okay, so `wm8962_i2c_probe` is trying to talk to the WM8962 chip over I2C, specifically reading the `WM8962_SOFTWARE_RESET` register. A quick check for a specific value, `0x6243`, is done. If that doesn't match, it's a hard fail. Makes sense, that's a pretty standard initial check to ensure we're talking to the right device, and the immediate bailout keeps things clean. But, even if it *does* pass that initial test... how does that codec then *become* a sound card?

In ASoC, the codec driver itself doesn't just magically *create* an ALSA sound card or a PCM device, I know that. It's the machine driver – something like a Tegra, an i.MX, or even something simpler defined in Device Tree or ACPI – that's responsible for binding the codec's Digital Audio Interface (DAI) and the CPU's DAI together into an `snd_soc_card` structure. That's the crucial link.

So, I need to check if there are any machine drivers at all, or anything ACPI, defined for the WM8962 specifically, especially on x86/amd64 platforms. Let's start with a quick `grep` for "wm8962" within the `sound/soc/` directory. That's the most likely place to start looking for the missing piece. It's the machine driver that's going to make or break this.



16/2 2026/09/17 03:57 tool grepper
0m Args:
{
  "Expression": "wm8962",
  "PathPrefix": "sound/soc/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 1235 lines.\nUse more precise expression if possible.\n\nsound/soc/codecs/Makefile=409=snd-soc-wm8961-y := wm8961.o\nsound/soc/codecs/Makefile:410:snd-soc-wm8962-y := wm8962.o\nsound/soc/codecs/Makefile-411-snd-soc-wm8971-y := wm8971.o\n--\nsound/soc/codecs/Makefile=862=obj-$(CONFIG_SND_SOC_WM8961)\t+= snd-soc-wm8961.o\nsound/soc/codecs/Makefile:863:obj-$(CONFIG_SND_SOC_WM8962)\t+= snd-soc-wm8962.o\nsound/soc/codecs/Makefile-864-obj-$(CONFIG_SND_SOC_WM8971)\t+= snd-soc-wm8971.o\n--\nsound/soc/codecs/wm8962.c-2-/*\nsound/soc/codecs/wm8962.c:3: * wm8962.c  --  WM8962 ALSA SoC Audio driver\nsound/soc/codecs/wm8962.c-4- *\n--\nsound/soc/codecs/wm8962.c-33-#include \u003csound/tlv.h\u003e\nsound/soc/codecs/wm8962.c:34:#include \u003csound/wm8962.h\u003e\nsound/soc/codecs/wm8962.c-35-#include \u003ctrace/events/asoc.h\u003e\nsound/soc/codecs/wm8962.c-36-\nsound/soc/codecs/wm8962.c:37:#include \"wm8962.h\"\nsound/soc/codecs/wm8962.c-38-\nsound/soc/codecs/wm8962.c-39-#define WM8962_NUM_SUPPLIES 8\nsound/soc/codecs/wm8962.c:40:static const char *wm8962_supply_names[WM8962_NUM_SUPPLIES] = {\nsound/soc/codecs/wm8962.c-41-\t\"DCVDD\",\n--\nsound/soc/codecs/wm8962.c-51-/* codec private data */\nsound/soc/codecs/wm8962.c:52:struct wm8962_priv {\nsound/soc/codecs/wm8962.c:53:\tstruct wm8962_pdata pdata;\nsound/soc/codecs/wm8962.c-54-\tstruct regmap *regmap;\n--\nsound/soc/codecs/wm8962.c-97-#define WM8962_REGULATOR_EVENT(n) \\\nsound/soc/codecs/wm8962.c:98:static int wm8962_regulator_event_##n(struct notifier_block *nb, \\\nsound/soc/codecs/wm8962.c-99-\t\t\t\t    unsigned long event, void *data)\t\\\nsound/soc/codecs/wm8962.c-100-{ \\\nsound/soc/codecs/wm8962.c:101:\tstruct wm8962_priv *wm8962 = container_of(nb, struct wm8962_priv, \\\nsound/soc/codecs/wm8962.c-102-\t\t\t\t\t\t  disable_nb[n]); \\\nsound/soc/codecs/wm8962.c-103-\tif (event \u0026 REGULATOR_EVENT_DISABLE) { \\\nsound/soc/codecs/wm8962.c:104:\t\tregcache_mark_dirty(wm8962-\u003eregmap);\t\\\nsound/soc/codecs/wm8962.c-105-\t} \\\n--\nsound/soc/codecs/wm8962.c=116=WM8962_REGULATOR_EVENT(7)\nsound/soc/codecs/wm8962.c-117-\nsound/soc/codecs/wm8962.c:118:static const struct reg_default wm8962_reg[] = {\nsound/soc/codecs/wm8962.c-119-\t{ 0, 0x009F },   /* R0     - Left Input volume */\n--\nsound/soc/codecs/wm8962.c-792-\nsound/soc/codecs/wm8962.c:793:static bool wm8962_volatile_register(struct device *dev, unsigned int reg)\nsound/soc/codecs/wm8962.c-794-{\n--\nsound/soc/codecs/wm8962.c-809-\nsound/soc/codecs/wm8962.c:810:static bool wm8962_readable_register(struct device *dev, unsigned int reg)\nsound/soc/codecs/wm8962.c-811-{\n--\nsound/soc/codecs/wm8962.c-1444-\nsound/soc/codecs/wm8962.c:1445:static int wm8962_reset(struct wm8962_priv *wm8962)\nsound/soc/codecs/wm8962.c-1446-{\n--\nsound/soc/codecs/wm8962.c-1448-\nsound/soc/codecs/wm8962.c:1449:\tret = regmap_write(wm8962-\u003eregmap, WM8962_SOFTWARE_RESET, 0x6243);\nsound/soc/codecs/wm8962.c-1450-\tif (ret != 0)\n--\nsound/soc/codecs/wm8962.c-1452-\nsound/soc/codecs/wm8962.c:1453:\treturn regmap_write(wm8962-\u003eregmap, WM8962_PLL_SOFTWARE_RESET, 0);\nsound/soc/codecs/wm8962.c-1454-}\n--\nsound/soc/codecs/wm8962.c=1476=static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);\nsound/soc/codecs/wm8962.c-1477-\nsound/soc/codecs/wm8962.c:1478:static int wm8962_dsp2_write_config(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-1479-{\nsound/soc/codecs/wm8962.c:1480:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-1481-\nsound/soc/codecs/wm8962.c:1482:\treturn regcache_sync_region(wm8962-\u003eregmap,\nsound/soc/codecs/wm8962.c-1483-\t\t\t\t    WM8962_HDBASS_AI_1, WM8962_MAX_REGISTER);\n--\nsound/soc/codecs/wm8962.c-1485-\nsound/soc/codecs/wm8962.c:1486:static int wm8962_dsp2_set_enable(struct snd_soc_component *component, u16 val)\nsound/soc/codecs/wm8962.c-1487-{\n--\nsound/soc/codecs/wm8962.c-1508-\nsound/soc/codecs/wm8962.c:1509:static int wm8962_dsp2_start(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-1510-{\nsound/soc/codecs/wm8962.c:1511:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-1512-\nsound/soc/codecs/wm8962.c:1513:\twm8962_dsp2_write_config(component);\nsound/soc/codecs/wm8962.c-1514-\n--\nsound/soc/codecs/wm8962.c-1516-\nsound/soc/codecs/wm8962.c:1517:\twm8962_dsp2_set_enable(component, wm8962-\u003edsp2_ena);\nsound/soc/codecs/wm8962.c-1518-\n--\nsound/soc/codecs/wm8962.c-1521-\nsound/soc/codecs/wm8962.c:1522:static int wm8962_dsp2_stop(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-1523-{\nsound/soc/codecs/wm8962.c:1524:\twm8962_dsp2_set_enable(component, 0);\nsound/soc/codecs/wm8962.c-1525-\n--\nsound/soc/codecs/wm8962.c-1532-{\t.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \\\nsound/soc/codecs/wm8962.c:1533:\t.info = wm8962_dsp2_ena_info, \\\nsound/soc/codecs/wm8962.c:1534:\t.get = wm8962_dsp2_ena_get, .put = wm8962_dsp2_ena_put, \\\nsound/soc/codecs/wm8962.c-1535-\t.private_value = xshift }\nsound/soc/codecs/wm8962.c-1536-\nsound/soc/codecs/wm8962.c:1537:static int wm8962_dsp2_ena_info(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1538-\t\t\t\tstruct snd_ctl_elem_info *uinfo)\n--\nsound/soc/codecs/wm8962.c-1548-\nsound/soc/codecs/wm8962.c:1549:static int wm8962_dsp2_ena_get(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1550-\t\t\t       struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c-1553-\tstruct snd_soc_component *component = snd_kcontrol_chip(kcontrol);\nsound/soc/codecs/wm8962.c:1554:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-1555-\nsound/soc/codecs/wm8962.c:1556:\tucontrol-\u003evalue.integer.value[0] = !!(wm8962-\u003edsp2_ena \u0026 1 \u003c\u003c shift);\nsound/soc/codecs/wm8962.c-1557-\n--\nsound/soc/codecs/wm8962.c-1560-\nsound/soc/codecs/wm8962.c:1561:static int wm8962_dsp2_ena_put(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1562-\t\t\t       struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c-1565-\tstruct snd_soc_component *component = snd_kcontrol_chip(kcontrol);\nsound/soc/codecs/wm8962.c:1566:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c:1567:\tint old = wm8962-\u003edsp2_ena;\nsound/soc/codecs/wm8962.c-1568-\tint dsp2_running = snd_soc_component_read(component, WM8962_DSP2_POWER_MANAGEMENT) \u0026\n--\nsound/soc/codecs/wm8962.c-1570-\nsound/soc/codecs/wm8962.c:1571:\tguard(mutex)(\u0026wm8962-\u003edsp2_ena_lock);\nsound/soc/codecs/wm8962.c-1572-\nsound/soc/codecs/wm8962.c-1573-\tif (ucontrol-\u003evalue.integer.value[0])\nsound/soc/codecs/wm8962.c:1574:\t\twm8962-\u003edsp2_ena |= 1 \u003c\u003c shift;\nsound/soc/codecs/wm8962.c-1575-\telse\nsound/soc/codecs/wm8962.c:1576:\t\twm8962-\u003edsp2_ena \u0026= ~(1 \u003c\u003c shift);\nsound/soc/codecs/wm8962.c-1577-\nsound/soc/codecs/wm8962.c:1578:\tif (wm8962-\u003edsp2_ena == old)\nsound/soc/codecs/wm8962.c-1579-\t\treturn 0;\n--\nsound/soc/codecs/wm8962.c-1581-\tif (dsp2_running) {\nsound/soc/codecs/wm8962.c:1582:\t\tif (wm8962-\u003edsp2_ena)\nsound/soc/codecs/wm8962.c:1583:\t\t\twm8962_dsp2_set_enable(component, wm8962-\u003edsp2_ena);\nsound/soc/codecs/wm8962.c-1584-\t\telse\nsound/soc/codecs/wm8962.c:1585:\t\t\twm8962_dsp2_stop(component);\nsound/soc/codecs/wm8962.c-1586-\t}\n--\nsound/soc/codecs/wm8962.c-1593- */\nsound/soc/codecs/wm8962.c:1594:static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1595-\t\t\t    struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c-1623- */\nsound/soc/codecs/wm8962.c:1624:static int wm8962_put_spk_sw(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1625-\t\t\t    struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c=1663=static SOC_ENUM_SINGLE_DECL(cap_lhpf_mode,\n--\nsound/soc/codecs/wm8962.c-1665-\nsound/soc/codecs/wm8962.c:1666:static const struct snd_kcontrol_new wm8962_snd_controls[] = {\nsound/soc/codecs/wm8962.c-1667-SOC_DOUBLE(\"Input Mixer Switch\", WM8962_INPUT_MIXER_CONTROL_1, 3, 2, 1, 1),\n--\nsound/soc/codecs/wm8962.c=1715=SOC_DOUBLE_EXT(\"Headphone Switch\", WM8962_PWR_MGMT_2, 1, 0, 1, 1,\nsound/soc/codecs/wm8962.c:1716:\t       snd_soc_get_volsw, wm8962_put_hp_sw),\nsound/soc/codecs/wm8962.c-1717-SOC_DOUBLE_R(\"Headphone ZC Switch\", WM8962_HPOUTL_VOLUME, WM8962_HPOUTR_VOLUME,\n--\nsound/soc/codecs/wm8962.c=1780=SND_SOC_BYTES_MASK(\"ALC Coefficients\", WM8962_ALC1, 4,\n--\nsound/soc/codecs/wm8962.c-1783-\nsound/soc/codecs/wm8962.c:1784:static const struct snd_kcontrol_new wm8962_spk_mono_controls[] = {\nsound/soc/codecs/wm8962.c-1785-SOC_SINGLE_TLV(\"Speaker Volume\", WM8962_SPKOUTL_VOLUME, 0, 127, 0, out_tlv),\nsound/soc/codecs/wm8962.c=1786=SOC_SINGLE_EXT(\"Speaker Switch\", WM8962_CLASS_D_CONTROL_1, 1, 1, 1,\nsound/soc/codecs/wm8962.c:1787:\t       snd_soc_get_volsw, wm8962_put_spk_sw),\nsound/soc/codecs/wm8962.c-1788-SOC_SINGLE(\"Speaker ZC Switch\", WM8962_SPKOUTL_VOLUME, 7, 1, 0),\n--\nsound/soc/codecs/wm8962.c=1801=SOC_SINGLE_TLV(\"Speaker Mixer DACR Volume\", WM8962_SPEAKER_MIXER_5,\n--\nsound/soc/codecs/wm8962.c-1804-\nsound/soc/codecs/wm8962.c:1805:static const struct snd_kcontrol_new wm8962_spk_stereo_controls[] = {\nsound/soc/codecs/wm8962.c-1806-SOC_DOUBLE_R_TLV(\"Speaker Volume\", WM8962_SPKOUTL_VOLUME,\n--\nsound/soc/codecs/wm8962.c=1808=SOC_DOUBLE_EXT(\"Speaker Switch\", WM8962_CLASS_D_CONTROL_1, 1, 0, 1, 1,\nsound/soc/codecs/wm8962.c:1809:\t       snd_soc_get_volsw, wm8962_put_spk_sw),\nsound/soc/codecs/wm8962.c-1810-SOC_DOUBLE_R(\"Speaker ZC Switch\", WM8962_SPKOUTL_VOLUME, WM8962_SPKOUTR_VOLUME,\n--\nsound/soc/codecs/wm8962.c=2030=static int dsp2_event(struct snd_soc_dapm_widget *w,\n--\nsound/soc/codecs/wm8962.c-2033-\tstruct snd_soc_component *component = snd_soc_dapm_to_component(w-\u003edapm);\nsound/soc/codecs/wm8962.c:2034:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2035-\n--\nsound/soc/codecs/wm8962.c-2037-\tcase SND_SOC_DAPM_POST_PMU:\nsound/soc/codecs/wm8962.c:2038:\t\tif (wm8962-\u003edsp2_ena)\nsound/soc/codecs/wm8962.c:2039:\t\t\twm8962_dsp2_start(component);\nsound/soc/codecs/wm8962.c-2040-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c-2042-\tcase SND_SOC_DAPM_PRE_PMD:\nsound/soc/codecs/wm8962.c:2043:\t\tif (wm8962-\u003edsp2_ena)\nsound/soc/codecs/wm8962.c:2044:\t\t\twm8962_dsp2_stop(component);\nsound/soc/codecs/wm8962.c-2045-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c=2161=SOC_DAPM_SINGLE(\"IN4R Switch\", WM8962_SPEAKER_MIXER_2, 0, 1, 0),\n--\nsound/soc/codecs/wm8962.c-2163-\nsound/soc/codecs/wm8962.c:2164:static const struct snd_soc_dapm_widget wm8962_dapm_widgets[] = {\nsound/soc/codecs/wm8962.c-2165-SND_SOC_DAPM_INPUT(\"IN1L\"),\n--\nsound/soc/codecs/wm8962.c=2234=SND_SOC_DAPM_PGA(\"SPKOUTR Output\", WM8962_CLASS_D_CONTROL_1, 7, 0, NULL, 0),\n--\nsound/soc/codecs/wm8962.c-2236-\nsound/soc/codecs/wm8962.c:2237:static const struct snd_soc_dapm_widget wm8962_dapm_spk_mono_widgets[] = {\nsound/soc/codecs/wm8962.c-2238-SND_SOC_DAPM_MIXER(\"Speaker Mixer\", WM8962_MIXER_ENABLES, 1, 0,\n--\nsound/soc/codecs/wm8962.c=2242=SND_SOC_DAPM_OUTPUT(\"SPKOUT\"),\n--\nsound/soc/codecs/wm8962.c-2244-\nsound/soc/codecs/wm8962.c:2245:static const struct snd_soc_dapm_widget wm8962_dapm_spk_stereo_widgets[] = {\nsound/soc/codecs/wm8962.c-2246-SND_SOC_DAPM_MIXER(\"SPKOUTL Mixer\", WM8962_MIXER_ENABLES, 1, 0,\n--\nsound/soc/codecs/wm8962.c=2257=SND_SOC_DAPM_OUTPUT(\"SPKOUTR\"),\n--\nsound/soc/codecs/wm8962.c-2259-\nsound/soc/codecs/wm8962.c:2260:static const struct snd_soc_dapm_route wm8962_intercon[] = {\nsound/soc/codecs/wm8962.c-2261-\t{ \"INPGAL\", \"IN1L Switch\", \"IN1L\" },\n--\nsound/soc/codecs/wm8962.c-2356-\nsound/soc/codecs/wm8962.c:2357:static const struct snd_soc_dapm_route wm8962_spk_mono_intercon[] = {\nsound/soc/codecs/wm8962.c-2358-\t{ \"Speaker Mixer\", \"IN4L Switch\", \"IN4L\" },\n--\nsound/soc/codecs/wm8962.c-2381-\nsound/soc/codecs/wm8962.c:2382:static const struct snd_soc_dapm_route wm8962_spk_stereo_intercon[] = {\nsound/soc/codecs/wm8962.c-2383-\t{ \"SPKOUTL Mixer\", \"IN4L Switch\", \"IN4L\" },\n--\nsound/soc/codecs/wm8962.c-2416-\nsound/soc/codecs/wm8962.c:2417:static int wm8962_add_widgets(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-2418-{\nsound/soc/codecs/wm8962.c:2419:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c:2420:\tstruct wm8962_pdata *pdata = \u0026wm8962-\u003epdata;\nsound/soc/codecs/wm8962.c-2421-\tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\nsound/soc/codecs/wm8962.c-2422-\nsound/soc/codecs/wm8962.c:2423:\tsnd_soc_add_component_controls(component, wm8962_snd_controls,\nsound/soc/codecs/wm8962.c:2424:\t\t\t     ARRAY_SIZE(wm8962_snd_controls));\nsound/soc/codecs/wm8962.c-2425-\tif (pdata-\u003espk_mono)\nsound/soc/codecs/wm8962.c:2426:\t\tsnd_soc_add_component_controls(component, wm8962_spk_mono_controls,\nsound/soc/codecs/wm8962.c:2427:\t\t\t\t     ARRAY_SIZE(wm8962_spk_mono_controls));\nsound/soc/codecs/wm8962.c-2428-\telse\nsound/soc/codecs/wm8962.c:2429:\t\tsnd_soc_add_component_controls(component, wm8962_spk_stereo_controls,\nsound/soc/codecs/wm8962.c:2430:\t\t\t\t     ARRAY_SIZE(wm8962_spk_stereo_controls));\nsound/soc/codecs/wm8962.c-2431-\nsound/soc/codecs/wm8962.c-2432-\nsound/soc/codecs/wm8962.c:2433:\tsnd_soc_dapm_new_controls(dapm, wm8962_dapm_widgets,\nsound/soc/codecs/wm8962.c:2434:\t\t\t\t  ARRAY_SIZE(wm8962_dapm_widgets));\nsound/soc/codecs/wm8962.c-2435-\tif (pdata-\u003espk_mono)\nsound/soc/codecs/wm8962.c:2436:\t\tsnd_soc_dapm_new_controls(dapm, wm8962_dapm_spk_mono_widgets,\nsound/soc/codecs/wm8962.c:2437:\t\t\t\t\t  ARRAY_SIZE(wm8962_dapm_spk_mono_widgets));\nsound/soc/codecs/wm8962.c-2438-\telse\nsound/soc/codecs/wm8962.c:2439:\t\tsnd_soc_dapm_new_controls(dapm, wm8962_dapm_spk_stereo_widgets,\nsound/soc/codecs/wm8962.c:2440:\t\t\t\t\t  ARRAY_SIZE(wm8962_dapm_spk_stereo_widgets));\nsound/soc/codecs/wm8962.c-2441-\nsound/soc/codecs/wm8962.c:2442:\tsnd_soc_dapm_add_routes(dapm, wm8962_intercon,\nsound/soc/codecs/wm8962.c:2443:\t\t\t\tARRAY_SIZE(wm8962_intercon));\nsound/soc/codecs/wm8962.c-2444-\tif (pdata-\u003espk_mono)\nsound/soc/codecs/wm8962.c:2445:\t\tsnd_soc_dapm_add_routes(dapm, wm8962_spk_mono_intercon,\nsound/soc/codecs/wm8962.c:2446:\t\t\t\t\tARRAY_SIZE(wm8962_spk_mono_intercon));\nsound/soc/codecs/wm8962.c-2447-\telse\nsound/soc/codecs/wm8962.c:2448:\t\tsnd_soc_dapm_add_routes(dapm, wm8962_spk_stereo_intercon,\nsound/soc/codecs/wm8962.c:2449:\t\t\t\t\tARRAY_SIZE(wm8962_spk_stereo_intercon));\nsound/soc/codecs/wm8962.c-2450-\n--\nsound/soc/codecs/wm8962.c=2462=static const int sysclk_rates[] = {\n--\nsound/soc/codecs/wm8962.c-2465-\nsound/soc/codecs/wm8962.c:2466:static void wm8962_configure_bclk(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-2467-{\nsound/soc/codecs/wm8962.c-2468-\tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\nsound/soc/codecs/wm8962.c:2469:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2470-\tint best, min_diff, diff;\n--\nsound/soc/codecs/wm8962.c-2477-\nsound/soc/codecs/wm8962.c:2478:\tif (!wm8962-\u003esysclk_rate) {\nsound/soc/codecs/wm8962.c-2479-\t\tdev_dbg(component-\u003edev, \"No SYSCLK configured\\n\");\n--\nsound/soc/codecs/wm8962.c-2482-\nsound/soc/codecs/wm8962.c:2483:\tif (!wm8962-\u003ebclk || !wm8962-\u003elrclk) {\nsound/soc/codecs/wm8962.c-2484-\t\tdev_dbg(component-\u003edev, \"No audio clocks configured\\n\");\n--\nsound/soc/codecs/wm8962.c-2488-\tfor (i = 0; i \u003c ARRAY_SIZE(sysclk_rates); i++) {\nsound/soc/codecs/wm8962.c:2489:\t\tif (sysclk_rates[i] == wm8962-\u003esysclk_rate / wm8962-\u003elrclk) {\nsound/soc/codecs/wm8962.c-2490-\t\t\tclocking4 |= i \u003c\u003c WM8962_SYSCLK_RATE_SHIFT;\n--\nsound/soc/codecs/wm8962.c-2496-\t\tdev_err(component-\u003edev, \"Unsupported sysclk ratio %d\\n\",\nsound/soc/codecs/wm8962.c:2497:\t\t\twm8962-\u003esysclk_rate / wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2498-\t\treturn;\n--\nsound/soc/codecs/wm8962.c-2510-\t * SYSCLK_ENA is owned by the \"SYSCLK\" DAPM supply widget, which may\nsound/soc/codecs/wm8962.c:2511:\t * already have it set even below SND_SOC_BIAS_ON: wm8962_mic_detect()\nsound/soc/codecs/wm8962.c-2512-\t * force-enables that pin, so on boards using it (the Tegra machine\n--\nsound/soc/codecs/wm8962.c-2547-\tcase 0:\nsound/soc/codecs/wm8962.c:2548:\t\tdspclk = wm8962-\u003esysclk_rate;\nsound/soc/codecs/wm8962.c-2549-\t\tbreak;\nsound/soc/codecs/wm8962.c-2550-\tcase 1:\nsound/soc/codecs/wm8962.c:2551:\t\tdspclk = wm8962-\u003esysclk_rate / 2;\nsound/soc/codecs/wm8962.c-2552-\t\tbreak;\nsound/soc/codecs/wm8962.c-2553-\tcase 2:\nsound/soc/codecs/wm8962.c:2554:\t\tdspclk = wm8962-\u003esysclk_rate / 4;\nsound/soc/codecs/wm8962.c-2555-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c-2557-\t\tdev_warn(component-\u003edev, \"Unknown DSPCLK divisor read back\\n\");\nsound/soc/codecs/wm8962.c:2558:\t\tdspclk = wm8962-\u003esysclk_rate;\nsound/soc/codecs/wm8962.c-2559-\t}\nsound/soc/codecs/wm8962.c-2560-\nsound/soc/codecs/wm8962.c:2561:\tdev_dbg(component-\u003edev, \"DSPCLK is %dHz, BCLK %d\\n\", dspclk, wm8962-\u003ebclk);\nsound/soc/codecs/wm8962.c-2562-\n--\nsound/soc/codecs/wm8962.c-2569-\nsound/soc/codecs/wm8962.c:2570:\t\tdiff = (dspclk / bclk_divs[i]) - wm8962-\u003ebclk;\nsound/soc/codecs/wm8962.c-2571-\t\tif (diff \u003c 0) /* Table is sorted */\n--\nsound/soc/codecs/wm8962.c-2577-\t}\nsound/soc/codecs/wm8962.c:2578:\twm8962-\u003ebclk = dspclk / bclk_divs[best];\nsound/soc/codecs/wm8962.c-2579-\tclocking2 |= best;\nsound/soc/codecs/wm8962.c-2580-\tdev_dbg(component-\u003edev, \"Selected BCLK_DIV %d for %dHz\\n\",\nsound/soc/codecs/wm8962.c:2581:\t\tbclk_divs[best], wm8962-\u003ebclk);\nsound/soc/codecs/wm8962.c-2582-\nsound/soc/codecs/wm8962.c:2583:\taif2 |= wm8962-\u003ebclk / wm8962-\u003elrclk;\nsound/soc/codecs/wm8962.c-2584-\tdev_dbg(component-\u003edev, \"Selected LRCLK divisor %d for %dHz\\n\",\nsound/soc/codecs/wm8962.c:2585:\t\twm8962-\u003ebclk / wm8962-\u003elrclk, wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2586-\n--\nsound/soc/codecs/wm8962.c-2592-\nsound/soc/codecs/wm8962.c:2593:static int wm8962_set_bias_level(struct snd_soc_component *component,\nsound/soc/codecs/wm8962.c-2594-\t\t\t\t enum snd_soc_bias_level level)\n--\nsound/soc/codecs/wm8962.c-2606-\nsound/soc/codecs/wm8962.c:2607:\t\twm8962_configure_bclk(component);\nsound/soc/codecs/wm8962.c-2608-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c-2625-\nsound/soc/codecs/wm8962.c:2626:static int wm8962_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,\nsound/soc/codecs/wm8962.c-2627-\t\t\t       unsigned int rx_mask, int slots, int slot_width)\n--\nsound/soc/codecs/wm8962.c-2629-\tstruct snd_soc_component *component = dai-\u003ecomponent;\nsound/soc/codecs/wm8962.c:2630:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2631-\nsound/soc/codecs/wm8962.c:2632:\twm8962-\u003etdm_width = slot_width;\nsound/soc/codecs/wm8962.c-2633-\t/* External is one slot one channel, but internal is one slot two channels */\nsound/soc/codecs/wm8962.c:2634:\twm8962-\u003etdm_slots = slots / 2;\nsound/soc/codecs/wm8962.c-2635-\n--\nsound/soc/codecs/wm8962.c=2639=static const struct {\n--\nsound/soc/codecs/wm8962.c-2655-\nsound/soc/codecs/wm8962.c:2656:static int wm8962_hw_params(struct snd_pcm_substream *substream,\nsound/soc/codecs/wm8962.c-2657-\t\t\t    struct snd_pcm_hw_params *params,\n--\nsound/soc/codecs/wm8962.c-2661-\tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\nsound/soc/codecs/wm8962.c:2662:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2663-\tint i;\n--\nsound/soc/codecs/wm8962.c-2667-\nsound/soc/codecs/wm8962.c:2668:\tif (wm8962-\u003etdm_width \u0026\u0026 wm8962-\u003etdm_slots) {\nsound/soc/codecs/wm8962.c:2669:\t\twm8962-\u003ebclk = snd_soc_calc_bclk(params_rate(params),\nsound/soc/codecs/wm8962.c:2670:\t\t\t\t\t\t wm8962-\u003etdm_width,\nsound/soc/codecs/wm8962.c-2671-\t\t\t\t\t\t params_channels(params),\nsound/soc/codecs/wm8962.c:2672:\t\t\t\t\t\t wm8962-\u003etdm_slots);\nsound/soc/codecs/wm8962.c:2673:\t\twidth = wm8962-\u003etdm_width;\nsound/soc/codecs/wm8962.c-2674-\t} else {\nsound/soc/codecs/wm8962.c:2675:\t\twm8962-\u003ebclk = snd_soc_params_to_bclk(params);\nsound/soc/codecs/wm8962.c-2676-\t\twidth = params_width(params);\n--\nsound/soc/codecs/wm8962.c-2678-\t\tif (params_channels(params) == 1)\nsound/soc/codecs/wm8962.c:2679:\t\t\twm8962-\u003ebclk *= 2;\nsound/soc/codecs/wm8962.c-2680-\t}\nsound/soc/codecs/wm8962.c-2681-\nsound/soc/codecs/wm8962.c:2682:\twm8962-\u003elrclk = params_rate(params);\nsound/soc/codecs/wm8962.c-2683-\nsound/soc/codecs/wm8962.c-2684-\tfor (i = 0; i \u003c ARRAY_SIZE(sr_vals); i++) {\nsound/soc/codecs/wm8962.c:2685:\t\tif (sr_vals[i].rate == wm8962-\u003elrclk) {\nsound/soc/codecs/wm8962.c-2686-\t\t\tadctl3 |= sr_vals[i].reg;\n--\nsound/soc/codecs/wm8962.c-2690-\tif (i == ARRAY_SIZE(sr_vals)) {\nsound/soc/codecs/wm8962.c:2691:\t\tdev_err(component-\u003edev, \"Unsupported rate %dHz\\n\", wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2692-\t\treturn -EINVAL;\n--\nsound/soc/codecs/wm8962.c-2694-\nsound/soc/codecs/wm8962.c:2695:\tif (wm8962-\u003elrclk % 8000 == 0)\nsound/soc/codecs/wm8962.c-2696-\t\tadctl3 |= WM8962_SAMPLE_RATE_INT_MODE;\n--\nsound/soc/codecs/wm8962.c-2720-\tdev_dbg(component-\u003edev, \"hw_params set BCLK %dHz LRCLK %dHz\\n\",\nsound/soc/codecs/wm8962.c:2721:\t\twm8962-\u003ebclk, wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2722-\nsound/soc/codecs/wm8962.c-2723-\tif (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_ON)\nsound/soc/codecs/wm8962.c:2724:\t\twm8962_configure_bclk(component);\nsound/soc/codecs/wm8962.c-2725-\n--\nsound/soc/codecs/wm8962.c-2728-\nsound/soc/codecs/wm8962.c:2729:static int wm8962_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,\nsound/soc/codecs/wm8962.c-2730-\t\t\t\t unsigned int freq, int dir)\n--\nsound/soc/codecs/wm8962.c-2732-\tstruct snd_soc_component *component = dai-\u003ecomponent;\nsound/soc/codecs/wm8962.c:2733:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2734-\tint src;\n--\nsound/soc/codecs/wm8962.c-2737-\tcase WM8962_SYSCLK_MCLK:\nsound/soc/codecs/wm8962.c:2738:\t\twm8962-\u003esysclk = WM8962_SYSCLK_MCLK;\nsound/soc/codecs/wm8962.c-2739-\t\tsrc = 0;\n--\nsound/soc/codecs/wm8962.c-2741-\tcase WM8962_SYSCLK_FLL:\nsound/soc/codecs/wm8962.c:2742:\t\twm8962-\u003esysclk = WM8962_SYSCLK_FLL;\nsound/soc/codecs/wm8962.c-2743-\t\tsrc = 1 \u003c\u003c WM8962_SYSCLK_SRC_SHIFT;\n--\nsound/soc/codecs/wm8962.c-2751-\nsound/soc/codecs/wm8962.c:2752:\twm8962-\u003esysclk_rate = freq;\nsound/soc/codecs/wm8962.c-2753-\n--\nsound/soc/codecs/wm8962.c-2756-\nsound/soc/codecs/wm8962.c:2757:static int wm8962_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)\nsound/soc/codecs/wm8962.c-2758-{\nsound/soc/codecs/wm8962.c-2759-\tstruct snd_soc_component *component = dai-\u003ecomponent;\nsound/soc/codecs/wm8962.c:2760:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2761-\tint aif0 = 0;\n--\nsound/soc/codecs/wm8962.c-2806-\nsound/soc/codecs/wm8962.c:2807:\twm8962-\u003emaster_flag = false;\nsound/soc/codecs/wm8962.c-2808-\tswitch (fmt \u0026 SND_SOC_DAIFMT_MASTER_MASK) {\n--\nsound/soc/codecs/wm8962.c-2810-\t\taif0 |= WM8962_MSTR;\nsound/soc/codecs/wm8962.c:2811:\t\twm8962-\u003emaster_flag = true;\nsound/soc/codecs/wm8962.c-2812-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c=2852=static int fll_factors(struct _fll_div *fll_div, unsigned int Fref,\n--\nsound/soc/codecs/wm8962.c-2928-\nsound/soc/codecs/wm8962.c:2929:static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int source,\nsound/soc/codecs/wm8962.c-2930-\t\t\t  unsigned int Fref, unsigned int Fout)\nsound/soc/codecs/wm8962.c-2931-{\nsound/soc/codecs/wm8962.c:2932:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2933-\tstruct _fll_div fll_div;\n--\nsound/soc/codecs/wm8962.c-2938-\t/* Any change? */\nsound/soc/codecs/wm8962.c:2939:\tif (source == wm8962-\u003efll_src \u0026\u0026 Fref == wm8962-\u003efll_fref \u0026\u0026\nsound/soc/codecs/wm8962.c:2940:\t    Fout == wm8962-\u003efll_fout)\nsound/soc/codecs/wm8962.c-2941-\t\treturn 0;\n--\nsound/soc/codecs/wm8962.c-2945-\nsound/soc/codecs/wm8962.c:2946:\t\twm8962-\u003efll_fref = 0;\nsound/soc/codecs/wm8962.c:2947:\t\twm8962-\u003efll_fout = 0;\nsound/soc/codecs/wm8962.c-2948-\n--\nsound/soc/codecs/wm8962.c-3003-\nsound/soc/codecs/wm8962.c:3004:\treinit_completion(\u0026wm8962-\u003efll_lock);\nsound/soc/codecs/wm8962.c-3005-\n--\nsound/soc/codecs/wm8962.c-3020-\t */\nsound/soc/codecs/wm8962.c:3021:\tif (wm8962-\u003eirq)\nsound/soc/codecs/wm8962.c-3022-\t\ttime_left = msecs_to_jiffies(5);\n--\nsound/soc/codecs/wm8962.c-3025-\nsound/soc/codecs/wm8962.c:3026:\ttime_left = wait_for_completion_timeout(\u0026wm8962-\u003efll_lock,\nsound/soc/codecs/wm8962.c-3027-\t\t\t\t\t\ttime_left);\nsound/soc/codecs/wm8962.c-3028-\nsound/soc/codecs/wm8962.c:3029:\tif (time_left == 0 \u0026\u0026 wm8962-\u003eirq) {\nsound/soc/codecs/wm8962.c-3030-\t\tdev_err(component-\u003edev, \"FLL lock timed out\");\n--\nsound/soc/codecs/wm8962.c-3036-\nsound/soc/codecs/wm8962.c:3037:\twm8962-\u003efll_fref = Fref;\nsound/soc/codecs/wm8962.c:3038:\twm8962-\u003efll_fout = Fout;\nsound/soc/codecs/wm8962.c:3039:\twm8962-\u003efll_src = source;\nsound/soc/codecs/wm8962.c-3040-\n--\nsound/soc/codecs/wm8962.c-3043-\nsound/soc/codecs/wm8962.c:3044:static int wm8962_mute(struct snd_soc_dai *dai, int mute, int direction)\nsound/soc/codecs/wm8962.c-3045-{\n--\nsound/soc/codecs/wm8962.c-3072-\nsound/soc/codecs/wm8962.c:3073:static const struct snd_soc_dai_ops wm8962_dai_ops = {\nsound/soc/codecs/wm8962.c:3074:\t.hw_params = wm8962_hw_params,\nsound/soc/codecs/wm8962.c:3075:\t.set_sysclk = wm8962_set_dai_sysclk,\nsound/soc/codecs/wm8962.c:3076:\t.set_fmt = wm8962_set_dai_fmt,\nsound/soc/codecs/wm8962.c:3077:\t.set_tdm_slot = wm8962_set_tdm_slot,\nsound/soc/codecs/wm8962.c:3078:\t.mute_stream = wm8962_mute,\nsound/soc/codecs/wm8962.c-3079-\t.no_capture_mute = 1,\n--\nsound/soc/codecs/wm8962.c-3081-\nsound/soc/codecs/wm8962.c:3082:static struct snd_soc_dai_driver wm8962_dai = {\nsound/soc/codecs/wm8962.c:3083:\t.name = \"wm8962\",\nsound/soc/codecs/wm8962.c-3084-\t.playback = {\n--\nsound/soc/codecs/wm8962.c-3097-\t},\nsound/soc/codecs/wm8962.c:3098:\t.ops = \u0026wm8962_dai_ops,\nsound/soc/codecs/wm8962.c-3099-\t.symmetric_rate = 1,\n--\nsound/soc/codecs/wm8962.c-3101-\nsound/soc/codecs/wm8962.c:3102:static void wm8962_mic_work(struct work_struct *work)\nsound/soc/codecs/wm8962.c-3103-{\nsound/soc/codecs/wm8962.c:3104:\tstruct wm8962_priv *wm8962 = container_of(work,\nsound/soc/codecs/wm8962.c:3105:\t\t\t\t\t\t  struct wm8962_priv,\nsound/soc/codecs/wm8962.c-3106-\t\t\t\t\t\t  mic_work.work);\nsound/soc/codecs/wm8962.c:3107:\tstruct snd_soc_component *component = wm8962-\u003ecomponent;\nsound/soc/codecs/wm8962.c-3108-\tint status = 0;\n--\nsound/soc/codecs/wm8962.c-3125-\t\t */\nsound/soc/codecs/wm8962.c:3126:\t\tif (!(wm8962-\u003emic_status \u0026 WM8962_MICDET_STS))\nsound/soc/codecs/wm8962.c-3127-\t\t\tstatus = 0;\n--\nsound/soc/codecs/wm8962.c-3129-\nsound/soc/codecs/wm8962.c:3130:\twm8962-\u003emic_status = status;\nsound/soc/codecs/wm8962.c-3131-\nsound/soc/codecs/wm8962.c:3132:\tsnd_soc_jack_report(wm8962-\u003ejack, status,\n\n"
}

17/2 2026/09/17 03:57 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 38466
							output: 29
							thoughts: 20
						

Thoughts:
Here's a summary of my thought process, as requested:

**Exploring the Wider Applications of the WM8962**

Okay, so I'm thinking about the WM8962... my initial focus is always on the standard audio applications, the `sound/soc/codecs/` realm. But, I know this chip is versatile. The question is, where else might I find it? I need to broaden my search and think beyond the obvious. It's time to brainstorm. What other embedded systems, beyond typical audio codecs, might leverage its features? Think industrial applications, maybe some specialized data acquisition systems, perhaps even some niche medical devices? Let's delve deeper and expand the search criteria... I bet there are some interesting use cases out there if I can just adjust my thinking.



18/2 2026/09/17 03:57 tool grepper
0m Args:
{
  "Expression": "wm8962",
  "PathPrefix": "sound/soc/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 1235 lines.\nUse more precise expression if possible.\n\nsound/soc/codecs/Makefile=409=snd-soc-wm8961-y := wm8961.o\nsound/soc/codecs/Makefile:410:snd-soc-wm8962-y := wm8962.o\nsound/soc/codecs/Makefile-411-snd-soc-wm8971-y := wm8971.o\n--\nsound/soc/codecs/Makefile=862=obj-$(CONFIG_SND_SOC_WM8961)\t+= snd-soc-wm8961.o\nsound/soc/codecs/Makefile:863:obj-$(CONFIG_SND_SOC_WM8962)\t+= snd-soc-wm8962.o\nsound/soc/codecs/Makefile-864-obj-$(CONFIG_SND_SOC_WM8971)\t+= snd-soc-wm8971.o\n--\nsound/soc/codecs/wm8962.c-2-/*\nsound/soc/codecs/wm8962.c:3: * wm8962.c  --  WM8962 ALSA SoC Audio driver\nsound/soc/codecs/wm8962.c-4- *\n--\nsound/soc/codecs/wm8962.c-33-#include \u003csound/tlv.h\u003e\nsound/soc/codecs/wm8962.c:34:#include \u003csound/wm8962.h\u003e\nsound/soc/codecs/wm8962.c-35-#include \u003ctrace/events/asoc.h\u003e\nsound/soc/codecs/wm8962.c-36-\nsound/soc/codecs/wm8962.c:37:#include \"wm8962.h\"\nsound/soc/codecs/wm8962.c-38-\nsound/soc/codecs/wm8962.c-39-#define WM8962_NUM_SUPPLIES 8\nsound/soc/codecs/wm8962.c:40:static const char *wm8962_supply_names[WM8962_NUM_SUPPLIES] = {\nsound/soc/codecs/wm8962.c-41-\t\"DCVDD\",\n--\nsound/soc/codecs/wm8962.c-51-/* codec private data */\nsound/soc/codecs/wm8962.c:52:struct wm8962_priv {\nsound/soc/codecs/wm8962.c:53:\tstruct wm8962_pdata pdata;\nsound/soc/codecs/wm8962.c-54-\tstruct regmap *regmap;\n--\nsound/soc/codecs/wm8962.c-97-#define WM8962_REGULATOR_EVENT(n) \\\nsound/soc/codecs/wm8962.c:98:static int wm8962_regulator_event_##n(struct notifier_block *nb, \\\nsound/soc/codecs/wm8962.c-99-\t\t\t\t    unsigned long event, void *data)\t\\\nsound/soc/codecs/wm8962.c-100-{ \\\nsound/soc/codecs/wm8962.c:101:\tstruct wm8962_priv *wm8962 = container_of(nb, struct wm8962_priv, \\\nsound/soc/codecs/wm8962.c-102-\t\t\t\t\t\t  disable_nb[n]); \\\nsound/soc/codecs/wm8962.c-103-\tif (event \u0026 REGULATOR_EVENT_DISABLE) { \\\nsound/soc/codecs/wm8962.c:104:\t\tregcache_mark_dirty(wm8962-\u003eregmap);\t\\\nsound/soc/codecs/wm8962.c-105-\t} \\\n--\nsound/soc/codecs/wm8962.c=116=WM8962_REGULATOR_EVENT(7)\nsound/soc/codecs/wm8962.c-117-\nsound/soc/codecs/wm8962.c:118:static const struct reg_default wm8962_reg[] = {\nsound/soc/codecs/wm8962.c-119-\t{ 0, 0x009F },   /* R0     - Left Input volume */\n--\nsound/soc/codecs/wm8962.c-792-\nsound/soc/codecs/wm8962.c:793:static bool wm8962_volatile_register(struct device *dev, unsigned int reg)\nsound/soc/codecs/wm8962.c-794-{\n--\nsound/soc/codecs/wm8962.c-809-\nsound/soc/codecs/wm8962.c:810:static bool wm8962_readable_register(struct device *dev, unsigned int reg)\nsound/soc/codecs/wm8962.c-811-{\n--\nsound/soc/codecs/wm8962.c-1444-\nsound/soc/codecs/wm8962.c:1445:static int wm8962_reset(struct wm8962_priv *wm8962)\nsound/soc/codecs/wm8962.c-1446-{\n--\nsound/soc/codecs/wm8962.c-1448-\nsound/soc/codecs/wm8962.c:1449:\tret = regmap_write(wm8962-\u003eregmap, WM8962_SOFTWARE_RESET, 0x6243);\nsound/soc/codecs/wm8962.c-1450-\tif (ret != 0)\n--\nsound/soc/codecs/wm8962.c-1452-\nsound/soc/codecs/wm8962.c:1453:\treturn regmap_write(wm8962-\u003eregmap, WM8962_PLL_SOFTWARE_RESET, 0);\nsound/soc/codecs/wm8962.c-1454-}\n--\nsound/soc/codecs/wm8962.c=1476=static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);\nsound/soc/codecs/wm8962.c-1477-\nsound/soc/codecs/wm8962.c:1478:static int wm8962_dsp2_write_config(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-1479-{\nsound/soc/codecs/wm8962.c:1480:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-1481-\nsound/soc/codecs/wm8962.c:1482:\treturn regcache_sync_region(wm8962-\u003eregmap,\nsound/soc/codecs/wm8962.c-1483-\t\t\t\t    WM8962_HDBASS_AI_1, WM8962_MAX_REGISTER);\n--\nsound/soc/codecs/wm8962.c-1485-\nsound/soc/codecs/wm8962.c:1486:static int wm8962_dsp2_set_enable(struct snd_soc_component *component, u16 val)\nsound/soc/codecs/wm8962.c-1487-{\n--\nsound/soc/codecs/wm8962.c-1508-\nsound/soc/codecs/wm8962.c:1509:static int wm8962_dsp2_start(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-1510-{\nsound/soc/codecs/wm8962.c:1511:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-1512-\nsound/soc/codecs/wm8962.c:1513:\twm8962_dsp2_write_config(component);\nsound/soc/codecs/wm8962.c-1514-\n--\nsound/soc/codecs/wm8962.c-1516-\nsound/soc/codecs/wm8962.c:1517:\twm8962_dsp2_set_enable(component, wm8962-\u003edsp2_ena);\nsound/soc/codecs/wm8962.c-1518-\n--\nsound/soc/codecs/wm8962.c-1521-\nsound/soc/codecs/wm8962.c:1522:static int wm8962_dsp2_stop(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-1523-{\nsound/soc/codecs/wm8962.c:1524:\twm8962_dsp2_set_enable(component, 0);\nsound/soc/codecs/wm8962.c-1525-\n--\nsound/soc/codecs/wm8962.c-1532-{\t.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \\\nsound/soc/codecs/wm8962.c:1533:\t.info = wm8962_dsp2_ena_info, \\\nsound/soc/codecs/wm8962.c:1534:\t.get = wm8962_dsp2_ena_get, .put = wm8962_dsp2_ena_put, \\\nsound/soc/codecs/wm8962.c-1535-\t.private_value = xshift }\nsound/soc/codecs/wm8962.c-1536-\nsound/soc/codecs/wm8962.c:1537:static int wm8962_dsp2_ena_info(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1538-\t\t\t\tstruct snd_ctl_elem_info *uinfo)\n--\nsound/soc/codecs/wm8962.c-1548-\nsound/soc/codecs/wm8962.c:1549:static int wm8962_dsp2_ena_get(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1550-\t\t\t       struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c-1553-\tstruct snd_soc_component *component = snd_kcontrol_chip(kcontrol);\nsound/soc/codecs/wm8962.c:1554:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-1555-\nsound/soc/codecs/wm8962.c:1556:\tucontrol-\u003evalue.integer.value[0] = !!(wm8962-\u003edsp2_ena \u0026 1 \u003c\u003c shift);\nsound/soc/codecs/wm8962.c-1557-\n--\nsound/soc/codecs/wm8962.c-1560-\nsound/soc/codecs/wm8962.c:1561:static int wm8962_dsp2_ena_put(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1562-\t\t\t       struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c-1565-\tstruct snd_soc_component *component = snd_kcontrol_chip(kcontrol);\nsound/soc/codecs/wm8962.c:1566:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c:1567:\tint old = wm8962-\u003edsp2_ena;\nsound/soc/codecs/wm8962.c-1568-\tint dsp2_running = snd_soc_component_read(component, WM8962_DSP2_POWER_MANAGEMENT) \u0026\n--\nsound/soc/codecs/wm8962.c-1570-\nsound/soc/codecs/wm8962.c:1571:\tguard(mutex)(\u0026wm8962-\u003edsp2_ena_lock);\nsound/soc/codecs/wm8962.c-1572-\nsound/soc/codecs/wm8962.c-1573-\tif (ucontrol-\u003evalue.integer.value[0])\nsound/soc/codecs/wm8962.c:1574:\t\twm8962-\u003edsp2_ena |= 1 \u003c\u003c shift;\nsound/soc/codecs/wm8962.c-1575-\telse\nsound/soc/codecs/wm8962.c:1576:\t\twm8962-\u003edsp2_ena \u0026= ~(1 \u003c\u003c shift);\nsound/soc/codecs/wm8962.c-1577-\nsound/soc/codecs/wm8962.c:1578:\tif (wm8962-\u003edsp2_ena == old)\nsound/soc/codecs/wm8962.c-1579-\t\treturn 0;\n--\nsound/soc/codecs/wm8962.c-1581-\tif (dsp2_running) {\nsound/soc/codecs/wm8962.c:1582:\t\tif (wm8962-\u003edsp2_ena)\nsound/soc/codecs/wm8962.c:1583:\t\t\twm8962_dsp2_set_enable(component, wm8962-\u003edsp2_ena);\nsound/soc/codecs/wm8962.c-1584-\t\telse\nsound/soc/codecs/wm8962.c:1585:\t\t\twm8962_dsp2_stop(component);\nsound/soc/codecs/wm8962.c-1586-\t}\n--\nsound/soc/codecs/wm8962.c-1593- */\nsound/soc/codecs/wm8962.c:1594:static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1595-\t\t\t    struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c-1623- */\nsound/soc/codecs/wm8962.c:1624:static int wm8962_put_spk_sw(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1625-\t\t\t    struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c=1663=static SOC_ENUM_SINGLE_DECL(cap_lhpf_mode,\n--\nsound/soc/codecs/wm8962.c-1665-\nsound/soc/codecs/wm8962.c:1666:static const struct snd_kcontrol_new wm8962_snd_controls[] = {\nsound/soc/codecs/wm8962.c-1667-SOC_DOUBLE(\"Input Mixer Switch\", WM8962_INPUT_MIXER_CONTROL_1, 3, 2, 1, 1),\n--\nsound/soc/codecs/wm8962.c=1715=SOC_DOUBLE_EXT(\"Headphone Switch\", WM8962_PWR_MGMT_2, 1, 0, 1, 1,\nsound/soc/codecs/wm8962.c:1716:\t       snd_soc_get_volsw, wm8962_put_hp_sw),\nsound/soc/codecs/wm8962.c-1717-SOC_DOUBLE_R(\"Headphone ZC Switch\", WM8962_HPOUTL_VOLUME, WM8962_HPOUTR_VOLUME,\n--\nsound/soc/codecs/wm8962.c=1780=SND_SOC_BYTES_MASK(\"ALC Coefficients\", WM8962_ALC1, 4,\n--\nsound/soc/codecs/wm8962.c-1783-\nsound/soc/codecs/wm8962.c:1784:static const struct snd_kcontrol_new wm8962_spk_mono_controls[] = {\nsound/soc/codecs/wm8962.c-1785-SOC_SINGLE_TLV(\"Speaker Volume\", WM8962_SPKOUTL_VOLUME, 0, 127, 0, out_tlv),\nsound/soc/codecs/wm8962.c=1786=SOC_SINGLE_EXT(\"Speaker Switch\", WM8962_CLASS_D_CONTROL_1, 1, 1, 1,\nsound/soc/codecs/wm8962.c:1787:\t       snd_soc_get_volsw, wm8962_put_spk_sw),\nsound/soc/codecs/wm8962.c-1788-SOC_SINGLE(\"Speaker ZC Switch\", WM8962_SPKOUTL_VOLUME, 7, 1, 0),\n--\nsound/soc/codecs/wm8962.c=1801=SOC_SINGLE_TLV(\"Speaker Mixer DACR Volume\", WM8962_SPEAKER_MIXER_5,\n--\nsound/soc/codecs/wm8962.c-1804-\nsound/soc/codecs/wm8962.c:1805:static const struct snd_kcontrol_new wm8962_spk_stereo_controls[] = {\nsound/soc/codecs/wm8962.c-1806-SOC_DOUBLE_R_TLV(\"Speaker Volume\", WM8962_SPKOUTL_VOLUME,\n--\nsound/soc/codecs/wm8962.c=1808=SOC_DOUBLE_EXT(\"Speaker Switch\", WM8962_CLASS_D_CONTROL_1, 1, 0, 1, 1,\nsound/soc/codecs/wm8962.c:1809:\t       snd_soc_get_volsw, wm8962_put_spk_sw),\nsound/soc/codecs/wm8962.c-1810-SOC_DOUBLE_R(\"Speaker ZC Switch\", WM8962_SPKOUTL_VOLUME, WM8962_SPKOUTR_VOLUME,\n--\nsound/soc/codecs/wm8962.c=2030=static int dsp2_event(struct snd_soc_dapm_widget *w,\n--\nsound/soc/codecs/wm8962.c-2033-\tstruct snd_soc_component *component = snd_soc_dapm_to_component(w-\u003edapm);\nsound/soc/codecs/wm8962.c:2034:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2035-\n--\nsound/soc/codecs/wm8962.c-2037-\tcase SND_SOC_DAPM_POST_PMU:\nsound/soc/codecs/wm8962.c:2038:\t\tif (wm8962-\u003edsp2_ena)\nsound/soc/codecs/wm8962.c:2039:\t\t\twm8962_dsp2_start(component);\nsound/soc/codecs/wm8962.c-2040-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c-2042-\tcase SND_SOC_DAPM_PRE_PMD:\nsound/soc/codecs/wm8962.c:2043:\t\tif (wm8962-\u003edsp2_ena)\nsound/soc/codecs/wm8962.c:2044:\t\t\twm8962_dsp2_stop(component);\nsound/soc/codecs/wm8962.c-2045-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c=2161=SOC_DAPM_SINGLE(\"IN4R Switch\", WM8962_SPEAKER_MIXER_2, 0, 1, 0),\n--\nsound/soc/codecs/wm8962.c-2163-\nsound/soc/codecs/wm8962.c:2164:static const struct snd_soc_dapm_widget wm8962_dapm_widgets[] = {\nsound/soc/codecs/wm8962.c-2165-SND_SOC_DAPM_INPUT(\"IN1L\"),\n--\nsound/soc/codecs/wm8962.c=2234=SND_SOC_DAPM_PGA(\"SPKOUTR Output\", WM8962_CLASS_D_CONTROL_1, 7, 0, NULL, 0),\n--\nsound/soc/codecs/wm8962.c-2236-\nsound/soc/codecs/wm8962.c:2237:static const struct snd_soc_dapm_widget wm8962_dapm_spk_mono_widgets[] = {\nsound/soc/codecs/wm8962.c-2238-SND_SOC_DAPM_MIXER(\"Speaker Mixer\", WM8962_MIXER_ENABLES, 1, 0,\n--\nsound/soc/codecs/wm8962.c=2242=SND_SOC_DAPM_OUTPUT(\"SPKOUT\"),\n--\nsound/soc/codecs/wm8962.c-2244-\nsound/soc/codecs/wm8962.c:2245:static const struct snd_soc_dapm_widget wm8962_dapm_spk_stereo_widgets[] = {\nsound/soc/codecs/wm8962.c-2246-SND_SOC_DAPM_MIXER(\"SPKOUTL Mixer\", WM8962_MIXER_ENABLES, 1, 0,\n--\nsound/soc/codecs/wm8962.c=2257=SND_SOC_DAPM_OUTPUT(\"SPKOUTR\"),\n--\nsound/soc/codecs/wm8962.c-2259-\nsound/soc/codecs/wm8962.c:2260:static const struct snd_soc_dapm_route wm8962_intercon[] = {\nsound/soc/codecs/wm8962.c-2261-\t{ \"INPGAL\", \"IN1L Switch\", \"IN1L\" },\n--\nsound/soc/codecs/wm8962.c-2356-\nsound/soc/codecs/wm8962.c:2357:static const struct snd_soc_dapm_route wm8962_spk_mono_intercon[] = {\nsound/soc/codecs/wm8962.c-2358-\t{ \"Speaker Mixer\", \"IN4L Switch\", \"IN4L\" },\n--\nsound/soc/codecs/wm8962.c-2381-\nsound/soc/codecs/wm8962.c:2382:static const struct snd_soc_dapm_route wm8962_spk_stereo_intercon[] = {\nsound/soc/codecs/wm8962.c-2383-\t{ \"SPKOUTL Mixer\", \"IN4L Switch\", \"IN4L\" },\n--\nsound/soc/codecs/wm8962.c-2416-\nsound/soc/codecs/wm8962.c:2417:static int wm8962_add_widgets(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-2418-{\nsound/soc/codecs/wm8962.c:2419:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c:2420:\tstruct wm8962_pdata *pdata = \u0026wm8962-\u003epdata;\nsound/soc/codecs/wm8962.c-2421-\tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\nsound/soc/codecs/wm8962.c-2422-\nsound/soc/codecs/wm8962.c:2423:\tsnd_soc_add_component_controls(component, wm8962_snd_controls,\nsound/soc/codecs/wm8962.c:2424:\t\t\t     ARRAY_SIZE(wm8962_snd_controls));\nsound/soc/codecs/wm8962.c-2425-\tif (pdata-\u003espk_mono)\nsound/soc/codecs/wm8962.c:2426:\t\tsnd_soc_add_component_controls(component, wm8962_spk_mono_controls,\nsound/soc/codecs/wm8962.c:2427:\t\t\t\t     ARRAY_SIZE(wm8962_spk_mono_controls));\nsound/soc/codecs/wm8962.c-2428-\telse\nsound/soc/codecs/wm8962.c:2429:\t\tsnd_soc_add_component_controls(component, wm8962_spk_stereo_controls,\nsound/soc/codecs/wm8962.c:2430:\t\t\t\t     ARRAY_SIZE(wm8962_spk_stereo_controls));\nsound/soc/codecs/wm8962.c-2431-\nsound/soc/codecs/wm8962.c-2432-\nsound/soc/codecs/wm8962.c:2433:\tsnd_soc_dapm_new_controls(dapm, wm8962_dapm_widgets,\nsound/soc/codecs/wm8962.c:2434:\t\t\t\t  ARRAY_SIZE(wm8962_dapm_widgets));\nsound/soc/codecs/wm8962.c-2435-\tif (pdata-\u003espk_mono)\nsound/soc/codecs/wm8962.c:2436:\t\tsnd_soc_dapm_new_controls(dapm, wm8962_dapm_spk_mono_widgets,\nsound/soc/codecs/wm8962.c:2437:\t\t\t\t\t  ARRAY_SIZE(wm8962_dapm_spk_mono_widgets));\nsound/soc/codecs/wm8962.c-2438-\telse\nsound/soc/codecs/wm8962.c:2439:\t\tsnd_soc_dapm_new_controls(dapm, wm8962_dapm_spk_stereo_widgets,\nsound/soc/codecs/wm8962.c:2440:\t\t\t\t\t  ARRAY_SIZE(wm8962_dapm_spk_stereo_widgets));\nsound/soc/codecs/wm8962.c-2441-\nsound/soc/codecs/wm8962.c:2442:\tsnd_soc_dapm_add_routes(dapm, wm8962_intercon,\nsound/soc/codecs/wm8962.c:2443:\t\t\t\tARRAY_SIZE(wm8962_intercon));\nsound/soc/codecs/wm8962.c-2444-\tif (pdata-\u003espk_mono)\nsound/soc/codecs/wm8962.c:2445:\t\tsnd_soc_dapm_add_routes(dapm, wm8962_spk_mono_intercon,\nsound/soc/codecs/wm8962.c:2446:\t\t\t\t\tARRAY_SIZE(wm8962_spk_mono_intercon));\nsound/soc/codecs/wm8962.c-2447-\telse\nsound/soc/codecs/wm8962.c:2448:\t\tsnd_soc_dapm_add_routes(dapm, wm8962_spk_stereo_intercon,\nsound/soc/codecs/wm8962.c:2449:\t\t\t\t\tARRAY_SIZE(wm8962_spk_stereo_intercon));\nsound/soc/codecs/wm8962.c-2450-\n--\nsound/soc/codecs/wm8962.c=2462=static const int sysclk_rates[] = {\n--\nsound/soc/codecs/wm8962.c-2465-\nsound/soc/codecs/wm8962.c:2466:static void wm8962_configure_bclk(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-2467-{\nsound/soc/codecs/wm8962.c-2468-\tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\nsound/soc/codecs/wm8962.c:2469:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2470-\tint best, min_diff, diff;\n--\nsound/soc/codecs/wm8962.c-2477-\nsound/soc/codecs/wm8962.c:2478:\tif (!wm8962-\u003esysclk_rate) {\nsound/soc/codecs/wm8962.c-2479-\t\tdev_dbg(component-\u003edev, \"No SYSCLK configured\\n\");\n--\nsound/soc/codecs/wm8962.c-2482-\nsound/soc/codecs/wm8962.c:2483:\tif (!wm8962-\u003ebclk || !wm8962-\u003elrclk) {\nsound/soc/codecs/wm8962.c-2484-\t\tdev_dbg(component-\u003edev, \"No audio clocks configured\\n\");\n--\nsound/soc/codecs/wm8962.c-2488-\tfor (i = 0; i \u003c ARRAY_SIZE(sysclk_rates); i++) {\nsound/soc/codecs/wm8962.c:2489:\t\tif (sysclk_rates[i] == wm8962-\u003esysclk_rate / wm8962-\u003elrclk) {\nsound/soc/codecs/wm8962.c-2490-\t\t\tclocking4 |= i \u003c\u003c WM8962_SYSCLK_RATE_SHIFT;\n--\nsound/soc/codecs/wm8962.c-2496-\t\tdev_err(component-\u003edev, \"Unsupported sysclk ratio %d\\n\",\nsound/soc/codecs/wm8962.c:2497:\t\t\twm8962-\u003esysclk_rate / wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2498-\t\treturn;\n--\nsound/soc/codecs/wm8962.c-2510-\t * SYSCLK_ENA is owned by the \"SYSCLK\" DAPM supply widget, which may\nsound/soc/codecs/wm8962.c:2511:\t * already have it set even below SND_SOC_BIAS_ON: wm8962_mic_detect()\nsound/soc/codecs/wm8962.c-2512-\t * force-enables that pin, so on boards using it (the Tegra machine\n--\nsound/soc/codecs/wm8962.c-2547-\tcase 0:\nsound/soc/codecs/wm8962.c:2548:\t\tdspclk = wm8962-\u003esysclk_rate;\nsound/soc/codecs/wm8962.c-2549-\t\tbreak;\nsound/soc/codecs/wm8962.c-2550-\tcase 1:\nsound/soc/codecs/wm8962.c:2551:\t\tdspclk = wm8962-\u003esysclk_rate / 2;\nsound/soc/codecs/wm8962.c-2552-\t\tbreak;\nsound/soc/codecs/wm8962.c-2553-\tcase 2:\nsound/soc/codecs/wm8962.c:2554:\t\tdspclk = wm8962-\u003esysclk_rate / 4;\nsound/soc/codecs/wm8962.c-2555-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c-2557-\t\tdev_warn(component-\u003edev, \"Unknown DSPCLK divisor read back\\n\");\nsound/soc/codecs/wm8962.c:2558:\t\tdspclk = wm8962-\u003esysclk_rate;\nsound/soc/codecs/wm8962.c-2559-\t}\nsound/soc/codecs/wm8962.c-2560-\nsound/soc/codecs/wm8962.c:2561:\tdev_dbg(component-\u003edev, \"DSPCLK is %dHz, BCLK %d\\n\", dspclk, wm8962-\u003ebclk);\nsound/soc/codecs/wm8962.c-2562-\n--\nsound/soc/codecs/wm8962.c-2569-\nsound/soc/codecs/wm8962.c:2570:\t\tdiff = (dspclk / bclk_divs[i]) - wm8962-\u003ebclk;\nsound/soc/codecs/wm8962.c-2571-\t\tif (diff \u003c 0) /* Table is sorted */\n--\nsound/soc/codecs/wm8962.c-2577-\t}\nsound/soc/codecs/wm8962.c:2578:\twm8962-\u003ebclk = dspclk / bclk_divs[best];\nsound/soc/codecs/wm8962.c-2579-\tclocking2 |= best;\nsound/soc/codecs/wm8962.c-2580-\tdev_dbg(component-\u003edev, \"Selected BCLK_DIV %d for %dHz\\n\",\nsound/soc/codecs/wm8962.c:2581:\t\tbclk_divs[best], wm8962-\u003ebclk);\nsound/soc/codecs/wm8962.c-2582-\nsound/soc/codecs/wm8962.c:2583:\taif2 |= wm8962-\u003ebclk / wm8962-\u003elrclk;\nsound/soc/codecs/wm8962.c-2584-\tdev_dbg(component-\u003edev, \"Selected LRCLK divisor %d for %dHz\\n\",\nsound/soc/codecs/wm8962.c:2585:\t\twm8962-\u003ebclk / wm8962-\u003elrclk, wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2586-\n--\nsound/soc/codecs/wm8962.c-2592-\nsound/soc/codecs/wm8962.c:2593:static int wm8962_set_bias_level(struct snd_soc_component *component,\nsound/soc/codecs/wm8962.c-2594-\t\t\t\t enum snd_soc_bias_level level)\n--\nsound/soc/codecs/wm8962.c-2606-\nsound/soc/codecs/wm8962.c:2607:\t\twm8962_configure_bclk(component);\nsound/soc/codecs/wm8962.c-2608-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c-2625-\nsound/soc/codecs/wm8962.c:2626:static int wm8962_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,\nsound/soc/codecs/wm8962.c-2627-\t\t\t       unsigned int rx_mask, int slots, int slot_width)\n--\nsound/soc/codecs/wm8962.c-2629-\tstruct snd_soc_component *component = dai-\u003ecomponent;\nsound/soc/codecs/wm8962.c:2630:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2631-\nsound/soc/codecs/wm8962.c:2632:\twm8962-\u003etdm_width = slot_width;\nsound/soc/codecs/wm8962.c-2633-\t/* External is one slot one channel, but internal is one slot two channels */\nsound/soc/codecs/wm8962.c:2634:\twm8962-\u003etdm_slots = slots / 2;\nsound/soc/codecs/wm8962.c-2635-\n--\nsound/soc/codecs/wm8962.c=2639=static const struct {\n--\nsound/soc/codecs/wm8962.c-2655-\nsound/soc/codecs/wm8962.c:2656:static int wm8962_hw_params(struct snd_pcm_substream *substream,\nsound/soc/codecs/wm8962.c-2657-\t\t\t    struct snd_pcm_hw_params *params,\n--\nsound/soc/codecs/wm8962.c-2661-\tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\nsound/soc/codecs/wm8962.c:2662:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2663-\tint i;\n--\nsound/soc/codecs/wm8962.c-2667-\nsound/soc/codecs/wm8962.c:2668:\tif (wm8962-\u003etdm_width \u0026\u0026 wm8962-\u003etdm_slots) {\nsound/soc/codecs/wm8962.c:2669:\t\twm8962-\u003ebclk = snd_soc_calc_bclk(params_rate(params),\nsound/soc/codecs/wm8962.c:2670:\t\t\t\t\t\t wm8962-\u003etdm_width,\nsound/soc/codecs/wm8962.c-2671-\t\t\t\t\t\t params_channels(params),\nsound/soc/codecs/wm8962.c:2672:\t\t\t\t\t\t wm8962-\u003etdm_slots);\nsound/soc/codecs/wm8962.c:2673:\t\twidth = wm8962-\u003etdm_width;\nsound/soc/codecs/wm8962.c-2674-\t} else {\nsound/soc/codecs/wm8962.c:2675:\t\twm8962-\u003ebclk = snd_soc_params_to_bclk(params);\nsound/soc/codecs/wm8962.c-2676-\t\twidth = params_width(params);\n--\nsound/soc/codecs/wm8962.c-2678-\t\tif (params_channels(params) == 1)\nsound/soc/codecs/wm8962.c:2679:\t\t\twm8962-\u003ebclk *= 2;\nsound/soc/codecs/wm8962.c-2680-\t}\nsound/soc/codecs/wm8962.c-2681-\nsound/soc/codecs/wm8962.c:2682:\twm8962-\u003elrclk = params_rate(params);\nsound/soc/codecs/wm8962.c-2683-\nsound/soc/codecs/wm8962.c-2684-\tfor (i = 0; i \u003c ARRAY_SIZE(sr_vals); i++) {\nsound/soc/codecs/wm8962.c:2685:\t\tif (sr_vals[i].rate == wm8962-\u003elrclk) {\nsound/soc/codecs/wm8962.c-2686-\t\t\tadctl3 |= sr_vals[i].reg;\n--\nsound/soc/codecs/wm8962.c-2690-\tif (i == ARRAY_SIZE(sr_vals)) {\nsound/soc/codecs/wm8962.c:2691:\t\tdev_err(component-\u003edev, \"Unsupported rate %dHz\\n\", wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2692-\t\treturn -EINVAL;\n--\nsound/soc/codecs/wm8962.c-2694-\nsound/soc/codecs/wm8962.c:2695:\tif (wm8962-\u003elrclk % 8000 == 0)\nsound/soc/codecs/wm8962.c-2696-\t\tadctl3 |= WM8962_SAMPLE_RATE_INT_MODE;\n--\nsound/soc/codecs/wm8962.c-2720-\tdev_dbg(component-\u003edev, \"hw_params set BCLK %dHz LRCLK %dHz\\n\",\nsound/soc/codecs/wm8962.c:2721:\t\twm8962-\u003ebclk, wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2722-\nsound/soc/codecs/wm8962.c-2723-\tif (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_ON)\nsound/soc/codecs/wm8962.c:2724:\t\twm8962_configure_bclk(component);\nsound/soc/codecs/wm8962.c-2725-\n--\nsound/soc/codecs/wm8962.c-2728-\nsound/soc/codecs/wm8962.c:2729:static int wm8962_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,\nsound/soc/codecs/wm8962.c-2730-\t\t\t\t unsigned int freq, int dir)\n--\nsound/soc/codecs/wm8962.c-2732-\tstruct snd_soc_component *component = dai-\u003ecomponent;\nsound/soc/codecs/wm8962.c:2733:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2734-\tint src;\n--\nsound/soc/codecs/wm8962.c-2737-\tcase WM8962_SYSCLK_MCLK:\nsound/soc/codecs/wm8962.c:2738:\t\twm8962-\u003esysclk = WM8962_SYSCLK_MCLK;\nsound/soc/codecs/wm8962.c-2739-\t\tsrc = 0;\n--\nsound/soc/codecs/wm8962.c-2741-\tcase WM8962_SYSCLK_FLL:\nsound/soc/codecs/wm8962.c:2742:\t\twm8962-\u003esysclk = WM8962_SYSCLK_FLL;\nsound/soc/codecs/wm8962.c-2743-\t\tsrc = 1 \u003c\u003c WM8962_SYSCLK_SRC_SHIFT;\n--\nsound/soc/codecs/wm8962.c-2751-\nsound/soc/codecs/wm8962.c:2752:\twm8962-\u003esysclk_rate = freq;\nsound/soc/codecs/wm8962.c-2753-\n--\nsound/soc/codecs/wm8962.c-2756-\nsound/soc/codecs/wm8962.c:2757:static int wm8962_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)\nsound/soc/codecs/wm8962.c-2758-{\nsound/soc/codecs/wm8962.c-2759-\tstruct snd_soc_component *component = dai-\u003ecomponent;\nsound/soc/codecs/wm8962.c:2760:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2761-\tint aif0 = 0;\n--\nsound/soc/codecs/wm8962.c-2806-\nsound/soc/codecs/wm8962.c:2807:\twm8962-\u003emaster_flag = false;\nsound/soc/codecs/wm8962.c-2808-\tswitch (fmt \u0026 SND_SOC_DAIFMT_MASTER_MASK) {\n--\nsound/soc/codecs/wm8962.c-2810-\t\taif0 |= WM8962_MSTR;\nsound/soc/codecs/wm8962.c:2811:\t\twm8962-\u003emaster_flag = true;\nsound/soc/codecs/wm8962.c-2812-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c=2852=static int fll_factors(struct _fll_div *fll_div, unsigned int Fref,\n--\nsound/soc/codecs/wm8962.c-2928-\nsound/soc/codecs/wm8962.c:2929:static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int source,\nsound/soc/codecs/wm8962.c-2930-\t\t\t  unsigned int Fref, unsigned int Fout)\nsound/soc/codecs/wm8962.c-2931-{\nsound/soc/codecs/wm8962.c:2932:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2933-\tstruct _fll_div fll_div;\n--\nsound/soc/codecs/wm8962.c-2938-\t/* Any change? */\nsound/soc/codecs/wm8962.c:2939:\tif (source == wm8962-\u003efll_src \u0026\u0026 Fref == wm8962-\u003efll_fref \u0026\u0026\nsound/soc/codecs/wm8962.c:2940:\t    Fout == wm8962-\u003efll_fout)\nsound/soc/codecs/wm8962.c-2941-\t\treturn 0;\n--\nsound/soc/codecs/wm8962.c-2945-\nsound/soc/codecs/wm8962.c:2946:\t\twm8962-\u003efll_fref = 0;\nsound/soc/codecs/wm8962.c:2947:\t\twm8962-\u003efll_fout = 0;\nsound/soc/codecs/wm8962.c-2948-\n--\nsound/soc/codecs/wm8962.c-3003-\nsound/soc/codecs/wm8962.c:3004:\treinit_completion(\u0026wm8962-\u003efll_lock);\nsound/soc/codecs/wm8962.c-3005-\n--\nsound/soc/codecs/wm8962.c-3020-\t */\nsound/soc/codecs/wm8962.c:3021:\tif (wm8962-\u003eirq)\nsound/soc/codecs/wm8962.c-3022-\t\ttime_left = msecs_to_jiffies(5);\n--\nsound/soc/codecs/wm8962.c-3025-\nsound/soc/codecs/wm8962.c:3026:\ttime_left = wait_for_completion_timeout(\u0026wm8962-\u003efll_lock,\nsound/soc/codecs/wm8962.c-3027-\t\t\t\t\t\ttime_left);\nsound/soc/codecs/wm8962.c-3028-\nsound/soc/codecs/wm8962.c:3029:\tif (time_left == 0 \u0026\u0026 wm8962-\u003eirq) {\nsound/soc/codecs/wm8962.c-3030-\t\tdev_err(component-\u003edev, \"FLL lock timed out\");\n--\nsound/soc/codecs/wm8962.c-3036-\nsound/soc/codecs/wm8962.c:3037:\twm8962-\u003efll_fref = Fref;\nsound/soc/codecs/wm8962.c:3038:\twm8962-\u003efll_fout = Fout;\nsound/soc/codecs/wm8962.c:3039:\twm8962-\u003efll_src = source;\nsound/soc/codecs/wm8962.c-3040-\n--\nsound/soc/codecs/wm8962.c-3043-\nsound/soc/codecs/wm8962.c:3044:static int wm8962_mute(struct snd_soc_dai *dai, int mute, int direction)\nsound/soc/codecs/wm8962.c-3045-{\n--\nsound/soc/codecs/wm8962.c-3072-\nsound/soc/codecs/wm8962.c:3073:static const struct snd_soc_dai_ops wm8962_dai_ops = {\nsound/soc/codecs/wm8962.c:3074:\t.hw_params = wm8962_hw_params,\nsound/soc/codecs/wm8962.c:3075:\t.set_sysclk = wm8962_set_dai_sysclk,\nsound/soc/codecs/wm8962.c:3076:\t.set_fmt = wm8962_set_dai_fmt,\nsound/soc/codecs/wm8962.c:3077:\t.set_tdm_slot = wm8962_set_tdm_slot,\nsound/soc/codecs/wm8962.c:3078:\t.mute_stream = wm8962_mute,\nsound/soc/codecs/wm8962.c-3079-\t.no_capture_mute = 1,\n--\nsound/soc/codecs/wm8962.c-3081-\nsound/soc/codecs/wm8962.c:3082:static struct snd_soc_dai_driver wm8962_dai = {\nsound/soc/codecs/wm8962.c:3083:\t.name = \"wm8962\",\nsound/soc/codecs/wm8962.c-3084-\t.playback = {\n--\nsound/soc/codecs/wm8962.c-3097-\t},\nsound/soc/codecs/wm8962.c:3098:\t.ops = \u0026wm8962_dai_ops,\nsound/soc/codecs/wm8962.c-3099-\t.symmetric_rate = 1,\n--\nsound/soc/codecs/wm8962.c-3101-\nsound/soc/codecs/wm8962.c:3102:static void wm8962_mic_work(struct work_struct *work)\nsound/soc/codecs/wm8962.c-3103-{\nsound/soc/codecs/wm8962.c:3104:\tstruct wm8962_priv *wm8962 = container_of(work,\nsound/soc/codecs/wm8962.c:3105:\t\t\t\t\t\t  struct wm8962_priv,\nsound/soc/codecs/wm8962.c-3106-\t\t\t\t\t\t  mic_work.work);\nsound/soc/codecs/wm8962.c:3107:\tstruct snd_soc_component *component = wm8962-\u003ecomponent;\nsound/soc/codecs/wm8962.c-3108-\tint status = 0;\n--\nsound/soc/codecs/wm8962.c-3125-\t\t */\nsound/soc/codecs/wm8962.c:3126:\t\tif (!(wm8962-\u003emic_status \u0026 WM8962_MICDET_STS))\nsound/soc/codecs/wm8962.c-3127-\t\t\tstatus = 0;\n--\nsound/soc/codecs/wm8962.c-3129-\nsound/soc/codecs/wm8962.c:3130:\twm8962-\u003emic_status = status;\nsound/soc/codecs/wm8962.c-3131-\nsound/soc/codecs/wm8962.c:3132:\tsnd_soc_jack_report(wm8962-\u003ejack, status,\n\n"
}

19/2 2026/09/17 03:57 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 52930
							output: 32
							thoughts: 37
						

Thoughts:
Okay, here's my interpretation of those thoughts, presented as a first-person summary, keeping in mind my expertise:

**Targeted Code Search for WM8962 Interaction**

Alright, I need to understand how the WM8962 codec is integrated within the ALSA sound subsystem. I know `sound/soc/codecs/wm8962.c` exists, but I'm *not* interested in that file for this particular query. My objective is to find other instances where the `wm8962` string appears within the `sound/soc/` directory *excluding* that specific codec driver file. Perhaps I'm looking for its usage in a machine driver, a platform driver, or some supporting infrastructure. It could be in a DTSI file, a Kconfig, a Makefile – the possibilities are broad. This narrowed search strategy helps me pinpoint interactions beyond the core driver, saving me time by focusing on the broader system-level integration or usage of this codec. I'm thinking I'll start with a `grep` or similar command, with the appropriate exclusion flag, to efficiently find those other references.



20/2 2026/09/17 03:57 tool grepper
0m Args:
{
  "Expression": "wm8962",
  "PathPrefix": "sound/soc/fsl/"
}

Results:
{
  "Output": "sound/soc/fsl/fsl-asoc-card.c-25-#include \"../codecs/sgtl5000.h\"\nsound/soc/fsl/fsl-asoc-card.c:26:#include \"../codecs/wm8962.h\"\nsound/soc/fsl/fsl-asoc-card.c-27-#include \"../codecs/wm8960.h\"\n--\nsound/soc/fsl/fsl-asoc-card.c=722=static const struct fsl_asoc_card_pdata fsl_asoc_tlv320aic31xx_pdata = {\n--\nsound/soc/fsl/fsl-asoc-card.c-730-\nsound/soc/fsl/fsl-asoc-card.c:731:static const struct fsl_asoc_card_pdata fsl_asoc_wm8962_pdata = {\nsound/soc/fsl/fsl-asoc-card.c:732:\t.codec_dai_name      = \"wm8962\",\nsound/soc/fsl/fsl-asoc-card.c-733-\t.dai_fmt             = DAI_FMT_BASE | SND_SOC_DAIFMT_CBP_CFP,\n--\nsound/soc/fsl/fsl-asoc-card.c=1390=static const struct of_device_id fsl_asoc_card_dt_ids[] = {\n--\nsound/soc/fsl/fsl-asoc-card.c-1396-\t{ .compatible = \"fsl,imx-audio-sgtl5000\",       .data = \u0026fsl_asoc_sgtl5000_pdata },\nsound/soc/fsl/fsl-asoc-card.c:1397:\t{ .compatible = \"fsl,imx-audio-wm8962\",         .data = \u0026fsl_asoc_wm8962_pdata },\nsound/soc/fsl/fsl-asoc-card.c-1398-\t{ .compatible = \"fsl,imx-audio-wm8960\",         .data = \u0026fsl_asoc_wm8960_pdata },\n"
}

21/2 2026/09/17 03:57 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 53814
							output: 29
							thoughts: 72
						

Thoughts:
Here's my summary, as if I were thinking it:

**Kernel Audio Driver Investigation - Initial Assessment**

Okay, so I'm looking into these audio drivers and trying to get a lay of the land. Let's see... `fsl-asoc-card.c`, that's the Freescale i.MX stuff, which is expected—they're all ARM-based systems, of course. Then there's `sound/soc/tegra/`, definitely NVIDIA Tegra, again, ARM. And `sound/soc/samsung/`, yep, Samsung, also ARM. Seems like the directory structure is logical, breaking down by SoC vendor.

Now, my next step is to cast a wider net. I need to make sure I haven't missed anything crucial. Let me do a quick scan of the entire kernel tree and look for any other instances that might be relevant. Gotta make sure I'm not missing any other potential contenders or relevant code segments. Let's get a comprehensive picture here.



22/2 2026/09/17 03:57 tool grepper
0m Args:
{
  "Expression": "wm8962",
  "PathPrefix": "sound/soc/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 1235 lines.\nUse more precise expression if possible.\n\nsound/soc/codecs/Makefile=409=snd-soc-wm8961-y := wm8961.o\nsound/soc/codecs/Makefile:410:snd-soc-wm8962-y := wm8962.o\nsound/soc/codecs/Makefile-411-snd-soc-wm8971-y := wm8971.o\n--\nsound/soc/codecs/Makefile=862=obj-$(CONFIG_SND_SOC_WM8961)\t+= snd-soc-wm8961.o\nsound/soc/codecs/Makefile:863:obj-$(CONFIG_SND_SOC_WM8962)\t+= snd-soc-wm8962.o\nsound/soc/codecs/Makefile-864-obj-$(CONFIG_SND_SOC_WM8971)\t+= snd-soc-wm8971.o\n--\nsound/soc/codecs/wm8962.c-2-/*\nsound/soc/codecs/wm8962.c:3: * wm8962.c  --  WM8962 ALSA SoC Audio driver\nsound/soc/codecs/wm8962.c-4- *\n--\nsound/soc/codecs/wm8962.c-33-#include \u003csound/tlv.h\u003e\nsound/soc/codecs/wm8962.c:34:#include \u003csound/wm8962.h\u003e\nsound/soc/codecs/wm8962.c-35-#include \u003ctrace/events/asoc.h\u003e\nsound/soc/codecs/wm8962.c-36-\nsound/soc/codecs/wm8962.c:37:#include \"wm8962.h\"\nsound/soc/codecs/wm8962.c-38-\nsound/soc/codecs/wm8962.c-39-#define WM8962_NUM_SUPPLIES 8\nsound/soc/codecs/wm8962.c:40:static const char *wm8962_supply_names[WM8962_NUM_SUPPLIES] = {\nsound/soc/codecs/wm8962.c-41-\t\"DCVDD\",\n--\nsound/soc/codecs/wm8962.c-51-/* codec private data */\nsound/soc/codecs/wm8962.c:52:struct wm8962_priv {\nsound/soc/codecs/wm8962.c:53:\tstruct wm8962_pdata pdata;\nsound/soc/codecs/wm8962.c-54-\tstruct regmap *regmap;\n--\nsound/soc/codecs/wm8962.c-97-#define WM8962_REGULATOR_EVENT(n) \\\nsound/soc/codecs/wm8962.c:98:static int wm8962_regulator_event_##n(struct notifier_block *nb, \\\nsound/soc/codecs/wm8962.c-99-\t\t\t\t    unsigned long event, void *data)\t\\\nsound/soc/codecs/wm8962.c-100-{ \\\nsound/soc/codecs/wm8962.c:101:\tstruct wm8962_priv *wm8962 = container_of(nb, struct wm8962_priv, \\\nsound/soc/codecs/wm8962.c-102-\t\t\t\t\t\t  disable_nb[n]); \\\nsound/soc/codecs/wm8962.c-103-\tif (event \u0026 REGULATOR_EVENT_DISABLE) { \\\nsound/soc/codecs/wm8962.c:104:\t\tregcache_mark_dirty(wm8962-\u003eregmap);\t\\\nsound/soc/codecs/wm8962.c-105-\t} \\\n--\nsound/soc/codecs/wm8962.c=116=WM8962_REGULATOR_EVENT(7)\nsound/soc/codecs/wm8962.c-117-\nsound/soc/codecs/wm8962.c:118:static const struct reg_default wm8962_reg[] = {\nsound/soc/codecs/wm8962.c-119-\t{ 0, 0x009F },   /* R0     - Left Input volume */\n--\nsound/soc/codecs/wm8962.c-792-\nsound/soc/codecs/wm8962.c:793:static bool wm8962_volatile_register(struct device *dev, unsigned int reg)\nsound/soc/codecs/wm8962.c-794-{\n--\nsound/soc/codecs/wm8962.c-809-\nsound/soc/codecs/wm8962.c:810:static bool wm8962_readable_register(struct device *dev, unsigned int reg)\nsound/soc/codecs/wm8962.c-811-{\n--\nsound/soc/codecs/wm8962.c-1444-\nsound/soc/codecs/wm8962.c:1445:static int wm8962_reset(struct wm8962_priv *wm8962)\nsound/soc/codecs/wm8962.c-1446-{\n--\nsound/soc/codecs/wm8962.c-1448-\nsound/soc/codecs/wm8962.c:1449:\tret = regmap_write(wm8962-\u003eregmap, WM8962_SOFTWARE_RESET, 0x6243);\nsound/soc/codecs/wm8962.c-1450-\tif (ret != 0)\n--\nsound/soc/codecs/wm8962.c-1452-\nsound/soc/codecs/wm8962.c:1453:\treturn regmap_write(wm8962-\u003eregmap, WM8962_PLL_SOFTWARE_RESET, 0);\nsound/soc/codecs/wm8962.c-1454-}\n--\nsound/soc/codecs/wm8962.c=1476=static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);\nsound/soc/codecs/wm8962.c-1477-\nsound/soc/codecs/wm8962.c:1478:static int wm8962_dsp2_write_config(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-1479-{\nsound/soc/codecs/wm8962.c:1480:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-1481-\nsound/soc/codecs/wm8962.c:1482:\treturn regcache_sync_region(wm8962-\u003eregmap,\nsound/soc/codecs/wm8962.c-1483-\t\t\t\t    WM8962_HDBASS_AI_1, WM8962_MAX_REGISTER);\n--\nsound/soc/codecs/wm8962.c-1485-\nsound/soc/codecs/wm8962.c:1486:static int wm8962_dsp2_set_enable(struct snd_soc_component *component, u16 val)\nsound/soc/codecs/wm8962.c-1487-{\n--\nsound/soc/codecs/wm8962.c-1508-\nsound/soc/codecs/wm8962.c:1509:static int wm8962_dsp2_start(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-1510-{\nsound/soc/codecs/wm8962.c:1511:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-1512-\nsound/soc/codecs/wm8962.c:1513:\twm8962_dsp2_write_config(component);\nsound/soc/codecs/wm8962.c-1514-\n--\nsound/soc/codecs/wm8962.c-1516-\nsound/soc/codecs/wm8962.c:1517:\twm8962_dsp2_set_enable(component, wm8962-\u003edsp2_ena);\nsound/soc/codecs/wm8962.c-1518-\n--\nsound/soc/codecs/wm8962.c-1521-\nsound/soc/codecs/wm8962.c:1522:static int wm8962_dsp2_stop(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-1523-{\nsound/soc/codecs/wm8962.c:1524:\twm8962_dsp2_set_enable(component, 0);\nsound/soc/codecs/wm8962.c-1525-\n--\nsound/soc/codecs/wm8962.c-1532-{\t.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \\\nsound/soc/codecs/wm8962.c:1533:\t.info = wm8962_dsp2_ena_info, \\\nsound/soc/codecs/wm8962.c:1534:\t.get = wm8962_dsp2_ena_get, .put = wm8962_dsp2_ena_put, \\\nsound/soc/codecs/wm8962.c-1535-\t.private_value = xshift }\nsound/soc/codecs/wm8962.c-1536-\nsound/soc/codecs/wm8962.c:1537:static int wm8962_dsp2_ena_info(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1538-\t\t\t\tstruct snd_ctl_elem_info *uinfo)\n--\nsound/soc/codecs/wm8962.c-1548-\nsound/soc/codecs/wm8962.c:1549:static int wm8962_dsp2_ena_get(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1550-\t\t\t       struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c-1553-\tstruct snd_soc_component *component = snd_kcontrol_chip(kcontrol);\nsound/soc/codecs/wm8962.c:1554:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-1555-\nsound/soc/codecs/wm8962.c:1556:\tucontrol-\u003evalue.integer.value[0] = !!(wm8962-\u003edsp2_ena \u0026 1 \u003c\u003c shift);\nsound/soc/codecs/wm8962.c-1557-\n--\nsound/soc/codecs/wm8962.c-1560-\nsound/soc/codecs/wm8962.c:1561:static int wm8962_dsp2_ena_put(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1562-\t\t\t       struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c-1565-\tstruct snd_soc_component *component = snd_kcontrol_chip(kcontrol);\nsound/soc/codecs/wm8962.c:1566:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c:1567:\tint old = wm8962-\u003edsp2_ena;\nsound/soc/codecs/wm8962.c-1568-\tint dsp2_running = snd_soc_component_read(component, WM8962_DSP2_POWER_MANAGEMENT) \u0026\n--\nsound/soc/codecs/wm8962.c-1570-\nsound/soc/codecs/wm8962.c:1571:\tguard(mutex)(\u0026wm8962-\u003edsp2_ena_lock);\nsound/soc/codecs/wm8962.c-1572-\nsound/soc/codecs/wm8962.c-1573-\tif (ucontrol-\u003evalue.integer.value[0])\nsound/soc/codecs/wm8962.c:1574:\t\twm8962-\u003edsp2_ena |= 1 \u003c\u003c shift;\nsound/soc/codecs/wm8962.c-1575-\telse\nsound/soc/codecs/wm8962.c:1576:\t\twm8962-\u003edsp2_ena \u0026= ~(1 \u003c\u003c shift);\nsound/soc/codecs/wm8962.c-1577-\nsound/soc/codecs/wm8962.c:1578:\tif (wm8962-\u003edsp2_ena == old)\nsound/soc/codecs/wm8962.c-1579-\t\treturn 0;\n--\nsound/soc/codecs/wm8962.c-1581-\tif (dsp2_running) {\nsound/soc/codecs/wm8962.c:1582:\t\tif (wm8962-\u003edsp2_ena)\nsound/soc/codecs/wm8962.c:1583:\t\t\twm8962_dsp2_set_enable(component, wm8962-\u003edsp2_ena);\nsound/soc/codecs/wm8962.c-1584-\t\telse\nsound/soc/codecs/wm8962.c:1585:\t\t\twm8962_dsp2_stop(component);\nsound/soc/codecs/wm8962.c-1586-\t}\n--\nsound/soc/codecs/wm8962.c-1593- */\nsound/soc/codecs/wm8962.c:1594:static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1595-\t\t\t    struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c-1623- */\nsound/soc/codecs/wm8962.c:1624:static int wm8962_put_spk_sw(struct snd_kcontrol *kcontrol,\nsound/soc/codecs/wm8962.c-1625-\t\t\t    struct snd_ctl_elem_value *ucontrol)\n--\nsound/soc/codecs/wm8962.c=1663=static SOC_ENUM_SINGLE_DECL(cap_lhpf_mode,\n--\nsound/soc/codecs/wm8962.c-1665-\nsound/soc/codecs/wm8962.c:1666:static const struct snd_kcontrol_new wm8962_snd_controls[] = {\nsound/soc/codecs/wm8962.c-1667-SOC_DOUBLE(\"Input Mixer Switch\", WM8962_INPUT_MIXER_CONTROL_1, 3, 2, 1, 1),\n--\nsound/soc/codecs/wm8962.c=1715=SOC_DOUBLE_EXT(\"Headphone Switch\", WM8962_PWR_MGMT_2, 1, 0, 1, 1,\nsound/soc/codecs/wm8962.c:1716:\t       snd_soc_get_volsw, wm8962_put_hp_sw),\nsound/soc/codecs/wm8962.c-1717-SOC_DOUBLE_R(\"Headphone ZC Switch\", WM8962_HPOUTL_VOLUME, WM8962_HPOUTR_VOLUME,\n--\nsound/soc/codecs/wm8962.c=1780=SND_SOC_BYTES_MASK(\"ALC Coefficients\", WM8962_ALC1, 4,\n--\nsound/soc/codecs/wm8962.c-1783-\nsound/soc/codecs/wm8962.c:1784:static const struct snd_kcontrol_new wm8962_spk_mono_controls[] = {\nsound/soc/codecs/wm8962.c-1785-SOC_SINGLE_TLV(\"Speaker Volume\", WM8962_SPKOUTL_VOLUME, 0, 127, 0, out_tlv),\nsound/soc/codecs/wm8962.c=1786=SOC_SINGLE_EXT(\"Speaker Switch\", WM8962_CLASS_D_CONTROL_1, 1, 1, 1,\nsound/soc/codecs/wm8962.c:1787:\t       snd_soc_get_volsw, wm8962_put_spk_sw),\nsound/soc/codecs/wm8962.c-1788-SOC_SINGLE(\"Speaker ZC Switch\", WM8962_SPKOUTL_VOLUME, 7, 1, 0),\n--\nsound/soc/codecs/wm8962.c=1801=SOC_SINGLE_TLV(\"Speaker Mixer DACR Volume\", WM8962_SPEAKER_MIXER_5,\n--\nsound/soc/codecs/wm8962.c-1804-\nsound/soc/codecs/wm8962.c:1805:static const struct snd_kcontrol_new wm8962_spk_stereo_controls[] = {\nsound/soc/codecs/wm8962.c-1806-SOC_DOUBLE_R_TLV(\"Speaker Volume\", WM8962_SPKOUTL_VOLUME,\n--\nsound/soc/codecs/wm8962.c=1808=SOC_DOUBLE_EXT(\"Speaker Switch\", WM8962_CLASS_D_CONTROL_1, 1, 0, 1, 1,\nsound/soc/codecs/wm8962.c:1809:\t       snd_soc_get_volsw, wm8962_put_spk_sw),\nsound/soc/codecs/wm8962.c-1810-SOC_DOUBLE_R(\"Speaker ZC Switch\", WM8962_SPKOUTL_VOLUME, WM8962_SPKOUTR_VOLUME,\n--\nsound/soc/codecs/wm8962.c=2030=static int dsp2_event(struct snd_soc_dapm_widget *w,\n--\nsound/soc/codecs/wm8962.c-2033-\tstruct snd_soc_component *component = snd_soc_dapm_to_component(w-\u003edapm);\nsound/soc/codecs/wm8962.c:2034:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2035-\n--\nsound/soc/codecs/wm8962.c-2037-\tcase SND_SOC_DAPM_POST_PMU:\nsound/soc/codecs/wm8962.c:2038:\t\tif (wm8962-\u003edsp2_ena)\nsound/soc/codecs/wm8962.c:2039:\t\t\twm8962_dsp2_start(component);\nsound/soc/codecs/wm8962.c-2040-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c-2042-\tcase SND_SOC_DAPM_PRE_PMD:\nsound/soc/codecs/wm8962.c:2043:\t\tif (wm8962-\u003edsp2_ena)\nsound/soc/codecs/wm8962.c:2044:\t\t\twm8962_dsp2_stop(component);\nsound/soc/codecs/wm8962.c-2045-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c=2161=SOC_DAPM_SINGLE(\"IN4R Switch\", WM8962_SPEAKER_MIXER_2, 0, 1, 0),\n--\nsound/soc/codecs/wm8962.c-2163-\nsound/soc/codecs/wm8962.c:2164:static const struct snd_soc_dapm_widget wm8962_dapm_widgets[] = {\nsound/soc/codecs/wm8962.c-2165-SND_SOC_DAPM_INPUT(\"IN1L\"),\n--\nsound/soc/codecs/wm8962.c=2234=SND_SOC_DAPM_PGA(\"SPKOUTR Output\", WM8962_CLASS_D_CONTROL_1, 7, 0, NULL, 0),\n--\nsound/soc/codecs/wm8962.c-2236-\nsound/soc/codecs/wm8962.c:2237:static const struct snd_soc_dapm_widget wm8962_dapm_spk_mono_widgets[] = {\nsound/soc/codecs/wm8962.c-2238-SND_SOC_DAPM_MIXER(\"Speaker Mixer\", WM8962_MIXER_ENABLES, 1, 0,\n--\nsound/soc/codecs/wm8962.c=2242=SND_SOC_DAPM_OUTPUT(\"SPKOUT\"),\n--\nsound/soc/codecs/wm8962.c-2244-\nsound/soc/codecs/wm8962.c:2245:static const struct snd_soc_dapm_widget wm8962_dapm_spk_stereo_widgets[] = {\nsound/soc/codecs/wm8962.c-2246-SND_SOC_DAPM_MIXER(\"SPKOUTL Mixer\", WM8962_MIXER_ENABLES, 1, 0,\n--\nsound/soc/codecs/wm8962.c=2257=SND_SOC_DAPM_OUTPUT(\"SPKOUTR\"),\n--\nsound/soc/codecs/wm8962.c-2259-\nsound/soc/codecs/wm8962.c:2260:static const struct snd_soc_dapm_route wm8962_intercon[] = {\nsound/soc/codecs/wm8962.c-2261-\t{ \"INPGAL\", \"IN1L Switch\", \"IN1L\" },\n--\nsound/soc/codecs/wm8962.c-2356-\nsound/soc/codecs/wm8962.c:2357:static const struct snd_soc_dapm_route wm8962_spk_mono_intercon[] = {\nsound/soc/codecs/wm8962.c-2358-\t{ \"Speaker Mixer\", \"IN4L Switch\", \"IN4L\" },\n--\nsound/soc/codecs/wm8962.c-2381-\nsound/soc/codecs/wm8962.c:2382:static const struct snd_soc_dapm_route wm8962_spk_stereo_intercon[] = {\nsound/soc/codecs/wm8962.c-2383-\t{ \"SPKOUTL Mixer\", \"IN4L Switch\", \"IN4L\" },\n--\nsound/soc/codecs/wm8962.c-2416-\nsound/soc/codecs/wm8962.c:2417:static int wm8962_add_widgets(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-2418-{\nsound/soc/codecs/wm8962.c:2419:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c:2420:\tstruct wm8962_pdata *pdata = \u0026wm8962-\u003epdata;\nsound/soc/codecs/wm8962.c-2421-\tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\nsound/soc/codecs/wm8962.c-2422-\nsound/soc/codecs/wm8962.c:2423:\tsnd_soc_add_component_controls(component, wm8962_snd_controls,\nsound/soc/codecs/wm8962.c:2424:\t\t\t     ARRAY_SIZE(wm8962_snd_controls));\nsound/soc/codecs/wm8962.c-2425-\tif (pdata-\u003espk_mono)\nsound/soc/codecs/wm8962.c:2426:\t\tsnd_soc_add_component_controls(component, wm8962_spk_mono_controls,\nsound/soc/codecs/wm8962.c:2427:\t\t\t\t     ARRAY_SIZE(wm8962_spk_mono_controls));\nsound/soc/codecs/wm8962.c-2428-\telse\nsound/soc/codecs/wm8962.c:2429:\t\tsnd_soc_add_component_controls(component, wm8962_spk_stereo_controls,\nsound/soc/codecs/wm8962.c:2430:\t\t\t\t     ARRAY_SIZE(wm8962_spk_stereo_controls));\nsound/soc/codecs/wm8962.c-2431-\nsound/soc/codecs/wm8962.c-2432-\nsound/soc/codecs/wm8962.c:2433:\tsnd_soc_dapm_new_controls(dapm, wm8962_dapm_widgets,\nsound/soc/codecs/wm8962.c:2434:\t\t\t\t  ARRAY_SIZE(wm8962_dapm_widgets));\nsound/soc/codecs/wm8962.c-2435-\tif (pdata-\u003espk_mono)\nsound/soc/codecs/wm8962.c:2436:\t\tsnd_soc_dapm_new_controls(dapm, wm8962_dapm_spk_mono_widgets,\nsound/soc/codecs/wm8962.c:2437:\t\t\t\t\t  ARRAY_SIZE(wm8962_dapm_spk_mono_widgets));\nsound/soc/codecs/wm8962.c-2438-\telse\nsound/soc/codecs/wm8962.c:2439:\t\tsnd_soc_dapm_new_controls(dapm, wm8962_dapm_spk_stereo_widgets,\nsound/soc/codecs/wm8962.c:2440:\t\t\t\t\t  ARRAY_SIZE(wm8962_dapm_spk_stereo_widgets));\nsound/soc/codecs/wm8962.c-2441-\nsound/soc/codecs/wm8962.c:2442:\tsnd_soc_dapm_add_routes(dapm, wm8962_intercon,\nsound/soc/codecs/wm8962.c:2443:\t\t\t\tARRAY_SIZE(wm8962_intercon));\nsound/soc/codecs/wm8962.c-2444-\tif (pdata-\u003espk_mono)\nsound/soc/codecs/wm8962.c:2445:\t\tsnd_soc_dapm_add_routes(dapm, wm8962_spk_mono_intercon,\nsound/soc/codecs/wm8962.c:2446:\t\t\t\t\tARRAY_SIZE(wm8962_spk_mono_intercon));\nsound/soc/codecs/wm8962.c-2447-\telse\nsound/soc/codecs/wm8962.c:2448:\t\tsnd_soc_dapm_add_routes(dapm, wm8962_spk_stereo_intercon,\nsound/soc/codecs/wm8962.c:2449:\t\t\t\t\tARRAY_SIZE(wm8962_spk_stereo_intercon));\nsound/soc/codecs/wm8962.c-2450-\n--\nsound/soc/codecs/wm8962.c=2462=static const int sysclk_rates[] = {\n--\nsound/soc/codecs/wm8962.c-2465-\nsound/soc/codecs/wm8962.c:2466:static void wm8962_configure_bclk(struct snd_soc_component *component)\nsound/soc/codecs/wm8962.c-2467-{\nsound/soc/codecs/wm8962.c-2468-\tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\nsound/soc/codecs/wm8962.c:2469:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2470-\tint best, min_diff, diff;\n--\nsound/soc/codecs/wm8962.c-2477-\nsound/soc/codecs/wm8962.c:2478:\tif (!wm8962-\u003esysclk_rate) {\nsound/soc/codecs/wm8962.c-2479-\t\tdev_dbg(component-\u003edev, \"No SYSCLK configured\\n\");\n--\nsound/soc/codecs/wm8962.c-2482-\nsound/soc/codecs/wm8962.c:2483:\tif (!wm8962-\u003ebclk || !wm8962-\u003elrclk) {\nsound/soc/codecs/wm8962.c-2484-\t\tdev_dbg(component-\u003edev, \"No audio clocks configured\\n\");\n--\nsound/soc/codecs/wm8962.c-2488-\tfor (i = 0; i \u003c ARRAY_SIZE(sysclk_rates); i++) {\nsound/soc/codecs/wm8962.c:2489:\t\tif (sysclk_rates[i] == wm8962-\u003esysclk_rate / wm8962-\u003elrclk) {\nsound/soc/codecs/wm8962.c-2490-\t\t\tclocking4 |= i \u003c\u003c WM8962_SYSCLK_RATE_SHIFT;\n--\nsound/soc/codecs/wm8962.c-2496-\t\tdev_err(component-\u003edev, \"Unsupported sysclk ratio %d\\n\",\nsound/soc/codecs/wm8962.c:2497:\t\t\twm8962-\u003esysclk_rate / wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2498-\t\treturn;\n--\nsound/soc/codecs/wm8962.c-2510-\t * SYSCLK_ENA is owned by the \"SYSCLK\" DAPM supply widget, which may\nsound/soc/codecs/wm8962.c:2511:\t * already have it set even below SND_SOC_BIAS_ON: wm8962_mic_detect()\nsound/soc/codecs/wm8962.c-2512-\t * force-enables that pin, so on boards using it (the Tegra machine\n--\nsound/soc/codecs/wm8962.c-2547-\tcase 0:\nsound/soc/codecs/wm8962.c:2548:\t\tdspclk = wm8962-\u003esysclk_rate;\nsound/soc/codecs/wm8962.c-2549-\t\tbreak;\nsound/soc/codecs/wm8962.c-2550-\tcase 1:\nsound/soc/codecs/wm8962.c:2551:\t\tdspclk = wm8962-\u003esysclk_rate / 2;\nsound/soc/codecs/wm8962.c-2552-\t\tbreak;\nsound/soc/codecs/wm8962.c-2553-\tcase 2:\nsound/soc/codecs/wm8962.c:2554:\t\tdspclk = wm8962-\u003esysclk_rate / 4;\nsound/soc/codecs/wm8962.c-2555-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c-2557-\t\tdev_warn(component-\u003edev, \"Unknown DSPCLK divisor read back\\n\");\nsound/soc/codecs/wm8962.c:2558:\t\tdspclk = wm8962-\u003esysclk_rate;\nsound/soc/codecs/wm8962.c-2559-\t}\nsound/soc/codecs/wm8962.c-2560-\nsound/soc/codecs/wm8962.c:2561:\tdev_dbg(component-\u003edev, \"DSPCLK is %dHz, BCLK %d\\n\", dspclk, wm8962-\u003ebclk);\nsound/soc/codecs/wm8962.c-2562-\n--\nsound/soc/codecs/wm8962.c-2569-\nsound/soc/codecs/wm8962.c:2570:\t\tdiff = (dspclk / bclk_divs[i]) - wm8962-\u003ebclk;\nsound/soc/codecs/wm8962.c-2571-\t\tif (diff \u003c 0) /* Table is sorted */\n--\nsound/soc/codecs/wm8962.c-2577-\t}\nsound/soc/codecs/wm8962.c:2578:\twm8962-\u003ebclk = dspclk / bclk_divs[best];\nsound/soc/codecs/wm8962.c-2579-\tclocking2 |= best;\nsound/soc/codecs/wm8962.c-2580-\tdev_dbg(component-\u003edev, \"Selected BCLK_DIV %d for %dHz\\n\",\nsound/soc/codecs/wm8962.c:2581:\t\tbclk_divs[best], wm8962-\u003ebclk);\nsound/soc/codecs/wm8962.c-2582-\nsound/soc/codecs/wm8962.c:2583:\taif2 |= wm8962-\u003ebclk / wm8962-\u003elrclk;\nsound/soc/codecs/wm8962.c-2584-\tdev_dbg(component-\u003edev, \"Selected LRCLK divisor %d for %dHz\\n\",\nsound/soc/codecs/wm8962.c:2585:\t\twm8962-\u003ebclk / wm8962-\u003elrclk, wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2586-\n--\nsound/soc/codecs/wm8962.c-2592-\nsound/soc/codecs/wm8962.c:2593:static int wm8962_set_bias_level(struct snd_soc_component *component,\nsound/soc/codecs/wm8962.c-2594-\t\t\t\t enum snd_soc_bias_level level)\n--\nsound/soc/codecs/wm8962.c-2606-\nsound/soc/codecs/wm8962.c:2607:\t\twm8962_configure_bclk(component);\nsound/soc/codecs/wm8962.c-2608-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c-2625-\nsound/soc/codecs/wm8962.c:2626:static int wm8962_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,\nsound/soc/codecs/wm8962.c-2627-\t\t\t       unsigned int rx_mask, int slots, int slot_width)\n--\nsound/soc/codecs/wm8962.c-2629-\tstruct snd_soc_component *component = dai-\u003ecomponent;\nsound/soc/codecs/wm8962.c:2630:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2631-\nsound/soc/codecs/wm8962.c:2632:\twm8962-\u003etdm_width = slot_width;\nsound/soc/codecs/wm8962.c-2633-\t/* External is one slot one channel, but internal is one slot two channels */\nsound/soc/codecs/wm8962.c:2634:\twm8962-\u003etdm_slots = slots / 2;\nsound/soc/codecs/wm8962.c-2635-\n--\nsound/soc/codecs/wm8962.c=2639=static const struct {\n--\nsound/soc/codecs/wm8962.c-2655-\nsound/soc/codecs/wm8962.c:2656:static int wm8962_hw_params(struct snd_pcm_substream *substream,\nsound/soc/codecs/wm8962.c-2657-\t\t\t    struct snd_pcm_hw_params *params,\n--\nsound/soc/codecs/wm8962.c-2661-\tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\nsound/soc/codecs/wm8962.c:2662:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2663-\tint i;\n--\nsound/soc/codecs/wm8962.c-2667-\nsound/soc/codecs/wm8962.c:2668:\tif (wm8962-\u003etdm_width \u0026\u0026 wm8962-\u003etdm_slots) {\nsound/soc/codecs/wm8962.c:2669:\t\twm8962-\u003ebclk = snd_soc_calc_bclk(params_rate(params),\nsound/soc/codecs/wm8962.c:2670:\t\t\t\t\t\t wm8962-\u003etdm_width,\nsound/soc/codecs/wm8962.c-2671-\t\t\t\t\t\t params_channels(params),\nsound/soc/codecs/wm8962.c:2672:\t\t\t\t\t\t wm8962-\u003etdm_slots);\nsound/soc/codecs/wm8962.c:2673:\t\twidth = wm8962-\u003etdm_width;\nsound/soc/codecs/wm8962.c-2674-\t} else {\nsound/soc/codecs/wm8962.c:2675:\t\twm8962-\u003ebclk = snd_soc_params_to_bclk(params);\nsound/soc/codecs/wm8962.c-2676-\t\twidth = params_width(params);\n--\nsound/soc/codecs/wm8962.c-2678-\t\tif (params_channels(params) == 1)\nsound/soc/codecs/wm8962.c:2679:\t\t\twm8962-\u003ebclk *= 2;\nsound/soc/codecs/wm8962.c-2680-\t}\nsound/soc/codecs/wm8962.c-2681-\nsound/soc/codecs/wm8962.c:2682:\twm8962-\u003elrclk = params_rate(params);\nsound/soc/codecs/wm8962.c-2683-\nsound/soc/codecs/wm8962.c-2684-\tfor (i = 0; i \u003c ARRAY_SIZE(sr_vals); i++) {\nsound/soc/codecs/wm8962.c:2685:\t\tif (sr_vals[i].rate == wm8962-\u003elrclk) {\nsound/soc/codecs/wm8962.c-2686-\t\t\tadctl3 |= sr_vals[i].reg;\n--\nsound/soc/codecs/wm8962.c-2690-\tif (i == ARRAY_SIZE(sr_vals)) {\nsound/soc/codecs/wm8962.c:2691:\t\tdev_err(component-\u003edev, \"Unsupported rate %dHz\\n\", wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2692-\t\treturn -EINVAL;\n--\nsound/soc/codecs/wm8962.c-2694-\nsound/soc/codecs/wm8962.c:2695:\tif (wm8962-\u003elrclk % 8000 == 0)\nsound/soc/codecs/wm8962.c-2696-\t\tadctl3 |= WM8962_SAMPLE_RATE_INT_MODE;\n--\nsound/soc/codecs/wm8962.c-2720-\tdev_dbg(component-\u003edev, \"hw_params set BCLK %dHz LRCLK %dHz\\n\",\nsound/soc/codecs/wm8962.c:2721:\t\twm8962-\u003ebclk, wm8962-\u003elrclk);\nsound/soc/codecs/wm8962.c-2722-\nsound/soc/codecs/wm8962.c-2723-\tif (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_ON)\nsound/soc/codecs/wm8962.c:2724:\t\twm8962_configure_bclk(component);\nsound/soc/codecs/wm8962.c-2725-\n--\nsound/soc/codecs/wm8962.c-2728-\nsound/soc/codecs/wm8962.c:2729:static int wm8962_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,\nsound/soc/codecs/wm8962.c-2730-\t\t\t\t unsigned int freq, int dir)\n--\nsound/soc/codecs/wm8962.c-2732-\tstruct snd_soc_component *component = dai-\u003ecomponent;\nsound/soc/codecs/wm8962.c:2733:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2734-\tint src;\n--\nsound/soc/codecs/wm8962.c-2737-\tcase WM8962_SYSCLK_MCLK:\nsound/soc/codecs/wm8962.c:2738:\t\twm8962-\u003esysclk = WM8962_SYSCLK_MCLK;\nsound/soc/codecs/wm8962.c-2739-\t\tsrc = 0;\n--\nsound/soc/codecs/wm8962.c-2741-\tcase WM8962_SYSCLK_FLL:\nsound/soc/codecs/wm8962.c:2742:\t\twm8962-\u003esysclk = WM8962_SYSCLK_FLL;\nsound/soc/codecs/wm8962.c-2743-\t\tsrc = 1 \u003c\u003c WM8962_SYSCLK_SRC_SHIFT;\n--\nsound/soc/codecs/wm8962.c-2751-\nsound/soc/codecs/wm8962.c:2752:\twm8962-\u003esysclk_rate = freq;\nsound/soc/codecs/wm8962.c-2753-\n--\nsound/soc/codecs/wm8962.c-2756-\nsound/soc/codecs/wm8962.c:2757:static int wm8962_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)\nsound/soc/codecs/wm8962.c-2758-{\nsound/soc/codecs/wm8962.c-2759-\tstruct snd_soc_component *component = dai-\u003ecomponent;\nsound/soc/codecs/wm8962.c:2760:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2761-\tint aif0 = 0;\n--\nsound/soc/codecs/wm8962.c-2806-\nsound/soc/codecs/wm8962.c:2807:\twm8962-\u003emaster_flag = false;\nsound/soc/codecs/wm8962.c-2808-\tswitch (fmt \u0026 SND_SOC_DAIFMT_MASTER_MASK) {\n--\nsound/soc/codecs/wm8962.c-2810-\t\taif0 |= WM8962_MSTR;\nsound/soc/codecs/wm8962.c:2811:\t\twm8962-\u003emaster_flag = true;\nsound/soc/codecs/wm8962.c-2812-\t\tbreak;\n--\nsound/soc/codecs/wm8962.c=2852=static int fll_factors(struct _fll_div *fll_div, unsigned int Fref,\n--\nsound/soc/codecs/wm8962.c-2928-\nsound/soc/codecs/wm8962.c:2929:static int wm8962_set_fll(struct snd_soc_component *component, int fll_id, int source,\nsound/soc/codecs/wm8962.c-2930-\t\t\t  unsigned int Fref, unsigned int Fout)\nsound/soc/codecs/wm8962.c-2931-{\nsound/soc/codecs/wm8962.c:2932:\tstruct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);\nsound/soc/codecs/wm8962.c-2933-\tstruct _fll_div fll_div;\n--\nsound/soc/codecs/wm8962.c-2938-\t/* Any change? */\nsound/soc/codecs/wm8962.c:2939:\tif (source == wm8962-\u003efll_src \u0026\u0026 Fref == wm8962-\u003efll_fref \u0026\u0026\nsound/soc/codecs/wm8962.c:2940:\t    Fout == wm8962-\u003efll_fout)\nsound/soc/codecs/wm8962.c-2941-\t\treturn 0;\n--\nsound/soc/codecs/wm8962.c-2945-\nsound/soc/codecs/wm8962.c:2946:\t\twm8962-\u003efll_fref = 0;\nsound/soc/codecs/wm8962.c:2947:\t\twm8962-\u003efll_fout = 0;\nsound/soc/codecs/wm8962.c-2948-\n--\nsound/soc/codecs/wm8962.c-3003-\nsound/soc/codecs/wm8962.c:3004:\treinit_completion(\u0026wm8962-\u003efll_lock);\nsound/soc/codecs/wm8962.c-3005-\n--\nsound/soc/codecs/wm8962.c-3020-\t */\nsound/soc/codecs/wm8962.c:3021:\tif (wm8962-\u003eirq)\nsound/soc/codecs/wm8962.c-3022-\t\ttime_left = msecs_to_jiffies(5);\n--\nsound/soc/codecs/wm8962.c-3025-\nsound/soc/codecs/wm8962.c:3026:\ttime_left = wait_for_completion_timeout(\u0026wm8962-\u003efll_lock,\nsound/soc/codecs/wm8962.c-3027-\t\t\t\t\t\ttime_left);\nsound/soc/codecs/wm8962.c-3028-\nsound/soc/codecs/wm8962.c:3029:\tif (time_left == 0 \u0026\u0026 wm8962-\u003eirq) {\nsound/soc/codecs/wm8962.c-3030-\t\tdev_err(component-\u003edev, \"FLL lock timed out\");\n--\nsound/soc/codecs/wm8962.c-3036-\nsound/soc/codecs/wm8962.c:3037:\twm8962-\u003efll_fref = Fref;\nsound/soc/codecs/wm8962.c:3038:\twm8962-\u003efll_fout = Fout;\nsound/soc/codecs/wm8962.c:3039:\twm8962-\u003efll_src = source;\nsound/soc/codecs/wm8962.c-3040-\n--\nsound/soc/codecs/wm8962.c-3043-\nsound/soc/codecs/wm8962.c:3044:static int wm8962_mute(struct snd_soc_dai *dai, int mute, int direction)\nsound/soc/codecs/wm8962.c-3045-{\n--\nsound/soc/codecs/wm8962.c-3072-\nsound/soc/codecs/wm8962.c:3073:static const struct snd_soc_dai_ops wm8962_dai_ops = {\nsound/soc/codecs/wm8962.c:3074:\t.hw_params = wm8962_hw_params,\nsound/soc/codecs/wm8962.c:3075:\t.set_sysclk = wm8962_set_dai_sysclk,\nsound/soc/codecs/wm8962.c:3076:\t.set_fmt = wm8962_set_dai_fmt,\nsound/soc/codecs/wm8962.c:3077:\t.set_tdm_slot = wm8962_set_tdm_slot,\nsound/soc/codecs/wm8962.c:3078:\t.mute_stream = wm8962_mute,\nsound/soc/codecs/wm8962.c-3079-\t.no_capture_mute = 1,\n--\nsound/soc/codecs/wm8962.c-3081-\nsound/soc/codecs/wm8962.c:3082:static struct snd_soc_dai_driver wm8962_dai = {\nsound/soc/codecs/wm8962.c:3083:\t.name = \"wm8962\",\nsound/soc/codecs/wm8962.c-3084-\t.playback = {\n--\nsound/soc/codecs/wm8962.c-3097-\t},\nsound/soc/codecs/wm8962.c:3098:\t.ops = \u0026wm8962_dai_ops,\nsound/soc/codecs/wm8962.c-3099-\t.symmetric_rate = 1,\n--\nsound/soc/codecs/wm8962.c-3101-\nsound/soc/codecs/wm8962.c:3102:static void wm8962_mic_work(struct work_struct *work)\nsound/soc/codecs/wm8962.c-3103-{\nsound/soc/codecs/wm8962.c:3104:\tstruct wm8962_priv *wm8962 = container_of(work,\nsound/soc/codecs/wm8962.c:3105:\t\t\t\t\t\t  struct wm8962_priv,\nsound/soc/codecs/wm8962.c-3106-\t\t\t\t\t\t  mic_work.work);\nsound/soc/codecs/wm8962.c:3107:\tstruct snd_soc_component *component = wm8962-\u003ecomponent;\nsound/soc/codecs/wm8962.c-3108-\tint status = 0;\n--\nsound/soc/codecs/wm8962.c-3125-\t\t */\nsound/soc/codecs/wm8962.c:3126:\t\tif (!(wm8962-\u003emic_status \u0026 WM8962_MICDET_STS))\nsound/soc/codecs/wm8962.c-3127-\t\t\tstatus = 0;\n--\nsound/soc/codecs/wm8962.c-3129-\nsound/soc/codecs/wm8962.c:3130:\twm8962-\u003emic_status = status;\nsound/soc/codecs/wm8962.c-3131-\nsound/soc/codecs/wm8962.c:3132:\tsnd_soc_jack_report(wm8962-\u003ejack, status,\n\n"
}

23/2 2026/09/17 03:57 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 68378
							output: 26
							thoughts: 61
						

Thoughts:
**Investigating Audio Driver Conflicts**

Okay, so I'm trying to figure out what's going on with these audio drivers. The situation seems to involve `sound/soc/samsung/tobermory.c` and `sound/soc/tegra/tegra_wm8962.c`. I need to understand if there's potential interference or conflicts between these two. My first instinct is to see if these files reference each other, or perhaps common elements. I'll need to do a `grep` to quickly search for either "tegra_wm8962" or "tobermory" within the code base. That should illuminate any direct interactions or shared resources that could be a source of problems.



24/2 2026/09/17 03:57 tool grepper
0m Args:
{
  "Expression": "tegra_wm8962|tobermory"
}

Results:
{
  "Output": "arch/arm/mach-s3c/mach-crag6410.c=335=static struct platform_device lowland_device = {\n--\narch/arm/mach-s3c/mach-crag6410.c-339-\narch/arm/mach-s3c/mach-crag6410.c:340:static struct platform_device tobermory_device = {\narch/arm/mach-s3c/mach-crag6410.c:341:\t.name\t\t= \"tobermory\",\narch/arm/mach-s3c/mach-crag6410.c-342-\t.id\t\t= -1,\n--\narch/arm/mach-s3c/mach-crag6410.c=439=static struct platform_device *crag6410_devs1[] __initdata = {\n--\narch/arm/mach-s3c/mach-crag6410.c-444-\t\u0026speyside_device,\narch/arm/mach-s3c/mach-crag6410.c:445:\t\u0026tobermory_device,\narch/arm/mach-s3c/mach-crag6410.c-446-\t\u0026littlemill_device,\n--\nsound/soc/samsung/Makefile=20=snd-soc-speyside-y := speyside.o\nsound/soc/samsung/Makefile:21:snd-soc-tobermory-y := tobermory.o\nsound/soc/samsung/Makefile-22-snd-soc-lowland-y := lowland.o\n--\nsound/soc/samsung/Makefile=35=obj-$(CONFIG_SND_SOC_SPEYSIDE) += snd-soc-speyside.o\nsound/soc/samsung/Makefile:36:obj-$(CONFIG_SND_SOC_TOBERMORY) += snd-soc-tobermory.o\nsound/soc/samsung/Makefile-37-obj-$(CONFIG_SND_SOC_LOWLAND) += snd-soc-lowland.o\n--\nsound/soc/samsung/tobermory.c=14=static int sample_rate = 44100;\nsound/soc/samsung/tobermory.c-15-\nsound/soc/samsung/tobermory.c:16:static int tobermory_set_bias_level(struct snd_soc_card *card,\nsound/soc/samsung/tobermory.c-17-\t\t\t\t\t  struct snd_soc_dapm_context *dapm,\n--\nsound/soc/samsung/tobermory.c-58-\nsound/soc/samsung/tobermory.c:59:static int tobermory_set_bias_level_post(struct snd_soc_card *card,\nsound/soc/samsung/tobermory.c-60-\t\t\t\t\t       struct snd_soc_dapm_context *dapm,\n--\nsound/soc/samsung/tobermory.c-96-\nsound/soc/samsung/tobermory.c:97:static int tobermory_hw_params(struct snd_pcm_substream *substream,\nsound/soc/samsung/tobermory.c-98-\t\t\t      struct snd_pcm_hw_params *params)\n--\nsound/soc/samsung/tobermory.c-104-\nsound/soc/samsung/tobermory.c:105:static const struct snd_soc_ops tobermory_ops = {\nsound/soc/samsung/tobermory.c:106:\t.hw_params = tobermory_hw_params,\nsound/soc/samsung/tobermory.c-107-};\n--\nsound/soc/samsung/tobermory.c=109=SND_SOC_DAILINK_DEFS(cpu,\n--\nsound/soc/samsung/tobermory.c-113-\nsound/soc/samsung/tobermory.c:114:static struct snd_soc_dai_link tobermory_dai[] = {\nsound/soc/samsung/tobermory.c-115-\t{\n--\nsound/soc/samsung/tobermory.c-119-\t\t\t\t| SND_SOC_DAIFMT_CBP_CFP,\nsound/soc/samsung/tobermory.c:120:\t\t.ops = \u0026tobermory_ops,\nsound/soc/samsung/tobermory.c-121-\t\tSND_SOC_DAILINK_REG(cpu),\n--\nsound/soc/samsung/tobermory.c=140=static const struct snd_soc_dapm_route audio_paths[] = {\n--\nsound/soc/samsung/tobermory.c-158-\nsound/soc/samsung/tobermory.c:159:static struct snd_soc_jack tobermory_headset;\nsound/soc/samsung/tobermory.c-160-\nsound/soc/samsung/tobermory.c-161-/* Headset jack detection DAPM pins */\nsound/soc/samsung/tobermory.c:162:static struct snd_soc_jack_pin tobermory_headset_pins[] = {\nsound/soc/samsung/tobermory.c-163-\t{\n--\nsound/soc/samsung/tobermory.c-172-\nsound/soc/samsung/tobermory.c:173:static int tobermory_late_probe(struct snd_soc_card *card)\nsound/soc/samsung/tobermory.c-174-{\n--\nsound/soc/samsung/tobermory.c-189-\tret = snd_soc_card_jack_new_pins(card, \"Headset\", SND_JACK_HEADSET |\nsound/soc/samsung/tobermory.c:190:\t\t\t\t\t SND_JACK_BTN_0, \u0026tobermory_headset,\nsound/soc/samsung/tobermory.c:191:\t\t\t\t\t tobermory_headset_pins,\nsound/soc/samsung/tobermory.c:192:\t\t\t\t\t ARRAY_SIZE(tobermory_headset_pins));\nsound/soc/samsung/tobermory.c-193-\tif (ret)\n--\nsound/soc/samsung/tobermory.c-195-\nsound/soc/samsung/tobermory.c:196:\twm8962_mic_detect(component, \u0026tobermory_headset);\nsound/soc/samsung/tobermory.c-197-\n--\nsound/soc/samsung/tobermory.c-200-\nsound/soc/samsung/tobermory.c:201:static struct snd_soc_card tobermory = {\nsound/soc/samsung/tobermory.c-202-\t.name = \"Tobermory\",\nsound/soc/samsung/tobermory.c-203-\t.owner = THIS_MODULE,\nsound/soc/samsung/tobermory.c:204:\t.dai_link = tobermory_dai,\nsound/soc/samsung/tobermory.c:205:\t.num_links = ARRAY_SIZE(tobermory_dai),\nsound/soc/samsung/tobermory.c-206-\nsound/soc/samsung/tobermory.c:207:\t.set_bias_level = tobermory_set_bias_level,\nsound/soc/samsung/tobermory.c:208:\t.set_bias_level_post = tobermory_set_bias_level_post,\nsound/soc/samsung/tobermory.c-209-\n--\nsound/soc/samsung/tobermory.c-217-\nsound/soc/samsung/tobermory.c:218:\t.late_probe = tobermory_late_probe,\nsound/soc/samsung/tobermory.c-219-};\nsound/soc/samsung/tobermory.c-220-\nsound/soc/samsung/tobermory.c:221:static int tobermory_probe(struct platform_device *pdev)\nsound/soc/samsung/tobermory.c-222-{\nsound/soc/samsung/tobermory.c:223:\tstruct snd_soc_card *card = \u0026tobermory;\nsound/soc/samsung/tobermory.c-224-\tint ret;\n--\nsound/soc/samsung/tobermory.c-234-\nsound/soc/samsung/tobermory.c:235:static struct platform_driver tobermory_driver = {\nsound/soc/samsung/tobermory.c-236-\t.driver = {\nsound/soc/samsung/tobermory.c:237:\t\t.name = \"tobermory\",\nsound/soc/samsung/tobermory.c-238-\t\t.pm = \u0026snd_soc_pm_ops,\nsound/soc/samsung/tobermory.c-239-\t},\nsound/soc/samsung/tobermory.c:240:\t.probe = tobermory_probe,\nsound/soc/samsung/tobermory.c-241-};\nsound/soc/samsung/tobermory.c-242-\nsound/soc/samsung/tobermory.c:243:module_platform_driver(tobermory_driver);\nsound/soc/samsung/tobermory.c-244-\n--\nsound/soc/samsung/tobermory.c=247=MODULE_LICENSE(\"GPL\");\nsound/soc/samsung/tobermory.c:248:MODULE_ALIAS(\"platform:tobermory\");\n--\nsound/soc/tegra/Makefile=44=snd-soc-tegra-wm8903-y := tegra_wm8903.o\nsound/soc/tegra/Makefile:45:snd-soc-tegra-wm8962-y := tegra_wm8962.o\nsound/soc/tegra/Makefile-46-snd-soc-tegra-machine-y := tegra_asoc_machine.o\n--\nsound/soc/tegra/tegra_wm8962.c-2-/*\nsound/soc/tegra/tegra_wm8962.c:3: * tegra_wm8962.c - Tegra machine ASoC driver for boards using WM8962 codec.\nsound/soc/tegra/tegra_wm8962.c-4- *\n--\nsound/soc/tegra/tegra_wm8962.c-34-\nsound/soc/tegra/tegra_wm8962.c:35:static struct snd_soc_jack_pin tegra_wm8962_mic_jack_pins[] = {\nsound/soc/tegra/tegra_wm8962.c-36-\t{ .pin = \"Mic Jack\", .mask = SND_JACK_MICROPHONE },\n--\nsound/soc/tegra/tegra_wm8962.c-38-\nsound/soc/tegra/tegra_wm8962.c:39:static unsigned int tegra_wm8962_mclk_rate(unsigned int srate)\nsound/soc/tegra/tegra_wm8962.c-40-{\n--\nsound/soc/tegra/tegra_wm8962.c-66-\nsound/soc/tegra/tegra_wm8962.c:67:static int tegra_wm8962_init(struct snd_soc_pcm_runtime *rtd)\nsound/soc/tegra/tegra_wm8962.c-68-{\n--\nsound/soc/tegra/tegra_wm8962.c-84-\t\t\t\t\t\t machine-\u003emic_jack,\nsound/soc/tegra/tegra_wm8962.c:85:\t\t\t\t\t\t tegra_wm8962_mic_jack_pins,\nsound/soc/tegra/tegra_wm8962.c:86:\t\t\t\t\t\t ARRAY_SIZE(tegra_wm8962_mic_jack_pins));\nsound/soc/tegra/tegra_wm8962.c-87-\t\tif (err) {\n--\nsound/soc/tegra/tegra_wm8962.c-99-\nsound/soc/tegra/tegra_wm8962.c:100:static int tegra_wm8962_remove(struct snd_soc_card *card)\nsound/soc/tegra/tegra_wm8962.c-101-{\n--\nsound/soc/tegra/tegra_wm8962.c=112=SND_SOC_DAILINK_DEFS(wm8962_hifi,\n--\nsound/soc/tegra/tegra_wm8962.c-116-\nsound/soc/tegra/tegra_wm8962.c:117:static struct snd_soc_dai_link tegra_wm8962_dai = {\nsound/soc/tegra/tegra_wm8962.c-118-\t.name = \"WM8962\",\nsound/soc/tegra/tegra_wm8962.c-119-\t.stream_name = \"WM8962 PCM\",\nsound/soc/tegra/tegra_wm8962.c:120:\t.init = tegra_wm8962_init,\nsound/soc/tegra/tegra_wm8962.c-121-\t.dai_fmt = SND_SOC_DAIFMT_I2S |\n--\nsound/soc/tegra/tegra_wm8962.c-126-\nsound/soc/tegra/tegra_wm8962.c:127:static struct snd_soc_card snd_soc_tegra_wm8962 = {\nsound/soc/tegra/tegra_wm8962.c-128-\t.components = \"codec:wm8962\",\nsound/soc/tegra/tegra_wm8962.c-129-\t.owner = THIS_MODULE,\nsound/soc/tegra/tegra_wm8962.c:130:\t.dai_link = \u0026tegra_wm8962_dai,\nsound/soc/tegra/tegra_wm8962.c-131-\t.num_links = 1,\nsound/soc/tegra/tegra_wm8962.c:132:\t.remove = tegra_wm8962_remove,\nsound/soc/tegra/tegra_wm8962.c-133-\t.fully_routed = true,\n--\nsound/soc/tegra/tegra_wm8962.c-135-\nsound/soc/tegra/tegra_wm8962.c:136:static const struct tegra_asoc_data tegra_wm8962_data = {\nsound/soc/tegra/tegra_wm8962.c:137:\t.mclk_rate = tegra_wm8962_mclk_rate,\nsound/soc/tegra/tegra_wm8962.c:138:\t.card = \u0026snd_soc_tegra_wm8962,\nsound/soc/tegra/tegra_wm8962.c-139-\t.add_common_dapm_widgets = true,\n--\nsound/soc/tegra/tegra_wm8962.c-145-\nsound/soc/tegra/tegra_wm8962.c:146:static const struct of_device_id tegra_wm8962_of_match[] = {\nsound/soc/tegra/tegra_wm8962.c:147:\t{ .compatible = \"nvidia,tegra-audio-wm8962\", .data = \u0026tegra_wm8962_data },\nsound/soc/tegra/tegra_wm8962.c-148-\t{},\nsound/soc/tegra/tegra_wm8962.c-149-};\nsound/soc/tegra/tegra_wm8962.c:150:MODULE_DEVICE_TABLE(of, tegra_wm8962_of_match);\nsound/soc/tegra/tegra_wm8962.c-151-\nsound/soc/tegra/tegra_wm8962.c:152:static struct platform_driver tegra_wm8962_driver = {\nsound/soc/tegra/tegra_wm8962.c-153-\t.driver = {\nsound/soc/tegra/tegra_wm8962.c-154-\t\t.name = \"tegra-wm8962\",\nsound/soc/tegra/tegra_wm8962.c:155:\t\t.of_match_table = tegra_wm8962_of_match,\nsound/soc/tegra/tegra_wm8962.c-156-\t\t.pm = \u0026snd_soc_pm_ops,\n--\nsound/soc/tegra/tegra_wm8962.c-159-};\nsound/soc/tegra/tegra_wm8962.c:160:module_platform_driver(tegra_wm8962_driver);\nsound/soc/tegra/tegra_wm8962.c-161-\n"
}

25/2 2026/09/17 03:57 llm patch-evaluator-compressor
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Reply:
### 1. Approaches Tried and Results

- **Patch Inspection**:
  - Examined commit `9844cf00923bdb2e5d74cac16fb731ba0293f0f0` modifying `sound/soc/codecs/wm8962.c`.
  - Modified function: `wm8962_configure_bclk(struct snd_soc_component *component)`.
  - Change: Avoids unconditionally clearing `WM8962_SYSCLK_ENA` in `WM8962_CLOCKING2` when `bias_level != SND_SOC_BIAS_ON`. Reads register first; only clears if `!sysclk_was_ena`.
  - Patch notes explicitly state this fix targets boards like Tegra machine driver where `wm8962_mic_detect()` force-enables `SYSCLK`.

- **Driver Architecture & Bus Binding Investigation**:
  - Grepped `sound/soc/codecs/wm8962.c` for bus attachment and driver registration.
  - Driver is strictly an I2C client driver: `static struct i2c_driver wm8962_i2c_driver` registered via `module_i2c_driver(wm8962_i2c_driver)`.
  - Reviewed `wm8962_i2c_probe(struct i2c_client *i2c)`:
    - Queries regulator supplies (`devm_regulator_bulk_get`, `regulator_bulk_enable`) using 8 supply names (`wm8962_supply_names`).
    - Initializes regmap (`devm_regmap_init_i2c`).
    - Performs physical I2C read of `WM8962_SOFTWARE_RESET` register; explicitly enforces `reg == 0x6243`. Fails probe if read fails or ID != 0x6243.
    - Reads revision from `WM8962_RIGHT_INPUT_VOLUME`.
    - Issues software reset via I2C write (`wm8962_reset`).

- **Kconfig & Subsystem Dependencies**:
  - `sound/soc/codecs/Kconfig`:
    ```kconfig
    config SND_SOC_WM8962
        tristate "Wolfson Microelectronics WM8962 CODEC"
        depends on I2C && INPUT
    ```
  - Searched repository for all references to `CONFIG_SND_SOC_WM8962` / `SND_SOC_WM8962`:
    - Present in ARM defconfigs: `arch/arm/configs/imx_v6_v7_defconfig`, `arch/arm/configs/multi_v7_defconfig`, `arch/arm64/configs/defconfig`.
    - Machine driver selectors:
      - `sound/soc/samsung/Kconfig` (`CONFIG_SND_SOC_TOBERMORY` selects `SND_SOC_WM8962`)
      - `sound/soc/tegra/Kconfig` (`CONFIG_SND_SOC_TEGRA_WM8962` selects `SND_SOC_WM8962`)
    - No x86/amd64 machine driver binds or instantiates WM8962.

- **ASoC Card Reachability on amd64**:
  - Target architecture: `amd64`.
  - Codec driver alone (`soc_component_dev_wm8962`) does not instantiate sound cards or PCM stream devices (`snd_pcm`).
  - Requires an ASoC machine driver (linking CPU DAI and Codec DAI into `snd_soc_card`) and physical/emulated hardware or OF/DT description.
  - Neither QEMU standard virtual machines nor GCE provide emulated WM8962 hardware on an I2C bus, nor do standard amd64 setups instantiate ASoC platform/machine drivers for ARM SoC boards (Tegra / Tobermory / i.MX).

---

### 2. Current Hypotheses and Lines of Investigation

- **Hypothesis: Structurally Unreachable Hardware (`WorthFuzzing=false`)**:
  - The modified code is in `wm8962.c`, an embedded audio codec exclusively driven across I2C on specific embedded ARM platforms (Nvidia Tegra, Samsung Exynos/Tobermory, NXP i.MX).
  - Target architecture is `amd64`. Standard QEMU/GCE amd64 environments do not emulate the WM8962 I2C chip (which requires a hardware handshake returning chip ID `0x6243`), nor do they configure an ASoC machine card binding this codec.
  - Execution of `wm8962_configure_bclk()` requires an active PCM stream / DAPM event / bias transition on an initialized `snd_soc_card`, which cannot be probed or instantiated on amd64 virtual testbeds.
  - Per Section 2 of triage guidelines: "Structurally unreachable hardware... requiring physical ASIC/PCIe cards not emulated in standard QEMU" and "Code paths exclusive to architectures other than the target architecture".

---

### 3. Critical Files, Code Snippets, and Configuration

- **File**: `sound/soc/codecs/wm8962.c`
  - Patch diff:
    ```c
    @@ -2472,6 +2472,8 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)
        int clocking2 = 0;
        int clocking4 = 0;
        int aif2 = 0;
    +	int sysclk;
    +	bool sysclk_was_ena;
     
        if (!wm8962->sysclk_rate) {
            dev_dbg(component->dev, "No SYSCLK configured\n");
    @@ -2504,8 +2506,19 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)
        /* DSPCLK_DIV can be only generated correctly after enabling SYSCLK.
         * So we here provisionally enable it and then disable it afterward
         * if current bias_level hasn't reached SND_SOC_BIAS_ON.
    +	 *
    +	 * SYSCLK_ENA is owned by the "SYSCLK" DAPM supply widget, which may
    +	 * already have it set even below SND_SOC_BIAS_ON: wm8962_mic_detect()
    +	 * force-enables that pin, so on boards using it (the Tegra machine
    +	 * driver) the bit is set once at card init and DAPM never writes it
    +	 * again. If we unconditionally clear it here, SYSCLK stays off for
    +	 * every stream, DAPM still believes it is on, and the codec is
    +	 * silent with "DC servo timed out" errors. Only undo what we did.
         */
    -	if (snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON)
    +	sysclk = snd_soc_component_read(component, WM8962_CLOCKING2);
    +	sysclk_was_ena = sysclk >= 0 && (sysclk & WM8962_SYSCLK_ENA);
    +	if (!sysclk_was_ena &&
    +	    snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON)
            snd_soc_component_update_bits(component, WM8962_CLOCKING2,
                    WM8962_SYSCLK_ENA_MASK, WM8962_SYSCLK_ENA);
     
    @@ -2519,7 +2532,8 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)
        usleep_range(500, 1000);
        dspclk = snd_soc_component_read(component, WM8962_CLOCKING1);
     
    -	if (snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON)
    +	if (!sysclk_was_ena &&
    +	    snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON)
            snd_soc_component_update_bits(component, WM8962_CLOCKING2,
                    WM8962_SYSCLK_ENA_MASK, 0);
    ```

  - Chip ID verification in `wm8962_i2c_probe`:
    ```c
    ret = regmap_read(wm8962->regmap, WM8962_SOFTWARE_RESET, &reg);
    if (ret < 0) {
        dev_err(&i2c->dev, "Failed to read ID register\n");
        goto err_enable;
    }
    if (reg != 0x6243) {
        dev_err(&i2c->dev,
            "Device is not a WM8962, ID %x != 0x6243\n", reg);
        ret = -EINVAL;
        goto err_enable;
    }
    ```

- **File**: `sound/soc/codecs/Kconfig`
  - `CONFIG_SND_SOC_WM8962` (depends on `I2C && INPUT`)
- **Machine Driver Kconfigs**:
  - `CONFIG_SND_SOC_TEGRA_WM8962` (depends on Tegra architecture)
  - `CONFIG_SND_SOC_TOBERMORY` (depends on Samsung Exynos architecture)

---

### 4. Reasoning Loops and Repetitive Tool Calls

- **Noted Redundancy**: `grepper` with parameters `{"Expression":"wm8962","PathPrefix":"sound/soc/"}` was invoked twice back-to-back with identical results (both outputting 500 lines truncated).
- Avoid repeating broad greps across `sound/soc/`; all necessary details regarding bus type, probe requirements, architecture bindings, and callers of `wm8962_configure_bclk()` have already been established.

Tokens:
							input: 55419
							output: 2379
							thoughts: 2348
						

26/2 2026/09/17 03:58 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 25892
							output: 186
							thoughts: 1066
						

Thoughts:
**Analysis of the WM8962 Patch and Reachability**

Okay, let's break this down. The patch targets `sound/soc/codecs/wm8962.c`, specifically `wm8962_configure_bclk()`. The core change seems to conditionally enable or clear `WM8962_SYSCLK_ENA` based on a bias level check, but the crucial point is how reachable this is on our target, amd64.

First, I need to confirm what `wm8962` actually is. It's an ASoC codec driver for the Wolfson WM8962, communicated via I2C. The `wm8962_i2c_probe()` function immediately stands out. It checks for a specific register value (`0x6243`) which is a hardware ID. This confirms the requirement for actual WM8962 hardware. The driver also relies on regulators obtained via `devm_regulator_bulk_get` and needs an ASoC *machine driver* (like those for Tegra, i.MX, Exynos) to form a sound card.

Here's the problem. Standard QEMU/GCE environments on amd64 *do not* emulate this codec or the I2C device it needs. Even if we could somehow poke at I2C through `/dev/i2c-X` via `I2C_SLAVE`, `I2C_RDWR`, or `i2c_new_client_device`, the probe would fail. No physical or emulated WM8962 will respond with `0x6243`. Also, `wm8962_configure_bclk()` is called during `wm8962_set_bias_level()` and `wm8962_hw_params()` implying that a complete ASoC card with an active PCM device is also required.

This immediately triggers the "structurally unreachable hardware" negative criteria described in Section 2. The WM8962 is an embedded I2C audio codec primarily used with ARM-based systems. It requires physical I2C hardware and ASoC machine drivers, which are not present on amd64 in a typical QEMU or GCE setup. It's simply not possible to initialize or reach this code. The architecture mismatch is the key here.

Therefore, WorthFuzzing is definitely false. The hardware dependencies make this a non-starter.

Let's summarize this concisely:

*   **WorthFuzzing: false**
*   **EnableConfigs: \[ ]**
*   **FocusSymbols: \[ ]**
*   **Reasoning:** The modified code in `sound/soc/codecs/wm8962.c` is an ASoC codec driver for the Wolfson WM8962, an I2C audio chip. This chip is used on embedded ARM platforms (e.g. Nvidia Tegra, Freescale i.MX). This driver is structurally unreachable on the target architecture (amd64) because the hardware is not emulated in standard QEMU or GCE environments. The driver's probe function fails immediately on amd64 due to a lack of available hardware with an ID of `0x6243`. Furthermore, the code execution relies on an initialized ASoC card and PCM stream, which cannot be instantiated on amd64. Therefore, this code path is not worth fuzzing.

Okay, that's clear and concise. Ready to submit the results.



27/2 2026/09/17 03:58 tool set-results
0m Args:
{
  "EnableConfigs": [],
  "FocusSymbols": [],
  "Reasoning": "The patch modifies wm8962_configure_bclk() in sound/soc/codecs/wm8962.c, an ASoC codec driver for the Wolfson WM8962 audio chip over I2C. This codec is designed for embedded ARM platforms (such as Nvidia Tegra, NXP i.MX, and Samsung Exynos) and is structurally unreachable on the target architecture (amd64). Standard QEMU/GCE amd64 environments do not emulate the WM8962 hardware (whose probe strictly validates hardware ID 0x6243) nor do they instantiate an ASoC machine driver linking to this codec. Thus, the modified code cannot be executed or fuzzed.",
  "WorthFuzzing": false
}

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies wm8962_configure_bclk() in sound/soc/codecs/wm8962.c, an ASoC codec driver for the Wolfson WM8962 audio chip over I2C. This codec is designed for embedded ARM platforms (such as Nvidia Tegra, NXP i.MX, and Samsung Exynos) and is structurally unreachable on the target architecture (amd64). Standard QEMU/GCE amd64 environments do not emulate the WM8962 hardware (whose probe strictly validates hardware ID 0x6243) nor do they instantiate an ASoC machine driver linking to this codec. Thus, the modified code cannot be executed or fuzzed.",
  "WorthFuzzing": false
}

28/1 2026/09/17 03:58 action If
0m Args:
{
  "WorthFuzzing": false
}

Results:
null

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)