matrix-io / matrixio-kernel-modules

MATRIX HAL in kernel space
22 stars 23 forks source link

V5.9 #53

Closed HinTak closed 3 years ago

HinTak commented 3 years ago

Apparently raspbian has just released a v5.10 kernel

ycardon commented 3 years ago

It does compile in v5.10 kernel, but I cannot get it to work. dmesg gives:

[    5.739305] matrixio_core: loading out-of-tree module taints kernel.
[    7.341841] matrixio-everloop: Failed to locate of_node [id: -1]
[    7.343242] matrixio-mic matrixio-mic: DMA mask not set
[    7.343501] matrixio-mic matrixio-mic: MATRIXIO mic array audio driver loaded (IRQ=199)
[    7.344429] matrixio-playback matrixio-playback: DMA mask not set
[    7.345218] matrixio-codec matrixio-codec: DMA mask not set
[    7.348068] matrixio-gpio matrixio-gpio: DMA mask not set
[    7.350292] matrixio-env matrixio-env: DMA mask not set
[    7.351412] matrixio-imu matrixio-imu: DMA mask not set
[    7.352136] matrixio-regmap: Failed to locate of_node [id: -1]
[    8.774781] matrixio-uart matrixio-uart: DMA mask not set

and using it with nodejs lib gives:

INFO: [/dev/matrixio_regmap] was opened
MATRIX device has not been detected
internal/modules/cjs/loader.js:1122
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: matrixio_bus not initialized!
Is MATRIX HAL installed?

Do you have the same ?

HinTak commented 3 years ago

Failed to locate of_node suggests the overlay isn't loaded properly...

LE0xUL commented 3 years ago

Hi Hintak . . . Have you tested the mics? . . . arecord recording.wav -f S16_LE -r 16000 -d 5 didn't work for me

mleglise commented 3 years ago

@HinTak moving our convo here to discuss this PR directly. Going to paste all the relevant output, just in case there's clues I'm not seeing.

Compiled with no errors or warnings. Then... sudo make install

make -C /lib/modules/5.10.11-v7l+/build M=/home/pi/src/matrixio-kernel-modules/src modules_install
make[1]: Entering directory '/usr/src/linux-headers-5.10.11-v7l+'
  INSTALL /home/pi/src/matrixio-kernel-modules/src/matrixio-codec.ko
  INSTALL /home/pi/src/matrixio-kernel-modules/src/matrixio-core.ko
  INSTALL /home/pi/src/matrixio-kernel-modules/src/matrixio-env.ko
  INSTALL /home/pi/src/matrixio-kernel-modules/src/matrixio-everloop.ko
  INSTALL /home/pi/src/matrixio-kernel-modules/src/matrixio-gpio.ko
  INSTALL /home/pi/src/matrixio-kernel-modules/src/matrixio-imu.ko
  INSTALL /home/pi/src/matrixio-kernel-modules/src/matrixio-mic.ko
  INSTALL /home/pi/src/matrixio-kernel-modules/src/matrixio-playback.ko
  INSTALL /home/pi/src/matrixio-kernel-modules/src/matrixio-regmap.ko
  INSTALL /home/pi/src/matrixio-kernel-modules/src/matrixio-uart.ko
  DEPMOD  5.10.11-v7l+
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/usr/src/linux-headers-5.10.11-v7l+'
depmod -A
cp matrixio.dtbo /boot/overlays

Confirmed matrixio.dtbo is present in /boot/overlays

/boot/config.txt

# SNIP - all lines above here are comments
# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
# Lines added by matrixlabs_edit_settings.py.
# Commented definitions of the settings might be above.
dtoverlay=spi0-cs,cs1_pin=12
dtparam=spi=on
enable_uart=1
start_x=1

# Added by me
dtoverlay=matrixio

