if it were me, and the only problem left is one irq priority setting, i would add a chrt line in the startup options manually (after rtirq). that way you aren't messing with anything else.

porl


On 08/10/2007, Nigel Henry <cave.dnb@tiscali.fr> wrote:
On Sunday 07 October 2007 17:37, Rui Nuno Capela wrote:
> Nigel Henry wrote:
> > On Friday 05 October 2007 18:14, Nigel Henry wrote:
> >> On Thursday 04 October 2007 21:29, Roman Muņoz wrote:
> >>> Hi Nigel,
> >>>
> >>> Is rtirq working four you? If yes, I think that your soundcard IRQ
> >>> should be at prio 85 at startup... and it was not.
> >>>
> >>> See this:
> >>> http://mggmail.blogspot.com/2007/07/re-rtirq-fixed.html
> >>
> >> Well I've got realtime working ok on Debian Etch, and Rick Wright's one
> >> liner in rc.local is changing the prio to 90 for the soundcard on
> >> bootup. But, rtirq is something different. The version installed is the
> >> same as on the blog above (20070101), and the 2 files are installed, one
> >> in /etc/init.d/rtirq, and the other in /etc/sysconfig/rtirq. I believe
> >> the /etc/sysconfig directory was created when installing rtirq, as I
> >> don't rmember it being there before. I say this because with Fedora the
> >> sysconfig directory exists, and there is a bunch of files in it, and I
> >> remember looking in Debian for this directory, and couldn't find it.
> >>
> >> I also ran sysv-rc-conf as root on Etch. The rtirq entry is there, but
> >> runlevels 2,3,4,and5 are unchecked, so something isn't quite right here.
> >> I see also on the blog above that rtirq should be in /etc/default, but
> >> in the case of Etch it isn't. As I say. Realtime on Etch is working ok,
> >> but I'll go through the same procedure on Debian Lenny (testing), and
> >> try and fix the rtirq problem without using Rick Wright's one liner,
> >> although it's much appreciated, and works like clockwork.
> >>
> >> I'll post back after I've played around with realtime on Lenny a bit.
> >>
> >>> Best regards,
> >>> Roman
> >>
> >> Thanks for all the replies to this interesting subject.
> >>
> >> Nigel.
> >
> > As promised, an update on realtime on Debian Lenny. That is after having
> > installed from the musix repo, kernel 2.6.21-rt4, and 2.6.21.5-rt18 .
> >
> > First I had to update util-linux from the unstable repo, as the version
> > on Lenny was the Etch one, and still thought that schedutils was
> > available. The Sid (unstable) version installed ok, and chrt is available
> > now.
> >
> > Then added the lines below to /etc/security/limits.conf.
> > @audio  - rtprio  99
> > @audio  - nice  -10
> > @audio  - memlock  4000000
> >
> > Now the fun started with installing rtirq (the version from the musix
> > repo). It installed, but refused to start. I was confused, as both
> > scripts, the one in /etc/init.d, and /etc/sysconfig seemed to be the
> > same, so I booted up Fedora 7, and checked the 2 rtirq scripts there, and
> > sure enough the one in /etc/sysconfig was a very short one, compared to
> > the start script in /etc/init.d.
> >
> > Downloaded the rtirq tarball from the blog that Roman posted.
> > http://www.rncbc.org/jack/rtirq-20070101.tar.gz
> >
> > Unpacked it, deleted the duplicated startup script in Lenny's
> > /etc/sysconfig, pasted the correct config script in /etc/sysconfig,
> > renaming it from rtirq.conf to rtirq.
> >
> > Rebooted, and ran /etc/init.d/rtirq status, and got the following output.
> >
> > /etc/init.d/rtirq status
> >
> >   PID CLS RTPRIO  NI PRI %CPU STAT COMMAND
> >   184 FF      90   - 130   0.0 S<   IRQ-8        rtc
> >   666 FF      85   - 125  0.0 S<   IRQ-9        ohci1394, bttv0, Bt87x
> > audio 1770 FF      84   - 124  0.1 S<   IRQ-10       EMU10K1
> >   631 FF      80   - 120   0.0 S<   IRQ-11       uhci_hcd:usb1,
> > uhci_hcd:usb2, eth0
> >   288 FF      75   - 115  0.0 S<   IRQ-1        i8042
> >   287 FF      74   - 114  0.0 S<   IRQ-12       i8042
> >     4 FF      50   -  90   0.0 S    softirq-high/0
> >     5 FF      50   -  90  0.0 S    softirq-timer/0
> >     6 FF      50   -  90  0.0 S    softirq-net-tx/
> >     7 FF      50   -  90  0.0 S    softirq-net-rx/
> >     8 FF      50   -  90   0.0 S    softirq-block/0
> >     9 FF      50   -  90  0.0 S    softirq-tasklet
> >    10 FF      50   -  90  0.0 S    softirq-sched/0
> >    11 FF      50   -  90  0.0 S    softirq-hrtimer
> >    12 FF      50   -  90   0.0 S    softirq-rcu/0
> >   207 FF      50   -  90  3.2 S<   IRQ-14       ide0
> >   210 FF      50   -  90  0.0 S<   IRQ-15       ide1
> >   785 FF      50   -  90  0.0 S<   IRQ-6        floppy
> >  1581 FF      50   -  90  0.0 S<   IRQ-7        parport0
> >  3078 FF      50   -  90  0.0 S<   IRQ-3
> >
> > Jackd has a prio of 70, and just with jackd started, only one xrun up to
> > now after 58mins of 0.118 msecs duration.
> >
> > Job done. Realtime on Etch, and Lenny. The above makes it look dead easy,
> > but there was a lot of frustration along the way, and it took longer than
> > it appears.
> >
> > Many thanks to all those who offered help on this list, and the
> > debian-user list.
> >
> > One question regarding the rtirq status output above.
> >
> > IRQ-9 has a slightly higher rtprio than that for the soundcard on IRQ-10.
> > ohci1394 is tied in with the firewire port on the audigy2 soundblaster,
> > but I can probably stop that being loaded, as I don't use firewire. bttv0
> > is the TV card, and BT87x audio is for the audio capture part of the
> > TVcard.
> >
> > What would I need to do to swap these around, so that IRQ-9 has a prio of
> > 84, and IRQ-10, a prio of 85?
> >
> > It's probably a bit of an academic question, as your unlikely to be doing
> > serious audio work while watching TV.
>
> you can switch pci slots around, that is between the tvcard and the
> audigy2 on the mainboard

