Re: [LAU] Issue with the priority of the sound cards using rtirq

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Rui Nuno Capela <rncbc@...>
Cc: <linux-audio-user@...>
Date: Thursday, May 3, 2012 - 11:39 pm

On 05/03/2012 10:00 AM, Fernando Lopez-Lezcano wrote:

Some good news! Something has changed from 2.6.33 to 3.2.x...

This finds all irq setup calls on the 3.2 kernel tree:

find sound/ -type f -exec grep -2 request_irq {] \; -print

The fourth argument to that call is what is going to be shown in the ps
listing. Now, I found that all _pci_ cards in 3.2.x have KBUILD_MODNAME
as the fourth argument (that was not the case before!). So anything
starting with "snd_" is going to be a soundcard, so rtirq could have
another special case for that.

Rui: this addition/hack in rtirq takes care of snd_hda_intel in my
3.2.16-rt27 system and will presumably do the right thing for any other
pci soundcards:

----
# Special for kernel-rt >= 2.6.31, where one can
# prioritize shared IRQs by device driver (NAME2)...
# first try with irq names that start with snd_
PIDS=`ps -eo pid,comm | egrep -i "IRQ.${IRQ}.snd_.*" | awk
'{print $1}'`
if [ -n "${PIDS}" ]
then
RTIRQ_TRAIL=":${IRQ}${RTIRQ_TRAIL}"
else
# try with the name reported in /proc/asound/cards
PIDS=`ps -eo pid,comm | egrep -i "IRQ.${IRQ}.${NAME2:0:8}" | awk
'{print $1}'`
if [ -n "${PIDS}" ]
then
RTIRQ_TRAIL=":${IRQ}${RTIRQ_TRAIL}"
else
# Backward compability for older kernel-rt < 2.6.31...
PIDS=`ps -eo pid,comm | egrep -i "IRQ.${IRQ}" | awk '{print $1}'`
if [ -n "${PIDS}" ]
then
RTIRQ_TRAIL=":${IRQ}${RTIRQ_TRAIL}"
fi
fi
fi
----

far from a solution, this is a list of sound/ subdirectories in 3.2
where this does not hold true:

sound/ppc/
sound/mips/
sound/oss/
sound/arm
sound/sparc/

sound/spi
sound/soc
sound/parisc
sound/pcmcia/
sound/isa/
sound/drivers/
sound/atmel/
sound/aoa/

but it will work for a LOT of frequently used soundcards, at least when
running 3.2 ...

-- Fernando
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAU] Issue with the priority of the sound cards using r..., Fernando Lopez-Lezcano, (Tue May 1, 6:32 pm)
Re: [LAU] Issue with the priority of the sound cards using r..., Fernando Lopez-Lezcano, (Thu May 3, 6:26 am)
Re: [LAU] Issue with the priority of the sound cards using r..., Fernando Lopez-Lezcano, (Thu May 3, 5:01 pm)
Re: [LAU] Issue with the priority of the sound cards using r..., Fernando Lopez-Lezcano, (Thu May 3, 11:39 pm)
Re: [LAU] new rtirq release, Fernando Lopez-Lezcano, (Fri May 4, 7:08 pm)
[LAU] rtirq question, Ivica Ico Bukvic, (Sat May 5, 2:42 am)
Re: [LAU] rtirq question, Ivica Ico Bukvic, (Sat May 5, 3:02 am)
Re: [LAU] new rtirq release, Rui Nuno Capela, (Fri May 4, 9:56 pm)
Re: [LAU] new rtirq release, Fernando Lopez-Lezcano, (Fri May 4, 11:14 pm)
Re: [LAU] new rtirq release, Rui Nuno Capela, (Fri May 4, 11:42 pm)
Re: [LAU] new rtirq release, Brendan Jones, (Fri May 4, 3:36 pm)
Re: [LAU] new rtirq release, Ralf Mardorf, (Fri May 4, 4:26 pm)
Re: [LAU] Issue with the priority of the sound cards using r..., Fernando Lopez-Lezcano, (Thu May 3, 8:23 pm)