Alsa-devel
Threads by month
- ----- 2024 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2024
- 67 participants
- 184 discussions
usb:gadget:f_uac2: RFC: allowing multiple altsetttings for channel/samplesize combinations
by Pavel Hofman 02 May '24
by Pavel Hofman 02 May '24
02 May '24
Hi,
I am considering implementation of multiple altsettings to f_uac2, so
that multiple combinations of channels and samplesizes can be offered to
the host.
Configuration:
--------------
* each altsetting for each direction should define
* channel mask
* samplesize
* hs_bint bInterval
* c_sync type (for capture only)
Perhaps the easiest config would be allowing lists for the existing
parameters (like the multiple samplerates were implemented). All the
list params would have to have the same number of items - initial check.
First values in the list would apply to altsetting 1, second to
altsetting 2 etc.
Or the altsetting could be some structured configfs param - please is
there any recommended standard for structured configfs params?
Should the config also adjust the list of allowed samplerates for each
altsetting? Technically it makes sense as higher number of channels can
decrease the max samplerate, e.g. for via a TDM interface. If so, it
would need either the structured configuration or some "list of lists"
format.
Implementation:
---------------
Parameters could be turned to arrays of fixed predefined sizes, like the
p/s_srates. E.g. 5 max. altsettings in each direction would consume only
4 * (5-1) + 3* (5-1) = 28 extra ints (excluding the samplerates config).
Currently all descriptor structs are statically pre-allocated as there
are only two hard-coded altsettings. IMO the descriptors specific for
each altsetting could be allocated dynamically in a loop over all
none-zero alsettings.
Please may I ask UAC2 gadget "stakeholders" for comments, suggestions,
recommendations, so that my eventual initial version was in some
generally acceptable direction?
Thanks a lot,
Pavel.
4
7
Hi!
I recently acquired a ASRock N100DC-ITX mainboard with the goal to run
some audio processing on it. After some tuning I got the board to behave
nicely with e.g. cyclictest giving worst case latencies around 10 us
with a recent -rt kernel. So the system shoudl be well equipped to run
small period sizes.
I have two USB audio class 2.0 audio interfaces here.
1. Focusrite 2i2 2nd gen
2. Tascam iXR
Both these interfaces work fine on other systems, so I guess they are
not the problem. And I used at least the Tascam with period sizes of
e.g. 64 and 32 frames and 2 periods without problems (the 0.125 ms
microframe resolution is good enough when it comes to the resulting jitter).
But on this new system I cannot get either of the two interfaces to run
with even 64 frames, 2 periods reliably. I tried jackd1, jack2, and the
alsa_loopback program from Fons' libzita-alsa-pcmi. The system is well
tuned with xhci IRQs at prio 90, jackd/alsa_loopback at prio 80 and all
other kernel irq threads at prio 50.
For 64 frames 2 periods 48000 samplerate
$ LD_LIBRARY_PATH=../source/ ./alsa_loopback hw:USB hw:USB 48000 64 2
I get:
May 02 12:37:35 ogfx100 kernel: retire_capture_urb: 1090 callbacks
suppressed
in the kernel log (every 5 seconds with the number of callbacks in the
same ballpark) and alsa_loopback complaining:
Error: pcm_wait returned 0.
For 48 frames 2 periods 48000 samplerate (which should actually work
better since the period boundaries should fall onto usb frame boundaries.)
LD_LIBRARY_PATH=../source/ ./alsa_loopback hw:USB hw:USB 48000 48 2
I get:
May 02 12:39:58 ogfx100 kernel: xhci_hcd 0000:00:14.0: WARN Event TRB
for slot 4 ep 1 with no TDs queued?
over and over in the kernel log and alsa_loopback again complaining as
above.
On the other hand 48 frames, 3 periods works great! I measure jitter
with jack_wakeup in an otherwise empty jack-graph:
[fps@ogfx100:~]$ ./src/jack_wakeup/jack_wakeup
min: 0.92522 ms; mean: 0.999884ms; max: 1.07727 ms
64 frames, 3 periods works ok-ish:
[fps@ogfx100:~]$ ./src/jack_wakeup/jack_wakeup
min: 0.938189 ms; mean: 1.33265ms; max: 1.59372 ms
with 3 to 4 times the jitter I would expect giving the 0.125 ms
microframe length of USB 2. Here I would expect output more like
min: 1.25... ms; mean: 1.33265ms; max: 1.5... ms
or
min: 1.25... ms; mean: 1.33265ms; max: 1.375... ms
I suspect that this is not a problem of the snd_usb_audio driver from
ALSA but rather a problem with the XHCI in this board, since the
combination of cards and snd_usb_audio driver work well on other
systems. But maybe you have some insight or suggestions for me to try
before reporting to LKML..
Looking forward to your replies and
kind regards,
FPS
P.S.: [fps@ogfx100:~]$ uname -a
Linux ogfx100 6.6.25-rt29 #1-NixOS SMP PREEMPT_RT Thu Apr 4 18:23:07
UTC 2024 x86_64 GNU/Linux
I have tried with many other kernels though -rt and non-rt. That did not
change much IIRC. I am
P.P.S.: Find below the output of lspci -v, lspci -t, lsusb -v, cat
/proc/cpuinfo
[fps@ogfx100:~]$ lspci -v
00:00.0 Host bridge: Intel Corporation Device 461c
Subsystem: ASRock Incorporation Device 461c
Flags: bus master, fast devsel, latency 0
Capabilities: <access denied>
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-N [UHD
Graphics] (prog-if 00 [VGA controller])
Subsystem: ASRock Incorporation Device 46d1
Flags: bus master, fast devsel, latency 0, IRQ 134
Memory at 6000000000 (64-bit, non-prefetchable) [size=16M]
Memory at 4000000000 (64-bit, prefetchable) [size=256M]
I/O ports at 4000 [size=64]
Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: i915
Kernel modules: i915
00:0d.0 USB controller: Intel Corporation Device 464e (prog-if 30 [XHCI])
Flags: medium devsel, IRQ 129
Memory at 6001110000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci
00:14.0 USB controller: Intel Corporation Device 54ed (prog-if 30 [XHCI])
Subsystem: ASRock Incorporation Device 54ed
Flags: bus master, medium devsel, latency 0, IRQ 131
Memory at 6001100000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci
00:14.2 RAM memory: Intel Corporation Device 54ef
Flags: fast devsel
Memory at 6001124000 (64-bit, non-prefetchable) [disabled]
[size=16K]
Memory at 600112a000 (64-bit, non-prefetchable) [disabled]
[size=4K]
Capabilities: <access denied>
00:16.0 Communication controller: Intel Corporation Device 54e0
Subsystem: ASRock Incorporation Device 54e0
Flags: bus master, fast devsel, latency 0, IRQ 132
Memory at 6001129000 (64-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>
Kernel driver in use: mei_me
Kernel modules: mei_me
00:17.0 SATA controller: Intel Corporation Device 54d3 (prog-if 01 [AHCI
1.0])
Subsystem: ASRock Incorporation Device 54d3
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 130
Memory at 80a00000 (32-bit, non-prefetchable) [size=8K]
Memory at 80a03000 (32-bit, non-prefetchable) [size=256]
I/O ports at 4090 [size=8]
I/O ports at 4080 [size=4]
I/O ports at 4060 [size=32]
Memory at 80a02000 (32-bit, non-prefetchable) [size=2K]
Capabilities: <access denied>
Kernel driver in use: ahci
Kernel modules: ahci
00:1c.0 PCI bridge: Intel Corporation Device 54be (prog-if 00 [Normal
decode])
Subsystem: ASRock Incorporation Device 54be
Flags: bus master, fast devsel, latency 0, IRQ 122
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 3000-3fff [size=4K] [16-bit]
Memory behind bridge: 80900000-809fffff [size=1M] [32-bit]
Prefetchable memory behind bridge: [disabled] [64-bit]
Capabilities: <access denied>
Kernel driver in use: pcieport
00:1d.0 PCI bridge: Intel Corporation Device 54b0 (prog-if 00 [Normal
decode])
Subsystem: ASRock Incorporation Device 54b0
Flags: bus master, fast devsel, latency 0, IRQ 123
Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
I/O behind bridge: [disabled] [16-bit]
Memory behind bridge: 80800000-808fffff [size=1M] [32-bit]
Prefetchable memory behind bridge: [disabled] [64-bit]
Capabilities: <access denied>
Kernel driver in use: pcieport
00:1f.0 ISA bridge: Intel Corporation Device 5481
Subsystem: ASRock Incorporation Device 5481
Flags: bus master, fast devsel, latency 0
00:1f.3 Audio device: Intel Corporation Device 54c8
Subsystem: ASRock Incorporation Device 3897
Flags: bus master, fast devsel, latency 32, IRQ 135
Memory at 6001120000 (64-bit, non-prefetchable) [size=16K]
Memory at 6001000000 (64-bit, non-prefetchable) [size=1M]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel, snd_sof_pci_intel_tgl
00:1f.4 SMBus: Intel Corporation Device 54a3
Subsystem: ASRock Incorporation Device 54a3
Flags: medium devsel, IRQ 16
Memory at 6001128000 (64-bit, non-prefetchable) [size=256]
I/O ports at efa0 [size=32]
Kernel driver in use: i801_smbus
Kernel modules: i2c_i801
00:1f.5 Serial bus controller: Intel Corporation Device 54a4
Subsystem: ASRock Incorporation Device 54a4
Flags: fast devsel
Memory at 80a04000 (32-bit, non-prefetchable) [size=4K]
Kernel driver in use: intel-spi
Kernel modules: spi_intel_pci
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
Subsystem: ASRock Incorporation Motherboard (one of many)
Flags: bus master, fast devsel, latency 0, IRQ 18
I/O ports at 3000 [size=256]
Memory at 80904000 (64-bit, non-prefetchable) [size=4K]
Memory at 80900000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: r8169
Kernel modules: r8169
02:00.0 Non-Volatile memory controller: Kingston Technology Company,
Inc. Device 5017 (rev 03) (prog-if 02 [NVM Express])
Subsystem: Kingston Technology Company, Inc. Device 5017
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at 80800000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: nvme
Kernel modules: nvme
[fps@ogfx100:~]$ lspci -t
-[0000:00]-+-00.0
+-02.0
+-0d.0
+-14.0
+-14.2
+-16.0
+-17.0
+-1c.0-[01]----00.0
+-1d.0-[02]----00.0
+-1f.0
+-1f.3
+-1f.4
\-1f.5
[fps@ogfx100:~]$ sudo lsusb -v
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 [unknown]
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 6.06
iManufacturer 3 Linux 6.6.25-rt29 xhci-hcd
iProduct 2 xHCI Host Controller
iSerial 1 0000:00:0d.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0019
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 [unknown]
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 1
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
TT think time 8 FS bits
bPwrOn2PwrGood 10 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Device Status: 0x0001
Self Powered
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.10
bDeviceClass 9 Hub
bDeviceSubClass 0 [unknown]
bDeviceProtocol 3
bMaxPacketSize0 9
idVendor 0x1d6b Linux Foundation
idProduct 0x0003 3.0 root hub
bcdDevice 6.06
iManufacturer 3 Linux 6.6.25-rt29 xhci-hcd
iProduct 2 xHCI Host Controller
iSerial 1 0000:00:0d.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x001f
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 [unknown]
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
bMaxBurst 0
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x003b
bNumDeviceCaps 2
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x02
Latency Tolerance Messages (LTM) Supported
wSpeedsSupported 0x0008
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 1
Lowest fully-functional device speed is Full Speed (12Mbps)
bU1DevExitLat 0 micro seconds
bU2DevExitLat 400 micro seconds
SuperSpeedPlus USB Device Capability:
bLength 44
bDescriptorType 16
bDevCapabilityType 10
bmAttributes 0x00000067
Sublink Speed Attribute count 8
Sublink Speed ID count 4
wFunctionalitySupport 0x1104
Min functional Speed Attribute ID: 4
Min functional RX lanes: 1
Min functional TX lanes: 1
bmSublinkSpeedAttr[0] 0x00050034
Speed Attribute ID: 4 5Gb/s Symmetric RX SuperSpeed
bmSublinkSpeedAttr[1] 0x000500b4
Speed Attribute ID: 4 5Gb/s Symmetric TX SuperSpeed
bmSublinkSpeedAttr[2] 0x000a4035
Speed Attribute ID: 5 10Gb/s Symmetric RX SuperSpeedPlus
bmSublinkSpeedAttr[3] 0x000a40b5
Speed Attribute ID: 5 10Gb/s Symmetric TX SuperSpeedPlus
bmSublinkSpeedAttr[4] 0x00054036
Speed Attribute ID: 6 5Gb/s Symmetric RX SuperSpeedPlus
bmSublinkSpeedAttr[5] 0x000540b6
Speed Attribute ID: 6 5Gb/s Symmetric TX SuperSpeedPlus
bmSublinkSpeedAttr[6] 0x000a4037
Speed Attribute ID: 7 10Gb/s Symmetric RX SuperSpeedPlus
bmSublinkSpeedAttr[7] 0x000a40b7
Speed Attribute ID: 7 10Gb/s Symmetric TX SuperSpeedPlus
Hub Descriptor:
bLength 12
bDescriptorType 42
nNbrPorts 2
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 50 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
bHubDecLat 0.0 micro seconds
wHubDelay 0 nano seconds
DeviceRemovable 0x00
Hub Port Status:
Port 1: 0000.02a0 5Gbps power Rx.Detect
Port 2: 0000.02a0 5Gbps power Rx.Detect
Device Status: 0x0001
Self Powered
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 [unknown]
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 6.06
iManufacturer 3 Linux 6.6.25-rt29 xhci-hcd
iProduct 2 xHCI Host Controller
iSerial 1 0000:00:14.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0019
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 [unknown]
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 11
bDescriptorType 41
nNbrPorts 12
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
TT think time 8 FS bits
bPwrOn2PwrGood 10 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0xa0 0x00
PortPwrCtrlMask 0xff 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0303 lowspeed power enable connect
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Port 5: 0000.0503 highspeed power enable connect
Port 6: 0000.0503 highspeed power enable connect
Port 7: 0000.0507 highspeed power suspend enable connect
Port 8: 0000.0100 power
Port 9: 0000.0100 power
Port 10: 0000.0100 power
Port 11: 0000.0100 power
Port 12: 0000.0100 power
Device Status: 0x0001
Self Powered
Bus 003 Device 002: ID 046d:c31c Logitech, Inc. Keyboard K120
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 [unknown]
bDeviceSubClass 0 [unknown]
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x046d Logitech, Inc.
idProduct 0xc31c Keyboard K120
bcdDevice 64.00
iManufacturer 1 Logitech
iProduct 2 USB Keyboard
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x003b
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 3 U64.00_B0001
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 90mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 2 USB Keyboard
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 65
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 [unknown]
bInterfaceProtocol 0
iInterface 2 USB Keyboard
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 159
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 255
Device Status: 0x0000
(Bus Powered)
Bus 003 Device 003: ID 174c:2074 ASMedia Technology Inc. ASM1074
High-Speed hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 9 Hub
bDeviceSubClass 0 [unknown]
bDeviceProtocol 2 TT per port
bMaxPacketSize0 64
idVendor 0x174c ASMedia Technology Inc.
idProduct 0x2074 ASM1074 High-Speed hub
bcdDevice 2.00
iManufacturer 2 Asmedia
iProduct 3 ASM107x
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 [unknown]
bInterfaceProtocol 1 Single TT
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 [unknown]
bInterfaceProtocol 2 TT per port
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x002a
bNumDeviceCaps 3
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000000
(Missing must-be-set LPM bit!)
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x000e
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 1
Lowest fully-functional device speed is Full Speed (12Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 2047 micro seconds
Container ID Device Capability:
bLength 20
bDescriptorType 16
bDevCapabilityType 4
bReserved 0
ContainerID {cfe2b8a8-57df-4db7-9881-214005c7fbe5}
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 4
wHubCharacteristic 0x00a9
Per-port power switching
Per-port overcurrent protection
TT think time 16 FS bits
Port indicators
bPwrOn2PwrGood 1 * 2 milli seconds
bHubContrCurrent 100 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0503 highspeed power enable connect
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Device Status: 0x0001
Self Powered
Bus 003 Device 004: ID 1235:8202 Focusrite-Novation Focusrite Scarlett
2i2 2nd Gen
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 [unknown]
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x1235 Focusrite-Novation
idProduct 0x8202 Focusrite Scarlett 2i2 2nd Gen
bcdDevice 4.1b
iManufacturer 1 Focusrite
iProduct 3 Scarlett 2i2 USB
iSerial 0
bNumConfigurations 2
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0116
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 9 Internal
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 3
bFunctionClass 1 Audio
bFunctionSubClass 0 [unknown]
bFunctionProtocol 32
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 32
iInterface 3 Scarlett 2i2 USB
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 2.00
bCategory 8
wTotalLength 0x0077
bmControls 0x00
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 10 (CLOCK_SOURCE)
bClockID 41
bmAttributes 3 Internal programmable clock
bmControls 0x07
Clock Frequency Control (read/write)
Clock Validity Control (read-only)
bAssocTerminal 0
iClockSource 10 USB Internal
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 11 (CLOCK_SELECTOR)
bClockID 40
bNrInPins 1
baCSourceID(0) 41
bmControls 0x03
Clock Selector Control (read/write)
iClockSelector 8 Clock Source
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 12 Output 1
bmControls 0x0000
iTerminal 6 Scarlett 2i2 USB
AudioControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 10
bSourceID 2
bmaControls(0) 0x00000000
bmaControls(1) 0x00000000
bmaControls(2) 0x00000000
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 20
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 10
bCSourceID 40
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Microphone
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 14 Input 1
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 11
bSourceID 1
bmaControls(0) 0x00000000
bmaControls(1) 0x00000000
bmaControls(2) 0x00000000
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 22
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 11
bCSourceID 40
bmControls 0x0000
iTerminal 7 Scarlett 2i2 USB
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4 Scarlett 2i2 USB
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4 Scarlett 2i2 USB
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 12 Output 1
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 13
Transfer Type Isochronous
Synch Type Synchronous
Usage Type Data
wMaxPacketSize 0x00c8 1x 200 bytes
bInterval 1
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0x0008
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5 Scarlett 2i2 USB
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5 Scarlett 2i2 USB
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 14 Input 1
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 37
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Implicit feedback Data
wMaxPacketSize 0x00c8 1x 200 bytes
bInterval 1
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0x0008
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 1 [unknown]
bInterfaceProtocol 16
iInterface 11 Focusrite Control
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 8
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0116
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 9 Internal
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 3
bFunctionClass 1 Audio
bFunctionSubClass 0 [unknown]
bFunctionProtocol 32
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 32
iInterface 3 Scarlett 2i2 USB
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 2.00
bCategory 8
wTotalLength 0x0077
bmControls 0x00
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 10 (CLOCK_SOURCE)
bClockID 41
bmAttributes 3 Internal programmable clock
bmControls 0x07
Clock Frequency Control (read/write)
Clock Validity Control (read-only)
bAssocTerminal 0
iClockSource 10 USB Internal
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 11 (CLOCK_SELECTOR)
bClockID 40
bNrInPins 1
baCSourceID(0) 41
bmControls 0x03
Clock Selector Control (read/write)
iClockSelector 8 Clock Source
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 12 Output 1
bmControls 0x0000
iTerminal 6 Scarlett 2i2 USB
AudioControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 10
bSourceID 2
bmaControls(0) 0x00000000
bmaControls(1) 0x00000000
bmaControls(2) 0x00000000
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 20
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 10
bCSourceID 40
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Microphone
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 14 Input 1
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 11
bSourceID 1
bmaControls(0) 0x00000000
bmaControls(1) 0x00000000
bmaControls(2) 0x00000000
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 22
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 11
bCSourceID 40
bmControls 0x0000
iTerminal 7 Scarlett 2i2 USB
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4 Scarlett 2i2 USB
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4 Scarlett 2i2 USB
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 12 Output 1
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 13
Transfer Type Isochronous
Synch Type Synchronous
Usage Type Data
wMaxPacketSize 0x00c8 1x 200 bytes
bInterval 1
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0x0008
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5 Scarlett 2i2 USB
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5 Scarlett 2i2 USB
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 14 Input 1
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 37
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Implicit feedback Data
wMaxPacketSize 0x00c8 1x 200 bytes
bInterval 1
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0x0008
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 1 [unknown]
bInterfaceProtocol 16
iInterface 11 Focusrite Control
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 8
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 [unknown]
bDeviceSubClass 0 [unknown]
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Bus 003 Device 005: ID 148f:2070 Ralink Technology, Corp. RT2070
Wireless Adapter
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 [unknown]
bDeviceSubClass 0 [unknown]
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x148f Ralink Technology, Corp.
idProduct 0x2070 RT2070 Wireless Adapter
bcdDevice 1.01
iManufacturer 1 Ralink
iProduct 2 802.11 g WLAN
iSerial 3 1.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0043
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 450mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 7
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 5 1.0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 [unknown]
bDeviceSubClass 0 [unknown]
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Bus 003 Device 006: ID 05e3:0610 Genesys Logic, Inc. Hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 [unknown]
bDeviceProtocol 2 TT per port
bMaxPacketSize0 64
idVendor 0x05e3 Genesys Logic, Inc.
idProduct 0x0610 Hub
bcdDevice 60.52
iManufacturer 0
iProduct 1 USB2.0 Hub
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 [unknown]
bInterfaceProtocol 1 Single TT
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 [unknown]
bInterfaceProtocol 2 TT per port
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 4
wHubCharacteristic 0x00e9
Per-port power switching
Per-port overcurrent protection
TT think time 32 FS bits
Port indicators
bPwrOn2PwrGood 50 * 2 milli seconds
bHubContrCurrent 100 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 [unknown]
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.10
bDeviceClass 9 Hub
bDeviceSubClass 0 [unknown]
bDeviceProtocol 3
bMaxPacketSize0 9
idVendor 0x1d6b Linux Foundation
idProduct 0x0003 3.0 root hub
bcdDevice 6.06
iManufacturer 3 Linux 6.6.25-rt29 xhci-hcd
iProduct 2 xHCI Host Controller
iSerial 1 0000:00:14.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x001f
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 [unknown]
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
bMaxBurst 0
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x005b
bNumDeviceCaps 2
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x02
Latency Tolerance Messages (LTM) Supported
wSpeedsSupported 0x0008
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 1
Lowest fully-functional device speed is Full Speed (12Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 160 micro seconds
SuperSpeedPlus USB Device Capability:
bLength 76
bDescriptorType 16
bDevCapabilityType 10
bmAttributes 0x000000ef
Sublink Speed Attribute count 16
Sublink Speed ID count 8
wFunctionalitySupport 0x1106
Min functional Speed Attribute ID: 6
Min functional RX lanes: 1
Min functional TX lanes: 1
bmSublinkSpeedAttr[0] 0x00050034
Speed Attribute ID: 4 5Gb/s Symmetric RX SuperSpeed
bmSublinkSpeedAttr[1] 0x000500b4
Speed Attribute ID: 4 5Gb/s Symmetric TX SuperSpeed
bmSublinkSpeedAttr[2] 0x000a4035
Speed Attribute ID: 5 10Gb/s Symmetric RX SuperSpeedPlus
bmSublinkSpeedAttr[3] 0x000a40b5
Speed Attribute ID: 5 10Gb/s Symmetric TX SuperSpeedPlus
bmSublinkSpeedAttr[4] 0x00e00026
Speed Attribute ID: 6 224Mb/s Symmetric RX SuperSpeed
bmSublinkSpeedAttr[5] 0x00e000a6
Speed Attribute ID: 6 224Mb/s Symmetric TX SuperSpeed
bmSublinkSpeedAttr[6] 0x00c00027
Speed Attribute ID: 7 192Mb/s Symmetric RX SuperSpeed
bmSublinkSpeedAttr[7] 0x00c000a7
Speed Attribute ID: 7 192Mb/s Symmetric TX SuperSpeed
bmSublinkSpeedAttr[8] 0x00800028
Speed Attribute ID: 8 128Mb/s Symmetric RX SuperSpeed
bmSublinkSpeedAttr[9] 0x008000a8
Speed Attribute ID: 8 128Mb/s Symmetric TX SuperSpeed
bmSublinkSpeedAttr[10] 0x00b10029
Speed Attribute ID: 9 177Mb/s Symmetric RX SuperSpeed
bmSublinkSpeedAttr[11] 0x00b100a9
Speed Attribute ID: 9 177Mb/s Symmetric TX SuperSpeed
bmSublinkSpeedAttr[12] 0x0063002a
Speed Attribute ID: 10 99Mb/s Symmetric RX SuperSpeed
bmSublinkSpeedAttr[13] 0x006300aa
Speed Attribute ID: 10 99Mb/s Symmetric TX SuperSpeed
bmSublinkSpeedAttr[14] 0x00c6002b
Speed Attribute ID: 11 198Mb/s Symmetric RX SuperSpeed
bmSublinkSpeedAttr[15] 0x00c600ab
Speed Attribute ID: 11 198Mb/s Symmetric TX SuperSpeed
Hub Descriptor:
bLength 12
bDescriptorType 42
nNbrPorts 4
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 50 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
bHubDecLat 0.0 micro seconds
wHubDelay 0 nano seconds
DeviceRemovable 0x02
Hub Port Status:
Port 1: 0000.0263 5Gbps power suspend enable connect
Ext Status: 0000.0044
RX Speed Attribute ID: 4 Lanes: 1
TX Speed Attribute ID: 4 Lanes: 1
Port 2: 0000.02a0 5Gbps power Rx.Detect
Port 3: 0000.02a0 5Gbps power Rx.Detect
Port 4: 0000.02a0 5Gbps power Rx.Detect
Device Status: 0x0001
Self Powered
Bus 004 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074
SuperSpeed hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 9 Hub
bDeviceSubClass 0 [unknown]
bDeviceProtocol 3
bMaxPacketSize0 9
idVendor 0x174c ASMedia Technology Inc.
idProduct 0x3074 ASM1074 SuperSpeed hub
bcdDevice 2.00
iManufacturer 2 Asmedia
iProduct 3 ASM107x
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x001f
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 8mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 [unknown]
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 19
Transfer Type Interrupt
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 8
bMaxBurst 0
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x002a
bNumDeviceCaps 3
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000000
(Missing must-be-set LPM bit!)
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x000e
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 1
Lowest fully-functional device speed is Full Speed (12Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 2047 micro seconds
Container ID Device Capability:
bLength 20
bDescriptorType 16
bDevCapabilityType 4
bReserved 0
ContainerID {cfe2b8a8-57df-4db7-9881-214005c7fbe5}
Hub Descriptor:
bLength 12
bDescriptorType 42
nNbrPorts 4
wHubCharacteristic 0x0009
Per-port power switching
Per-port overcurrent protection
bPwrOn2PwrGood 60 * 2 milli seconds
bHubContrCurrent 400 milli Ampere
bHubDecLat 0.4 micro seconds
wHubDelay 3492 nano seconds
DeviceRemovable 0x00
Hub Port Status:
Port 1: 0000.02a0 5Gbps power Rx.Detect
Port 2: 0000.02a0 5Gbps power Rx.Detect
Port 3: 0000.02a0 5Gbps power Rx.Detect
Port 4: 0000.02a0 5Gbps power Rx.Detect
Device Status: 0x000d
Self Powered
U1 Enabled
U2 Enabled
[fps@ogfx100:~]$ sudo lsusb -t
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/1p, 480M
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 20000M/x2
/: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/12p, 480M
|__ Port 002: Dev 002, If 0, Class=Human Interface Device,
Driver=usbhid, 1.5M
|__ Port 002: Dev 002, If 1, Class=Human Interface Device,
Driver=usbhid, 1.5M
|__ Port 005: Dev 003, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 002: Dev 005, If 0, Class=Vendor Specific Class,
Driver=rt2800usb, 480M
|__ Port 006: Dev 004, If 0, Class=Audio, Driver=snd-usb-audio, 480M
|__ Port 006: Dev 004, If 1, Class=Audio, Driver=snd-usb-audio, 480M
|__ Port 006: Dev 004, If 2, Class=Audio, Driver=snd-usb-audio, 480M
|__ Port 006: Dev 004, If 3, Class=Vendor Specific Class,
Driver=[none], 480M
|__ Port 007: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
/: Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
|__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M
[fps@ogfx100:~]$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 190
model name : Intel(R) N100
stepping : 0
microcode : 0x15
cpu MHz : 700.000
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 32
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts
rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni
pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr
pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx
f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 cdp_l2 ssbd
ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad
fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a rdseed adx
smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves
split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp
hwp_notify hwp_act_window hwp_epp hwp_pkg_req vnmi umip pku ospke
waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear
serialize arch_lbr ibt flush_l1d arch_capabilities
vmx flags : vnmi preemption_timer posted_intr invvpid ept_x_only
ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid
unrestricted_guest vapic_reg vid ple shadow_vmcs ept_mode_based_exec
tsc_scaling usr_wait_pause
bugs : spectre_v1 spectre_v2 spec_store_bypass swapgs rfds
bogomips : 1612.80
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 190
model name : Intel(R) N100
stepping : 0
microcode : 0x15
cpu MHz : 3052.591
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 4
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 32
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts
rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni
pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr
pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx
f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 cdp_l2 ssbd
ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad
fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a rdseed adx
smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves
split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp
hwp_notify hwp_act_window hwp_epp hwp_pkg_req vnmi umip pku ospke
waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear
serialize arch_lbr ibt flush_l1d arch_capabilities
vmx flags : vnmi preemption_timer posted_intr invvpid ept_x_only
ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid
unrestricted_guest vapic_reg vid ple shadow_vmcs ept_mode_based_exec
tsc_scaling usr_wait_pause
bugs : spectre_v1 spectre_v2 spec_store_bypass swapgs rfds
bogomips : 1612.80
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 190
model name : Intel(R) N100
stepping : 0
microcode : 0x15
cpu MHz : 3148.532
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 2
cpu cores : 4
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 32
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts
rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni
pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr
pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx
f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 cdp_l2 ssbd
ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad
fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a rdseed adx
smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves
split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp
hwp_notify hwp_act_window hwp_epp hwp_pkg_req vnmi umip pku ospke
waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear
serialize arch_lbr ibt flush_l1d arch_capabilities
vmx flags : vnmi preemption_timer posted_intr invvpid ept_x_only
ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid
unrestricted_guest vapic_reg vid ple shadow_vmcs ept_mode_based_exec
tsc_scaling usr_wait_pause
bugs : spectre_v1 spectre_v2 spec_store_bypass swapgs rfds
bogomips : 1612.80
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 190
model name : Intel(R) N100
stepping : 0
microcode : 0x15
cpu MHz : 3125.526
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 3
cpu cores : 4
apicid : 6
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 32
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts
rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni
pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr
pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx
f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 cdp_l2 ssbd
ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad
fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a rdseed adx
smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves
split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp
hwp_notify hwp_act_window hwp_epp hwp_pkg_req vnmi umip pku ospke
waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear
serialize arch_lbr ibt flush_l1d arch_capabilities
vmx flags : vnmi preemption_timer posted_intr invvpid ept_x_only
ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid
unrestricted_guest vapic_reg vid ple shadow_vmcs ept_mode_based_exec
tsc_scaling usr_wait_pause
bugs : spectre_v1 spectre_v2 spec_store_bypass swapgs rfds
bogomips : 1612.80
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
--
https://dfdx.eu
1
0
02 May '24
It is possible that during system boot when there multiple devices
attempting simultaneous initialization on a slow control bus the
download of firmware and tuning data may take a user perceivable amount
of time.
Adopt a pattern used in the ASoC driver and perform this activity in a
background thread so that interactive performance is not impaired.
Signed-off-by: Simon Trimmer <simont(a)opensource.cirrus.com>
---
sound/pci/hda/cs35l56_hda.c | 89 ++++++++++++++++++++++++++++++-------
sound/pci/hda/cs35l56_hda.h | 4 ++
2 files changed, 76 insertions(+), 17 deletions(-)
diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
index 1a3f84599cb5..042c2407c007 100644
--- a/sound/pci/hda/cs35l56_hda.c
+++ b/sound/pci/hda/cs35l56_hda.c
@@ -13,6 +13,7 @@
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/slab.h>
+#include <linux/workqueue.h>
#include <sound/core.h>
#include <sound/cs-amp-lib.h>
#include <sound/hda_codec.h>
@@ -50,11 +51,19 @@ static const struct reg_sequence cs35l56_hda_dai_config[] = {
};
+static void cs35l56_hda_wait_dsp_ready(struct cs35l56_hda *cs35l56)
+{
+ /* Wait for patching to complete */
+ flush_work(&cs35l56->dsp_work);
+}
+
static void cs35l56_hda_play(struct cs35l56_hda *cs35l56)
{
unsigned int val;
int ret;
+ cs35l56_hda_wait_dsp_ready(cs35l56);
+
pm_runtime_get_sync(cs35l56->base.dev);
ret = cs35l56_mbox_send(&cs35l56->base, CS35L56_MBOX_CMD_AUDIO_PLAY);
if (ret == 0) {
@@ -180,6 +189,8 @@ static int cs35l56_hda_mixer_get(struct snd_kcontrol *kcontrol,
unsigned int reg_val;
int i;
+ cs35l56_hda_wait_dsp_ready(cs35l56);
+
regmap_read(cs35l56->base.regmap, kcontrol->private_value, ®_val);
reg_val &= CS35L56_ASP_TXn_SRC_MASK;
@@ -203,6 +214,8 @@ static int cs35l56_hda_mixer_put(struct snd_kcontrol *kcontrol,
if (item >= CS35L56_NUM_INPUT_SRC)
return -EINVAL;
+ cs35l56_hda_wait_dsp_ready(cs35l56);
+
regmap_update_bits_check(cs35l56->base.regmap, kcontrol->private_value,
CS35L56_INPUT_MASK, cs35l56_tx_input_values[item],
&changed);
@@ -227,6 +240,8 @@ static int cs35l56_hda_posture_get(struct snd_kcontrol *kcontrol,
unsigned int pos;
int ret;
+ cs35l56_hda_wait_dsp_ready(cs35l56);
+
ret = regmap_read(cs35l56->base.regmap, CS35L56_MAIN_POSTURE_NUMBER, &pos);
if (ret)
return ret;
@@ -248,6 +263,8 @@ static int cs35l56_hda_posture_put(struct snd_kcontrol *kcontrol,
(pos > CS35L56_MAIN_POSTURE_MAX))
return -EINVAL;
+ cs35l56_hda_wait_dsp_ready(cs35l56);
+
ret = regmap_update_bits_check(cs35l56->base.regmap,
CS35L56_MAIN_POSTURE_NUMBER,
CS35L56_MAIN_POSTURE_MASK,
@@ -291,6 +308,8 @@ static int cs35l56_hda_vol_get(struct snd_kcontrol *kcontrol,
int vol;
int ret;
+ cs35l56_hda_wait_dsp_ready(cs35l56);
+
ret = regmap_read(cs35l56->base.regmap, CS35L56_MAIN_RENDER_USER_VOLUME, &raw_vol);
if (ret)
@@ -323,6 +342,8 @@ static int cs35l56_hda_vol_put(struct snd_kcontrol *kcontrol,
raw_vol = (vol + CS35L56_MAIN_RENDER_USER_VOLUME_MIN) <<
CS35L56_MAIN_RENDER_USER_VOLUME_SHIFT;
+ cs35l56_hda_wait_dsp_ready(cs35l56);
+
ret = regmap_update_bits_check(cs35l56->base.regmap,
CS35L56_MAIN_RENDER_USER_VOLUME,
CS35L56_MAIN_RENDER_USER_VOLUME_MASK,
@@ -539,8 +560,9 @@ static void cs35l56_hda_release_firmware_files(const struct firmware *wmfw_firmw
kfree(coeff_filename);
}
-static void cs35l56_hda_add_dsp_controls(struct cs35l56_hda *cs35l56)
+static void cs35l56_hda_create_dsp_controls_work(struct work_struct *work)
{
+ struct cs35l56_hda *cs35l56 = container_of(work, struct cs35l56_hda, control_work);
struct hda_cs_dsp_ctl_info info;
info.device_name = cs35l56->amp_name;
@@ -566,7 +588,7 @@ static void cs35l56_hda_apply_calibration(struct cs35l56_hda *cs35l56)
dev_info(cs35l56->base.dev, "Calibration applied\n");
}
-static int cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
+static void cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
{
const struct firmware *coeff_firmware = NULL;
const struct firmware *wmfw_firmware = NULL;
@@ -574,15 +596,27 @@ static int cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
char *wmfw_filename = NULL;
unsigned int preloaded_fw_ver;
bool firmware_missing;
- int ret = 0;
+ bool add_dsp_controls_required = false;
+ int ret;
- /* Prepare for a new DSP power-up */
+ /*
+ * Prepare for a new DSP power-up. If the DSP has had firmware
+ * downloaded previously then it needs to be powered down so that it
+ * can be updated and if hadn't been patched before then the controls
+ * will need to be added once firmware download succeeds.
+ */
if (cs35l56->base.fw_patched)
cs_dsp_power_down(&cs35l56->cs_dsp);
+ else
+ add_dsp_controls_required = true;
cs35l56->base.fw_patched = false;
- pm_runtime_get_sync(cs35l56->base.dev);
+ ret = pm_runtime_resume_and_get(cs35l56->base.dev);
+ if (ret < 0) {
+ dev_err(cs35l56->base.dev, "Failed to resume and get %d\n", ret);
+ return;
+ }
/*
* The firmware can only be upgraded if it is currently running
@@ -606,7 +640,6 @@ static int cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
*/
if (!coeff_firmware && firmware_missing) {
dev_err(cs35l56->base.dev, ".bin file required but not found\n");
- ret = -ENOENT;
goto err_fw_release;
}
@@ -657,6 +690,15 @@ static int cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
CS35L56_FIRMWARE_MISSING);
cs35l56->base.fw_patched = true;
+ /*
+ * Adding controls is deferred to prevent a lock inversion - ALSA takes
+ * the controls_rwsem when adding a control, the get() / put()
+ * functions of a control are called holding controls_rwsem and those
+ * that depend on running firmware wait for dsp_work() to complete.
+ */
+ if (add_dsp_controls_required)
+ queue_work(cs35l56->dsp_wq, &cs35l56->control_work);
+
ret = cs_dsp_run(&cs35l56->cs_dsp);
if (ret)
dev_dbg(cs35l56->base.dev, "%s: cs_dsp_run ret %d\n", __func__, ret);
@@ -676,15 +718,19 @@ static int cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
coeff_firmware, coeff_filename);
err_pm_put:
pm_runtime_put(cs35l56->base.dev);
+}
- return ret;
+static void cs35l56_hda_dsp_work(struct work_struct *work)
+{
+ struct cs35l56_hda *cs35l56 = container_of(work, struct cs35l56_hda, dsp_work);
+
+ cs35l56_hda_fw_load(cs35l56);
}
static int cs35l56_hda_bind(struct device *dev, struct device *master, void *master_data)
{
struct cs35l56_hda *cs35l56 = dev_get_drvdata(dev);
struct hda_component *comps = master_data;
- int ret;
if (!comps || cs35l56->index < 0 || cs35l56->index >= HDA_MAX_COMPONENTS)
return -EINVAL;
@@ -698,12 +744,9 @@ static int cs35l56_hda_bind(struct device *dev, struct device *master, void *mas
strscpy(comps->name, dev_name(dev), sizeof(comps->name));
comps->playback_hook = cs35l56_hda_playback_hook;
- ret = cs35l56_hda_fw_load(cs35l56);
- if (ret)
- return ret;
+ queue_work(cs35l56->dsp_wq, &cs35l56->dsp_work);
cs35l56_hda_create_controls(cs35l56);
- cs35l56_hda_add_dsp_controls(cs35l56);
#if IS_ENABLED(CONFIG_SND_DEBUG)
cs35l56->debugfs_root = debugfs_create_dir(dev_name(cs35l56->base.dev), sound_debugfs_root);
@@ -720,6 +763,9 @@ static void cs35l56_hda_unbind(struct device *dev, struct device *master, void *
struct cs35l56_hda *cs35l56 = dev_get_drvdata(dev);
struct hda_component *comps = master_data;
+ cancel_work_sync(&cs35l56->dsp_work);
+ cancel_work_sync(&cs35l56->control_work);
+
cs35l56_hda_remove_controls(cs35l56);
#if IS_ENABLED(CONFIG_SND_DEBUG)
@@ -747,6 +793,10 @@ static int cs35l56_hda_system_suspend(struct device *dev)
{
struct cs35l56_hda *cs35l56 = dev_get_drvdata(dev);
+ cs35l56_hda_wait_dsp_ready(cs35l56);
+
+ flush_work(&cs35l56->control_work);
+
if (cs35l56->playing)
cs35l56_hda_pause(cs35l56);
@@ -842,11 +892,8 @@ static int cs35l56_hda_system_resume(struct device *dev)
ret = cs35l56_is_fw_reload_needed(&cs35l56->base);
dev_dbg(cs35l56->base.dev, "fw_reload_needed: %d\n", ret);
- if (ret > 0) {
- ret = cs35l56_hda_fw_load(cs35l56);
- if (ret)
- return ret;
- }
+ if (ret > 0)
+ queue_work(cs35l56->dsp_wq, &cs35l56->dsp_work);
if (cs35l56->playing)
cs35l56_hda_play(cs35l56);
@@ -964,6 +1011,14 @@ int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int hid, int id)
mutex_init(&cs35l56->base.irq_lock);
dev_set_drvdata(cs35l56->base.dev, cs35l56);
+ cs35l56->dsp_wq = create_singlethread_workqueue("cs35l56-dsp");
+ if (!cs35l56->dsp_wq) {
+ ret = -ENOMEM;
+ goto err;
+ }
+ INIT_WORK(&cs35l56->dsp_work, cs35l56_hda_dsp_work);
+ INIT_WORK(&cs35l56->control_work, cs35l56_hda_create_dsp_controls_work);
+
ret = cs35l56_hda_read_acpi(cs35l56, hid, id);
if (ret)
goto err;
diff --git a/sound/pci/hda/cs35l56_hda.h b/sound/pci/hda/cs35l56_hda.h
index 464e4aa63cd1..d207e4e0d167 100644
--- a/sound/pci/hda/cs35l56_hda.h
+++ b/sound/pci/hda/cs35l56_hda.h
@@ -14,6 +14,7 @@
#include <linux/firmware/cirrus/cs_dsp.h>
#include <linux/firmware/cirrus/wmfw.h>
#include <linux/regulator/consumer.h>
+#include <linux/workqueue.h>
#include <sound/cs35l56.h>
struct dentry;
@@ -21,6 +22,9 @@ struct dentry;
struct cs35l56_hda {
struct cs35l56_base base;
struct hda_codec *codec;
+ struct work_struct dsp_work;
+ struct work_struct control_work;
+ struct workqueue_struct *dsp_wq;
int index;
const char *system_name;
--
2.34.1
3
5
[PATCH v5 00/18] ASoC: Cleanup MediaTek soundcard machine drivers
by AngeloGioacchino Del Regno 02 May '24
by AngeloGioacchino Del Regno 02 May '24
02 May '24
Changes in v5:
- Cleaned up MT8186 soundcard migration commit which erroneously
had leftovers from development
- Changed the mtk_pcm_constraints_data structure to hold pointers
to snd_pcm_hw_constraint_list, as to really reuse the const data
- Tested again on all of the listed MTK platforms.
Changes in v4:
- Rebased over next-20240409
- Dropped the first 4 patches from v3 as were already picked by Mark
- Fixed W=1 build issue
Changes in v3:
- Added audio-routing names in enum in all yaml files
- Added mention of disallowing old and new properties together in
commit message of bindings patches
- Fixed validation errors with sound-card-common.yaml inclusion
due to missing model property in examples
- Removed `else` enforcing headset-codec/speaker-codecs requirement
if xxx-dai-link not present to avoid future commit noise as the
deprecated statement will disallow deprecated properties as required
Changes in v2:
- Bindings: Changed link-name/codec/clk-provider to remove `items`
and leave just the enum
- Moved .*-dai-link pattern additionalProperties after `type: object`
- Added ref to sound-card-common.yaml
- Fixed dai-link-xxx -> xxx-dai-link typo in example comment
This series performs a cleanup of most of the MediaTek AFE drivers and
soundcard machine drivers, reducing code duplication and setting a base
to be consistent with their devicetree bindings, as many of those are
using different properties and nodes for no good reason.
Summarizing:
- Commonizes functions and ops where possible
- Adds a common probe mechanism, increasing maintainability of
soundcard drivers for older MediaTek SoCs
- Migrates all drivers to support the new bindings
- Obviously retains compatibility with old device trees
- Reduces machine-specific parameters hardcoding in drivers
- Can now set machine-specific params in device tree
- Uses the `audio-routing` and `dai-link` nodes like some
other non-MediaTek SoC sound drivers
- Imposes consistency between MediaTek ASoC machine soundcard
drivers bindings
- Reduces code size and greatly reduces the amount of code that
will be required for newer drivers (retaining compatibility with
the old bindings was costly in terms of code size, otherwise
this series would've removed ~1000 more lines, or something
along that line).
This series was (manually) tested on MT8173, MT8192, MT8195 and MT8186
Chromebooks.
AngeloGioacchino Del Regno (18):
ASoC: mediatek: Add common machine soundcard driver probe mechanism
ASoC: mediatek: common: Constify struct mtk_sof_priv
ASoC: mediatek: mt8188: Migrate to mtk_soundcard_common_probe
ASoC: mediatek: mt8195: Migrate to mtk_soundcard_common_probe
ASoC: mediatek: mt8192: Migrate to mtk_soundcard_common_probe
ASoC: mediatek: mt8186: Migrate to mtk_soundcard_common_probe
ASoC: mediatek: Add common snd_soc_ops .startup() callback
ASoC: mediatek: mt8195: Migrate to the common mtk_soundcard_startup
ASoC: mediatek: mt8192: Migrate to the common mtk_soundcard_startup
ASoC: mediatek: mt8186-rt1019: Migrate to the common
mtk_soundcard_startup
ASoC: mediatek: Add common mtk_afe_component_probe callback
ASoC: mediatek: Use common mtk_afe_pcm_platform with common probe cb
ASoC: mediatek: mt8186: Unify mt8186-mt6366 machine drivers
ASoC: dt-bindings: mt8195: Document audio-routing and dai-link subnode
ASoC: dt-bindings: mt8192: Document audio-routing and dai-link subnode
ASoC: dt-bindings: mt8186: Document audio-routing and dai-link subnode
arm64: dts: mediatek: mt8195-cherry: Specify sound DAI links and
routing
arm64: dts: mediatek: mt8186-corsola: Specify sound DAI links and
routing
.../sound/mt8186-mt6366-da7219-max98357.yaml | 131 +-
.../sound/mt8186-mt6366-rt1019-rt5682s.yaml | 120 +-
.../sound/mt8192-mt6359-rt1015-rt5682.yaml | 139 +-
.../bindings/sound/mt8195-mt6359.yaml | 134 ++
.../boot/dts/mediatek/mt8186-corsola.dtsi | 42 +-
.../boot/dts/mediatek/mt8195-cherry.dtsi | 45 +
sound/soc/mediatek/Kconfig | 24 +-
.../mediatek/common/mtk-afe-platform-driver.c | 18 +
.../soc/mediatek/common/mtk-dsp-sof-common.c | 15 +-
.../soc/mediatek/common/mtk-dsp-sof-common.h | 1 -
sound/soc/mediatek/common/mtk-soc-card.h | 7 +-
.../mediatek/common/mtk-soundcard-driver.c | 199 +++
.../mediatek/common/mtk-soundcard-driver.h | 42 +
sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 14 +-
sound/soc/mediatek/mt7986/mt7986-afe-pcm.c | 14 +-
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 14 +-
sound/soc/mediatek/mt8186/Makefile | 3 +-
.../mt8186/mt8186-mt6366-da7219-max98357.c | 1189 -----------------
...t6366-rt1019-rt5682s.c => mt8186-mt6366.c} | 578 ++++----
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 21 +-
sound/soc/mediatek/mt8188/mt8188-mt6359.c | 203 +--
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 25 +-
.../mt8192/mt8192-mt6359-rt1015-rt5682.c | 301 ++---
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 21 +-
sound/soc/mediatek/mt8195/mt8195-mt6359.c | 487 +++----
25 files changed, 1597 insertions(+), 2190 deletions(-)
delete mode 100644 sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c
rename sound/soc/mediatek/mt8186/{mt8186-mt6366-rt1019-rt5682s.c => mt8186-mt6366.c} (72%)
--
2.44.0
3
20
[tiwai-sound:for-linus 1/4] sound/pci/hda/patch_realtek.c:7222:8: error: no member named 'power_hook' in 'struct alc_spec'
by kernel test robot 01 May '24
by kernel test robot 01 May '24
01 May '24
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-linus
head: 9b3c22ab3929672b117f5c46d718692abb65da0b
commit: 1e707769df072757bdcafab158bb159ead73daa4 [1/4] ALSA: hda/realtek - Set GPIO3 to default at S4 state for Thinkpad with ALC1318
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240502/202405020226.ddBTVUNI-lkp@…)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 37ae4ad0eef338776c7e2cffb3896153d43dcd90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240502/202405020226.ddBTVUNI-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405020226.ddBTVUNI-lkp@intel.com/
Note: the tiwai-sound/for-linus HEAD 9b3c22ab3929672b117f5c46d718692abb65da0b builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
In file included from sound/pci/hda/patch_realtek.c:17:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from sound/pci/hda/patch_realtek.c:17:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from sound/pci/hda/patch_realtek.c:17:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
In file included from sound/pci/hda/patch_realtek.c:17:
In file included from include/linux/pci.h:2693:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:2208:
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> sound/pci/hda/patch_realtek.c:7222:8: error: no member named 'power_hook' in 'struct alc_spec'
7222 | spec->power_hook = alc287_s4_power_gpio3_default;
| ~~~~ ^
7 warnings and 1 error generated.
vim +7222 sound/pci/hda/patch_realtek.c
7214
7215 static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec,
7216 const struct hda_fixup *fix, int action)
7217 {
7218 struct alc_spec *spec = codec->spec;
7219
7220 if (action != HDA_FIXUP_ACT_PRE_PROBE)
7221 return;
> 7222 spec->power_hook = alc287_s4_power_gpio3_default;
7223 spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook;
7224 }
7225
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0
The following changes since commit fec50db7033ea478773b159e0e2efb135270e3b7:
Linux 6.9-rc3 (2024-04-07 13:22:46 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git tags/asoc-fix-v6.9-rc6
for you to fetch changes up to c5782bb5468acf86d8ca8e161267e8d055fb4161:
ASoC: meson: tdm fixes (2024-04-30 23:36:23 +0900)
----------------------------------------------------------------
ASoC: Fixes for v6.9
This is much larger than is ideal, partly due to your holiday but also
due to several vendors having come in with relatively large fixes at
similar times. It's all driver specific stuff.
The meson fixes from Jerome fix some rare timing issues with blocking
operations happening in triggers, plus the continuous clock support
which fixes clocking for some platforms. The SOF series from Peter
builds to the fix to avoid spurious resets of ChainDMA which triggered
errors in cleanup paths with both PulseAudio and PipeWire, and there's
also some simple new debugfs files from Pierre which make support a lot
eaiser.
----------------------------------------------------------------
Amadeusz Sławiński (1):
ASoC: Intel: avs: Set name of control as in topology
Cezary Rojewski (1):
ASoC: Intel: avs: Fix debug window description
Derek Fang (2):
ASoC: rt5645: Fix the electric noise due to the CBJ contacts floating
ASoC: dt-bindings: rt5645: add cbj sleeve gpio property
Hans de Goede (1):
ASoC: Intel: bytcr_rt5640: Apply Asus T100TA quirk to Asus T100TAM too
Jack Yu (4):
ASoC: rt722-sdca: modify channel number to support 4 channels
ASoC: rt722-sdca: add headset microphone vrefo setting
ASoC: rt715: add vendor clear control register
ASoC: rt715-sdca: volume step modification
Jerome Brunet (5):
ASoC: meson: axg-fifo: use threaded irq to check periods
ASoC: meson: axg-card: make links nonatomic
ASoC: meson: axg-tdm-interface: manage formatters in trigger
ASoC: meson: axg-tdm: add continuous clock support
ASoC: meson: cards: select SND_DYNAMIC_MINORS
Joao Paulo Goncalves (1):
ASoC: ti: davinci-mcasp: Fix race condition during probe
Mark Brown (4):
ASoC: SOF: misc fixes
ASoC: SOF: ipc4-pcm: Do not reset ChainDMA if it is
ASoC: cs35l56: Fixes to handling of ASP1 config
ASoC: meson: tdm fixes
Peter Ujfalusi (5):
ASoC: SOF: ipc4-pcm: Use consistent name for snd_sof_pcm_stream pointer
ASoC: SOF: ipc4-pcm: Use consistent name for sof_ipc4_timestamp_info pointer
ASoC: SOF: ipc4-pcm: Introduce generic sof_ipc4_pcm_stream_priv
ASoC: SOF: ipc4-pcm: Do not reset the ChainDMA if it has not been allocated
ASoC: SOF: Core: Handle error returned by sof_select_ipc_and_paths
Pierre-Louis Bossart (4):
ASoC: SOF: Intel: add default firmware library path for LNL
ASoC: SOF: debug: show firmware/topology prefix/names
ASoC: da7219-aad: fix usage of device_get_named_child_node()
ASoC: cs35l56: fix usages of device_get_named_child_node()
Ranjani Sridharan (1):
ASoC: SOF: pcm: Restrict DSP D0i3 during S0ix to IPC3
Richard Fitzgerald (4):
regmap: Add regmap_read_bypassed()
ALSA: hda: cs35l56: Exit cache-only after cs35l56_wait_for_firmware_boot()
ASoC: cs35l56: Fix unintended bus access while resetting amp
ASoC: cs35l56: Prevent overwriting firmware ASP config
Sameer Pujar (1):
ASoC: tegra: Fix DSPK 16-bit playback
Simon Trimmer (1):
ASoC: cs35l56: Avoid static analysis warning of uninitialised variable
Srinivas Kandagatla (1):
ASoC: codecs: wsa881x: set clk_stop_mode1 flag
Stefan Binding (1):
ASoC: cs35l41: Update DSP1RX5/6 Sources for DSP config
end.to.start (1):
ASoC: acp: Support microphone from device Acer 315-24p
Documentation/devicetree/bindings/sound/rt5645.txt | 6 ++
drivers/base/regmap/regmap.c | 37 +++++++
include/linux/regmap.h | 8 ++
include/sound/cs35l56.h | 2 +
sound/pci/hda/cs35l56_hda.c | 4 +
sound/soc/amd/yc/acp6x-mach.c | 7 ++
sound/soc/codecs/cs35l41.c | 26 +++--
sound/soc/codecs/cs35l56-sdw.c | 2 -
sound/soc/codecs/cs35l56-shared.c | 85 +++++++++------
sound/soc/codecs/cs35l56.c | 39 ++++++-
sound/soc/codecs/da7219-aad.c | 6 +-
sound/soc/codecs/rt5645.c | 25 +++++
sound/soc/codecs/rt715-sdca.c | 8 +-
sound/soc/codecs/rt715-sdw.c | 1 +
sound/soc/codecs/rt722-sdca.c | 27 +++--
sound/soc/codecs/rt722-sdca.h | 3 +
sound/soc/codecs/wsa881x.c | 1 +
sound/soc/intel/avs/icl.c | 2 +-
sound/soc/intel/avs/topology.c | 2 +
sound/soc/intel/boards/bytcr_rt5640.c | 14 +--
sound/soc/meson/Kconfig | 1 +
sound/soc/meson/axg-card.c | 1 +
sound/soc/meson/axg-fifo.c | 29 ++++--
sound/soc/meson/axg-tdm-formatter.c | 40 +++++++
sound/soc/meson/axg-tdm-interface.c | 38 +++++--
sound/soc/meson/axg-tdm.h | 5 +
sound/soc/sof/core.c | 4 +-
sound/soc/sof/debug.c | 18 ++++
sound/soc/sof/intel/pci-lnl.c | 3 +
sound/soc/sof/ipc3-pcm.c | 1 +
sound/soc/sof/ipc4-pcm.c | 115 ++++++++++++++-------
sound/soc/sof/pcm.c | 13 ++-
sound/soc/sof/sof-audio.h | 2 +
sound/soc/tegra/tegra186_dspk.c | 7 +-
sound/soc/ti/davinci-mcasp.c | 12 +--
35 files changed, 460 insertions(+), 134 deletions(-)
2
1
[PATCH v2] ALSA: ASoc/tas2781: Fix wrong loading calibrated data sequence
by Shenghao Ding 01 May '24
by Shenghao Ding 01 May '24
01 May '24
Calibrated data will be set to default after loading DSP config params,
which will cause speaker protection work abnormally. Reload calibrated
data after loading DSP config params.
'Fixes: 0a0877812628 ("ASoc: tas2781: Fix spelling mistake "calibraiton"
-> "calibration"")'
Signed-off-by: Shenghao Ding <shenghao-ding(a)ti.com>
---
v2:
- In the Subject, fixed --> Fix
- In tas2781-fmwlib.c, tasdevice-fmw.c ---> tas2781-fmwlib.c
- dsp --> DSP
- Remove unneeded parentheses for & (dereference) operator
- Add Fixes tag
- Changed the copyright year to 2024 in the related files
- In tas2781-dsp.h, __TASDEVICE_DSP_H__ --> __TAS2781_DSP_H__
v1:
- Download calibrated data after loading the new DSP config params
- call tasdevice_prmg_load instead of tasdevice_prmg_calibdata_load, it
is unnecessary to load calibrated data after loading DSP program. Load
it after loading DSP config params each time.
- Remove tasdevice_prmg_calibdata_load, because it is unnecessary to load
calibrated data after loading DSP program.
---
include/sound/tas2781-dsp.h | 7 +--
sound/soc/codecs/tas2781-fmwlib.c | 99 +++++++------------------------
sound/soc/codecs/tas2781-i2c.c | 4 +-
3 files changed, 28 insertions(+), 82 deletions(-)
diff --git a/include/sound/tas2781-dsp.h b/include/sound/tas2781-dsp.h
index ea9af2726a53..7fba7ea26a4b 100644
--- a/include/sound/tas2781-dsp.h
+++ b/include/sound/tas2781-dsp.h
@@ -2,7 +2,7 @@
//
// ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier
//
-// Copyright (C) 2022 - 2023 Texas Instruments Incorporated
+// Copyright (C) 2022 - 2024 Texas Instruments Incorporated
// https://www.ti.com
//
// The TAS2781 driver implements a flexible and configurable
@@ -13,8 +13,8 @@
// Author: Kevin Lu <kevin-lu(a)ti.com>
//
-#ifndef __TASDEVICE_DSP_H__
-#define __TASDEVICE_DSP_H__
+#ifndef __TAS2781_DSP_H__
+#define __TAS2781_DSP_H__
#define MAIN_ALL_DEVICES 0x0d
#define MAIN_DEVICE_A 0x01
@@ -180,7 +180,6 @@ void tasdevice_calbin_remove(void *context);
int tasdevice_select_tuningprm_cfg(void *context, int prm,
int cfg_no, int rca_conf_no);
int tasdevice_prmg_load(void *context, int prm_no);
-int tasdevice_prmg_calibdata_load(void *context, int prm_no);
void tasdevice_tuning_switch(void *context, int state);
int tas2781_load_calibration(void *context, char *file_name,
unsigned short i);
diff --git a/sound/soc/codecs/tas2781-fmwlib.c b/sound/soc/codecs/tas2781-fmwlib.c
index 45760fe19523..5a4095c6a954 100644
--- a/sound/soc/codecs/tas2781-fmwlib.c
+++ b/sound/soc/codecs/tas2781-fmwlib.c
@@ -2,7 +2,7 @@
//
// tasdevice-fmw.c -- TASDEVICE firmware support
//
-// Copyright 2023 Texas Instruments, Inc.
+// Copyright 2023 - 2024 Texas Instruments, Inc.
//
// Author: Shenghao Ding <shenghao-ding(a)ti.com>
@@ -2151,6 +2151,20 @@ static int tasdevice_load_data(struct tasdevice_priv *tas_priv,
return ret;
}
+static void tasdev_load_calibrated_data(struct tasdevice_priv *priv,
+ int i)
+{
+ struct tasdevice_fw *cal_fmw = priv->tasdevice[i].cali_data_fmw;
+
+ if (cal_fmw) {
+ struct tasdevice_calibration *cal = cal_fmw->calibrations;
+
+ if (cal)
+ load_calib_data(priv, &cal->dev_data);
+ return;
+ }
+}
+
int tasdevice_select_tuningprm_cfg(void *context, int prm_no,
int cfg_no, int rca_conf_no)
{
@@ -2210,21 +2224,9 @@ int tasdevice_select_tuningprm_cfg(void *context, int prm_no,
for (i = 0; i < tas_priv->ndev; i++) {
if (tas_priv->tasdevice[i].is_loaderr == true)
continue;
- else if (tas_priv->tasdevice[i].is_loaderr == false
- && tas_priv->tasdevice[i].is_loading == true) {
- struct tasdevice_fw *cal_fmw =
- tas_priv->tasdevice[i].cali_data_fmw;
-
- if (cal_fmw) {
- struct tasdevice_calibration
- *cal = cal_fmw->calibrations;
-
- if (cal)
- load_calib_data(tas_priv,
- &(cal->dev_data));
- }
+ if (tas_priv->tasdevice[i].is_loaderr == false
+ && tas_priv->tasdevice[i].is_loading == true)
tas_priv->tasdevice[i].cur_prog = prm_no;
- }
}
}
@@ -2247,9 +2249,13 @@ int tasdevice_select_tuningprm_cfg(void *context, int prm_no,
if (tas_priv->tasdevice[i].is_loaderr == true) {
status |= 1 << (i + 4);
continue;
- } else if (tas_priv->tasdevice[i].is_loaderr == false
- && tas_priv->tasdevice[i].is_loading == true)
+ }
+
+ if (tas_priv->tasdevice[i].is_loaderr == false
+ && tas_priv->tasdevice[i].is_loading == true) {
+ tasdev_load_calibrated_data(tas_priv, i);
tas_priv->tasdevice[i].cur_conf = cfg_no;
+ }
}
} else
dev_dbg(tas_priv->dev, "%s: Unneeded loading dsp conf %d\n",
@@ -2308,65 +2314,6 @@ int tasdevice_prmg_load(void *context, int prm_no)
}
EXPORT_SYMBOL_NS_GPL(tasdevice_prmg_load, SND_SOC_TAS2781_FMWLIB);
-int tasdevice_prmg_calibdata_load(void *context, int prm_no)
-{
- struct tasdevice_priv *tas_priv = (struct tasdevice_priv *) context;
- struct tasdevice_fw *tas_fmw = tas_priv->fmw;
- struct tasdevice_prog *program;
- int prog_status = 0;
- int i;
-
- if (!tas_fmw) {
- dev_err(tas_priv->dev, "%s: Firmware is NULL\n", __func__);
- goto out;
- }
-
- if (prm_no >= tas_fmw->nr_programs) {
- dev_err(tas_priv->dev,
- "%s: prm(%d) is not in range of Programs %u\n",
- __func__, prm_no, tas_fmw->nr_programs);
- goto out;
- }
-
- for (i = 0, prog_status = 0; i < tas_priv->ndev; i++) {
- if (prm_no >= 0 && tas_priv->tasdevice[i].cur_prog != prm_no) {
- tas_priv->tasdevice[i].cur_conf = -1;
- tas_priv->tasdevice[i].is_loading = true;
- prog_status++;
- }
- tas_priv->tasdevice[i].is_loaderr = false;
- }
-
- if (prog_status) {
- program = &(tas_fmw->programs[prm_no]);
- tasdevice_load_data(tas_priv, &(program->dev_data));
- for (i = 0; i < tas_priv->ndev; i++) {
- if (tas_priv->tasdevice[i].is_loaderr == true)
- continue;
- else if (tas_priv->tasdevice[i].is_loaderr == false
- && tas_priv->tasdevice[i].is_loading == true) {
- struct tasdevice_fw *cal_fmw =
- tas_priv->tasdevice[i].cali_data_fmw;
-
- if (cal_fmw) {
- struct tasdevice_calibration *cal =
- cal_fmw->calibrations;
-
- if (cal)
- load_calib_data(tas_priv,
- &(cal->dev_data));
- }
- tas_priv->tasdevice[i].cur_prog = prm_no;
- }
- }
- }
-
-out:
- return prog_status;
-}
-EXPORT_SYMBOL_NS_GPL(tasdevice_prmg_calibdata_load,
- SND_SOC_TAS2781_FMWLIB);
-
void tasdevice_tuning_switch(void *context, int state)
{
struct tasdevice_priv *tas_priv = (struct tasdevice_priv *) context;
diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c
index b5abff230e43..9350972dfefe 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -2,7 +2,7 @@
//
// ALSA SoC Texas Instruments TAS2563/TAS2781 Audio Smart Amplifier
//
-// Copyright (C) 2022 - 2023 Texas Instruments Incorporated
+// Copyright (C) 2022 - 2024 Texas Instruments Incorporated
// https://www.ti.com
//
// The TAS2563/TAS2781 driver implements a flexible and configurable
@@ -414,7 +414,7 @@ static void tasdevice_fw_ready(const struct firmware *fmw,
__func__, tas_priv->cal_binaryname[i]);
}
- tasdevice_prmg_calibdata_load(tas_priv, 0);
+ tasdevice_prmg_load(tas_priv, 0);
tas_priv->cur_prog = 0;
out:
if (tas_priv->fw_state == TASDEVICE_DSP_FW_FAIL) {
--
2.34.1
2
2
Fixes when fw_lib_prefix is not set, updated error messages, improved
dmesg logs to SoundWire configurations not supported by ACPI
tables/topology and support for IEC61937 passthrough.
Peter Ujfalusi (2):
ASoC: SOF: debug: Handle cases when fw_lib_prefix is not set, NULL
ASoC: SOF: ipc4-topology: Advertise passthrough capable PCMs (using
ChainDMA)
Pierre-Louis Bossart (2):
ASoC: SOF: Intel: hda: simplify and reduce indentation for
hda_sdw_machine_select()
ASoC: SOF: Intel: hda: list SoundWire peripherals on mismatch
Yong Zhi (1):
ASoC: SOF: topology: remove incorrect widget id in error message
sound/soc/sof/debug.c | 23 ++++-
sound/soc/sof/intel/hda.c | 154 +++++++++++++++++++---------------
sound/soc/sof/ipc4-topology.c | 50 +++++++++++
sound/soc/sof/topology.c | 7 +-
4 files changed, 160 insertions(+), 74 deletions(-)
--
2.40.1
2
6
This patchset fixes 2 problems on TDM which both find a solution
by properly implementing the .trigger() callback for the TDM backend.
ATM, enabling the TDM formatters is done by the .prepare() callback
because handling the formatter is slow due to necessary calls to CCF.
The first problem affects the TDMIN. Because .prepare() is called on DPCM
backend first, the formatter are started before the FIFOs and this may
cause a random channel shifts if the TDMIN use multiple lanes with more
than 2 slots per lanes. Using trigger() allows to set the FE/BE order,
solving the problem.
There has already been an attempt to fix this 3y ago [1] and reverted [2]
It triggered a 'sleep in irq' error on the period IRQ. The solution is
to just use the bottom half of threaded IRQ. This is patch #1. Patch #2
and #3 remain mostly the same as 3y ago.
For TDMOUT, the problem is on pause. ATM pause only stops the FIFO and
the TDMOUT just starves. When it does, it will actually repeat the last
sample continuously. Depending on the platform, if there is no high-pass
filter on the analog path, this may translate to a constant position of
the speaker membrane. There is no audible glitch but it may damage the
speaker coil.
Properly stopping the TDMOUT in pause solves the problem. There is
behaviour change associated with that fix. Clocks used to be continuous
on pause because of the problem above. They will now be gated on pause by
default, as they should. The last change introduce the proper support for
continuous clocks, if needed.
[1]: https://lore.kernel.org/linux-amlogic/20211020114217.133153-1-jbrunet@bayli…
[2]: https://lore.kernel.org/linux-amlogic/20220421155725.2589089-1-narmstrong@b…
Jerome Brunet (4):
ASoC: meson: axg-fifo: use threaded irq to check periods
ASoC: meson: axg-card: make links nonatomic
ASoC: meson: axg-tdm-interface: manage formatters in trigger
ASoC: meson: axg-tdm: add continuous clock support
sound/soc/meson/axg-card.c | 1 +
sound/soc/meson/axg-fifo.c | 29 +++++++++++++--------
sound/soc/meson/axg-tdm-formatter.c | 40 +++++++++++++++++++++++++++++
sound/soc/meson/axg-tdm-interface.c | 38 +++++++++++++++++++--------
sound/soc/meson/axg-tdm.h | 5 ++++
5 files changed, 93 insertions(+), 20 deletions(-)
--
2.43.0
2
5
Last batch of cleanups from Brent Lu, with Chromebooks now supported
with fewer modular machine drivers.
Bard Liao (1):
ASoC: Intel: sof_rt5682: add missing MAX98357A config
Brent Lu (22):
ASoC: Intel: nau8825/rt5682: move speaker widget to common modules
ASoC: Intel: sof_maxim_common: support MAX98390 on cml boards
ASoC: Intel: sof_da7219: support MAX98390
ASoC: Intel: sof_da7219: add cml_da7219_def for cml boards
ASoC: Intel: sof_da7219: support MAX98390 on cml boards
ASoC: Intel: bxt_da7219_max98357a: remove MAX98390 support
ASoC: Intel: sof_da7219: support MAX98357A
ASoC: Intel: sof_da7219: support MAX98357A on cml boards
ASoC: Intel: bxt_da7219_max98357a: remove cml support
ASoC: Intel: sof_da7219: add glk_da7219_def for glk boards
ASoC: Intel: sof_da7219: support MAX98357A on glk boards
ASoC: Intel: bxt_da7219_max98357a: remove glk support
ASoC: Intel: sof_rt5682: add glk_rt5682_def for glk boards
ASoC: Intel: sof_rt5682: support MAX98357A on glk boards
ASoC: Intel: glk_rt5682_max98357a: delete driver
ASoC: Intel: sof-rt5682: add mclk_en to sof_rt5682_private
ASoC: Intel: sof-rt5682: remove SOF_RT5682_MCLK_BYTCHT_EN
ASoC: Intel: sof_rt5682: add icl_rt5682_def for icl boards
ASoC: Intel: sof-rt5682: add driver_data to sof_rt5682 board
ASoC: Intel: sof-rt5682: setup pll_id only when needed
ASoC: Intel: sof-rt5682: get bclk frequency from topology
ASoC: Intel: sof-rt5682: support bclk as PLL source on rt5682s
sound/soc/intel/boards/Kconfig | 41 +-
sound/soc/intel/boards/Makefile | 4 +-
sound/soc/intel/boards/bxt_da7219_max98357a.c | 179 +----
sound/soc/intel/boards/glk_rt5682_max98357a.c | 693 ------------------
sound/soc/intel/boards/sof_board_helpers.h | 2 +
sound/soc/intel/boards/sof_da7219.c | 110 ++-
sound/soc/intel/boards/sof_maxim_common.c | 108 ++-
sound/soc/intel/boards/sof_nau8825.c | 4 -
sound/soc/intel/boards/sof_realtek_common.c | 93 ++-
sound/soc/intel/boards/sof_rt5682.c | 233 +++---
.../intel/common/soc-acpi-intel-cml-match.c | 4 +-
.../intel/common/soc-acpi-intel-glk-match.c | 4 +-
.../intel/common/soc-acpi-intel-icl-match.c | 2 +-
13 files changed, 461 insertions(+), 1016 deletions(-)
delete mode 100644 sound/soc/intel/boards/glk_rt5682_max98357a.c
--
2.40.1
2
24