dmesg (full output)

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.11-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1399 SMP Thu Jan 28 12:09:48 GMT 2021
[    0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B Rev 1.4
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x000000001ec00000, size 256 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000002fffffff]
[    0.000000]   Normal   empty
[    0.000000]   HighMem  [mem 0x0000000030000000-0x00000001ffffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000]   node   0: [mem 0x0000000040000000-0x00000000fbffffff]
[    0.000000]   node   0: [mem 0x0000000100000000-0x00000001ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000001ffffffff]
[    0.000000] On node 0 totalpages: 2061312
[    0.000000]   DMA zone: 2304 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 196608 pages, LIFO batch:63
[    0.000000]   HighMem zone: 1864704 pages, LIFO batch:63
[    0.000000] percpu: Embedded 20 pages/cpu s50636 r8192 d23092 u81920
[    0.000000] pcpu-alloc: s50636 r8192 d23092 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 2059008
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1  smsc95xx.macaddr=DC:A6:32:E9:02:FB vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  root=PARTUUID=443406e1-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash
[    0.000000] Kernel parameter elevator= does not have any effect anymore.
               Please use sysfs to set IO scheduler for individual devices.
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x0000000014c00000-0x0000000018c00000] (64MB)
[    0.000000] Memory: 7800092K/8245248K available (10240K kernel code, 1354K rwdata, 3152K rodata, 2048K init, 890K bss, 183012K reserved, 262144K cma-reserved, 7458816K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 33824 entries in 67 pages
[    0.000000] ftrace: allocated 67 pages with 3 groups
[    0.000000] rcu: Hierarchical RCU implementation.
[    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 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x3c8/0x59c with crng_init=0
[    0.000007] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000026] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000087] bcm2835: system timer (irq = 25)
[    0.000751] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[    0.000768] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[    0.000786] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[    0.000801] Switching to timer-based delay loop, resolution 18ns
[    0.001043] Console: colour dummy device 80x30
[    0.001107] printk: console [tty0] enabled
[    0.001161] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=540000)
[    0.001193] pid_max: default: 32768 minimum: 301
[    0.001358] LSM: Security Framework initializing
[    0.001538] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.001563] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.003105] Disabling memory control group subsystem
[    0.003221] CPU: Testing write buffer coherency: ok
[    0.003671] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.004864] Setting up static identity map for 0x200000 - 0x20003c
[    0.005058] rcu: Hierarchical SRCU implementation.
[    0.005966] smp: Bringing up secondary CPUs ...
[    0.007145] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.008489] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.009758] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.009916] smp: Brought up 1 node, 4 CPUs
[    0.009937] SMP: Total of 4 processors activated (432.00 BogoMIPS).
[    0.009952] CPU: All CPU(s) started in HYP mode.
[    0.009966] CPU: Virtualization extensions available.
[    0.010786] devtmpfs: initialized
[    0.024758] VFP support v0.3: implementor 41 architecture 3 part 40 variant 8 rev 0
[    0.024987] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.025017] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.031705] pinctrl core: initialized pinctrl subsystem
[    0.032734] NET: Registered protocol family 16
[    0.036428] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.037189] audit: initializing netlink subsys (disabled)
[    0.037475] audit: type=2000 audit(0.030:1): state=initialized audit_enabled=0 res=1
[    0.038019] thermal_sys: Registered thermal governor 'step_wise'
[    0.038690] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.038707] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.039092] Serial: AMBA PL011 UART driver
[    0.073653] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[    0.090854] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-01-27T22:20:57, variant start_x
[    0.100867] raspberrypi-firmware soc:firmware: Firmware hash is 99d9a48302e4553cff3688692bb7e9ac760a03fa
[    0.145075] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[    0.149231] vgaarb: loaded
[    0.149666] SCSI subsystem initialized
[    0.149904] usbcore: registered new interface driver usbfs
[    0.149963] usbcore: registered new interface driver hub
[    0.150036] usbcore: registered new device driver usb
[    0.150407] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.152572] clocksource: Switched to clocksource arch_sys_counter
[    1.179933] VFS: Disk quotas dquot_6.6.0
[    1.180035] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.180215] FS-Cache: Loaded
[    1.180387] CacheFiles: Loaded
[    1.189392] NET: Registered protocol family 2
[    1.190251] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    1.190305] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    1.190450] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    1.190517] TCP: Hash tables configured (established 8192 bind 8192)
[    1.190666] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.190701] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.190961] NET: Registered protocol family 1
[    1.191710] RPC: Registered named UNIX socket transport module.
[    1.191726] RPC: Registered udp transport module.
[    1.191741] RPC: Registered tcp transport module.
[    1.191756] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.191779] PCI: CLS 0 bytes, default 64
[    1.194680] Initialise system trusted keyrings
[    1.194937] workingset: timestamp_bits=14 max_order=21 bucket_order=7
[    1.203176] zbud: loaded
[    1.205121] FS-Cache: Netfs 'nfs' registered for caching
[    1.205875] NFS: Registering the id_resolver key type
[    1.205918] Key type id_resolver registered
[    1.205934] Key type id_legacy registered
[    1.206079] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.207062] Key type asymmetric registered
[    1.207078] Asymmetric key parser 'x509' registered
[    1.207271] bounce: pool size: 64 pages
[    1.207327] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    1.207536] io scheduler mq-deadline registered
[    1.207553] io scheduler kyber registered
[    1.211841] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    1.211872] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    1.211951] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[    1.212039] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x00bfffffff -> 0x0400000000
[    1.274682] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[    1.275040] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    1.275061] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.275082] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[    1.275171] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    1.275414] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.279002] PCI: bus0: Fast back to back transfers disabled
[    1.279338] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330
[    1.279464] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[    1.279897] pci 0000:01:00.0: PME# supported from D0 D3hot
[    1.283479] PCI: bus1: Fast back to back transfers disabled
[    1.283575] pci 0000:00:00.0: BAR 8: assigned [mem 0x600000000-0x6000fffff]
[    1.283599] pci 0000:01:00.0: BAR 0: assigned [mem 0x600000000-0x600000fff 64bit]
[    1.283683] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.283708] pci 0000:00:00.0:   bridge window [mem 0x600000000-0x6000fffff]
[    1.284112] pcieport 0000:00:00.0: enabling device (0140 -> 0142)
[    1.284349] pcieport 0000:00:00.0: PME: Signaling with IRQ 64
[    1.290167] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    1.291062] bcm2835-aux-uart fe215040.serial: there is not valid maps for state default
[    1.293524] iproc-rng200 fe104000.rng: hwrng registered
[    1.293832] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    1.294674] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000
[    1.307414] brd: module loaded
[    1.319275] loop: module loaded
[    1.320899] Loading iSCSI transport class v2.0-870.
[    1.323417] libphy: Fixed MDIO Bus: probed
[    1.324717] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[    1.342639] libphy: bcmgenet MII bus: probed
[    1.432719] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
[    1.433843] usbcore: registered new interface driver r8152
[    1.433911] usbcore: registered new interface driver lan78xx
[    1.433985] usbcore: registered new interface driver smsc95xx
[    1.481180] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.481217] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[    1.484416] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000030000000890
[    1.485715] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.485735] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.485752] usb usb1: Product: xHCI Host Controller
[    1.485769] usb usb1: Manufacturer: Linux 5.10.11-v7l+ xhci-hcd
[    1.485786] usb usb1: SerialNumber: 0000:01:00.0
[    1.486507] hub 1-0:1.0: USB hub found
[    1.486617] hub 1-0:1.0: 1 port detected
[    1.487264] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.487292] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    1.487318] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    1.487779] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
[    1.487798] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.487815] usb usb2: Product: xHCI Host Controller
[    1.487832] usb usb2: Manufacturer: Linux 5.10.11-v7l+ xhci-hcd
[    1.487848] usb usb2: SerialNumber: 0000:01:00.0
[    1.488545] hub 2-0:1.0: USB hub found
[    1.488616] hub 2-0:1.0: 4 ports detected
[    1.490296] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.490623] dwc_otg: FIQ enabled
[    1.490638] dwc_otg: NAK holdoff enabled
[    1.490652] dwc_otg: FIQ split-transaction FSM enabled
[    1.490670] Module dwc_common_port init
[    1.491110] usbcore: registered new interface driver uas
[    1.491229] usbcore: registered new interface driver usb-storage
[    1.491411] mousedev: PS/2 mouse device common for all mice
[    1.493144] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.496605] sdhci: Secure Digital Host Controller Interface driver
[    1.496621] sdhci: Copyright(c) Pierre Ossman
[    1.497342] mmc-bcm2835 fe300000.mmcnr: could not get clk, deferring probe
[    1.497970] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.500763] ledtrig-cpu: registered to indicate activity on CPUs
[    1.501087] hid: raw HID events driver (C) Jiri Kosina
[    1.501283] usbcore: registered new interface driver usbhid
[    1.501298] usbhid: USB HID core driver
[    1.506582] Initializing XFRM netlink socket
[    1.506623] NET: Registered protocol family 17
[    1.506744] Key type dns_resolver registered
[    1.507088] Registering SWP/SWPB emulation handler
[    1.507253] registered taskstats version 1
[    1.507283] Loading compiled-in X.509 certificates
[    1.508092] Key type ._fscrypt registered
[    1.508108] Key type .fscrypt registered
[    1.508124] Key type fscrypt-provisioning registered
[    1.519504] uart-pl011 fe201000.serial: there is not valid maps for state default
[    1.519811] uart-pl011 fe201000.serial: cts_event_workaround enabled
[    1.519899] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 36, base_baud = 0) is a PL011 rev2
[    1.526314] bcm2835-aux-uart fe215040.serial: there is not valid maps for state default
[    1.527131] fe215040.serial: ttyS0 at MMIO 0xfe215040 (irq = 38, base_baud = 62500000) is a 16550
[    1.528107] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    1.529180] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
[    1.529197] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
[    1.556275] of_cfs_init
[    1.556546] of_cfs_init: OK
[    1.575445] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    1.577107] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.578766] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.581735] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    1.583394] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.591671] mmc0: SDHCI controller on fe340000.emmc2 [fe340000.emmc2] using ADMA
[    1.592687] Waiting for root device PARTUUID=443406e1-02...
[    1.625189] random: fast init done
[    1.649521] mmc1: new high speed SDIO card at address 0001
[    1.694576] mmc0: new ultra high speed DDR50 SDXC card at address aaaa
[    1.695451] mmcblk0: mmc0:aaaa SF256 238 GiB
[    1.697702]  mmcblk0: p1 p2
[    1.747788] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.747860] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    1.748813] devtmpfs: mounted
[    1.757716] Freeing unused kernel memory: 2048K
[    1.782929] Run /sbin/init as init process
[    1.782943]   with arguments:
[    1.782958]     /sbin/init
[    1.782973]     splash
[    1.782987]   with environment:
[    1.783001]     HOME=/
[    1.783015]     TERM=linux
[    1.852619] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    2.035293] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
[    2.035314] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.035332] usb 1-1: Product: USB2.0 Hub
[    2.037257] hub 1-1:1.0: USB hub found
[    2.037544] hub 1-1:1.0: 4 ports detected
[    2.199458] systemd[1]: System time before build time, advancing clock.
[    2.309386] NET: Registered protocol family 10
[    2.310779] Segment Routing with IPv6
[    2.357652] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[    2.358408] systemd[1]: Detected architecture arm.
[    2.404478] systemd[1]: Set hostname to <raspberrypi>.
[    3.115295] random: systemd: uninitialized urandom read (16 bytes read)
[    3.126283] random: systemd: uninitialized urandom read (16 bytes read)
[    3.130597] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    3.130936] random: systemd: uninitialized urandom read (16 bytes read)
[    3.132998] systemd[1]: Created slice system-getty.slice.
[    3.133714] systemd[1]: Listening on udev Kernel Socket.
[    3.134656] systemd[1]: Listening on Journal Audit Socket.
[    3.135095] systemd[1]: Listening on initctl Compatibility Named Pipe.
[    3.137063] systemd[1]: Created slice User and Session Slice.
[    3.137202] systemd[1]: Reached target Slices.
[    3.341561] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    3.347066] bcm2835_audio bcm2835_audio: card created with 8 channels
[    3.368700] matrixio_core: loading out-of-tree module taints kernel.
[    3.505167] i2c /dev entries driver
[    3.521261] mc: Linux media interface: v0.10
[    3.547478] videodev: Linux video capture interface: v2.00
[    3.572336] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    3.574469] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    3.574493] [vc_sm_connected_init]: start
[    3.575031] [vc_sm_connected_init]: installed successfully
[    3.577901] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    3.583881] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    4.084836] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    4.187344] systemd-journald[120]: Received request to flush runtime journal from PID 1
[    4.939189] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Registers at 0xfeb00000 length 0x00010000
[    4.946311] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00001000
[    4.947008] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x00010000
[    4.948214] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x00010000
[    5.156325] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[    5.160228] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    5.173132] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[    5.181543] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[    5.181972] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[    5.182293] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[    5.182322] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    5.182346] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    5.182369] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    5.182391] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    5.189213] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[    5.215039] matrixio-everloop: Failed to locate of_node [id: -1]
[    5.226964] matrixio-mic matrixio-mic: DMA mask not set
[    5.227218] matrixio-mic matrixio-mic: MATRIXIO mic array audio driver loaded (IRQ=66)
[    5.228097] matrixio-playback matrixio-playback: DMA mask not set
[    5.229023] matrixio-codec matrixio-codec: DMA mask not set
[    5.234156] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    5.234201] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    5.247320] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    5.247364] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    5.252013] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    5.252056] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    5.265370] matrixio-gpio matrixio-gpio: DMA mask not set
[    5.288676] matrixio-env matrixio-env: DMA mask not set
[    5.290659] matrixio-imu matrixio-imu: DMA mask not set
[    5.291303] matrixio-regmap: Failed to locate of_node [id: -1]
[    5.407669] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    5.413912] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0
[    5.427978] [drm] No displays found. Consider forcing hotplug if HDMI is attached
[    5.428116] vc4-drm gpu: bound fe600000.firmwarekms (ops vc4_fkms_ops [vc4])
[    5.442810] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
[    5.518233] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    5.650108] brcmfmac: F1 signature read @0x18000000=0x15264345
[    5.663027] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    5.663510] usbcore: registered new interface driver brcmfmac
[    5.690486] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
[    5.928866] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    5.938213] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Jan  4 2021 19:56:29 version 7.45.229 (617f1f5 CY) FWID 01-2dbd9d2e
[    6.332458] matrixio-uart matrixio-uart: DMA mask not set
[    7.764254] random: crng init done
[    7.764274] random: 7 urandom warning(s) missed due to ratelimiting
[    7.793852] uart-pl011 fe201000.serial: no DMA platform data
[    7.830591] 8021q: 802.1Q VLAN Support v1.8
[    8.203754] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[    8.335881] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[    8.608485] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
[    8.608767] bcmgenet fd580000.ethernet eth0: Link is Down
[   11.162058] broken atomic modeset userspace detected, disabling atomic
[   11.660191] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[   11.662976] Bridge firewalling registered
[   11.902586] broken atomic modeset userspace detected, disabling atomic
[   12.704657] broken atomic modeset userspace detected, disabling atomic
[   12.792735] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   12.792767] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   13.322431] broken atomic modeset userspace detected, disabling atomic
[   14.214206] broken atomic modeset userspace detected, disabling atomic
[   14.522645] Bluetooth: Core ver 2.22
[   14.522703] NET: Registered protocol family 31
[   14.522710] Bluetooth: HCI device and connection manager initialized
[   14.522725] Bluetooth: HCI socket layer initialized
[   14.522741] Bluetooth: L2CAP socket layer initialized
[   14.522758] Bluetooth: SCO socket layer initialized
[   14.531134] Bluetooth: HCI UART driver ver 2.3
[   14.531144] Bluetooth: HCI UART protocol H4 registered
[   14.531195] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   14.531361] Bluetooth: HCI UART protocol Broadcom registered
[   14.667480] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   14.667489] Bluetooth: BNEP filters: protocol multicast
[   14.667503] Bluetooth: BNEP socket layer initialized
[   14.913727] broken atomic modeset userspace detected, disabling atomic
[   15.650101] broken atomic modeset userspace detected, disabling atomic
[   16.217394] broken atomic modeset userspace detected, disabling atomic
[   17.157080] broken atomic modeset userspace detected, disabling atomic
[   17.720657] broken atomic modeset userspace detected, disabling atomic

