Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: thesofproject/linux
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: topic/sof-dev
Choose a base ref
...
head repository: lgirdwood/linux
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: topic/serial
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 13 files changed
  • 1 contributor

Commits on May 11, 2026

  1. sound: sof: add sof client driver for terminal.

    To be used for SOF shell and GDB. WIP.
    
    Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
    lrgirdwo committed May 11, 2026
    Configuration menu
    Copy the full SHA
    f9ca42c View commit details
    Browse the repository at this point in the history
  2. ASoC: SOF: serial: fix win_offset check to use <= 0

    The serial client driver stores the shell debug window slot offset as a
    signed ssize_t.  sof_client_ipc4_find_debug_slot_offset_by_type() returns
    0 when the slot is not found (not -1), so 'offset < 0' is the wrong test —
    a return of 0 silently bypasses the error path and causes a crash when the
    offset is later used in mailbox reads/writes.
    
    Fix all callers in sof-client-serial.c to use '<= 0'.
    
    Fixes: 2dedd18 ("sound: sof: add sof client driver for terminal.")
    Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
    lrgirdwo committed May 11, 2026
    Configuration menu
    Copy the full SHA
    de30f7a View commit details
    Browse the repository at this point in the history
  3. ASoC: SOF: add shell llext_load client driver for interactive module …

    …loading
    
    Implements the Linux host side of the 2-step DSP-shell-driven llext module
    load handshake introduced by the companion SOF firmware patch.
    
    New files:
      sound/soc/sof/shell-llext-shm.h — shared mailbox struct and state enum
        (binary layout must match zephyr/include/sof/shell_llext_load.h).
      sound/soc/sof/sof-client-llext-load.c — SOF auxiliary client driver that
        creates /sys/kernel/debug/sof/llext_load.  Writing a raw rimage binary
        to this file drives the complete host-side flow:
          1. Locate the ADSP_DW_SLOT_LLEXT_LOAD debug window slot populated by
             the DSP 'sof llext_load' shell command.
          2. Set state DMA_ACTIVE, copy the user buffer via vmalloc.
          3. Call snd_sof_ipc4_load_library_from_buf() → IPC4 LOAD_LIBRARY DMA.
          4. Write DMA_DONE (or ERROR + errno) back to the slot.
    
    Other changes:
      ipc4-loader.c / ipc4-priv.h — snd_sof_ipc4_load_library_from_buf(): in-
        memory variant of sof_ipc4_load_library(), exported as SND_SOC_SOF so
        the client module can call it.
      sof-client.h — declare sof_client_ipc4_load_library_buf() helper.
      sof-client.c — register/unregister the llext-load auxiliary client device
        (IPC4 only).
      include/sound/sof/ipc4/header.h — add SOF_IPC4_DEBUG_SLOT_LLEXT_LOAD.
      Kconfig — add SND_SOC_SOF_CLIENT_LLEXT_LOAD tristate; reorganise debug
        menu so the new option sits alongside the serial client.
      Makefile — wire up snd-sof-llext-load module.
      core.c — increase default IPC timeout 500 → 1500 ms to accommodate the
        longer HDA DMA transfer time for library binaries.
      intel/hda-loader.c — add lib_dmi_keepalive kthread: keeps the CPU in C0
        while sof_ipc_tx_message() sleeps, preventing DMI L1 entry which stalls
        the code-loader HDA stream on ACE (MTL/ARL-S).
      intel/hda-stream.c — add dev_info BDL trace for DMA buffer diagnostics.
    
    Usage:
      Step 1 (DSP shell):  sof llext_load mymodule 1
      Step 2 (Linux host): cat mymodule.ri > /sys/kernel/debug/sof/llext_load
    
    Requires CONFIG_SOF_SHELL_LLEXT_LOAD=y in the DSP firmware build.
    Requires matching Zephyr patch: intel/adsp: add ADSP_DW_SLOT_LLEXT_LOAD.
    
    Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
    lrgirdwo committed May 11, 2026
    Configuration menu
    Copy the full SHA
    37ccb6b View commit details
    Browse the repository at this point in the history
  4. ASoC: SOF: llext_load: fix single-shot write and add noop_llseek

    The sof_llext_dfs_write handler requires the complete library binary
    delivered in a single write() syscall (it returns -EINVAL if *ppos != 0
    on entry).  The 'cat' command splits files larger than ~16 KB into
    BUFSIZ-sized chunks, so the first chunk triggered a truncated IPC4
    LOAD_LIBRARY with only a partial payload, causing the DSP DMA to time
    out waiting for the remaining bytes.
    
    Two fixes:
    1. Add .llseek = noop_llseek to sof_llext_load_fops so that tools like
       'dd' that call lseek(SEEK_CUR) to determine the current position do
       not get ESPIPE and abort before writing anything.
    
    2. Improve the -EINVAL error message when a non-zero *ppos write is
       rejected to tell the user to use 'dd bs=<size> count=1' instead of
       'cat'.
    
    Users and scripts should write the module binary with:
      dd if=<module.ri> of=/sys/kernel/debug/sof/llext_load \
         bs=$(stat -c%s <module.ri>) count=1
    
    Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
    lrgirdwo committed May 11, 2026
    Configuration menu
    Copy the full SHA
    fe32a27 View commit details
    Browse the repository at this point in the history
Loading