Unfortunately that option is a no go, as I've got about 14 distros that run on
this machine, and don't want to mess with the placement of the cards, just in
case.
>
> or
>
> you can tweak the alsa modules loading order, like opted in
> /etc/modprobe.conf (or the equivalent in your distro), giving an
> explicit options ... index= line for each module, for example, i believe
> these are the ones to write down:
>
>   options snd-bt87x   index=0 # tvcard
>   options snd-emu10k1 index=1 # audigy

That's not ideal either, as it's better for me that snd-emu10k1 is indexed as
0. snd-bt87x is already notorious for grabbing card0, along with some other
uncooperative drivers, and as I don't need audio capture from the TV card, I
could send it to /bin/true, along with ohci1394, as.
install snd-bt87x /bin/true
install ohci1394 /bin/true

That still leaves bttv0 though, and as it is using /dev/video0, I cannot set
an indexing option for it.
>
> or
>
> you can hack the rtirq script for doing priorities in reverse order:
> edit /etc/init.d/rtirq near line 211, where it reads
>
>   IRQS=`grep irq /proc/asound/cards | tac | sed 's/.* irq \(.*\)/\1/'`
>
> change that line to:
>
>   IRQS=`grep irq /proc/asound/cards | sed 's/.* irq \(.*\)/\1/'`
>
>
> however I recommend doing it the second way, that is making it all
> deterministic and independent from the booting order resolution, which
> might change when you less expect with the weather ;)

As I've had so many problems getting realtime setup, I think I'll go for the
rtirq script hack, and will probably learn a bit more on how the script
works.
>
> cheers

btw: Running /etc/rc.d/init.d/rtirq status on Fedora 7 shows IRQ-10 sharing
the stuff from IRQ-9 above, with emu10k1, and I'm getting xruns about every
6m 25secs with jackd started.

/etc/rc.d/init.d/rtirq status

  PID CLS RTPRIO  NI PRI %CPU STAT COMMAND
  890 FF      80   - 120   0.0 S<   IRQ-8        rtc0
  920 FF      75   - 115  0.1 S<   IRQ-10       ohci1394, bttv0, Bt87x audio,
EMU10K1
   60 FF      70   - 110  0.0 S<   IRQ-11       acpi, uhci_hcd:usb1,
uhci_hcd:usb2, eth0
  285 FF      65   - 105  0.0 S<   IRQ-1        i8042
  284 FF      64   - 104  0.0 S<   IRQ-12       i8042
    5 FF      50   -  90  0.0 S<   softirq-high/0
    6 FF      50   -  90  0.3 S<   softirq-timer/0
    7 FF      50   -  90  0.0 S<   softirq-net-tx/
    8 FF      50   -  90  0.0 S<   softirq-net-rx/
    9 FF      50   -  90  0.0 S<   softirq-block/0
   10 FF      50   -  90  0.0 S<   softirq-tasklet
   11 FF      50   -  90  0.0 S<   softirq-sched/0
   12 FF      50   -  90  0.0 S<   softirq-hrtimer
   13 FF      50   -  90  0.0 S<   softirq-rcu/0
  324 FF      50   -  90  0.0 S<   IRQ-14       libata
  325 FF      50   -  90  0.0 S<   IRQ-15       libata
  674 FF      50   -  90  0.0 S<   IRQ-6        floppy
  895 FF      50   -  90  0.0 S<   IRQ-7        parport0

The TV card using bttv has been very hit and miss on which IRQ is used. On
some distros it is IRQ-10, on others IRQ-9. A bit confusing, but once set up
it appears to use the same IRQ everytime on the different distros.

Thanks for your reply Rui.

Nigel.


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