On 2011/12/12 20:14, Alexandre Ratchov wrote:
> By default sndiod (aka aucat) uses 2940 frame blocks at 44.1kHz, iirc
> to please uaudio, but this is not required anymore. On the other hand,
> programs that use audio block rate for synchronization (ex. mplayer)
> need smaller blocks (ex. to get smooth video).
> 
> If you're using sndiod (or aucat, if you aren't followig current),
> could you try one of the following commands:
> 
>       sndiod -r 48000 -b 960 -z 480
>       sndiod -r 48000 -b 1920 -z 480
>       sndiod -r 48000 -b 1920 -z 960
>       sndiod -r 48000 -b 3480 -z 960
>       sndiod -r 48000 -b 7680 -z 1920
> 
> Start with the first command (the most precise) and do your usual
> stuff. If it works reliably (ie doesn't cause too much additional
> stuttering), drop me a mail with the dmesg and audio programs you
> used. If it's not reliable try the second line, if it's still not
> working either try the next one and so on.
> 
> I'm interested mostly in regressions (ie significant stuttering) this
> change may cause in a typical usage pattern.
> 
> Note that this may trigger hidden bugs in ports (also causing
> stuttering), this can be verified by quickly running:
> 
>       audioctl play.errors; sleep 5; audioctl play.errors
> 
> during the stuttering, if the counter stays constant, then the program
> might be missusing sndio and should fixed.

I'm currently running with -b 47040 to control skipping when I switch
tabs in a web browser on my desktop machine with at least mplayer (using
libao), vlc (SDL) and ffplay (I think using SDL). Any of your suggested
settings cause a fair bit more stuttering for me using these programs
and play.errors stays at 0 in these cases.

If I use mpg123 or aqualung (both of which have their own sndio backends)
there's very little stuttering even with -b 960 -z 480, I would consider it
pretty much acceptable (I typically don't get any stuttering except when the
machine is very busy, and in that case play.errors does increase).

dmesg|grep uaudio, audioctl, /var/run/dmesg.boot follow.


uaudio0 at uhub7 port 2 configuration 1 interface 0 "EDIROL UA-1EX" rev 
1.10/1.00 addr 3
uaudio0: audio rev 1.00, 0 mixer controls
audio0 at uaudio0
uaudio_chan_pintr: count(2304) != size(3072)
uaudio_chan_pintr: count(1536) != size(3072)
uaudio_chan_pintr: count(2496) != size(3072)
uaudio_chan_pintr: count(2688) != size(3072)
uaudio_chan_pintr: count(2496) != size(3072)
uaudio_chan_pintr: count(2880) != size(3072)
uaudio_chan_pintr: count(2688) != size(3072)
uaudio_chan_pintr: count(1536) != size(3072)
uaudio_chan_pintr: count(2496) != size(3072)
uaudio_chan_pintr: count(2112) != size(3072)
uaudio_chan_pintr: count(1536) != size(3072)
uaudio_chan_pintr: count(1536) != size(1920)


name=USB audio
version=
config=uaudio
encodings=slinear_le:16:2:1
properties=full_duplex,independent
full_duplex=1
fullduplex=1
blocksize=1920
hiwat=2
lowat=1
output_muted=0
monitor_gain=0
mode=play,record
play.rate=48000
play.sample_rate=48000
play.channels=2
play.precision=16
play.bps=2
play.msb=1
play.encoding=slinear_le
play.gain=127
play.balance=32
play.port=0x0
play.avail_ports=0x0
play.seek=3840
play.samples=12230400
play.eof=0
play.pause=0
play.error=1
play.waiting=0
play.open=1
play.active=1
play.buffer_size=65536
play.block_size=1920
play.errors=8160
record.rate=48000
record.sample_rate=48000
record.channels=2
record.precision=16
record.bps=2
record.msb=1
record.encoding=slinear_le
record.gain=127
record.balance=32
record.port=0x0
record.avail_ports=0x0
record.seek=0
record.samples=12230400
record.eof=0
record.pause=0
record.error=0
record.waiting=0
record.open=1
record.active=1
record.buffer_size=65536
record.block_size=1920
record.errors=0


