nRF5340 Audio DK headphone output

I've purchased a couple of nRF5340 Audio DKs for testing Auracast broadcast source/sink. Installed VS Code and have the sample apps built & flashed.

SOURCE: Sample app bap_broadast _source. Audio source is either line in from a phone headphone, or USB audio from PC.

SINK:Sample app bap_broadcast_sink using line out jack

Problem is I get no audio output. The sink is definitely connecting & receiving the stream according to the uart output:

Stream 0x20000f88 connected
Stream 0x20000f88 started
Enable: stream with codec 0x200079e8
Enabling LC3 decoder with frame duration 10000us, frequency 16000Hz and with channel allocation 0x00000002, 40 octets per frame and 1 frame blocks per SDU
Waiting for PA disconnected
Stream 0x20000f88: received 1000 total ISO packets: Valid 1000 | Error 0 | Loss 0
Stream 0x20000f88: received 2000 total ISO packets: Valid 2000 | Error 0 | Loss 0
Stream 0x20000f88: received 3000 total ISO packets: Valid 3000 | Error 0 | Loss 0
Stream 0x20000f88: received 4000 total ISO packets: Valid 4000 | Error 0 | Loss 0
Stream 0x20000f88: received 5000 total ISO packets: Valid 5000 | Error 0 | Loss 0
Stream 0x20000f88: received 6000 total ISO packets: Valid 6000 | Error 0 | Loss 0
Stream 0x20000f88: received 7000 total ISO packets: Valid 7000 | Error 0 | Loss 0
Stream 0x20000f88: received 8000 total ISO packets: Valid 8000 | Error 0 | Loss 0
Stream 0x20000f88: received 9000 total ISO packets: Valid 9000 | Error 0 | Loss 0
Stream 0x20000f88: received 10000 total ISO packets: Valid 10000 | Error 0 | Loss 0
Stream 0x20000f88: received 11000 total ISO packets: Valid 11000 | Error 0 | Loss 0
Stream 0x20000f88: received 12000 total ISO packets: Valid 12000 | Error 0 | Loss 0
Stream 0x20000f88: received 13000 total ISO packets: Valid 13000 | Error 0 | Loss 0
Stream 0x20000f88: received 14000 total ISO packets: Valid 14000 | Error 0 | Loss 0
Stream 0x20000f88: received 15000 total ISO packets: Valid 15000 | Error 0 | Loss 0
Stream 0x20000f88: received 16000 total ISO packets: Valid 16000 | Error 0 | Loss 0
Stream 0x20000f88: received 17000 total ISO packets: Valid 17000 | Error 0 | Loss 0
Stream 0x20000f88 disconnected with reason 0x08

(the disconnection is me powering off the source DK)

Is there a config change needed for headphone out?

