BUG: USB audio discontinuities with 'UHCI: implement new semantics for URB_ISO_ASAP'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Small buffer/period sizes on usb audio playback though UHCI works fine on v3.7 but causes audio discontinuities/delays on v3.8 and v3.9-rc7.

I've bisected the behavior down to

    c44b225077bb1fb25ed5cd5c4f226897b91bedd4
    'UHCI: implement new semantics for URB_ISO_ASAP'

Tested on two UHCI hosts and three usb-audio devices, all from different vendors.

Please CC me on replies.

$ speaker-test -t sine -c 2 -D hw:2,0 -p 3990 # Produces smooth sine wave

speaker-test 1.0.25

Playback device is hw:2,0
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 440.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 262144
Period size range from 48 to 131072
Requested period time 3990 us
Periods = 4
was set period_size = 192
was set buffer_size = 768
 0 - Front Left
 1 - Front Right
Time per period = 5.991993
 0 - Front Left
 1 - Front Right
Time per period = 5.999980
 0 - Front Left
 1 - Front Right
Time per period = 5.999983
 0 - Front Left
 1 - Front Right
Time per period = 5.999983
 0 - Front Left
^C

$ speaker-test -t sine -c 2 -D hw:2,0 -p 3980 # Produces discontinuous sine wave

speaker-test 1.0.25

Playback device is hw:2,0
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 440.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 262144
Period size range from 48 to 131072
Requested period time 3980 us
Periods = 4
was set period_size = 191
was set buffer_size = 764
 0 - Front Left
 1 - Front Right
Time per period = 6.016006
 0 - Front Left
 1 - Front Right
Time per period = 6.023981
 0 - Front Left
 1 - Front Right
Time per period = 6.023984
 0 - Front Left
 1 - Front Right
Time per period = 6.023983
 0 - Front Left
^C

$ speaker-test -t sine -c 2 -D hw:2,0 -p 2000 # much higher rate of discontinuities; note increased time per period

speaker-test 1.0.25

Playback device is hw:2,0
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 440.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 262144
Period size range from 48 to 131072
Requested period time 2000 us
Periods = 4
was set period_size = 96
was set buffer_size = 384
 0 - Front Left
 1 - Front Right
Time per period = 8.994562
 0 - Front Left
 1 - Front Right
Time per period = 8.999913
 0 - Front Left
 1 - Front Right
Time per period = 8.999918
 0 - Front Left
^C

jrayhawk@tubbablubba:~$ lsusb # both 10f5:0211 and 0d8c:0126 exhibit the problem
Bus 002 Device 002: ID 046d:c50b Logitech, Inc. Cordless Desktop Optical
Bus 002 Device 003: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
Bus 002 Device 004: ID 10f5:0211 Turtle Beach 
Bus 002 Device 005: ID 0d8c:0126 C-Media Electronics, Inc. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
jrayhawk@richardiv:~$ lsusb # 046d:0a19 exhibits the problem
Bus 002 Device 004: ID 0a5c:2145 Broadcom Corp. Bluetooth with Enhanced Data Rate II
Bus 002 Device 005: ID 08ff:2810 AuthenTec, Inc. AES2810
Bus 004 Device 003: ID 046d:0a19 Logitech, Inc. 
Bus 007 Device 004: ID 17ef:1008 Lenovo 
Bus 008 Device 002: ID 17ef:480c Lenovo Integrated Webcam
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

jrayhawk@tubbablubba:~$ lspci -nn | grep -i usb
00:02.0 USB controller [0c03]: NVIDIA Corporation MCP61 USB 1.1 Controller [10de:03f1] (rev a3)
00:02.1 USB controller [0c03]: NVIDIA Corporation MCP61 USB 2.0 Controller [10de:03f2] (rev a3)
jrayhawk@richardiv:~$ lspci -nn | grep -i usb
00:1a.0 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 [8086:2937] (rev 03)
00:1a.1 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 [8086:2938] (rev 03)
00:1a.2 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 [8086:2939] (rev 03)
00:1a.7 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 [8086:293c] (rev 03)
00:1d.0 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 [8086:2934] (rev 03)
00:1d.1 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 [8086:2935] (rev 03)
00:1d.2 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 [8086:2936] (rev 03)
00:1d.7 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 [8086:293a] (rev 03)

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux