Hi,

> Next step would be to build a kernel with UAUDIO_DEBUG and see if the
> driver reports too many errors.

Below I send the kernel messages that I get during playing a song. I pasted the 
two cases: with default sndiod and with sndiod -z 4096.
After that there's the dmesg with UAUDIO_DEBUG.

Hope it might help.

Many thanks
Luca


=========================================
debug msgs with default sndio
=========================================
uaudio_set_params: rate 48000 -> 48000 (index 8)
uaudio_set_params: rate = 48000
uaudio_set_params: rate 48000 -> 48000 (index 8)
uaudio_set_params: rate = 48000
uaudio_req: type = 0xa1, req = 0x81, val = 0x201, index = 0x900, size = 2
uaudio_req: type = 0xa1, req = 0x81, val = 0x202, index = 0x900, size = 2
uaudio_req: type = 0xa1, req = 0x81, val = 0x100, index = 0x900, size = 1
uaudio_req: type = 0xa1, req = 0x81, val = 0x200, index = 0xa00, size = 2
uaudio_req: type = 0xa1, req = 0x81, val = 0x100, index = 0xa00, size = 1
uaudio_stream_open: play: blksz = 1920, rate = 48000, fps = 1000
uaudio_stream_open: spf = 0xf00000 in [0xef1000:0xf0f000]
uaudio_stream_open: nframes_max = 11, nframes_mask = 0, maxpkt = 196
uaudio_stream_open: safe_blksz = 2048, nxfers = 4
uaudio_req: type = 0x22, req = 0x1, val = 0x100, index = 0x1, size = 3
uaudio_stream_open: rec: blksz = 960, rate = 48000, fps = 1000
uaudio_stream_open: spf = 0xf00000 in [0xef1000:0xf0f000]
uaudio_stream_open: nframes_max = 11, nframes_mask = 0, maxpkt = 98
uaudio_stream_open: safe_blksz = 1024, nxfers = 4
uaudio_req: type = 0x22, req = 0x1, val = 0x100, index = 0x82, size = 3
uaudio_trigger: preparing
uaudio_trigger: starting
uaudio0: 3 null frames out of 11: incomplete record xfer
uaudio_pdata_intr: xfer status = 6
uaudio_pdata_intr: xfer status = 6
uaudio_pdata_intr: xfer status = 6
uaudio_pdata_intr: xfer status = 6
uaudio_rdata_intr: xfer status = 6
uaudio_rdata_intr: xfer status = 6
uaudio_rdata_intr: xfer status = 6
uaudio_rdata_intr: xfer status = 6
uaudio_set_params: rate 48000 -> 48000 (index 8)
uaudio_set_params: rate = 48000
uaudio_set_params: rate 48000 -> 48000 (index 8)
uaudio_set_params: rate = 48000
uaudio_req: type = 0xa1, req = 0x81, val = 0x201, index = 0x900, size = 2
uaudio_req: type = 0xa1, req = 0x81, val = 0x202, index = 0x900, size = 2
uaudio_req: type = 0xa1, req = 0x81, val = 0x100, index = 0x900, size = 1
uaudio_req: type = 0xa1, req = 0x81, val = 0x200, index = 0xa00, size = 2
uaudio_req: type = 0xa1, req = 0x81, val = 0x100, index = 0xa00, size = 1
uaudio_stream_open: play: blksz = 1920, rate = 48000, fps = 1000
uaudio_stream_open: spf = 0xf00000 in [0xef1000:0xf0f000]
uaudio_stream_open: nframes_max = 11, nframes_mask = 0, maxpkt = 196
uaudio_stream_open: safe_blksz = 2048, nxfers = 4
uaudio_req: type = 0x22, req = 0x1, val = 0x100, index = 0x1, size = 3
uaudio_stream_open: rec: blksz = 960, rate = 48000, fps = 1000
uaudio_stream_open: spf = 0xf00000 in [0xef1000:0xf0f000]
uaudio_stream_open: nframes_max = 11, nframes_mask = 0, maxpkt = 98
uaudio_stream_open: safe_blksz = 1024, nxfers = 4
uaudio_req: type = 0x22, req = 0x1, val = 0x100, index = 0x82, size = 3
uaudio_trigger: preparing
uaudio_trigger: starting
uaudio0: 3 null frames out of 11: incomplete record xfer
===================================================
no more msgs until Ctrl-C on the player, then this:
===================================================
uaudio_pdata_intr: xfer status = 6
uaudio_pdata_intr: xfer status = 6
uaudio_pdata_intr: xfer status = 6
uaudio_pdata_intr: xfer status = 6
uaudio_rdata_intr: xfer status = 6
uaudio_rdata_intr: xfer status = 6
uaudio_rdata_intr: xfer status = 6
uaudio_rdata_intr: xfer status = 6

=========================================
debug msgs with sndio -z 4096
=========================================
uaudio_set_params: rate 48000 -> 48000 (index 8)
uaudio_set_params: rate = 48000
uaudio_set_params: rate 48000 -> 48000 (index 8)
uaudio_set_params: rate = 48000
uaudio_req: type = 0xa1, req = 0x81, val = 0x201, index = 0x900, size = 2
uaudio_req: type = 0xa1, req = 0x81, val = 0x202, index = 0x900, size = 2
uaudio_req: type = 0xa1, req = 0x81, val = 0x100, index = 0x900, size = 1
uaudio_req: type = 0xa1, req = 0x81, val = 0x200, index = 0xa00, size = 2
uaudio_req: type = 0xa1, req = 0x81, val = 0x100, index = 0xa00, size = 1
uaudio_stream_open: play: blksz = 4080, rate = 48000, fps = 1000
uaudio_stream_open: spf = 0xf00000 in [0xef1000:0xf0f000]
uaudio_stream_open: nframes_max = 23, nframes_mask = 0, maxpkt = 196
uaudio_stream_open: safe_blksz = 4336, nxfers = 2
uaudio_req: type = 0x22, req = 0x1, val = 0x100, index = 0x1, size = 3
uaudio_stream_open: rec: blksz = 2040, rate = 48000, fps = 1000
uaudio_stream_open: spf = 0xf00000 in [0xef1000:0xf0f000]
uaudio_stream_open: nframes_max = 23, nframes_mask = 0, maxpkt = 98
uaudio_stream_open: safe_blksz = 2168, nxfers = 2
uaudio_req: type = 0x22, req = 0x1, val = 0x100, index = 0x82, size = 3
uaudio_trigger: preparing
uaudio_trigger: starting
uaudio0: 3 null frames out of 23: incomplete record xfer
uaudio_pdata_intr: xfer status = 6
uaudio_pdata_intr: xfer status = 6
uaudio_rdata_intr: xfer status = 6
uaudio_rdata_intr: xfer status = 6




==========================================
Dmesg with UAUDIO_DEBUG
==========================================
OpenBSD 6.9-current (GENERIC.MP) #0: Wed May 12 10:54:30 CEST 2021
   p...@noquiero.my.domain:/sys/arch/arm64/compile/GENERIC.MP
