It's a real-time circus out there!

Discuss anything new and newsworthy! See http://planet.linuxaudio.org and https://libreav.org/news for more Linux Audio News!

Announcements of proprietary software may fit better in the Marketplace.


Moderators: raboof, MattKingUSA, khz

User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

It's a real-time circus out there!

Post by autostatic »

Introducing rtcirqus, a Python script to automatically set real-time priorities of the IRQ threads of your onboard and USB audio devices.

https://codeberg.org/autostatic/rtcirqus

Code: Select all

Feb 16 22:34:10 lenovo kernel: usb 7-1: new high-speed USB device number 10 using xhci_hcd
Feb 16 22:34:11 lenovo kernel: usb 7-1: New USB device found, idVendor=0424, idProduct=3fb7, bcdDevice= 0.01
Feb 16 22:34:11 lenovo kernel: usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 16 22:34:11 lenovo kernel: usb 7-1: Product: Babyface (23596862)
Feb 16 22:34:11 lenovo kernel: usb 7-1: Manufacturer: RME
Feb 16 22:34:11 lenovo kernel: usb 7-1: SerialNumber: 18C0A73560538C8
Feb 16 22:34:11 lenovo kernel: usb 7-1: Quirk or no altest; falling back to MIDI 1.0
Feb 16 22:34:11 lenovo mtp-probe[15199]: checking bus 7, device 10: "/sys/devices/pci0000:00/0000:00:08.3/0000:66:00.4/usb7/7-1"
Feb 16 22:34:11 lenovo mtp-probe[15199]: bus: 7, device: 10 was not an MTP device
Feb 16 22:34:11 lenovo systemd[1]: Started run-r4c9e3d2d062846ecab03c6af31529349.service - /usr/local/bin/rtcirqus --action add --dev-path /devices/pci0000:00/0000:00:08.3/0000:66:00.4/usb7/7-1/7-1:1.0/sound/card0.
Feb 16 22:34:11 lenovo mtp-probe[15216]: checking bus 7, device 10: "/sys/devices/pci0000:00/0000:00:08.3/0000:66:00.4/usb7/7-1"
Feb 16 22:34:11 lenovo mtp-probe[15216]: bus: 7, device: 10 was not an MTP device
Feb 16 22:34:11 lenovo rtcirqus[15212]: WARNING: No configuration file found, continuing with defaults
Feb 16 22:34:11 lenovo rtcirqus[15212]: INFO: Loaded kernel is using threaded IRQs and threaded IRQ processes detected
Feb 16 22:34:11 lenovo rtcirqus[15212]: INFO: Onboard cards found: HD-Audio Generic, HD-Audio Generic, acp63
Feb 16 22:34:11 lenovo rtcirqus[15212]: INFO: USB cards found: Babyface (23596862)
Feb 16 22:34:11 lenovo rtcirqus[15212]: INFO: Setting RT priority 90 for USB card Babyface (23596862)
Feb 16 22:34:11 lenovo rtcirqus[15212]: INFO: Setting RT priority 85 for onboard card HD-Audio Generic
Feb 16 22:34:11 lenovo rtcirqus[15212]: INFO: Setting RT priority 80 for onboard card HD-Audio Generic
Feb 16 22:34:11 lenovo systemd[1]: run-r4c9e3d2d062846ecab03c6af31529349.service: Deactivated successfully.

Hope it's useful!

Jeremy

User avatar
Audiojunkie
Established Member
Posts: 403
Joined: Thu Feb 21, 2019 4:27 pm
Has thanked: 392 times
Been thanked: 157 times

Re: It's a real-time circus out there!

Post by Audiojunkie »

This looks cool! I may be wrong, but I don't think Pipewire does any thread priorities. It makes use of IRQ timing when in Pro Audio mode, but I think prioritizing the threads may be a place where an extra boost can be achieved when using a RT kernel or a generic kernel using the /threadirqs kernel paramater--just like the rtirq script does. If I understand correctly, your script specifically focuses on the USB interface devices. Is this correct?

How is this script different from the rtirq script?

User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: It's a real-time circus out there!

Post by autostatic »

Audiojunkie wrote: Sat Feb 17, 2024 12:19 am

This looks cool!

Thanks!

Audiojunkie wrote: Sat Feb 17, 2024 12:19 am

I may be wrong, but I don't think Pipewire does any thread priorities. It makes use of IRQ timing when in Pro Audio mode, but I think prioritizing the threads may be a place where an extra boost can be achieved when using a RT kernel or a generic kernel using the /threadirqs kernel paramater--just like the rtirq script does.

From my personal experience prioritizing IRQ threads is indispensable. It's the difference between running reliably at low latencies or having to cope with dozens of xruns.

Audiojunkie wrote: Sat Feb 17, 2024 12:19 am

If I understand correctly, your script specifically focuses on the USB interface devices. Is this correct?

Correct but rtcirqus handles both onboard and USB devices. The focus on USB is because USB devices can be plugged in and out. With onboard devices this is a bit harder ;)

Audiojunkie wrote: Sat Feb 17, 2024 12:19 am

How is this script different from the rtirq script?

rtirq is not coupled to udev so it doesn't respond dynamically to newly added or removed audio interfaces. You can do so too though with rtirq, see https://discourse.ardour.org/t/jerky-pl ... 4/109844/7 That post actually got me started with creating rtcirqus. Another difference is that on modern machines rtirq does not allow to prioritize only the IRQ where the audio interface sits on. For USB, that mainly uses xhci_hcd related IRQ's these days, rtirq can only prioritize all xhci_hcd related IRQs, not just the one with your interface connected. rtirq is more generic, it allows you to prioritize any IRQ while rtcirqus is geared towards audio related IRQs. rtirq also allows for finer grained control, the control options for rtcirqus are still pretty basic. And then there are some meta differences (configuration file location standardized according to FHS and licensing).

User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: It's a real-time circus out there!

Post by bluebell »

autostatic wrote: Fri Feb 16, 2024 9:52 pm

Introducing rtcirqus, a Python script to automatically set real-time priorities of the IRQ threads of your onboard and USB audio devices.

https://codeberg.org/autostatic/rtcirqus

Hi Jeremy,

looks promising. Unfortunately besides the missing chmod 755 of rtcirqus.py I have a severe problem:

Code: Select all

hm@bubu:~$ rtcirqus 
  File "/usr/local/bin/rtcirqus", line 53
    udev_context, 'sound', f'card{index}').device_path for index in
                                        ^
SyntaxError: invalid syntax

Code: Select all

hm@bubu:~$ python3 --version
Python 3.5.2

It seems that this Python version doesn't support f-strings. I managed - without really knowing what I am doing - to fix this line with

Code: Select all

udev_context, 'sound', fromstr('card{}'.format(index))).device_path for index in

but f-strings are heavily used in rtcirqus.py.

Yes, my well tuned system is a bit oldish but this way I'd be able to compare the effects of rtirq and rtcirqus.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: It's a real-time circus out there!

Post by autostatic »

bluebell wrote: Sat Feb 17, 2024 10:22 am

looks promising. Unfortunately besides the missing chmod 755 of rtcirqus.py I have a severe problem:

Thanks for the heads up, that's an easy fix.

bluebell wrote: Sat Feb 17, 2024 10:22 am

Code: Select all

hm@bubu:~$ rtcirqus 
  File "/usr/local/bin/rtcirqus", line 53
    udev_context, 'sound', f'card{index}').device_path for index in
                                        ^
SyntaxError: invalid syntax

Code: Select all

hm@bubu:~$ python3 --version
Python 3.5.2

It seems that this Python version doesn't support f-strings.

Correct, formatted string literals were introduced in Python 3.6.

bluebell wrote: Sat Feb 17, 2024 10:22 am

Yes, my system is a bit oldish but this way I could compare the effects of rtirq and rtcirqus.

Sorry to hear :( Can't promise anything but I could look into replacing the f-strings with str.format() ones so you could compare. I do prefer f-strings though so I'd like to keep those in the current script.

User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: It's a real-time circus out there!

Post by bluebell »

There might be a solution with the package future_fstrings that needs a "coding:" directive but I wasn't successful. Not even future-fstrings-show worked which - as I understand - can convert Python scripts with f-strings.

There is a Python3.6 on my system, too, but without properly installed packages as psutil & co.

Let's see if I can tame that Python mess. I can't remember such problems with Perl but there must be a reason why people like Python. I know at least 2 reasons why I don't .

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

User avatar
sysrqer
Established Member
Posts: 2527
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 320 times
Been thanked: 153 times
Contact:

Re: It's a real-time circus out there!

Post by sysrqer »

This is interesting to hear, I wouldn't think to consider that people have <3.6 of python. Could this error be caught be try/except?

Python is godly btw 8)

