DSPRelated.com
Forums

Do I really need a DSP? If yes, how to choose one?

Started by alpb June 7, 2011
Hi everybody,

For our next project, we need to develop & engineer a VOIP gateway which
must support 8 radio channels. The codec is G.711 . The requirement for the
latency of voice on the gateway is 1/4 seconds. My gut feeling says that we
can accomplish this with by using a 8 channel professional sound card
(~$200) and PJSIP library without using a DSP, with the help of a Intel i7
processor and Linux OS. But everyone says it's impossible without using a
DSP because of the CPU overhead of RTP packets and G.711 codec handling.

Can I ask for your opinion? Do we really need a DSP (PCI) card? If yes, can
you recommend a reliable & affordable DSP for our basic ROIP? 

Thank you.



alpb wrote:

> For our next project, we need to develop & engineer a VOIP gateway which > must support 8 radio channels. The codec is G.711 . The requirement for the > latency of voice on the gateway is 1/4 seconds. My gut feeling says that we > can accomplish this with by using a 8 channel professional sound card > (~$200) and PJSIP library without using a DSP, with the help of a Intel i7 > processor and Linux OS. But everyone says it's impossible without using a > DSP because of the CPU overhead of RTP packets and G.711 codec handling.
A 100MHz PC can handle that easily. The "G.711 codec" is just one table lookup operation. Do everything by hand, don't need any libraries and linuxes. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Jun 7, 9:39&#4294967295;am, "alpb" <alpbozkurt78@n_o_s_p_a_m.gmail.com> wrote:
> Hi everybody, > > For our next project, we need to develop & engineer a VOIP gateway which > must support 8 radio channels. The codec is G.711 . The requirement for the > latency of voice on the gateway is 1/4 seconds. My gut feeling says that we > can accomplish this with by using a 8 channel professional sound card > (~$200) and PJSIP library without using a DSP, with the help of a Intel i7 > processor and Linux OS. But everyone says it's impossible without using a > DSP because of the CPU overhead of RTP packets and G.711 codec handling. > > Can I ask for your opinion? Do we really need a DSP (PCI) card? If yes, can > you recommend a reliable & affordable DSP for our basic ROIP? > > Thank you.
I'm not sure who "everyone" is, but they might be referring to the fact that most PC operating systems are not designed for hard real- time operation, which your hard requirement on latency would suggest. Contemporary Linux kernels do have some real-time extensions available to mitigate this, but I don't have much experience with that. While I'm not familiar with G.711, I would be very surprised if a modern x86 processor like an Intel i7 would have any issue supporting the processing load of 8 voice-grade channels. Your main issue is just ensuring that your processing task gets enough precedence to meet your latency requirements without being elbowed out of the way by other processes on the system. Jason
On 06/07/2011 07:36 AM, Jason wrote:
> On Jun 7, 9:39 am, "alpb"<alpbozkurt78@n_o_s_p_a_m.gmail.com> wrote: >> Hi everybody, >> >> For our next project, we need to develop& engineer a VOIP gateway which >> must support 8 radio channels. The codec is G.711 . The requirement for the >> latency of voice on the gateway is 1/4 seconds. My gut feeling says that we >> can accomplish this with by using a 8 channel professional sound card >> (~$200) and PJSIP library without using a DSP, with the help of a Intel i7 >> processor and Linux OS. But everyone says it's impossible without using a >> DSP because of the CPU overhead of RTP packets and G.711 codec handling. >> >> Can I ask for your opinion? Do we really need a DSP (PCI) card? If yes, can >> you recommend a reliable& affordable DSP for our basic ROIP? >> >> Thank you. > > I'm not sure who "everyone" is, but they might be referring to the > fact that most PC operating systems are not designed for hard real- > time operation, which your hard requirement on latency would suggest. > Contemporary Linux kernels do have some real-time extensions available > to mitigate this, but I don't have much experience with that. While > I'm not familiar with G.711, I would be very surprised if a modern x86 > processor like an Intel i7 would have any issue supporting the > processing load of 8 voice-grade channels. Your main issue is just > ensuring that your processing task gets enough precedence to meet your > latency requirements without being elbowed out of the way by other > processes on the system.
Whether your app will get the attention it deserves depends, in turn, on what else is going on with your machine. If you're going to have dedicated hardware that does nothing but implement your VOIP gateway, then you'll have control over all the apps, you'll be able to fine-tune the Linux installation, and _my_ gut feel is that you have a good chance of success. If, on the other hand, you're trying to do this on a machine to which everyone and his brother has access, then you've got a tough row to hoe. Keep in mind, too, that the more you depend on the processor to keep the data moving, the less flexibility you have to add apps -- if your marketing or product management team sees that box as an infinite sink for the latest whiz-bang 3rd-party apps, then you're doomed. If, on the other hand, you retain total control and feature creep does not become feature sprint, then you may be OK. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
On Tue, 07 Jun 2011 08:39:44 -0500, alpb wrote:
> For our next project, we need to develop & engineer a VOIP gateway which > must support 8 radio channels. The codec is G.711 . The requirement for > the latency of voice on the gateway is 1/4 seconds. My gut feeling says > that we can accomplish this with by using a 8 channel professional sound > card (~$200) and PJSIP library without using a DSP, with the help of a > Intel i7 processor and Linux OS. But everyone says it's impossible > without using a DSP because of the CPU overhead of RTP packets and G.711 > codec handling.
Out of interest, which professional 8 channel sound cards support Linux? Do they have open or closed-source drivers? Back in the PCI days there used to be support for RME Hammerfall, I think, but I don't know that that continued into the realm of PCIE or USB/Firewire versions. Been a while since I looked, though. I ask because I think that would be a nice DSP development environment, but most of the 8-chan sound cards that I've seen lately only claim Windows (not good for RT) or Mac (excellent RT but single-source hardware). Cheers, -- Andrew
On Jun 7, 3:39&#4294967295;pm, "alpb" <alpbozkurt78@n_o_s_p_a_m.gmail.com> wrote:
> Hi everybody, > > For our next project, we need to develop & engineer a VOIP gateway which > must support 8 radio channels. The codec is G.711 . The requirement for the > latency of voice on the gateway is 1/4 seconds. My gut feeling says that we > can accomplish this with by using a 8 channel professional sound card > (~$200) and PJSIP library without using a DSP, with the help of a Intel i7 > processor and Linux OS. But everyone says it's impossible without using a > DSP because of the CPU overhead of RTP packets and G.711 codec handling. > > Can I ask for your opinion? Do we really need a DSP (PCI) card?
Yes, you do need the DSP. While it might be *technically* possible to pull this off with a linux box, provided you get it all to yourself and are granted total contorl of what it does and how, you will never succeed. Because you will never get that linux box all to yourself, nor will you be granted total control of what it does and how. Once that box is placed inside whatever system you are working on, somebody - not you - will some time see it, and realize that it is a huge resource. And start adding bells and whistles to it. Once *that* happens, your application is screwed. So get on with the DSP. That way you use only the resources necessary to get the job done, at the same time you protect those resources from future interference. Rune
>On Jun 7, 3:39=A0pm, "alpb" <alpbozkurt78@n_o_s_p_a_m.gmail.com> wrote: >> Hi everybody, >> >> For our next project, we need to develop & engineer a VOIP gateway
which
>> must support 8 radio channels. The codec is G.711 . The requirement for
t=
>he >> latency of voice on the gateway is 1/4 seconds. My gut feeling says that
=
>we >> can accomplish this with by using a 8 channel professional sound card >> (~$200) and PJSIP library without using a DSP, with the help of a Intel
i=
>7 >> processor and Linux OS. But everyone says it's impossible without using
a
>> DSP because of the CPU overhead of RTP packets and G.711 codec
handling.
>> >> Can I ask for your opinion? Do we really need a DSP (PCI) card? > >Yes, you do need the DSP. > >While it might be *technically* possible to pull this off with >a linux box, provided you get it all to yourself and are granted >total contorl of what it does and how, you will never succeed. >Because you will never get that linux box all to yourself, nor >will you be granted total control of what it does and how. > >Once that box is placed inside whatever system you are working on, >somebody - not you - will some time see it, and realize that it >is a huge resource. And start adding bells and whistles to it. >Once *that* happens, your application is screwed. > >So get on with the DSP. That way you use only the resources >necessary to get the job done, at the same time you protect >those resources from future interference.
That is not an argument for using a DSP. Its a pretty valid argument for using a dedicated processor. For the poster's workload many MCUs will do a much better job that a DSP. G.711 is trivial. His main work is RTP and TCP/IP handling. Its much better *not* to do those on a DSP. Steve
On Jun 8, 8:10&#4294967295;am, "steveu" <steveu@n_o_s_p_a_m.coppice.org> wrote:
> >On Jun 7, 3:39=A0pm, "alpb" <alpbozkurt78@n_o_s_p_a_m.gmail.com> wrote: > >> Hi everybody, > > >> For our next project, we need to develop & engineer a VOIP gateway > which > >> must support 8 radio channels. The codec is G.711 . The requirement for > t= > >he > >> latency of voice on the gateway is 1/4 seconds. My gut feeling says that > = > >we > >> can accomplish this with by using a 8 channel professional sound card > >> (~$200) and PJSIP library without using a DSP, with the help of a Intel > i= > >7 > >> processor and Linux OS. But everyone says it's impossible without using > a > >> DSP because of the CPU overhead of RTP packets and G.711 codec > handling. > > >> Can I ask for your opinion? Do we really need a DSP (PCI) card? > > >Yes, you do need the DSP. > > >While it might be *technically* possible to pull this off with > >a linux box, provided you get it all to yourself and are granted > >total contorl of what it does and how, you will never succeed. > >Because you will never get that linux box all to yourself, nor > >will you be granted total control of what it does and how. > > >Once that box is placed inside whatever system you are working on, > >somebody - not you - will some time see it, and realize that it > >is a huge resource. And start adding bells and whistles to it. > >Once *that* happens, your application is screwed. > > >So get on with the DSP. That way you use only the resources > >necessary to get the job done, at the same time you protect > >those resources from future interference. > > That is not an argument for using a DSP. Its a pretty valid argument for > using a dedicated processor.
Dedicated *processor*, not dedicated *PC*.
> For the poster's workload many MCUs will do a > much better job that a DSP. G.711 is trivial. His main work is RTP and > TCP/IP handling. Its much better *not* to do those on a DSP.
DSP with a network or comm interface integrated? The OP can't be the first person in history to face kind of task? Rune
>On Jun 8, 8:10=A0am, "steveu" <steveu@n_o_s_p_a_m.coppice.org> wrote: >> >On Jun 7, 3:39=3DA0pm, "alpb" <alpbozkurt78@n_o_s_p_a_m.gmail.com>
wrote=
>: >> >> Hi everybody, >> >> >> For our next project, we need to develop & engineer a VOIP gateway >> which >> >> must support 8 radio channels. The codec is G.711 . The requirement
fo=
>r >> t=3D >> >he >> >> latency of voice on the gateway is 1/4 seconds. My gut feeling says
th=
>at >> =3D >> >we >> >> can accomplish this with by using a 8 channel professional sound
card
>> >> (~$200) and PJSIP library without using a DSP, with the help of a
Inte=
>l >> i=3D >> >7 >> >> processor and Linux OS. But everyone says it's impossible without
usin=
>g >> a >> >> DSP because of the CPU overhead of RTP packets and G.711 codec >> handling. >> >> >> Can I ask for your opinion? Do we really need a DSP (PCI) card? >> >> >Yes, you do need the DSP. >> >> >While it might be *technically* possible to pull this off with >> >a linux box, provided you get it all to yourself and are granted >> >total contorl of what it does and how, you will never succeed. >> >Because you will never get that linux box all to yourself, nor >> >will you be granted total control of what it does and how. >> >> >Once that box is placed inside whatever system you are working on, >> >somebody - not you - will some time see it, and realize that it >> >is a huge resource. And start adding bells and whistles to it. >> >Once *that* happens, your application is screwed. >> >> >So get on with the DSP. That way you use only the resources >> >necessary to get the job done, at the same time you protect >> >those resources from future interference. >> >> That is not an argument for using a DSP. Its a pretty valid argument
for
>> using a dedicated processor. > >Dedicated *processor*, not dedicated *PC*. > >> For the poster's workload many MCUs will do a >> much better job that a DSP. G.711 is trivial. His main work is RTP and >> TCP/IP handling. Its much better *not* to do those on a DSP. > >DSP with a network or comm interface integrated? The OP >can't be the first person in history to face kind of task? > >Rune
They exist, but he isn't doing any DSP at all. Why make life hard? Use the right tool for the job, which is not a DSP. Steve
On Jun 8, 11:28&#4294967295;am, "Steve Underwood"
<coppice@n_o_s_p_a_m.coppice.org> wrote:
> >On Jun 8, 8:10=A0am, "steveu" <steveu@n_o_s_p_a_m.coppice.org> wrote: > >> >On Jun 7, 3:39=3DA0pm, "alpb" <alpbozkurt78@n_o_s_p_a_m.gmail.com> > wrote= > >: > >> >> Hi everybody, > > >> >> For our next project, we need to develop & engineer a VOIP gateway > >> which > >> >> must support 8 radio channels. The codec is G.711 . The requirement > fo= > >r > >> t=3D > >> >he > >> >> latency of voice on the gateway is 1/4 seconds. My gut feeling says > th= > >at > >> =3D > >> >we > >> >> can accomplish this with by using a 8 channel professional sound > card > >> >> (~$200) and PJSIP library without using a DSP, with the help of a > Inte= > >l > >> i=3D > >> >7 > >> >> processor and Linux OS. But everyone says it's impossible without > usin= > >g > >> a > >> >> DSP because of the CPU overhead of RTP packets and G.711 codec > >> handling. > > >> >> Can I ask for your opinion? Do we really need a DSP (PCI) card? > > >> >Yes, you do need the DSP. > > >> >While it might be *technically* possible to pull this off with > >> >a linux box, provided you get it all to yourself and are granted > >> >total contorl of what it does and how, you will never succeed. > >> >Because you will never get that linux box all to yourself, nor > >> >will you be granted total control of what it does and how. > > >> >Once that box is placed inside whatever system you are working on, > >> >somebody - not you - will some time see it, and realize that it > >> >is a huge resource. And start adding bells and whistles to it. > >> >Once *that* happens, your application is screwed. > > >> >So get on with the DSP. That way you use only the resources > >> >necessary to get the job done, at the same time you protect > >> >those resources from future interference. > > >> That is not an argument for using a DSP. Its a pretty valid argument > for > >> using a dedicated processor. > > >Dedicated *processor*, not dedicated *PC*. > > >> For the poster's workload many MCUs will do a > >> much better job that a DSP. G.711 is trivial. His main work is RTP and > >> TCP/IP handling. Its much better *not* to do those on a DSP. > > >DSP with a network or comm interface integrated? The OP > >can't be the first person in history to face kind of task? > > >Rune > > They exist, but he isn't doing any DSP at all. Why make life hard? Use the > right tool for the job, which is not a DSP.
We could probably quarrel over semantics till the cows come home. In a real-time setting I'd still go for the smallest possible device that could get the job done. Simply to discourage others from elbowing in on tempting computational resources. Rune