real mem  = 8418693120 (8028MB)
avail mem = 8127590400 (7751MB)
random: good seed from bootblocks
mainbus0 at root: Raspberry Pi 4 Model B Rev 1.4
psci0 at mainbus0: PSCI 1.1, SMCCC 1.2
cpu0 at mainbus0 mpidr 0: ARM Cortex-A72 r0p3
cpu0: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu0: 1024KB 64b/line 16-way L2 cache
cpu0: CRC32,ASID16
cpu1 at mainbus0 mpidr 1: ARM Cortex-A72 r0p3
cpu1: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu1: 1024KB 64b/line 16-way L2 cache
cpu1: CRC32,ASID16
cpu2 at mainbus0 mpidr 2: ARM Cortex-A72 r0p3
cpu2: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu2: 1024KB 64b/line 16-way L2 cache
cpu2: CRC32,ASID16
cpu3 at mainbus0 mpidr 3: ARM Cortex-A72 r0p3
cpu3: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu3: 1024KB 64b/line 16-way L2 cache
cpu3: CRC32,ASID16
efi0 at mainbus0: UEFI 2.7
efi0: https://github.com/pftf/RPi4 rev 0x10000
smbios0 at efi0: SMBIOS 3.3.0
smbios0: vendor https://github.com/pftf/RPi4 version "UEFI Firmware v1.26" date 
04/16/2021
smbios0: Raspberry Pi Foundation Raspberry Pi 4 Model B
apm0 at mainbus0
"system" at mainbus0 not configured
"axi" at mainbus0 not configured
simplebus0 at mainbus0: "soc"
bcmclock0 at simplebus0
bcmmbox0 at simplebus0
bcmgpio0 at simplebus0
bcmaux0 at simplebus0
ampintc0 at simplebus0 nirq 256, ncpu 4 ipi: 0, 1: "interrupt-controller"
bcmtmon0 at simplebus0
bcmdmac0 at simplebus0: DMA0 DMA2 DMA4 DMA5 DMA6 DMA7 DMA8 DMA9
"timer" at simplebus0 not configured
pluart0 at simplebus0: console
com0 at simplebus0: ns16550, no working fifo
"local_intc" at simplebus0 not configured
bcmdog0 at simplebus0
bcmirng0 at simplebus0
"firmware" at simplebus0 not configured
"power" at simplebus0 not configured
"mailbox" at simplebus0 not configured
sdhc0 at simplebus0
sdhc0: SDHC 3.0, 250 MHz base clock
sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed
"gpiomem" at simplebus0 not configured
"fb" at simplebus0 not configured
"vcsm" at simplebus0 not configured
"clocks" at mainbus0 not configured
"phy" at mainbus0 not configured
"clk-27M" at mainbus0 not configured
"clk-108M" at mainbus0 not configured
simplebus1 at mainbus0: "emmc2bus"
sdhc1 at simplebus1
sdhc1: SDHC 3.0, 100 MHz base clock
sdmmc1 at sdhc1: 8-bit, sd high-speed, mmc high-speed, ddr52, dma
"arm-pmu" at mainbus0 not configured
agtimer0 at mainbus0: 54000 kHz
simplebus2 at mainbus0: "scb"
bcmpcie0 at simplebus2
pci0 at bcmpcie0
ppb0 at pci0 dev 0 function 0 "Broadcom BCM2711" rev 0x10
pci1 at ppb0 bus 1
xhci0 at pci1 dev 0 function 0 "VIA VL805 xHCI" rev 0x01: intx, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "VIA xHCI root hub" rev 3.00/1.00 
addr 1
bse0 at simplebus2: address dc:a6:32:ed:1d:42
brgphy0 at bse0 phy 1: BCM54210E 10/100/1000baseT PHY, rev. 2
"dma" at simplebus2 not configured
"hevc-decoder" at simplebus2 not configured
"rpivid-local-intc" at simplebus2 not configured
"h264-decoder" at simplebus2 not configured
"vp9-decoder" at simplebus2 not configured
"leds" at mainbus0 not configured
"sd_io_1v8_reg" at mainbus0 not configured
"sd_vcc_reg" at mainbus0 not configured
"fixedregulator_3v3" at mainbus0 not configured
"fixedregulator_5v0" at mainbus0 not configured
simplebus3 at mainbus0: "v3dbus"
"bootloader" at mainbus0 not configured
dt: 443 probes
scsibus0 at sdmmc1: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SC64G, 0080> removable
sd0: 60906MB, 512 bytes/sector, 124735488 sectors
uhub1 at uhub0 port 1 configuration 1 interface 0 "VIA Labs USB2.0 Hub" rev 
2.10/4.21 addr 2
bwfm0 at sdmmc0 function 1
manufacturer 0x02d0, product 0xa9a6 at sdmmc0 function 2 not configured
manufacturer 0x02d0, product 0xa9a6 at sdmmc0 function 3 not configured
uaudio0 at uhub1 port 3 configuration 1 interface 1 "C-Media Electronics Inc. 
USB Audio Device" rev 1.10/1.00 addr 3
uaudio_process_ac: ifnum = 0, 235 bytes to processs
uaudio_process_header: version 0x100
01: in, nch = 2, term = 0x101, assoc = 0
02: in, nch = 1, term = 0x201, assoc = 0
13: feature id = 2, nch = 1, size = 1
       mute[-1]
uaudio_req: type = 0xa1, req = 0x82, val = 0x200, index = 0xd00, size = 2
uaudio_req: type = 0xa1, req = 0x83, val = 0x200, index = 0xd00, size = 2
uaudio_req: type = 0xa1, req = 0x84, val = 0x200, index = 0xd00, size = 2
[-5888:2048]/256 (7937 vals)
       level[-1]
15: mixer, nch = 2:
09: feature id = 15, nch = 2, size = 1
       mute[-1]
uaudio_req: type = 0xa1, req = 0x82, val = 0x201, index = 0x900, size = 2
uaudio_req: type = 0xa1, req = 0x83, val = 0x201, index = 0x900, size = 2
uaudio_req: type = 0xa1, req = 0x84, val = 0x201, index = 0x900, size = 2
[-9472:0]/256 (9473 vals)
       level[0]
uaudio_req: type = 0xa1, req = 0x82, val = 0x202, index = 0x900, size = 2
uaudio_req: type = 0xa1, req = 0x83, val = 0x202, index = 0x900, size = 2
uaudio_req: type = 0xa1, req = 0x84, val = 0x202, index = 0x900, size = 2
[-9472:0]/256 (9473 vals)
       level[1]
06: out, id = 9, nch = 2, term = 0x301, assoc = 0
10: feature id = 2, nch = 1, size = 1
       mute[-1]
uaudio_req: type = 0xa1, req = 0x82, val = 0x200, index = 0xa00, size = 2
uaudio_req: type = 0xa1, req = 0x83, val = 0x200, index = 0xa00, size = 2
uaudio_req: type = 0xa1, req = 0x84, val = 0x200, index = 0xa00, size = 2
[-3072:5888]/256 (8961 vals)
       level[-1]
       agc[-1]
08: selector, nch = 1
07: out, id = 8, nch = 1, term = 0x101, assoc = 0
uaudio0: units list:
10: feature <record>, src = 02 <input>, dst = 08 <record>, cls = 1
08: selector <record>:
08:     source 10 <record>:
07: output <record>, source = 08 <record>
02: input <input>, dest = 10 <record>
13: feature <output_input>, src = 02 <input>, dst = 15 <output>, cls = 1
01: input <dac>, dest = 15 <output>
15: mixer <output>:
15:     source 1 <dac>:
15:     source 13 <output_input>:
09: feature <output>, src = 15 <output>, dst = 06 <output>, cls = 0
06: output <output>, source = 09 <output>
uaudio0: mixer controls:
10:     record.agc
10:     record.level
10:     record.mute
13:     output_input.level
13:     output_input.mute
09:     output.level[0]
09:     output.level[1]
09:     output.mute
uaudio_process_conf: stop altnum 0
uaudio_process_as_ep: addr = 0x1, adapt/data, maxpktsz = 200, ival = 1
uaudio_process_conf: stop altnum 0
uaudio_process_as_ep: addr = 0x82, sync/data, maxpktsz = 100, ival = 1
uaudio_process_conf: skipped iface
00: <outputs>, next = -1, prev = -1, class = -1
01: <inputs>, next = -1, prev = -1, class = -1
uaudio_req: type = 0xa1, req = 0x81, val = 0x700, index = 0xa00, size = 1
02: <record_agc>, next = -1, prev = -1, class = 1, members: off(=0) on(=1), val 
= 1
uaudio_req: type = 0xa1, req = 0x81, val = 0x200, index = 0xa00, size = 2
03: <record>, next = -1, prev = -1, class = 1, nch = 1, delta = 1, val = 146
uaudio_req: type = 0xa1, req = 0x81, val = 0x100, index = 0xa00, size = 1
04: <record_mute>, next = -1, prev = -1, class = 1, members: off(=0) on(=1), 
val = 0
uaudio_req: type = 0xa1, req = 0x81, val = 0x200, index = 0xd00, size = 2
05: <output_input>, next = -1, prev = -1, class = 1, nch = 1, delta = 1, val = 
132
uaudio_req: type = 0xa1, req = 0x81, val = 0x100, index = 0xd00, size = 1
06: <output_input_mu>, next = -1, prev = -1, class = 1, members: off(=0) 
on(=1), val = 1
uaudio_req: type = 0xa1, req = 0x81, val = 0x201, index = 0x900, size = 2
uaudio_req: type = 0xa1, req = 0x81, val = 0x202, index = 0x900, size = 2
07: <output>, next = -1, prev = -1, class = 0, nch = 2, delta = 1, val = 186 186
uaudio_req: type = 0xa1, req = 0x81, val = 0x100, index = 0x900, size = 1
08: <output_mute>, next = -1, prev = -1, class = 0, members: off(=0) on(=1), 
val = 0
9 controls
alts:
mode = play, ifnum = 1, altnum = 1, addr = 0x1, maxpkt = 200, sync = 0x0, nch = 
2, fmt = s16le2, rates: 44100 48000
mode = rec, ifnum = 2, altnum = 1, addr = 0x82, maxpkt = 100, sync = 0x0, nch = 
1, fmt = s16le2, rates: 44100 48000
parameters:
pchan = 2, s16le2, rchan = 1, s16le2, rates: 44100 48000
uaudio0: class v1, full-speed, sync, channels: 2 play, 1 rec, 8 ctls
audio0 at uaudio0
uhidev0 at uhub1 port 3 configuration 1 interface 3 "C-Media Electronics Inc. 
USB Audio Device" rev 1.10/1.00 addr 3
uhidev0: iclass 3/0
uhid0 at uhidev0: input=4, output=4, feature=0
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on sd0a (33593fb538f83769.a) swap on sd0b dump on sd0b
WARNING: clock lost 25 days
WARNING: CHECK AND RESET THE DATE!
gpio0 at bcmgpio0: 58 pins
bwfm0: address dc:a6:32:ed:1d:43
WARNING: can't update clock chip time

Reply via email to