Re: [proaudio] Real-time for audio |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/proaudio Archives
]
- To: proaudio@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [proaudio] Real-time for audio
- From: Dominique Michel <dominique.michel@xxxxxxxxx>
- Date: Thu, 6 May 2010 20:07:33 +0200
- Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEXy8ubtkoXo7+b1+fbN cGKCeWDtamweFA8eMkmKPkPtvcWRoqyV0Pn7AAACbElEQVQ4jXXTMWvbQBQA4MOlizsdXEXp KAi09mKcLZ0EJxONDRJVkikg9AtqTm63gtHDmVJs1GsnC0JiaTMJGN2f67uzznJb+gZj9PFO 7717IqdtvCAmem4bxMLp/2BEyEBF1+U/0H8uhI6rv+BVLNrY/gH9T0L8yAxk2yMY3YuZxDCn TY/gpBByyTGktIcZOIvFjPNJmqYJDwrx3cIoBrE0zzG4FF8tfBAwM+DonKCYWjgROZ6Upjcm 5Qje58JAmlKKGfIAjzaDUuogZBY2Bjg14eDbywMIqZvwqgqFBcVFB0seYONLb00ZZlh4p0F6 FHNoUMyKAzxowJSQTyj+XloYs3MN3GeMpzyYSTMshLM00ODpWlPp4SDbqs4cViDcGAgmlK/a PsaOg7DvIQ3wzANMqB/iQW/XTkoTLO6XhSeHUoQKe+NLjyY/Ldx7CW2D4WTYhZ3V0GP64RpP Q/E66IUWMLj3+nDn4w2ejMACyXFeHZy6ETcZehc49bv1GQ/0bazNuzm97mDkhnoie9i30WYM w/YCnYT7Fx308s98n0IT//Jod1+aOzdzYXLVbftol+PC+REG3u+0AxdEtuSMB6G+DLGwMH4E vXGmJn8VCLM9LhmrOAMQYt5Wi/DFgIC52iFkUzMpDVmjAaDZRGC+JGwDqzJ/G5fUUcWZAaE7 YfvPLYtIU1Wb4A2IeS7uDMgcIFutiCr766qGfKHyuxvTIERKXVNSN27lDgCuBuojlpxIyJV6 ritS1uWWuHF2Ww7qcIKbqEFVNbmtmm3vGSCHbVXjikrY3SpVxwQWw2aIjwG+ueXTJDmHeK6a HfwGyU5ZSlGeSRQAAAAASUVORK5CYII=
Le Wed, 5 May 2010 11:13:56 -0700,
Grant <emailgrant@xxxxxxxxx> a écrit :
> >> I'm trying to set up a real-time system for audio playback via mpd.
> >> I've booted to rt-sources with CONFIG_PREEMPT_RT enabled. Do I need
> >> to set up jack and follow the real-time instructions here:
> >>
> >> http://jackaudio.org/faq
> >>
> >> Is there anything else I need to do?
> >>
> >> - Grant
> >
> > Hi there
> >
> > I'm not familiar with mpd at all but a realtime kernel for this seems a bit
> > overkill. The way I see it is a realtime kernel is tuned for low latency
> > interactivity for things like soft synths, effects and where you need the
> > responsiveness of live input with minimal delay.
> >
> > The reason is because playing a soft synth live via a midi keyboard is just
> > unplayable when you have say a hundred millisecond delay from playing a note
> > until when you actually hear it. With a realtime kernel you can get very low
> > latency and soft synths and the like become much more usable. For a daemon
> > playing music I don't see how this would make much difference but as I say
> > I'm not familiar with mpd.
> >
> > It seems you went down the right track though, one thing I might add is that
> > if you followed the jack faq, you need to add yourself to the audio group to
> > have realtime functionality for processes that you run. Or you could add the
> > username that mpd runs as to limits.conf instead, however I'm not sure of
> > the consequences of this.
> > Hope this helps and the best of luck in your endeavour.
> >
> > Best regards
> > Gavin
>
> Thank you Gavin. Do I need to prioritize both jack and mpd? Anything else?
>
> Since all I want to do is a straightforward playback of music via mpd,
> I think using jack is only necessary so I can use its reporting
> abilities to find out how real-time my system is. Is that correct?
>
> - Grant
>
>
If you follow the gentoo alsa guide http://www.gentoo.org/doc/en/alsa-guide..xml,
you need to be into the audio group anyway.
Now, rt audio, or rt in general is about 2 things, latency and task priority.
A very low latency is needed only at very high system load, as example
intensive audio filtering or synthesis. The price to pay is less throughput, but
you don't want to make a server.
With a rt kernel, you can setup both the hardware priorities and the software
priorities. That mean that tasks accessing some hardware, the sound card, will
have the priority over the other tasks, and that tasks executed by a given user
or group [the audio group] will have priority over the other. rtirq will dot
that for you. Just emerge it and add it into the default run level.
Be aware that if you don't really need a rt kernel, it is best to not use it,
because such a kernel can cause compilation failures with gcc.
http://bugs.gentoo.org/show_bug.cgi?id=190462
http://bugs.gentoo.org/show_bug.cgi?id=20600
For that raeson, if you want to use a rt kernel, it is good practice to have
another kernel of the same version, vanilla or gentoo sources, and reboot on
this non rt kernel when using emerge.
Dominique
--
If this message is send to an email list, please make sure to answer onto the
list, or you will be ignored.
"We have the heroes we deserve."