Hi,
FYI:
This stuff is almost working. The only problem is that the audio thread
is using a bit too small output buffer 10ms that the typical USB headset
will handle. Is there a way to enlarge the output audio buffer?
1574 100324 chrome 0.950986 RET read 4
1574 100324 chrome 0.950989 CALL fcntl(0xc1,F_GETFL,0x4)
1574 100324 chrome 0.950989 RET fcntl 2
1574 100324 chrome 0.950990 CALL fcntl(0xc1,F_SETFL,0x6<O_RDWR|O_NONBLOCK>)
1574 100324 chrome 0.950991 RET fcntl 0
1574 100324 chrome 0.950992 CALL write(0xc1,0x7fffde5f06ec,0x4)
1574 100324 chrome 0.950995 GIO fd 193 wrote 4 bytes
1574 100324 chrome 0.950996 RET write 4
1574 100324 chrome 0.950997 CALL fcntl(0xc1,F_SETFL,0x2<O_RDWR>)
1574 100324 chrome 0.951000 RET fcntl 0
1574 100324 chrome 0.951007 CALL write(0xc5,0x823c67000,0x780)
1574 100324 chrome 0.951011 GIO fd 197 wrote 1920 bytes
1574 100324 chrome 0.951013 RET write 1920/0x780
1574 100324 chrome 0.951020 CALL
_umtx_op(0x809ee2140,UMTX_OP_WAIT_UINT_PRIVATE,0,0x18,0x7fffde5f0be8)
1574 100324 chrome 0.970964 RET _umtx_op -1 errno 60 Operation timed out
1574 100324 chrome 0.970990 CALL poll(0x7fffde5f0618,0x1,0x14)
1574 100324 chrome 0.970992 RET poll 1
1574 100324 chrome 0.970993 CALL ioctl(0xc1,FIONREAD,0x7fffde5f05d4)
1574 100324 chrome 0.970995 RET ioctl 0
1574 100324 chrome 0.970996 CALL read(0xc1,0x7fffde5f06b4,0x4)
1574 100324 chrome 0.970998 GIO fd 193 read 4 bytes
I'm also thinking we may be able to fix this in the kernel, by fooling
devices with small writes to see an update in the TX ring when issuing
SNDCTL_DSP_GETOSPACE:
1574 100324 chrome 0.971046 CALL
ioctl(0xc5,SNDCTL_DSP_SETTRIGGER,0x7fffde5f08d4)
1574 100324 chrome 0.971049 RET ioctl 0
1574 100324 chrome 0.971051 CALL
ioctl(0xc5,SNDCTL_DSP_GETOSPACE,0x7fffde5f08e8)
1574 100324 chrome 0.971052 RET ioctl 0
1574 100324 chrome 0.971053 CALL
ioctl(0xc5,SNDCTL_DSP_GETOPTR,0x7fffde5f08d8)
1574 100324 chrome 0.971054 RET ioctl 0
1574 100324 chrome 0.971057 CALL
ioctl(0xc5,SNDCTL_DSP_GETOPTR,0x7fffde5f08f0)
1574 100324 chrome 0.971058 RET ioctl 0
1574 100324 chrome 0.971061 CALL
ioctl(0xc5,SNDCTL_DSP_GETOSPACE,0x7fffde5f08e0)
1574 100324 chrome 0.971078 RET ioctl 0
1574 100324 chrome 0.971085 CALL
_umtx_op(0x809ee2140,UMTX_OP_WAIT_UINT_PRIVATE,0,0x18,0x7fffde5f0be8)
1574 100324 chrome 0.976962 RET _umtx_op -1 errno 60 Operation timed out
1574 100324 chrome 0.976972 CALL
ioctl(0xc5,SNDCTL_DSP_GETOPTR,0x7fffde5f0800)
1574 100324 chrome 0.976975 RET ioctl 0
1574 100324 chrome 0.976976 CALL
ioctl(0xc5,SNDCTL_DSP_GETOSPACE,0x7fffde5f07f0)
1574 100324 chrome 0.976977 RET ioctl 0
1574 100324 chrome 0.976979 CALL
ioctl(0xc5,SNDCTL_DSP_GETOPTR,0x7fffde5f08f0)
1574 100324 chrome 0.976979 RET ioctl 0
1574 100324 chrome 0.976980 CALL
ioctl(0xc5,SNDCTL_DSP_GETOSPACE,0x7fffde5f08e0)
1574 100324 chrome 0.976981 RET ioctl 0
1574 100324 chrome 0.976985 CALL
_umtx_op(0x809ee2140,UMTX_OP_WAIT_UINT_PRIVATE,0,0x18,0x7fffde5f0be8)
1574 100324 chrome 0.982961 RET _umtx_op -1 errno 60 Operation timed out
1574 100324 chrome 0.982970 CALL
ioctl(0xc5,SNDCTL_DSP_GETOPTR,0x7fffde5f0800)
1574 100324 chrome 0.982971 RET ioctl 0
1574 100324 chrome 0.982974 CALL
ioctl(0xc5,SNDCTL_DSP_GETOPTR,0x7fffde5f08e0)
1574 100324 chrome 0.982975 RET ioctl 0
1574 100324 chrome 0.982976 CALL
ioctl(0xc5,SNDCTL_DSP_GETOSPACE,0x7fffde5f08d0)
1574 100324 chrome 0.982976 RET ioctl 0
1574 100324 chrome 0.982977 CALL
ioctl(0xc5,SNDCTL_DSP_GETOPTR,0x7fffde5f08d0)
1574 100324 chrome 0.982978 RET ioctl 0
1574 100324 chrome 0.982979 CALL
ioctl(0xc5,SNDCTL_DSP_GETOSPACE,0x7fffde5f08c0)
1574 100324 chrome 0.982980 RET ioctl 0
I've implemented something similar for virtual_oss (pkg install
virtual_oss) which might be worth a try:
virtual_oss -S \
-c 2 -r 48000 -b 16 -s 384 -f /dev/dsp3 \
-a 0 -b 16 -c 2 -m 0,0,1,1 -d dsp \
-t vdsp.ctl
--HPS
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-chromium
To unsubscribe, send any mail to "[email protected]"