User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: It's a real-time circus out there!

Post by bluebell »

sysrqer wrote: Sat Feb 17, 2024 1:04 pm

This is interesting to hear, I wouldn't think to consider that people have <3.6 of python. Could this error be caught be try/except?

Python is godly btw 8)

Python is a sweet poison. It looks elegant (it isn't), readable (it isn't), sane (it isn't) and finally bites your ass with backwards or maybe upwards incompatibilities.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

User avatar
rncbc
Established Member
Posts: 1071
Joined: Mon Apr 19, 2010 12:20 pm
Has thanked: 45 times
Been thanked: 279 times
Contact:

Re: It's a real-time circus out there!

Post by rncbc »

bluebell wrote: Sat Feb 17, 2024 1:18 pm

Python is a sweet poison. It looks elegant (it isn't), readable (it isn't), sane (it isn't) and finally bites your ass with backwards or maybe upwards incompatibilities.

let alone that real programmers do their own indentation (you can quote me on that line:))

any programming language that makes whitespace a role in its syntax is plain ridiculous... in my own judgement I rather praise cobol instead (all is/was good after the 8th column XD).

anyway, back to the topic at hand

having rtirq is almost two decades old already, wouldn't it be enough to add just a few rules to it?

please try the attached script and tell which IRQ we're talking about...

ofc. this pledge applies to usb audio devices only, the more the better; try to plug them in and out and back again; also after rebooting; how many lines does it show?

eager to know, whether the (old) rtirq script might cope with this mess--usb audio devices in particular--and not having you all to depend on snake oil bloat&blunder ;)

cheers

Attachments
rtirq_snd-usb_test-1.sh.txt
(614 Bytes) Downloaded 28 times
User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: It's a real-time circus out there!

Post by bluebell »

rncbc wrote: Mon Feb 19, 2024 6:26 pm

please try the attached script and tell which IRQ we're talking about...

ofc. this pledge applies to usb audio devices only, the more the better; try to plug them in and out and back again; also after rebooting; how many lines does it show?

eager to know, whether the (old) rtirq script might cope with this mess--usb audio devices in particular--and not having you all to depend on snake oil bloat&blunder ;)

Code: Select all

NAME2=<Focusrite Scarlett 2i4 USB>
UDEV2=<0000:00:14.0>
PRI1=<90>
IRQ=<127>
rtirq_start_irq snd-usb Focusrite Scarlett 2i4 USB 90 127

That's not bad but not perfect. My main USB interface MOTU UltraLite AVB which uses drumfix' ua101 driver is not recognized.

Code: Select all

hm@bubu:~$ cat /proc/asound/cards
 0 [MOTUAVB        ]: MOTU-AVB - MOTU-AVB
                      MOTU UltraLite AVB
 1 [USB            ]: USB-Audio - Scarlett 2i4 USB
                      Focusrite Scarlett 2i4 USB at usb-0000:00:14.0-5, high speed

Code: Select all

hm@bubu:/tmp$ lsusb
Bus 004 Device 003: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 004 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 30fa:0300  
Bus 003 Device 003: ID 0bda:5411 Realtek Semiconductor Corp. Bus 003 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 04f2:b59e Chicony Electronics Co., Ltd Bus 001 Device 006: ID 1235:8200 Focusrite-Novation Bus 001 Device 005: ID 8087:0a2b Intel Corp. Bus 001 Device 002: ID 07fd:0005 Mark of the Unicorn Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code: Select all

hm@bubu:/tmp$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 1: Dev 2, If 7, Class=Vendor Specific Class, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 2, If 5, Class=Vendor Specific Class, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 2, If 3, Class=Audio, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 2, If 1, Class=Audio, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 2, If 6, Class=Vendor Specific Class, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 2, If 4, Class=Audio, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 2, If 2, Class=Audio, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 2, If 0, Class=Audio, Driver=snd-motu-avb, 480M
    |__ Port 5: Dev 6, If 0, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 5: Dev 6, If 1, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 5: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 5: Dev 6, If 3, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 5: Dev 6, If 4, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 5: Dev 6, If 5, Class=Vendor Specific Class, Driver=, 480M
    |__ Port 6: Dev 4, If 0, Class=Video, Driver=, 480M
    |__ Port 6: Dev 4, If 1, Class=Video, Driver=, 480M
    |__ Port 10: Dev 5, If 0, Class=Wireless, Driver=, 12M
    |__ Port 10: Dev 5, If 1, Class=Wireless, Driver=, 12M