OpenBSD 5.0-current (GENERIC.MP) #137: Sun Nov 20 16:36:55 MST 2011
    [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8453160960 (8061MB)
avail mem = 8214003712 (7833MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xdc010 (45 entries)
bios0: vendor HP version "O15" date 03/12/2009
bios0: HP ProLiant ML110 G5
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP SPMI EINJ HEST BERT SSDT ERST MCFG APIC BOOT SPCR SSDT 
SSDT SSDT
acpi0: wakeup devices USB4(S3) USB5(S3) USB7(S3) ESB2(S4) EXP1(S4) EXP2(S4) 
EXP3(S4) EXP4(S4) EXP5(S4) EXP6(S4) USB1(S3) USB2(S3) USB3(S3) USB6(S3) 
ESB1(S3) PCIB(S3) PWRB(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0 addr 0xf0000000, bus 0-16
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Pentium(R) Dual CPU E2160 @ 1.80GHz, 1795.73 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG
cpu0: 1MB 64b/line 4-way L2 cache
cpu0: apic clock running at 199MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Pentium(R) Dual CPU E2160 @ 1.80GHz, 1795.50 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG
cpu1: 1MB 64b/line 4-way L2 cache
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PEG1)
acpiprt2 at acpi0: bus -1 (PEG2)
acpiprt3 at acpi0: bus 5 (EXP1)
acpiprt4 at acpi0: bus -1 (EXP2)
acpiprt5 at acpi0: bus -1 (EXP3)
acpiprt6 at acpi0: bus -1 (EXP4)
acpiprt7 at acpi0: bus 13 (EXP5)
acpiprt8 at acpi0: bus 14 (EXP6)
acpiprt9 at acpi0: bus 17 (PCIB)
acpicpu0 at acpi0: C3, PSS
acpicpu1 at acpi0: C3, PSS
acpibtn0 at acpi0: PWRB
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 1795 MHz: speeds: 1800, 1200 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 3200/3210 Host" rev 0x01
ppb0 at pci0 dev 1 function 0 "Intel 3200/3210 PCIE" rev 0x01: msi
pci1 at ppb0 bus 1
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x02: apic 2 int 16
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x02: apic 2 int 17
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x02: apic 2 int 18
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x02: apic 2 int 18
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb1 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x02: msi
pci2 at ppb1 bus 5
em0 at pci2 dev 0 function 0 "Intel PRO/1000 PT (82572EI)" rev 0x06: msi, 
address 00:1b:21:2d:f7:0c
ppb2 at pci0 dev 28 function 4 "Intel 82801I PCIE" rev 0x02: msi
pci3 at ppb2 bus 13
"Matrox MGA G200e (ServerEngines)" rev 0x02 at pci3 dev 0 function 0 not 
configured
ppb3 at pci0 dev 28 function 5 "Intel 82801I PCIE" rev 0x02: msi
pci4 at ppb3 bus 14
bge0 at pci4 dev 0 function 0 "Broadcom BCM5722" rev 0x00, BCM5755 C0 (0xa200): 
apic 2 int 17, address 00:26:55:03:71:76
brgphy0 at bge0 phy 1: BCM5722 10/100/1000baseT PHY, rev. 0
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x02: apic 2 int 16
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x02: apic 2 int 17
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x02: apic 2 int 18
ehci1 at pci0 dev 29 function 7 "Intel 82801I USB" rev 0x02: apic 2 int 16
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0x92
pci5 at ppb4 bus 17
vga1 at pci5 dev 1 function 0 "ATI Radeon 9000" rev 0x01
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: couldn't map interrupt
pcib0 at pci0 dev 31 function 0 "Intel 82801IR LPC" rev 0x02
pciide0 at pci0 dev 31 function 2 "Intel 82801I SATA" rev 0x02: DMA, channel 0 
configured to native-PCI, channel 1 configured to native-PCI
pciide0: using apic 2 int 17 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: <ST9320320AS>
wd0: 16-sector PIO, LBA48, 305245MB, 625142448 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6
wd1 at pciide0 channel 1 drive 0: <GB0250C8045>
wd1: 16-sector PIO, LBA48, 238475MB, 488397168 sectors
wd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 6
ichiic0 at pci0 dev 31 function 3 "Intel 82801I SMBus" rev 0x02: apic 2 int 17
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM ECC PC2-6400CL5
spdmem1 at iic0 addr 0x51: 2GB DDR2 SDRAM ECC PC2-6400CL5
spdmem2 at iic0 addr 0x52: 2GB DDR2 SDRAM ECC PC2-6400CL5
spdmem3 at iic0 addr 0x53: 2GB DDR2 SDRAM ECC PC2-6400CL5
pciide1 at pci0 dev 31 function 5 "Intel 82801I SATA" rev 0x02: DMA, channel 0 
wired to native-PCI, channel 1 wired to native-PCI
pciide1: using apic 2 int 18 for native-PCI interrupt
atapiscsi0 at pciide1 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <HL-DT-ST, DVD-RAM GH15L, FA01> ATAPI 5/cdrom 
removable
cd0(pciide1:1:0): using PIO mode 4, Ultra-DMA mode 5
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb7 at uhci5: USB revision 1.0
uhub7 at usb7 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
mtrr: Pentium Pro MTRR support
uhub8 at uhub0 port 2 "Genesys Logic USB2.0 Hub" rev 2.00/77.64 addr 2
uhub9 at uhub8 port 3 "Chicony Generic USB Hub" rev 1.10/1.00 addr 3
uhidev0 at uhub9 port 1 configuration 1 interface 0 "Chicony PFU-65 USB 
Keyboard" rev 1.10/1.00 addr 4
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 modifier keys, 6 key codes
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhub10 at uhub8 port 4 "Genesys Logic USB2.0 Hub" rev 2.00/77.64 addr 5
uhidev1 at uhub3 port 2 configuration 1 interface 0 "Ten X Technology, Inc. 
TEMPer sensor" rev 1.10/1.50 addr 2
uhidev1: iclass 3/1
uthum0 at uhidev1
uhidev2 at uhub3 port 2 configuration 1 interface 1 "Ten X Technology, Inc. 
TEMPer sensor" rev 1.10/1.50 addr 2
uhidev2: iclass 3/0
uthum1 at uhidev2
uhidev3 at uhub5 port 2 configuration 1 interface 0 "ServerEngines SE USB 
Device" rev 1.10/0.01 addr 2
uhidev3: iclass 3/1
ukbd1 at uhidev3: 8 modifier keys, 6 key codes
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev4 at uhub5 port 2 configuration 1 interface 1 "ServerEngines SE USB 
Device" rev 1.10/0.01 addr 2
uhidev4: iclass 3/1
ums0 at uhidev4: 8 buttons, Z dir
wsmouse0 at ums0 mux 0
uhidev5 at uhub7 port 1 configuration 1 interface 0 "WACOM CTE-430-UV3.1-4" rev 
1.10/3.14 addr 2
uhidev5: iclass 3/1, 3 report ids
ums1 at uhidev5 reportid 1: 3 buttons, Z dir
wsmouse1 at ums1 mux 0
uhid0 at uhidev5 reportid 2: input=7, output=0, feature=2
uhid1 at uhidev5 reportid 3: input=0, output=0, feature=2
uaudio0 at uhub7 port 2 configuration 1 interface 0 "EDIROL UA-1EX" rev 
1.10/1.00 addr 3
uaudio0: audio rev 1.00, 0 mixer controls
audio0 at uaudio0
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on wd0a swap on wd0b dump on wd0b

Reply via email to