Then tried to actually capture from the microphone using Rhasspy directly to asound. dmesg

[ 3503.605931] matrixio-mic matrixio-mic: ASoC: error at snd_soc_pcm_component_hw_params on matrixio-mic: -22
eljuguetero commented 3 years ago

@HinTak I am very grateful for the effort, I want to do the merge but I have not achieved a successful record, I'm trying with kernel 5.10.11-v7l+

Recording command: arecord recording.wav -f S16_LE -r 16000 -d 5

dmesg error:

[ 1008.423563] matrixio-mic matrixio-mic: ASoC: error at snd_soc_pcm_component_hw_params on matrixio-mic: -22
[ 1008.424610] matrixio-mic matrixio-mic: ASoC: error at snd_soc_pcm_component_hw_params on matrixio-mic: -22
[ 1008.425694] matrixio-mic matrixio-mic: ASoC: error at snd_soc_pcm_component_hw_params on matrixio-mic: -22
[ 1008.426664] matrixio-mic matrixio-mic: ASoC: error at snd_soc_pcm_component_hw_params on matrixio-mic: -22
[ 1008.428698] matrixio-mic matrixio-mic: ASoC: error at snd_soc_pcm_component_hw_params on matrixio-mic: -22
[ 1008.429780] matrixio-mic matrixio-mic: ASoC: error at snd_soc_pcm_component_hw_params on matrixio-mic: -22

