From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: tiwai@suse.de, Vinod Koul <vinod.koul@linux.intel.com>,
alsa-devel@alsa-project.org, lrg@ti.com
Subject: Re: [RFC 2/5] compress: add compress parameter definations
Date: Sat, 3 Sep 2011 01:05:14 +0100 [thread overview]
Message-ID: <20110903000514.GB31813@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1314991562.2298.11.camel@plb-Dell>
On Fri, Sep 02, 2011 at 02:26:01PM -0500, Pierre-Louis Bossart wrote:
> > > +/* AUDIO CODECS SUPPORTED */
> > > +#define MAX_NUM_CODECS 32
> > > +#define MAX_NUM_CODEC_DESCRIPTORS 32
> > > +#define MAX_NUM_RATES 32
> > > +#define MAX_NUM_BITRATES 32
> > Can we avoid these limitations? The limit on the number of CODECs in
> > particular strikes me as not sufficiently high for me to be confident
> > we'd never run into it. Consider a server side telephony system...
> The MAX_NUM_CODECS is actually the number of formats supported by your
> firmware, it's not related to the number of streams supported in
> parallel on your hardware. We could see support for 8 MP3 decoders, the
> number of codecs would be 1. This was dynamic but we limited it to make
> our life simpler. There's no problem to make it more flexible.
Yeah, I know. I can't think it'll be a practical issue right now but
it's near enough to actual numbers that it doesn't make me happy seeing
it hard coded into an ABI. The issue with server side telephony stuff
is that you end up interoperating with all sorts of weird stuff, some of
the PSTN stuff I used to work on would be getting close to this limit
due to some of the funky file formats people liked to do records in.
> We can align the sampling rates to use the exising ALSA definitions.
> The descriptors correspond to the number of variations for a given
> format, we can probably restrict it to 32...
That one is probably reasonable, yes.
> > I'd be inclined to add:
> > +#define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C)
> > +#define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D)
> > for VoIP usage as part of the default set but obviously it doesn't
> > really matter as it's trivial to add new numbers.
> Yes we can add these codecs, but it's actually extremely difficult to do
> any kind of hw acceleration for VoIP. G723.1 needs extra signaling for
> bad/lost frames, and you may want coupling between jitter buffer
> management, decoding and possibly a time-stretching solution to
> compensate for timing issues or dropped frames. This is difficult to
It's really not that hard, and there's also also the answerphone use
case where you're not dealing with a live VoIP stream but rather the
recorded data from one. That was actually my main thought here - an
answerphone type thing rather than calls.
The G.723.1 lost frame stuff is generally just totally ignored, I'd be
astonished if anyone ever implements it and I'm not convinced from
memory that there's even a place for it in the RTP encoding.
> implement if the speech encoding/decoding is done on the DSP, while the
> jitter buffer management is done on the host. The data transfers based
> on ringbuffers/DMAs makes it also difficult to handle frames of varying
> sizes while limiting latency.
Yes, you would be using a message based thing if it were live audio
(which might be DMAed obviously but nothing like a single audio stream
with a single buffer) - the sort of thing copy() is good for. The DMA
ring buffers just don't make much sense with the low volume low latency
traffic a live VoIP call generates.
> I'd rather push RTP packets down to the DSP and have the complete VoIP
> stack handled there.
Better yet, have a network stack on the DSP and never bother the host
with the data in the first place.
next prev parent reply other threads:[~2011-09-03 0:05 UTC|newest]
Thread overview: 133+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-02 6:06 [RFC 0/5] compress: add compress data API to ALSA kernel Vinod Koul
2011-09-02 6:06 ` [RFC 1/5] compress API documentation Vinod Koul
2011-09-02 6:06 ` [RFC 2/5] compress: add compress parameter definations Vinod Koul
2011-09-02 6:49 ` Paul Menzel
2011-09-02 19:54 ` Pierre-Louis Bossart
2011-09-03 6:28 ` Mark Brown
2011-09-02 14:19 ` Mark Brown
2011-09-02 19:26 ` Pierre-Louis Bossart
2011-09-03 0:05 ` Mark Brown [this message]
2011-09-02 6:06 ` [RFC 3/5] compress: add API header and driver header files Vinod Koul
2011-09-02 13:36 ` Clemens Ladisch
2011-09-03 2:59 ` Vinod Koul
2011-09-02 6:06 ` [RFC 4/5] compress: add the core file Vinod Koul
2011-09-02 14:36 ` Mark Brown
2011-09-03 3:06 ` Vinod Koul
2011-09-05 17:43 ` Mark Brown
2011-09-05 21:21 ` Vinod Koul
2011-09-07 13:59 ` Dimitris Papastamos
2011-09-07 14:12 ` Dimitris Papastamos
2011-09-07 18:00 ` Vinod Koul
2011-09-07 15:20 ` Dimitris Papastamos
2011-09-07 18:05 ` Vinod Koul
2011-09-08 10:38 ` Dimitris Papastamos
2011-09-08 23:18 ` Vinod Koul
2011-09-22 13:01 ` Dimitris Papastamos
2011-09-23 5:41 ` Vinod Koul
2011-09-23 11:07 ` Vinod Koul
2011-09-02 6:06 ` [RFC 5/5] compress: add makefile and kconfig file Vinod Koul
2011-09-02 11:30 ` [RFC 0/5] compress: add compress data API to ALSA kernel Mark Brown
2011-09-02 14:04 ` Pierre-Louis Bossart
[not found] ` <000601cc6979$437b11c0$ca713540$@bossart@linux.intel.com>
2011-09-02 14:23 ` Mark Brown
2011-11-22 8:51 ` [PATCH 0/6] " Vinod Koul
2011-12-05 7:39 ` [PATCH v3 0/6] core: " Vinod Koul
2011-12-06 7:27 ` Jassi Brar
2011-12-06 8:07 ` Vinod Koul
2011-12-07 10:04 ` Vinod Koul
2011-12-07 16:15 ` Mark Brown
2011-12-13 9:02 ` [PATCH v4 " Vinod Koul
2011-12-13 9:02 ` [PATCH v4 1/6] compress API documentation Vinod Koul
2011-12-13 9:02 ` [PATCH v4 2/6] core: add support for compressed devices Vinod Koul
2011-12-22 7:34 ` Takashi Iwai
2011-12-22 8:15 ` Vinod Koul
2011-12-13 9:02 ` [PATCH v4 3/6] core: add compress parameter definations Vinod Koul
2011-12-22 7:35 ` Takashi Iwai
2011-12-22 8:16 ` Vinod Koul
2011-12-13 9:02 ` [PATCH v4 4/6] core: add API header and driver header files Vinod Koul
2011-12-13 9:02 ` [PATCH v4 5/6] core: add support for compress_offload Vinod Koul
2011-12-13 12:48 ` Nallasellan, Singaravelan
2011-12-13 14:12 ` Vinod Koul
2011-12-13 16:02 ` Nallasellan, Singaravelan
2011-12-13 17:53 ` Vinod Koul
2011-12-14 5:17 ` Nallasellan, Singaravelan
2011-12-20 9:26 ` Vinod Koul
2011-12-22 7:55 ` Takashi Iwai
2011-12-22 8:19 ` Vinod Koul
2011-12-22 8:27 ` Takashi Iwai
2011-12-22 8:31 ` Vinod Koul
2011-12-22 8:44 ` Takashi Iwai
2011-12-22 8:48 ` Vinod Koul
2011-12-22 8:51 ` Takashi Iwai
2011-12-13 9:03 ` [PATCH v4 6/6] core: add makefile and kconfig file for compress Vinod Koul
2011-12-23 5:06 ` [PATCH v5 0/6] core: add compress data API to ALSA kernel Vinod Koul
2011-12-23 9:37 ` Takashi Iwai
2011-12-23 11:37 ` Vinod Koul
2011-12-23 5:06 ` [PATCH v5 1/6] compress offload API documentation Vinod Koul
2011-12-23 5:06 ` [PATCH v5 2/6] core: add support for compressed devices Vinod Koul
2011-12-23 5:06 ` [PATCH v5 3/6] core: add compress parameter definations Vinod Koul
2011-12-23 5:06 ` [PATCH v5 4/6] core: add API header and driver header files Vinod Koul
2011-12-23 5:06 ` [PATCH v5 5/6] core: add support for compress_offload Vinod Koul
2011-12-23 5:06 ` [PATCH v5 6/6] core: add makefile and kconfig file for compress Vinod Koul
2011-12-05 7:39 ` [PATCH v3 1/6] compress API documentation Vinod Koul
2011-12-05 7:39 ` [PATCH v3 2/6] core: add support for compressed devices Vinod Koul
2011-12-05 7:39 ` [PATCH v3 3/6] core: add compress parameter definations Vinod Koul
2011-12-05 7:39 ` [PATCH v3 4/6] core: add API header and driver header files Vinod Koul
2011-12-13 6:11 ` Mark Brown
2011-12-13 6:31 ` Vinod Koul
2011-12-13 7:03 ` Takashi Iwai
2011-12-13 7:50 ` Vinod Koul
2011-12-13 7:53 ` Mark Brown
2011-12-13 9:03 ` Vinod Koul
2011-12-05 7:39 ` [PATCH v3 5/6] core: add support for compress_offload Vinod Koul
2011-12-13 6:09 ` Mark Brown
2011-12-13 6:29 ` Vinod Koul
2011-12-05 7:39 ` [PATCH v3 6/6] core: add makefile and kconfig file for compress Vinod Koul
2011-11-22 8:51 ` [PATCH 1/6] compress API documentation Vinod Koul
2011-11-22 8:51 ` [PATCH 2/6] core: add support for compressed devices Vinod Koul
2011-11-23 11:30 ` Mark Brown
2011-11-22 8:51 ` [PATCH 3/6] compress: add compress parameter definations Vinod Koul
2011-11-23 16:32 ` Mark Brown
2011-11-22 8:51 ` [PATCH 4/6] compress: add API header and driver header files Vinod Koul
2011-11-22 11:18 ` Clemens Ladisch
2011-11-22 13:14 ` Vinod Koul
2011-12-02 15:39 ` Nallasellan, Singaravelan
2011-12-02 18:58 ` Pierre-Louis Bossart
[not found] ` <000301ccb124$72a53370$57ef9a50$@bossart@linux.intel.com>
2011-12-04 7:41 ` Nallasellan, Singaravelan
2011-12-05 14:14 ` Pierre-Louis Bossart
[not found] ` <000001ccb358$2b9e4b70$82dae250$@bossart@linux.intel.com>
2011-12-05 14:19 ` Mark Brown
2011-12-06 2:55 ` Nallasellan, Singaravelan
2011-11-22 8:51 ` [PATCH 5/6] compress: add the core file Vinod Koul
2011-11-23 16:02 ` Mark Brown
2011-11-23 16:16 ` Vinod Koul
2011-11-23 16:31 ` Mark Brown
2011-11-23 16:34 ` Vinod Koul
2011-11-23 17:03 ` Takashi Iwai
2011-11-24 3:45 ` Vinod Koul
2011-11-24 8:51 ` Takashi Iwai
2011-11-24 9:32 ` Vinod Koul
2011-11-28 21:36 ` Pierre-Louis Bossart
[not found] ` <001201ccae15$c24d8bf0$46e8a3d0$@bossart@linux.intel.com>
2011-11-29 7:21 ` Takashi Iwai
2011-11-29 21:15 ` Pierre-Louis Bossart
[not found] ` <003001ccaedb$f4e30010$dea90030$@bossart@linux.intel.com>
2011-11-30 10:30 ` Mark Brown
2011-11-30 11:19 ` Takashi Iwai
2011-11-30 11:29 ` Vinod Koul
2011-11-30 11:41 ` Takashi Iwai
2011-11-30 12:00 ` Vinod Koul
2011-11-28 21:19 ` Pierre-Louis Bossart
[not found] ` <000f01ccae13$78fe38c0$6afaaa40$@bossart@linux.intel.com>
2011-11-29 7:31 ` Takashi Iwai
2011-12-01 13:28 ` Nallasellan, Singaravelan
2011-12-02 6:44 ` Vinod Koul
2011-12-02 10:17 ` Nallasellan, Singaravelan
2011-12-02 11:48 ` Vinod Koul
2011-12-02 16:24 ` Nallasellan, Singaravelan
2011-12-04 4:31 ` Vinod Koul
2011-12-04 8:14 ` Nallasellan, Singaravelan
2011-12-05 15:19 ` Pierre-Louis Bossart
[not found] ` <001501ccb361$3af49990$b0ddccb0$@bossart@linux.intel.com>
2011-12-06 3:00 ` Nallasellan, Singaravelan
2011-12-06 6:03 ` Vinod Koul
2011-12-06 8:07 ` Nallasellan, Singaravelan
2011-12-06 20:15 ` Pierre-Louis Bossart
[not found] ` <4ede780f.890bb50a.54a3.ffffcc4dSMTPIN_ADDED@mx.google.com>
[not found] ` <CAKg5Tpo6LgirbVVe9ZXNGN-xq7FTZvgAXNQ2HnXh=gwQHjn_Pw@mail.gmail.com>
2011-12-07 16:53 ` Nallasellan, Singaravelan
2011-11-22 8:52 ` [PATCH 6/6] compress: add makefile and kconfig file Vinod Koul
2011-11-23 16:03 ` Mark Brown
2011-11-23 16:23 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110903000514.GB31813@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@ti.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.de \
--cc=vinod.koul@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).