Parents
  • Could you build with NCS v2.9.0 and provide the complete logs from the sink and source devices?

    Also, check the Testing flow. 

  • OK I am already using 2.9.0.

    The user interface mentioned in the testing link doesn't exist, Is that written for a different sample app?

    I'll start tomorrow with a fresh copy of the samples and capture logs.

    Which of the board configs is best? From memory there is a choice of nRF5340 Audio Dk Application CPU, Network CPU and Non-Secure.

    Thanks

    Nick

  • That doesn't really help me right now:

    Building and programming using the nRF Connect for VS Code extension is currently not supported.

    I don't really want to set up a whole new (sorry that should read old) toolchain just to prove a point. Even if does work, it's academic because I want to keep to VS Code. 

    Can you please look at the project that nRF Connect VS Code extension generated (it's zipped and attached above), and advise how to make it work? I don't care too much about the sink, just the broadcast source.

    At this stage I'm just trying to evaluate the system, starting with some basic power profile measurements as you can't/won't provide that info. Sadly it's turning into a painful experience :(

  • Although building and programming using the VS Code Extension is not supported, you still can use the script or command line to achieve that.

    To achieve your requirement with the nRF53 AudioDK, I think nRF5340 Audio: Broadcast source with CONFIG_AUDIO_SOURCE_I2S already can do that. 

  • Sorry, that's a fail:

    C:\ncs\v2.9.0\nrf\applications\nrf5340_audio\tools\buildprog>python buildprog.py -c app -b debug -d gateway
    +------------+----------+---------+--------------+---------------------+---------------------+
    |    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
    +------------+----------+---------+--------------+---------------------+---------------------+
    | 1050175789 |   True   | gateway | Not selected |       Selected      |     Not selected    |
    +------------+----------+---------+--------------+---------------------+---------------------+
    Invoking build step
    Run: west build C:\ncs\v2.9.0\nrf\applications\nrf5340_audio -b nrf5340_audio_dk/nrf5340/cpuapp --sysbuild -d C:\ncs\v2.9.0\nrf\applications\nrf5340_audio\build\dev_gateway\build_debug
    -- west build: generating a build system
    FATAL ERROR: CMake is not installed or cannot be found; cannot build.
    Traceback (most recent call last):
      File "C:\ncs\v2.9.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py", line 418, in <module>
        __main()
        ~~~~~~^^
      File "C:\ncs\v2.9.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py", line 401, in __main
        __build_module(build_cfg, options)
        ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
      File "C:\ncs\v2.9.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py", line 176, in __build_module
        raise Exception("cmake error: " + str(ret_val))
    Exception: cmake error: 1
    
    C:\ncs\v2.9.0\nrf\applications\nrf5340_audio\tools\buildprog>

    This is after uninstalling everything and reinstalling a fresh copy of everything. I can build a sample app in vs code, so that's working.

    Here is the output of Generate Support Information within vs code for what it's worth:

    // IMPORTANT: The following data can contain sensitive or confidential information about your environment.
    // If you do not want others to see this information, make sure to remove it before sharing the data.
    
    // For help and support, visit Nordic Semiconductor's DevZone at https://devzone.nordicsemi.com/.
    
    {
      "platform": {
        "os": "win32",
        "osVersion": "Windows 11 Pro",
        "osKernel": "10.0.26100",
        "vscode": "1.96.4",
        "electron": "32.2.6",
        "node": "v20.18.1"
      },
      "system": {
        "date": "2025-01-29T13:41:24.576Z",
        "vscodeRoot": "c:\\Users\\nick9\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "00:08:36",
        "osUptime": "01:01:07",
        "cpu": "13th Gen Intel(R) Core(TM) i9-13900T"
      },
      "workspace": {
        "name": "blinky",
        "workspaceFile": null,
        "folders": [
          "d:\\vscode\\blinky"
        ]
      },
      "sdks": [
        {
          "version": "v2.9.0",
          "path": "c:\\ncs\\v2.9.0"
        }
      ],
      "activeBuild": "d:\\vscode\\blinky\\build",
      "apps": [
        {
          "workspace": "d:\\vscode\\blinky",
          "uri": "d:\\vscode\\blinky",
          "buildConfigurations": [
            {
              "id": "d:\\vscode\\blinky\\build",
              "name": "build",
              "boardId": "nrf52dk/nrf52832",
              "type": "Sysbuild",
              "isChild": false,
              "isStale": false,
              "taskBindings": {
                "build": [],
                "pristineBuild": [],
                "flash": [],
                "eraseAndFlash": []
              },
              "sdk": "c:\\ncs\\v2.9.0",
              "toolchain": "nRF Connect SDK Toolchain v2.9.0"
            }
          ]
        }
      ],
      "toolchains": [
        {
          "version": "2.9.0",
          "path": "c:\\ncs\\toolchains\\b620d30767"
        }
      ],
      "connectedDevices": [
        {
          "serialNumber": "001050175789"
        }
      ],
      "tools": {
        "C:\\ncs\\toolchains\\b620d30767\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe": "0.17.0",
        "C:\\Program Files\\SEGGER\\JLink_V794i\\JLink.exe": "7.94i",
        "C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.24.2",
        "C:\\ncs\\toolchains\\b620d30767\\cmake": "3.21.0",
        "C:\\ncs\\toolchains\\b620d30767\\opt\\bin\\Scripts\\west.exe": "1.2.0",
        "C:\\ncs\\toolchains\\b620d30767\\opt\\bin\\python.exe": "3.12.4",
        "C:\\ncs\\toolchains\\b620d30767\\opt\\bin\\ninja.exe": "1.10.2",
        "C:\\ncs\\toolchains\\b620d30767\\opt\\bin\\gperf.exe": "3.1",
        "C:\\ncs\\toolchains\\b620d30767\\opt\\bin\\dtc.exe": "1.4.7",
        "C:\\ncs\\toolchains\\b620d30767\\opt\\bin\\gn.exe": "2202",
        "C:\\ncs\\toolchains\\b620d30767\\mingw64\\bin\\git.exe": "2.37.3.windows.1",
        "arm-gdbPath": "c:\\ncs\\toolchains\\b620d30767\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb.exe",
        "riscv-gdbPath": "C:\\ncs\\toolchains\\b620d30767\\opt\\zephyr-sdk\\riscv64-zephyr-elf\\bin\\riscv64-zephyr-elf-gdb.exe"
      },
      "nrfutil": {
        "nrfutil-device": {
          "version": "2.7.9",
          "binPath": "c:\\Users\\nick9\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2025.1.127-win32-x64\\platform\\nrfutil\\bin\\nrfutil-device",
          "jlinkInfo": {
            "name": "JlinkARM",
            "version": "JLink_V7.94i",
            "versionFormat": "string"
          }
        },
        "nrfutil-toolchain-manager": {
          "version": "0.14.4",
          "binPath": "c:\\Users\\nick9\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2025.1.127-win32-x64\\platform\\nrfutil\\bin\\nrfutil-toolchain-manager"
        }
      },
      "environment": {
        "westEnv": {
          "HOME": "C:\\Users\\nick9",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\nick9",
          "PATH": "C:\\ncs\\toolchains\\b620d30767;C:\\ncs\\toolchains\\b620d30767\\mingw64\\bin;C:\\ncs\\toolchains\\b620d30767\\bin;C:\\ncs\\toolchains\\b620d30767\\opt\\bin;C:\\ncs\\toolchains\\b620d30767\\opt\\bin\\Scripts;C:\\ncs\\toolchains\\b620d30767\\opt\\nanopb\\generator-bin;C:\\ncs\\toolchains\\b620d30767\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin;C:\\ncs\\toolchains\\b620d30767\\opt\\zephyr-sdk\\riscv64-zephyr-elf\\bin;c:\\Users\\nick9\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2025.1.127-win32-x64\\platform\\nrfutil\\lib\\nrfutil-toolchain-manager;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\VMware\\VMware Player\\bin\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\batch\\;C:\\Program Files\\7-Zip;C;C:\\Program Files\\Graphviz\\bin;C:\\Program Files\\Microchip\\xc8\\v2.36\\bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\Microchip\\xc8\\v2.46\\bin;C:\\Program Files\\Microchip\\xc-dsc\\v3.00\\bin;C:\\Program Files\\Microchip\\xc16\\v2.10\\bin;C:\\Program Files\\Microchip\\xc32\\v4.35\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;D:\\Python\\Scripts\\;D:\\Python\\;C:\\Users\\nick9\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\nick9\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\nick9\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
          "ZEPHYR_BASE": "c:\\ncs\\v2.9.0\\zephyr",
          "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
          "ZEPHYR_SDK_INSTALL_DIR": "C:\\ncs\\toolchains\\b620d30767\\opt\\zephyr-sdk",
          "PYTHONPATH": "C:\\ncs\\toolchains\\b620d30767\\opt\\bin;C:\\ncs\\toolchains\\b620d30767\\opt\\bin\\Lib;C:\\ncs\\toolchains\\b620d30767\\opt\\bin\\Lib\\site-packages"
        },
        "inherited": {
          "HOME": "C:\\Users\\nick9",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\nick9",
          "Path": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\VMware\\VMware Player\\bin\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\batch\\;C:\\Program Files\\7-Zip;C;C:\\Program Files\\Graphviz\\bin;C:\\Program Files\\Microchip\\xc8\\v2.36\\bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\Microchip\\xc8\\v2.46\\bin;C:\\Program Files\\Microchip\\xc-dsc\\v3.00\\bin;C:\\Program Files\\Microchip\\xc16\\v2.10\\bin;C:\\Program Files\\Microchip\\xc32\\v4.35\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;D:\\Python\\Scripts\\;D:\\Python\\;C:\\Users\\nick9\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\nick9\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\nick9\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
          "PATH": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\VMware\\VMware Player\\bin\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\batch\\;C:\\Program Files\\7-Zip;C;C:\\Program Files\\Graphviz\\bin;C:\\Program Files\\Microchip\\xc8\\v2.36\\bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\Microchip\\xc8\\v2.46\\bin;C:\\Program Files\\Microchip\\xc-dsc\\v3.00\\bin;C:\\Program Files\\Microchip\\xc16\\v2.10\\bin;C:\\Program Files\\Microchip\\xc32\\v4.35\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;D:\\Python\\Scripts\\;D:\\Python\\;C:\\Users\\nick9\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\nick9\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\nick9\\AppData\\Local\\Programs\\Microsoft VS Code\\bin"
        }
      },
      "terminal": {
        "defaultProfile": null
      },
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "",
          "toolchain": {
            "path": ""
          },
          "ozonePath": "",
          "applications": [],
          "applicationOptions": {},
          "kconfig": {
            "interface": "kconfig"
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "taskBindings": {},
          "buildTerminal": {
            "condensedProgress": true
          },
          "debugging": {
            "flash": true,
            "bindings": {},
            "justMyCode": false
          },
          "activeAppFollowActiveEditor": true,
          "flash": {
            "softreset": false,
            "erase": false,
            "recover": false
          },
          "enableTelemetry": false,
          "thirdpartyIntegration": {},
          "toolchainManager": {
            "indexURL": null,
            "installDirectory": null
          },
          "nrfutil": {
            "home": null
          },
          "defaultOpenAction": "ask",
          "terminalProfile": {
            "shell": null
          }
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character"
        }
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2025.1.127",
            "path": "c:\\Users\\nick9\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2025.1.127-win32-x64",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2024.9.14",
            "path": "c:\\Users\\nick9\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2024.9.14",
            "isActive": true
          },
          "nordic-semiconductor.nrf-devicetree": {
            "version": "2024.12.15",
            "path": "c:\\Users\\nick9\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2024.12.15",
            "isActive": true
          },
          "nordic-semiconductor.nrf-kconfig": {
            "version": "2024.12.13",
            "path": "c:\\Users\\nick9\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2024.12.13",
            "isActive": true
          }
        },
        "external": {
          "marus25.cortex-debug": null,
          "ms-vscode.cpptools": "1.23.5",
          "ms-vscode.js-debug": "1.96.0",
          "ms-vscode.js-debug-companion": "1.1.3",
          "ms-vscode.vscode-js-profile-table": "1.0.10",
          "ms-vscode.cpptools-extension-pack": "1.3.0",
          "ms-vscode.cpptools-themes": "2.0.0",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17"
        }
      }
    }
    
    

  • Nick_RA said:
    This is after uninstalling everything and reinstalling a fresh copy of everything. I can build a sample app in vs code, so that's working.

    Happy to hear it works. Slight smile

  • <sigh> You're selectively reading and/or completely missing the point. IT DOES NOT #*%%$@ WORK!!

    I meant reinstalling everything is working, because I can build a Blinky in VS Code. So cmake is OK in this context.

    What you quoted here is NOT working!!!

    Although building and programming using the VS Code Extension is not supported, you still can use the script or command line to achieve that.

    To achieve your requirement with the nRF53 AudioDK, I think nRF5340 Audio: Broadcast source with CONFIG_AUDIO_SOURCE_I2S already can do that.

Reply Children
Related