dmesg message before recording test:

[    3.814058] matrixio_core: loading out-of-tree module taints kernel.
[    5.633178] matrixio-everloop: Failed to locate of_node [id: -1]
[    5.641265] matrixio-mic matrixio-mic: DMA mask not set
[    5.641534] matrixio-mic matrixio-mic: MATRIXIO mic array audio driver loaded (IRQ=66)
[    5.642519] matrixio-playback matrixio-playback: DMA mask not set
[    5.651241] matrixio-codec matrixio-codec: DMA mask not set
[    5.660985] matrixio-gpio matrixio-gpio: DMA mask not set
[    5.668357] matrixio-env matrixio-env: DMA mask not set
[    5.669893] matrixio-imu matrixio-imu: DMA mask not set
[    5.671567] matrixio-regmap: Failed to locate of_node [id: -1]
[    6.674596] matrixio-uart matrixio-uart: DMA mask not set

Through some printk I was able to determine that the interruptions are not being attended.

@HinTak have you tried kernel 5.10?

HinTak commented 3 years ago

@eljuguetero the two of_node messages definitely looks bad - was it against in earlier kernels? Especially the regmap one.

mleglise commented 3 years ago

@HinTak are there any particular kernel versions you'd like us to try against to look for matrixio-regmap: Failed to locate of_node?

eljuguetero commented 3 years ago

@HinTak please test with this branch: https://github.com/matrix-io/matrixio-kernel-modules/tree/HinTak-v5.9