Pisound and Yocto?

Hi! Does anyone know of a “simple” way to get the basic drivers functioning with Yocto? I am using the meta-raspberrypi with poky and the minimal image (the Pi will run with a custom, headless software and I want minimal other “bloat”). I’ll try to incorporate the driver myself but I am not a Yocto nor linux driver expert.

Sure, the Pisound’s kernel driver is included with the Raspberry Pi kernel, just make sure it is enabled in the kernel config you use:

SND_PISOUND=m

The source is here:

Thank you!
I have tried to get this to work, but as I said, I am not a yocto expert. Following some guides on internet I found the bitbake -c diffconfig virtual/kernel-command, and I found the pisound driver in there. But it was already selected as ‘module’ and I failed to get the build running correctly if I tried to make a recipe with the driver as built-in instead (however, for my purpose, built in is probably prefered if possible).
I made some other adjustments adding RPI_DT_OVERLAYS += "pisound" in hope that it would help, but it caused my RPI to crash on boot with the message being something along the line of “no working kernel init” (kernel panic).
Is there some guide that can help me understand how to do this properly? As I said, I am building the ‘core-image-minimal’ raspberry pi+poky image (running with latest origin/walnascar commit).

We haven’t built any images for Raspberry Pi and Pisound this way, but generally, the bitbake should follow the Raspberry Pi’s conventions of building the kernel where it builds the .dtb overlays, and produces the required file system layout under /boot/firmware/overlays/…

If Pisound was already enabled (as a module) in the config it used, it should be good to go. What happens when you try to boot the system?

The system boots up alright, but there is no sign of a kernel module with the name of pisound. And the command aplay -l only lists the HDMI outputs.

Check if you have the .dtb files in /boot/firmware/overlays/.

Also try running these commands:

Update the kernel dependency tree and show info about Pisound’s kernel module:

sudo depmod -av
modinfo snd_soc_pisound

Manually load the Pisound’s device tree (should happen automatically through HAT EEPROM I²C, but worth a try)

sudo dtoverlay pisound

Check the kernel log for any useful info:

dmesg | grep -i pisound

There is no boot/firmware/overlays, but there are a few .dtb-files directly under boot. And there is a /boot/overlays that contains several although neither of the places contain a pisound.dtb.

I have no sudo on this basic build, everything is sudo. But the results of each command are:
depmod -av gave

depmod: ERROR: could not open directory /lib/modules/6.6.63-v8-16k: No such file or directory
depmod: FATAL: could not search modules: No such file or directory

modinfo snd_soc_pisound gave

modinfo: ERROR: Module snd_soc_pisound not found.

dtoverlay pisound gave

sh: dtoverlay: command not found

and dmesg | grep -i pisound came back empty.

You should investigate this first, it sounds like the kernel modules did not get installed, or they are located under some unexpected path.

After some investigations, it seems that I needed to add: RPI_KERNEL_DEVICETREE_OVERLAYS += "overlays/pisound-pi5.dtbo" to my local.conf (or a layer). Now I see a pisound-pi5.dtbo inside the booted raspberry pi 5. But aplay -l now says no devices found at all.

// Robin

You should get your modules fixed too, if the OS can’t find snd_soc_pisound, it won’t work.

I added IMAGE_INSTALL:append = " kernel-modules" after trying to add just the correct module to no avail but now at least the module is loaded. I get information that the driver exists when calling modinfo snd_soc_pisound. But doing dmesg | grep -i pisound reveals that it has some odd problems with SPI init and aplay -l output still seems weird. It lists a device alright but with the name/tag card 0: pisound [pisound], device 0: PS-3NBDZWD snd-soc-dummy-dai-0 [PS-3NBDZWD snd-soc-dummy-dai-0]. And no input/output channel information.

Btw, thanks for all the help so far! :slight_smile:

Please upload the entire dmesg output.

Ok, here it is:

dmesg
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x414fd0b1]
[    0.000000] Linux version 6.6.63-v8-16k (oe-user@oe-host) (aarch64-poky-linux-gcc (GCC) 14.2.0, GNU ld (GNU Binutils) 2.43.1.20241111) #1 SMP PREEMPT Fri Dec  6 10:10:05 UTC 2024
[    0.000000] KASLR enabled
[    0.000000] random: crng init done
[    0.000000] Machine model: Raspberry Pi 5 Model B Rev 1.0
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000002000000, size 64 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0x0000000002000000..0x0000000005ffffff (65536 KiB) map reusable linux,cma
[    0.000000] OF: reserved mem: 0x0000000000000000..0x000000000007ffff (512 KiB) nomap non-reusable atf@0
[    0.000000] OF: reserved mem: 0x000000003fd16b20..0x000000003fd16b57 (0 KiB) nomap non-reusable nvram@0
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x00000000ffffffff]
[    0.000000] NUMA: NODE_DATA [mem 0xffd892c0-0xffd8bfff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x00000000ffffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000007ffff]
[    0.000000]   node   0: [mem 0x0000000000080000-0x000000003f7fffff]
[    0.000000]   node   0: [mem 0x0000000040000000-0x00000000ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000ffffffff]
[    0.000000] On node 0, zone DMA: 512 pages in unavailable ranges
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 14 pages/cpu s185192 r8192 d35992 u229376
[    0.000000] pcpu-alloc: s185192 r8192 d35992 u229376 alloc=14*16384
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: detected: Virtualization Host Extensions
[    0.000000] CPU features: detected: Hardware dirty bit management
[    0.000000] CPU features: detected: Spectre-v4
[    0.000000] CPU features: detected: Spectre-BHB
[    0.000000] CPU features: kernel page table isolation forced ON by KASLR
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: detected: SSBS not fully self-synchronizing
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe cgroup_disable=memory numa_policy=interleave bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1080 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 smsc95xx.macaddr=D8:3A:DD:EE:40:92 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait  net.ifnames=0
[    0.000000] cgroup: Disabling memory control group subsystem
[    0.000000] mempolicy: NUMA default policy overridden to 'interleave:0'
[    0.000000] Dentry cache hash table entries: 524288 (order: 8, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 7, 2097152 bytes, linear)
[    0.000000] Fallback order for Node 0: 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000] Policy zone: DMA
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 4068752K/4186112K available (14592K kernel code, 2270K rwdata, 4752K rodata, 2176K init, 1228K bss, 51824K reserved, 65536K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 46895 entries in 46 pages
[    0.000000] ftrace: allocated 46 pages with 4 groups
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[    0.000000] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[    0.000162] Console: colour dummy device 80x25
[    0.000166] printk: console [tty0] enabled
[    0.000361] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000)
[    0.000370] pid_max: default: 32768 minimum: 301
[    0.000397] LSM: initializing lsm=capability,integrity
[    0.000456] Mount-cache hash table entries: 8192 (order: 2, 65536 bytes, linear)
[    0.000471] Mountpoint-cache hash table entries: 8192 (order: 2, 65536 bytes, linear)
[    0.001099] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[    0.001135] RCU Tasks Rude: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[    0.001158] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[    0.001221] rcu: Hierarchical SRCU implementation.
[    0.001225] rcu:     Max phase no-delay instances is 1000.
[    0.001827] EFI services will not be available.
[    0.001907] smp: Bringing up secondary CPUs ...
[    0.002075] Detected PIPT I-cache on CPU1
[    0.002119] CPU1: Booted secondary processor 0x0000000100 [0x414fd0b1]
[    0.002308] Detected PIPT I-cache on CPU2
[    0.002340] CPU2: Booted secondary processor 0x0000000200 [0x414fd0b1]
[    0.002515] Detected PIPT I-cache on CPU3
[    0.002544] CPU3: Booted secondary processor 0x0000000300 [0x414fd0b1]
[    0.002574] smp: Brought up 1 node, 4 CPUs
[    0.002594] SMP: Total of 4 processors activated.
[    0.002598] CPU features: detected: 32-bit EL0 Support
[    0.002602] CPU features: detected: Data cache clean to the PoU not required for I/D coherence
[    0.002607] CPU features: detected: Common not Private translations
[    0.002611] CPU features: detected: CRC32 instructions
[    0.002615] CPU features: detected: RCpc load-acquire (LDAPR)
[    0.002619] CPU features: detected: LSE atomic instructions
[    0.002623] CPU features: detected: Privileged Access Never
[    0.002626] CPU features: detected: RAS Extension Support
[    0.002630] CPU features: detected: Speculative Store Bypassing Safe (SSBS)
[    0.002663] CPU: All CPU(s) started at EL2
[    0.002667] alternatives: applying system-wide alternatives
[    0.004503] devtmpfs: initialized
[    0.007607] Enabled cp15_barrier support
[    0.007617] Enabled setend support
[    0.007722] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.007732] futex hash table entries: 1024 (order: 2, 65536 bytes, linear)
[    0.007993] pinctrl core: initialized pinctrl subsystem
[    0.008125] DMI not present or invalid.
[    0.008299] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.008846] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[    0.008895] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.008946] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.008966] audit: initializing netlink subsys (disabled)
[    0.009016] audit: type=2000 audit(0.008:1): state=initialized audit_enabled=0 res=1
[    0.009160] thermal_sys: Registered thermal governor 'step_wise'
[    0.009172] cpuidle: using governor menu
[    0.009238] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.009269] ASID allocator initialised with 32768 entries
[    0.009571] Serial: AMBA PL011 UART driver
[    0.010432] bcm2835-mbox 107c013880.mailbox: mailbox enabled
[    0.010650] 107d001000.serial: ttyAMA10 at MMIO 0x107d001000 (irq = 15, base_baud = 0) is a PL011 rev2
[    0.010665] printk: console [ttyAMA10] enabled
[    0.782707] raspberrypi-firmware soc:firmware: Attached to firmware from 2024-07-30T14:25:46, variant start_cd
[    0.796758] raspberrypi-firmware soc:firmware: Firmware hash is 790da7ef00000000000000000000000000000000
[    0.812863] Modules: 2G module region forced by RANDOMIZE_MODULE_REGION_FULL
[    0.819947] Modules: 0 pages in range for non-PLT usage
[    0.819949] Modules: 129488 pages in range for PLT usage
[    0.829797] bcm2835-dma 1000010000.dma: DMA legacy API manager, dmachans=0x1
[    0.842840] iommu: Default domain type: Translated
[    0.847714] iommu: DMA domain TLB invalidation policy: strict mode
[    0.854014] SCSI subsystem initialized
[    0.857812] usbcore: registered new interface driver usbfs
[    0.863331] usbcore: registered new interface driver hub
[    0.868673] usbcore: registered new device driver usb
[    0.873841] pps_core: LinuxPPS API ver. 1 registered
[    0.878828] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.888005] PTP clock support registered
[    0.891982] Advanced Linux Sound Architecture Driver Initialized.
[    0.898324] vgaarb: loaded
[    0.901137] clocksource: Switched to clocksource arch_sys_counter
[    1.073504] VFS: Disk quotas dquot_6.6.0
[    1.077455] VFS: Dquot-cache hash table entries: 2048 (order 0, 16384 bytes)
[    1.084563] FS-Cache: Loaded
[    1.087492] CacheFiles: Loaded
[    1.092136] NET: Registered PF_INET protocol family
[    1.097127] IP idents hash table entries: 65536 (order: 5, 524288 bytes, linear)
[    1.105902] tcp_listen_portaddr_hash hash table entries: 2048 (order: 1, 32768 bytes, linear)
[    1.114498] Table-perturb hash table entries: 65536 (order: 4, 262144 bytes, linear)
[    1.122277] TCP established hash table entries: 32768 (order: 4, 262144 bytes, linear)
[    1.130361] TCP bind hash table entries: 32768 (order: 6, 1048576 bytes, linear)
[    1.138578] TCP: Hash tables configured (established 32768 bind 32768)
[    1.145259] MPTCP token hash table entries: 4096 (order: 2, 98304 bytes, linear)
[    1.152742] UDP hash table entries: 2048 (order: 2, 65536 bytes, linear)
[    1.159519] UDP-Lite hash table entries: 2048 (order: 2, 65536 bytes, linear)
[    1.166781] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    1.172584] RPC: Registered named UNIX socket transport module.
[    1.178530] RPC: Registered udp transport module.
[    1.183249] RPC: Registered tcp transport module.
[    1.187967] RPC: Registered tcp-with-tls transport module.
[    1.193487] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.199959] PCI: CLS 0 bytes, default 64
[    1.204048] kvm [1]: IPA Size Limit: 40 bits
[    1.208355] kvm [1]: GICV region size/alignment is unsafe, using trapping (reduced performance)
[    1.217114] kvm [1]: vgic interrupt IRQ9
[    1.221062] kvm [1]: VHE mode initialized successfully
[    1.226620] Initialise system trusted keyrings
[    1.231130] workingset: timestamp_bits=42 max_order=18 bucket_order=0
[    1.237610] zbud: loaded
[    1.240294] NFS: Registering the id_resolver key type
[    1.245370] Key type id_resolver registered
[    1.249566] Key type id_legacy registered
[    1.253591] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.260318] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    1.267777] F2FS not supported on PAGE_SIZE(16384) != 4096
[    1.273334] Key type asymmetric registered
[    1.277444] Asymmetric key parser 'x509' registered
[    1.282349] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    1.289805] io scheduler mq-deadline registered
[    1.294352] io scheduler kyber registered
[    1.298382] io scheduler bfq registered
[    1.302445] irq_brcmstb_l2: registered L2 intc (/soc/intc@7d503000, parent irq: 26)
[    1.310195] irq_brcmstb_l2: registered L2 intc (/soc/intc@7d508380, parent irq: 27)
[    1.317928] irq_brcmstb_l2: registered L2 intc (/soc/intc@7d508400, parent irq: 28)
[    1.325665] irq_brcmstb_l2: registered L2 intc (/soc/intc@7d517b00, parent irq: 29)
[    1.335554] bcm2708_fb soc:fb: FB found 1 display(s)
[    1.351005] Console: switching to colour frame buffer device 240x67
[    1.360846] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 1920x1080
[    1.403146] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    1.409850] 107d50c000.serial: ttyS0 at MMIO 0x107d50c000 (irq = 32, base_baud = 6000000) is a Broadcom BCM7271 UART
[    1.420488] serial serial0: tty port ttyS0 registered
[    1.425853] iproc-rng200 107d208000.rng: hwrng registered
[    1.431332] vc-mem: phys_addr:0x00000000 mem_base=0x3fc00000 mem_size:0x40000000(1024 MiB)
[    1.439863] bcm2712-iommu-cache 1000005b00.iommuc: bcm2712_iommu_cache_probe
[    1.449449] brd: module loaded
[    1.453900] loop: module loaded
[    1.457192] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    1.464585] Loading iSCSI transport class v2.0-870.
[    1.470363] usbcore: registered new device driver r8152-cfgselector
[    1.476674] usbcore: registered new interface driver r8152
[    1.482192] usbcore: registered new interface driver lan78xx
[    1.487883] usbcore: registered new interface driver smsc95xx
[    1.493709] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.499503] dwc_otg: FIQ enabled
[    1.499505] dwc_otg: NAK holdoff enabled
[    1.499506] dwc_otg: FIQ split-transaction FSM enabled
[    1.499509] Module dwc_common_port init
[    1.499625] usbcore: registered new interface driver uas
[    1.504971] usbcore: registered new interface driver usb-storage
[    1.511101] mousedev: PS/2 mouse device common for all mice
[    1.525176] rpi-rtc soc:rpi_rtc: registered as rtc0
[    1.531612] rpi-rtc soc:rpi_rtc: setting system clock to 1970-01-03T18:10:23 UTC (238223)
[    1.540215] bcm2835-wdt bcm2835-wdt: Poweroff handler already present!
[    1.546782] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.555626] sdhci: Secure Digital Host Controller Interface driver
[    1.561842] sdhci: Copyright(c) Pierre Ossman
[    1.566258] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.572066] ledtrig-cpu: registered to indicate activity on CPUs
[    1.578135] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[    1.584612] hid: raw HID events driver (C) Jiri Kosina
[    1.589786] usbcore: registered new interface driver usbhid
[    1.595381] usbhid: USB HID core driver
[    1.599443] hw perfevents: enabled with armv8_cortex_a76 PMU driver, 7 counters available
[    1.607980] NET: Registered PF_PACKET protocol family
[    1.613074] Key type dns_resolver registered
[    1.621158] registered taskstats version 1
[    1.625325] Loading compiled-in X.509 certificates
[    1.631899] Key type .fscrypt registered
[    1.636133] Key type fscrypt-provisioning registered
[    1.642111] brcm-pcie 1000120000.pcie: host bridge /axi/pcie@120000 ranges:
[    1.649437] brcm-pcie 1000120000.pcie:   No bus range found for /axi/pcie@120000, using [bus 00-ff]
[    1.658817] brcm-pcie 1000120000.pcie:      MEM 0x1f00000000..0x1ffffffffb -> 0x0000000000
[    1.667402] brcm-pcie 1000120000.pcie:      MEM 0x1c00000000..0x1effffffff -> 0x0400000000
[    1.675988] brcm-pcie 1000120000.pcie:   IB MEM 0x1f00000000..0x1f003fffff -> 0x0000000000
[    1.684568] brcm-pcie 1000120000.pcie:   IB MEM 0x0000000000..0x0fffffffff -> 0x1000000000
[    1.694309] brcm-pcie 1000120000.pcie: Forcing gen 2
[    1.699754] brcm-pcie 1000120000.pcie: PCI host bridge to bus 0000:00
[    1.706517] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.712311] pci_bus 0000:00: root bus resource [mem 0x1f00000000-0x1ffffffffb] (bus address [0x00000000-0xfffffffb])
[    1.723173] pci_bus 0000:00: root bus resource [mem 0x1c00000000-0x1effffffff pref] (bus address [0x400000000-0x6ffffffff])
[    1.734641] pci 0000:00:00.0: [14e4:2712] type 01 class 0x060400
[    1.740971] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.747346] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.861141] brcm-pcie 1000120000.pcie: link up, 5.0 GT/s PCIe x4 (!SSC)
[    1.868075] pci 0000:01:00.0: [1de4:0001] type 00 class 0x020000
[    1.874393] pci 0000:01:00.0: reg 0x10: [mem 0xffffc000-0xffffffff]
[    1.880963] pci 0000:01:00.0: reg 0x14: [mem 0xffc00000-0xffffffff]
[    1.887529] pci 0000:01:00.0: reg 0x18: [mem 0xffff0000-0xffffffff]
[    1.894146] pci 0000:01:00.0: supports D1
[    1.898432] pci 0000:01:00.0: PME# supported from D0 D1 D3hot D3cold
[    1.917154] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.924157] pci 0000:00:00.0: BAR 8: assigned [mem 0x1f00000000-0x1f005fffff]
[    1.931689] pci 0000:01:00.0: BAR 1: assigned [mem 0x1f00000000-0x1f003fffff]
[    1.939215] pci 0000:01:00.0: BAR 2: assigned [mem 0x1f00400000-0x1f0040ffff]
[    1.946680] pci 0000:01:00.0: BAR 0: assigned [mem 0x1f00410000-0x1f00413fff]
[    1.954133] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.959401] pci 0000:00:00.0:   bridge window [mem 0x1f00000000-0x1f005fffff]
[    1.966819] pci 0000:00:00.0: Max Payload Size set to  256/ 512 (was  128), Max Read Rq  512
[    1.975547] pci 0000:01:00.0: Max Payload Size set to  256/ 256 (was  128), Max Read Rq  512
[    1.984324] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    1.990713] pcieport 0000:00:00.0: PME: Signaling with IRQ 37
[    1.996777] pcieport 0000:00:00.0: AER: enabled with IRQ 37
[    2.002662] rp1 0000:01:00.0: bar0 len 0x4000, start 0x1f00410000, end 0x1f00413fff, flags, 0x40200
[    2.011991] rp1 0000:01:00.0: bar1 len 0x400000, start 0x1f00000000, end 0x1f003fffff, flags, 0x40200
[    2.021503] rp1 0000:01:00.0: enabling device (0000 -> 0002)
[    2.028065] rp1 0000:01:00.0: chip_id 0x20001927
[    2.037363] genirq: irq_chip rp1_irq_chip did not update eff. affinity mask of irq 99
[    2.063236] macb 1f00100000.ethernet eth0: Cadence GEM rev 0x00070109 at 0x1f00100000 irq 105 (d8:3a:dd:ee:40:92)
[    2.074638] dw_axi_dmac_platform 1f00188000.dma: DesignWare AXI DMA Controller, 8 channels
[    2.083467] xhci-hcd xhci-hcd.0: xHCI Host Controller
[    2.088866] xhci-hcd xhci-hcd.0: new USB bus registered, assigned bus number 1
[    2.096821] xhci-hcd xhci-hcd.0: hcc params 0x0240fe6d hci version 0x110 quirks 0x0000008000000810
[    2.106092] xhci-hcd xhci-hcd.0: irq 130, io mem 0x1f00200000
[    2.112182] xhci-hcd xhci-hcd.0: xHCI Host Controller
[    2.117513] xhci-hcd xhci-hcd.0: new USB bus registered, assigned bus number 2
[    2.125029] xhci-hcd xhci-hcd.0: Host supports USB 3.0 SuperSpeed
[    2.131440] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    2.140001] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.147517] usb usb1: Product: xHCI Host Controller
[    2.152671] usb usb1: Manufacturer: Linux 6.6.63-v8-16k xhci-hcd
[    2.158962] usb usb1: SerialNumber: xhci-hcd.0
[    2.163776] hub 1-0:1.0: USB hub found
[    2.167804] hub 1-0:1.0: 2 ports detected
[    2.172187] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.06
[    2.180745] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.188259] usb usb2: Product: xHCI Host Controller
[    2.193468] usb usb2: Manufacturer: Linux 6.6.63-v8-16k xhci-hcd
[    2.199753] usb usb2: SerialNumber: xhci-hcd.0
[    2.204556] hub 2-0:1.0: USB hub found
[    2.208583] hub 2-0:1.0: 1 port detected
[    2.213070] xhci-hcd xhci-hcd.1: xHCI Host Controller
[    2.218400] xhci-hcd xhci-hcd.1: new USB bus registered, assigned bus number 3
[    2.226437] xhci-hcd xhci-hcd.1: hcc params 0x0240fe6d hci version 0x110 quirks 0x0000008000000810
[    2.235701] xhci-hcd xhci-hcd.1: irq 135, io mem 0x1f00300000
[    2.241875] xhci-hcd xhci-hcd.1: xHCI Host Controller
[    2.247204] xhci-hcd xhci-hcd.1: new USB bus registered, assigned bus number 4
[    2.254716] xhci-hcd xhci-hcd.1: Host supports USB 3.0 SuperSpeed
[    2.261209] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    2.269771] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.277383] usb usb3: Product: xHCI Host Controller
[    2.282535] usb usb3: Manufacturer: Linux 6.6.63-v8-16k xhci-hcd
[    2.288824] usb usb3: SerialNumber: xhci-hcd.1
[    2.293713] hub 3-0:1.0: USB hub found
[    2.297738] hub 3-0:1.0: 2 ports detected
[    2.302094] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.06
[    2.310747] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.318273] usb usb4: Product: xHCI Host Controller
[    2.323420] usb usb4: Manufacturer: Linux 6.6.63-v8-16k xhci-hcd
[    2.329722] usb usb4: SerialNumber: xhci-hcd.1
[    2.334532] hub 4-0:1.0: USB hub found
[    2.338559] hub 4-0:1.0: 1 port detected
[    2.343307] bcm2712-iommu 1000005100.iommu: bcm2712_iommu_init: DEBUG_INFO = 0x20804774
[    2.351828] platform 1000800000.codec: bcm2712_iommu_probe_device: MMU 1000005100.iommu
[    2.360128] platform 1000800000.codec: bcm2712_iommu_device_group: MMU 1000005100.iommu
[    2.368424] platform 1000800000.codec: Adding to iommu group 0
[    2.374544] platform 1000880000.pisp_be: bcm2712_iommu_probe_device: MMU 1000005100.iommu
[    2.383020] platform 1000880000.pisp_be: bcm2712_iommu_device_group: MMU 1000005100.iommu
[    2.391498] platform 1000880000.pisp_be: Adding to iommu group 0
[    2.397810] platform 1000800000.codec: bcm2712_iommu_attach_dev: MMU 1000005100.iommu
[    2.405939] platform 1000880000.pisp_be: bcm2712_iommu_attach_dev: MMU 1000005100.iommu
[    2.414244] bcm2712-iommu 1000005100.iommu: bcm2712_iommu_probe: Success
[    2.421459] bcm2712-iommu 1000005200.iommu: bcm2712_iommu_init: DEBUG_INFO = 0x20804774
[    2.429978] bcm2712-iommu 1000005200.iommu: bcm2712_iommu_probe: Success
[    2.437299] bcm2712-iommu 1000005280.iommu: bcm2712_iommu_init: DEBUG_INFO = 0x20804774
[    2.445840] bcm2712-iommu 1000005280.iommu: bcm2712_iommu_probe: Success
[    2.453466] sdhci-brcmstb 1000fff000.mmc: Got CD GPIO
[    2.453629] mmc1: CQHCI version 5.10
[    2.458616] mmc0: CQHCI version 5.10
[    2.462365] of_cfs_init
[    2.469222] of_cfs_init: OK
[    2.507968] mmc0: SDHCI controller on 1000fff000.mmc [1000fff000.mmc] using ADMA 64-bit
[    2.565189] usb 3-2: new low-speed USB device number 2 using xhci-hcd
[    2.613527] mmc0: new ultra high speed SDR104 SDHC card at address aaaa
[    2.620609] mmcblk0: mmc0:aaaa SC16G 14.8 GiB
[    2.629342]  mmcblk0: p1 p2
[    2.632452] mmcblk0: mmc0:aaaa SC16G 14.8 GiB (quirks 0x00004000)
[    2.659671] mmc1: SDHCI controller on 1001100000.mmc [1001100000.mmc] using ADMA 64-bit
[    2.670886] clk: Disabling unused clocks
[    2.684926] ALSA device list:
[    2.688259]   No soundcards found.
[    2.692063] uart-pl011 107d001000.serial: no DMA platform data
[    2.700184] mmc1: new ultra high speed DDR50 SDIO card at address 0001
[    2.719603] EXT4-fs (mmcblk0p2): orphan cleanup on readonly fs
[    2.725921] EXT4-fs (mmcblk0p2): mounted filesystem 31387c28-7d85-4384-a577-1985fac760a6 ro with ordered data mode. Quota mode: none.
[    2.738296] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.747676] devtmpfs: mounted
[    2.752229] Freeing unused kernel memory: 2176K
[    2.757108] Run /sbin/init as init process
[    2.757312] usb 3-2: New USB device found, idVendor=046d, idProduct=c31c, bcdDevice=64.00
[    2.761216]   with arguments:
[    2.761217]     /sbin/init
[    2.761218]   with environment:
[    2.769425] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.769714]     HOME=/
[    2.770016] usb 3-2: Product: USB Keyboard
[    2.777176]     TERM=linux
[    2.781281] usb 3-2: Manufacturer: Logitech
[    3.023986] udevd[149]: starting version 3.2.14
[    3.050591] udevd[149]: GOTO 'alsa_restore_std' has no matching label in: '/lib/udev/rules.d/90-alsa-restore.rules'
[    3.061494] udevd[149]: GOTO 'alsa_restore_std' has no matching label in: '/lib/udev/rules.d/90-alsa-restore.rules'
[    3.075150] udevd[150]: starting eudev-3.2.14
[    3.122757] input: pwr_button as /devices/platform/pwr_button/input/input0
[    3.141244] rpi-gpiomem 107d508500.gpiomem: window base 0x107d508500 size 0x00000040
[    3.149609] rpi-gpiomem 107d508500.gpiomem: initialised 1 regions as /dev/gpiomem1
[    3.149720] mc: Linux media interface: v0.10
[    3.161609] rpi-gpiomem 107d517c00.gpiomem: window base 0x107d517c00 size 0x00000040
[    3.170887] rpi-gpiomem 107d517c00.gpiomem: initialised 1 regions as /dev/gpiomem2
[    3.179525] rpi-gpiomem 107d504100.gpiomem: window base 0x107d504100 size 0x00000020
[    3.189390] rpi-gpiomem 107d504100.gpiomem: initialised 1 regions as /dev/gpiomem3
[    3.198161] rpi-gpiomem 107d510700.gpiomem: window base 0x107d510700 size 0x00000020
[    3.206783] rpi-gpiomem 107d510700.gpiomem: initialised 1 regions as /dev/gpiomem4
[    3.214888] rpi-gpiomem 1f000d0000.gpiomem: window base 0x1f000d0000 size 0x00030000
[    3.223261] rpi-gpiomem 1f000d0000.gpiomem: initialised 1 regions as /dev/gpiomem0
[    3.224279] videodev: Linux video capture interface: v2.00
[    3.250527] pispbe 1000880000.pisp_be: bcm2712_iommu_of_xlate: MMU 1000005100.iommu
[    3.265915] rpivid_hevc: module is from the staging directory, the quality is unknown, you have been warned.
[    3.276442] pisound: Using SPI speed: 100000
[    3.281925] rpivid 1000800000.codec: bcm2712_iommu_of_xlate: MMU 1000005100.iommu
[    3.289701] input: Logitech USB Keyboard as /devices/platform/axi/1000120000.pcie/1f00300000.usb/xhci-hcd.1/usb3/3-2/3-2:1.0/0003:046D:C31C.0001/input/input1
[    3.289880] pisound: Searching for spi device...
[    3.309377] pisound:         Found!
[    3.311330] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    3.320502] rpivid 1000800000.codec: Device registered as /dev/video19
[    3.323940] pispbe 1000880000.pisp_be: Runtime PM usage count underflow!
[    3.334918] Loaded X.509 cert 'benh@debian.org: 577e021cb980e0e820821ba7b54b4961b8b4fadf'
[    3.344175] Loaded X.509 cert 'romain.perier@gmail.com: 3abbc6ec146e09d1b6016ab9d6cf71dd233f0328'
[    3.354031] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    3.360266] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[    3.368018] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    3.369945] Bluetooth: Core ver 2.22
[    3.377198] cfg80211: failed to load regulatory.db
[    3.380389] NET: Registered PF_BLUETOOTH protocol family
[    3.385362] pisound: Detected Pisound card:
[    3.391317] Bluetooth: HCI device and connection manager initialized
[    3.394623] pisound:         Serial:           PS-3NBDZWD
[    3.401103] Bluetooth: HCI socket layer initialized
[    3.405804] pisound:         Firmware Version: 1.03
[    3.405805] pisound:         Hardware Version: 1.2
[    3.405806] pisound:         Id:               1e931532443136353206212b
[    3.422264] brcmfmac: F1 signature read @0x18000000=0x15264345
[    3.426333] Bluetooth: L2CAP socket layer initialized
[    3.427819] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    3.431687] Bluetooth: SCO socket layer initialized
[    3.440342] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,5-model-b.bin failed with error -2
[    3.457602] usbcore: registered new interface driver brcmfmac
[    3.457654] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.bin failed with error -2
[    3.474633] Bluetooth: HCI UART driver ver 2.3
[    3.481346] Bluetooth: HCI UART protocol H4 registered
[    3.486827] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    3.493524] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator
[    3.500972] Bluetooth: HCI UART protocol Broadcom registered
[    3.501402] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator
[    3.515098] hid-generic 0003:046D:C31C.0001: input,hidraw0: USB HID v1.10 Keyboard [Logitech USB Keyboard] on usb-xhci-hcd.1-2/input0
[    3.669281] input: Logitech USB Keyboard Consumer Control as /devices/platform/axi/1000120000.pcie/1f00300000.usb/xhci-hcd.1/usb3/3-2/3-2:1.1/0003:046D:C31C.0002/input/input2
[    3.745215] input: Logitech USB Keyboard System Control as /devices/platform/axi/1000120000.pcie/1f00300000.usb/xhci-hcd.1/usb3/3-2/3-2:1.1/0003:046D:C31C.0002/input/input3
[    3.761101] hid-generic 0003:046D:C31C.0002: input,hidraw1: USB HID v1.10 Device [Logitech USB Keyboard] on usb-xhci-hcd.1-2/input1
[    3.841581] Bluetooth: hci0: BCM: chip id 107
[    3.846663] Bluetooth: hci0: BCM: features 0x2f
[    3.852850] Bluetooth: hci0: BCM4345C0
[    3.856955] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[    3.863264] Bluetooth: hci0: BCM: firmware Patch file not found, tried:
[    3.870251] Bluetooth: hci0: BCM: 'brcm/BCM4345C0.raspberrypi,5-model-b.hcd'
[    3.877670] Bluetooth: hci0: BCM: 'brcm/BCM4345C0.hcd'
[    3.883162] Bluetooth: hci0: BCM: 'brcm/BCM.raspberrypi,5-model-b.hcd'
[    3.890034] Bluetooth: hci0: BCM: 'brcm/BCM.hcd'
[    4.169144] rp1-firmware: probe of rp1_firmware failed with error -110
[    4.245500] EXT4-fs (mmcblk0p2): re-mounted 31387c28-7d85-4384-a577-1985fac760a6 r/w. Quota mode: none.
[    4.372683] macb 1f00100000.ethernet eth0: PHY [1f00100000.ethernet-ffffffff:01] driver [Broadcom BCM54213PE] (irq=POLL)
[    4.384074] macb 1f00100000.ethernet eth0: configuring for phy/rgmii-id link mode
[    4.395685] pps pps0: new PPS source ptp0
[    4.400093] macb 1f00100000.ethernet: gem-ptp-timer ptp clock registered.
[    4.477146] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[    7.466278] macb 1f00100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[    8.691663] NET: Registered PF_INET6 protocol family
[    8.697408] Segment Routing with IPv6
[    8.701436] In-situ OAM (IOAM) with IPv6
[   14.409357] platform 1f00178000.pio: deferred probe pending

