On 05/02/2012 12:19 AM, Jeremy Jongepier wrote:
That's how we all would like things to work, regretfully that is not how
things actually work.
>> AFAIK it is not possible (or simple) to raise _just_ the soundcard as it
For soundcard drivers there is no convention for naming the irq process
that services its interrupt. The name of the irq process does not match
the name of the kernel module (which would be an obvious choice). The
ascii that is printed by ps is defined in the kernel code for each
driver, and driver authors pick different names that are not consistent.
That means you can't pattern match for the right irq process if the
interrupt number is shared by several devices.
It would be possible to pattern match if, for example, all soundcards
used a "snd_" prefix for the name of the irq process, but that is not
the case (at least until last time I looked at the kernel code for this
very same reason).
>So the graphics card gets a
The rtirq code does the following (simplified):
- rtirq gets the irq number from /proc/asound/cards
- that number is used to search the output of ps looking for matches
with that particular irq number
- there is no way to tell which irq process corresponds to a soundcard,
rtirq does not try AFAICT
- so, all irq processes that match the number get the elevated priority
For example, in my laptop, from /proc/interrupts:
16: 2551 516 113 95 IO-APIC-fasteoi
nouveau, snd_hda_intel, mmc0
rtirq happily gives them 75, 74 and 73:
222 FF 75 - 115 0.0 S irq/16-nouveau
11077 FF 74 - 114 0.0 S irq/16-snd_hda_
11082 FF 73 - 113 0.0 S irq/16-mmc0
Please let me know if there is a way to, given an irq number, know what
is the pid of the irq process that services that irq number for a
particular _soundcard_, I have found no way of doing that so far[*].
Note that in all other cases other than soundcards rtirq looks for the
name, not the number of the irq (for example for usb the names are well
known and unique and hardwired into rtirq).
[*] other than scanning the kernel source code for the names of all
possible soundcard driver irq processes, making a list and matching
against that - it would work but it would depend on those names not
changing, and of having the list that matches the kernel you are running.
Linux-audio-user mailing list