Code: Select all

hm@bubu:/tmp$ ls -l /sys/devices/pci0000:00/*/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:00.0/irq
-r--r--r-- 1 root root 4096 Feb 19 08:33 /sys/devices/pci0000:00/0000:00:02.0/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:14.0/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:14.2/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:16.0/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:17.0/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:1c.0/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:1c.4/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:1c.6/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:1d.0/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:1d.4/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:1f.0/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:1f.2/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:1f.3/irq
-r--r--r-- 1 root root 4096 Feb 19 08:34 /sys/devices/pci0000:00/0000:00:1f.4/irq

Code: Select all

hm@bubu:/tmp$ cat /sys/devices/pci0000:00/*/irq
0
138
127
18
139
136
122
123
124
125
126
0
0
11
11

IRQ 127 is probably used for both interfaces when I look at /proc/interrupts

Code: Select all

hm@bubu:/tmp$ cat /proc/interrupts 
            CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7       
0: 23 0 0 0 0 0 0 0 IR-IO-APIC 2-edge timer 1: 0 0 0 32975 0 0 0 0 IR-IO-APIC 1-edge i8042 8: 0 0 0 0 0 0 0 0 IR-IO-APIC 8-edge rtc0 9: 0 272 0 0 0 0 0 0 IR-IO-APIC 9-fasteoi acpi 12: 0 0 36310 0 0 0 0 0 IR-IO-APIC 12-edge i8042 120: 0 0 0 0 0 0 0 0 DMAR-MSI 0-edge dmar0 121: 0 0 0 0 0 0 0 0 DMAR-MSI 1-edge dmar1 127: 0 0 0 0 0 0 0 740673105 IR-PCI-MSI 327680-edge xhci_hcd 128: 0 270256 0 0 0 0 0 0 IR-PCI-MSI 1572864-edge xhci_hcd 129: 0 0 0 0 0 0 0 0 IR-PCI-MSI 1572865-edge xhci_hcd 130: 0 0 0 0 0 0 0 0 IR-PCI-MSI 1572866-edge xhci_hcd 131: 0 0 0 0 0 0 0 0 IR-PCI-MSI 1572867-edge xhci_hcd 132: 0 0 0 0 0 0 0 0 IR-PCI-MSI 1572868-edge xhci_hcd 133: 0 0 0 0 0 0 0 0 IR-PCI-MSI 1572869-edge xhci_hcd 134: 0 0 0 0 0 0 0 0 IR-PCI-MSI 1572870-edge xhci_hcd 135: 0 0 0 0 0 0 0 0 IR-PCI-MSI 1572871-edge xhci_hcd 136: 0 0 0 0 0 342137 0 0 IR-PCI-MSI 376832-edge ahci[0000:00:17.0] 137: 1734401 0 0 0 0 0 0 0 IR-PCI-MSI 2621440-edge enp5s0 138: 0 0 0 0 0 0 2835567 0 IR-PCI-MSI 32768-edge i915 139: 0 0 0 0 0 0 0 39 IR-PCI-MSI 360448-edge mei_me NMI: 0 0 0 0 0 0 0 0 Non-maskable interrupts LOC: 46878557 46995424 47022404 46802751 46684791 47192215 47169442 46485698 Local timer interrupts SPU: 0 0 0 0 0 0 0 0 Spurious interrupts PMI: 0 0 0 0 0 0 0 0 Performance monitoring interrupts IWI: 7694 5731 5557 7344 4346 10472 1420597 9094 IRQ work interrupts RTR: 0 0 0 0 0 0 0 0 APIC ICR read retries RES: 282927 238517 293863 317499 406355 248732 181617 79114 Rescheduling interrupts CAL: 1209744 985576 967243 1435280 834423 876803 876404 1341983 Function call interrupts TLB: 631977 672675 690830 770550 676369 649612 588390 454202 TLB shootdowns TRM: 476 476 476 476 476 476 476 476 Thermal event interrupts THR: 0 0 0 0 0 0 0 0 Threshold APIC interrupts DFR: 0 0 0 0 0 0 0 0 Deferred Error APIC interrupts MCE: 0 0 0 0 0 0 0 0 Machine check exceptions MCP: 142 143 143 143 143 143 143 143 Machine check polls ERR: 0 MIS: 0 PIN: 0 0 0 0 0 0 0 0 Posted-interrupt notification event NPI: 0 0 0 0 0 0 0 0 Nested posted-interrupt event PIW: 0 0 0 0 0 0 0 0 Posted-interrupt wakeup event

I have no idea how I could get from the lsusb output to IRQ 127 in /sys/devices/pci0000:00/0000:00:14.0/irq

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

User avatar
rncbc
Established Member
Posts: 1071
Joined: Mon Apr 19, 2010 12:20 pm
Has thanked: 45 times
Been thanked: 279 times
Contact:

Re: It's a real-time circus out there!

Post by rncbc »

bluebell wrote: Mon Feb 19, 2024 8:09 pm

ofc. this pledge applies to usb audio devices only...

I'll correct the above that it applies to snd-usb-audio driven devices only. iow. the ones which are usually said "usb audio class compliant"...

I could be wrong, but the motu avb doesn't seem to be one; does it appear on rtcirqus ?

User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: It's a real-time circus out there!

Post by bluebell »

rncbc wrote: Mon Feb 19, 2024 11:08 pm
bluebell wrote: Mon Feb 19, 2024 8:09 pm

ofc. this pledge applies to usb audio devices only...

I'll correct the above that it applies to snd-usb-audio driven devices only. iow. the ones which are usually said "usb audio class compliant"...

I could be wrong, but the motu avb doesn't seem to be one; does it appear on rtcirqus ?

At the moment I can't run rtcircus because of Python's builtin incompatibilities.

Iam afraid that rtcircus relies on the sys-path info in /proc/alsa/cards as well.

I run the MOTU UltraLite AVB in Class Compliant mode.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

User avatar
Loki Harfagr
Established Member
Posts: 268
Joined: Thu Aug 02, 2018 1:28 pm
Has thanked: 151 times
Been thanked: 53 times

Re: It's a real-time circus out there!

Post by Loki Harfagr »

@rncbc

My card is a funny one and the script goes funny:

Code: Select all

 sh rtirq_snd-usb_test-1.sh.txt
cat: '/sys/devices/pci0000:00/0000:07:00.0/irq': No such file or directory

and actually, asound states:

Code: Select all

 grep usb /proc/asound/cards
                      TASCAM US-4x4HR at usb-0000:07:00.0-1, high speed

while lsusb shows:

Code: Select all

lsusb | grep US-4x4HR
Bus 003 Device 002: ID 0644:8071 TEAC Corp. US-4x4HR

and find gives:

Code: Select all

 find /sys/devices/pci* -iname '*usb*' -exec ls {} + | grep 00:07
/sys/devices/pci0000:00/0000:00:1c.4/0000:07:00.0/usb4/4-0:1.0/usb4-port1/usb3_lpm_permit
/sys/devices/pci0000:00/0000:00:1c.4/0000:07:00.0/usb4/4-0:1.0/usb4-port2/usb3_lpm_permit
/sys/devices/pci0000:00/0000:00:1c.4/0000:07:00.0/usb3:
/sys/devices/pci0000:00/0000:00:1c.4/0000:07:00.0/usb3/3-0:1.0/usb3-port1:
/sys/devices/pci0000:00/0000:00:1c.4/0000:07:00.0/usb3/3-0:1.0/usb3-port2:
/sys/devices/pci0000:00/0000:00:1c.4/0000:07:00.0/usb4:
/sys/devices/pci0000:00/0000:00:1c.4/0000:07:00.0/usb4/4-0:1.0/usb4-port1:
/sys/devices/pci0000:00/0000:00:1c.4/0000:07:00.0/usb4/4-0:1.0/usb4-port2:
User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: It's a real-time circus out there!

Post by bluebell »

I googled around and I'm afraid that there is no way to find out the irq for an usb audio card if the driver doesn't provide any hints, e,g, in /proc/asound/cards

I hope that I am wrong.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

User avatar
rncbc
Established Member
Posts: 1071
Joined: Mon Apr 19, 2010 12:20 pm
Has thanked: 45 times
Been thanked: 279 times
Contact:

Re: It's a real-time circus out there!

Post by rncbc »

Loki Harfagr wrote: Tue Feb 20, 2024 9:56 am

My card is a funny one and the script goes funny: [...]

yeah, tascam and motu are infamous in this regard, as ever been: they are not driven by snd-usb-audio whatsoever...

question still applies: does the OP rtcirqus give you any better figures?

EDIT: btw. rtirq update - 2024 second edition is out now ;)

Post Reply