The dmesg log you posted seems to be entirely alright and as expected.

The expected aplay, arecord and amidi outputs should look something like shown here:

https://blokas.io/pisound/docs/troubleshooting/#verify-that-pisound-is-detected

How did you test the audio?

Well this was embarrasing as I did not test the device after it finally was found. I just assumed something was wrong when it said “dummy”. Now I tested with a custom software and sound do get through, it’s just that the software has not been tested with a soundcard that has multiple allowed formats so there was a bug there that I need to fix. Hopefully it will come back alright. My plan is to have everything necessary to get the pisound up and running with yocto as a small layer here for future experimenters: doocman/meta-pisound · GitHub but it is empty now.
There is however one thing that seems weird: it seems that alsa only sees one input and one output channel (as opposed to the stereo configuration mentioned in the specifications). Any idea what could be the reason for this?

Also, I noticed that it has a 2.5Vpp max before clipping and that is a serious issue as I wanted to use it as my guitar effect pedal/amp+cab simulator. Maybe I’ll have to create some sort of buffer+volume-lowering circuit somewhere as well..

How do you check this? Did you test the card otherwise in stereo?

This is by design to accommodate ultrasonic frequencies when recording in 96kHz and 192kHz sampling rates, to get a better frequency response.

How do you check this? Did you test the card otherwise in stereo?

Calling snd_pcm_hw_params_get_channels from my software. It may be some odd setting in ALSA as well, but I made a very similar Yocto-build for RPi-4 and ran it with a Focusrite USB card and it worked completely as expected. Since I have the same asound-settings as at that time I expect any soundcard to also work as expected. I guess I could try to plug in that USB-card and see what happens now.

Just out of curiosity: calling snd_pcm_hw_params_get_format for pisound returns an error and it looks like the reason is that you support multiple formats for the samples. In Audio - Pisound Documentation it talks briefly about round-trip latency. Is any format “preferred” over another in terms of latency or will any conversions done pre-DAC/post-ADC be so fast that it is completely negiliable?

This is by design to accommodate ultrasonic frequencies when recording in 96kHz and 192kHz sampling rates, to get a better frequency response.

Ohh, I had missed that you actually do allow more signal from above 20kHz when using a higher order sample rate. Good to know, cause I will probably filter those out to get a little higher SNR (and yes, I need the 96kHz as I do a lot of distortion and frequency shaping so neither aliasing nor warping is something that I want.). Thanks for that! :slight_smile:

All formats have the same latency for Pisound, as it has to send 32 bit samples per channel over I²S anyway.

Thank you!

After some more investigations, I discovered that I was missing my asound.conf-file. Adding it with the fields

defaults.namehint.showall on
defaults.namehint.extended on

caused the HW version of pisound to appear that had the correct number of channels. I also noticed that the USB card that works flawlessly with my older Raspberry Pi 4 gave similar problems with the sound when used with the Raspberry Pi 5 that I am trying to setup with my pisound now. So there is a big chance that I should have everything needed to get the pisound working correctly per se, but that I have some bigger issue with either my Yocto OS or the Raspberry Pi itself.
Anyway, I think we can close-complete this thread. Thanks for all help. If new problems appear, I think it is more meaningful to open a new, more specialised thread for that.

Best regards, Robin.

1 Like

Good to hear you’re making progress. It would be great if you could share some notes on how you got Pisound working with Yocto in the end, in case anyone else attempts a similar project.