[alsa-devel] [ALSA-UTILS][PATCH] Add support for cplay and crecord

Takashi Iwai tiwai at suse.de
Wed Mar 4 17:21:20 CET 2015


At Wed, 4 Mar 2015 21:40:13 +0530,
Vinod Koul wrote:
> 
> On Wed, Mar 04, 2015 at 03:36:00PM +0000, Qais Yousef wrote:
> > cplay and crecord use compress offload API to play and record compressed audio.
> > 
> > They're based on cplay and crec from tinycompress library using LGPL license.
> > 
> > For now cplay only supports playing mp3 files.
> > 
> > Signed-off-by: Qais Yousef <qais.yousef at imgtec.com>
> > Cc: Takashi Iwai <tiwai at suse.de>
> > Cc: Vinod Koul <vinod.koul at intel.com>
> > Cc: Mark Brown <broonie at kernel.org>
> > ---
> > I renamed crec to crecord also to match aplay and arecord, hopefully
> > you don't mind Vinod.
> No thats fine..
> 
> > 
> > This patch is dependent on my other patch that adds support for compress offload
> > to alsa-lib.
> And where is that, should have preceded this
> > 
> > I needed to include <sound/compress_params.h> in cplay.c and crec.c
> > but I couldn't find an example of any C file which directly includes <sound/*.h>
> > The norm seems to be to just include <alsa/asoundlib.h>. Do I need to
> > redefine structs from <sound/compress_params.h> to newly added <alsa/compress.h>?
> > <alsa/pcm.h> seems to redefine structs from <sound/asound.h>.
> These are kernel headers and should be in your include path if you have
> those installed

This can't be guaranteed because each kernel may provide a different
set of include files.  Currently alsa-lib is packaged as
self-contained so that it can be built with less dependency and
provide user-space also build without kernel headers.  That said, 
user-space apps should read only alsa/*.h, not sound/*.h in general,
except for the very h/w-specific one.  It's an intended separation.
(But it's a waste of spaces, yes.)


Takashi


More information about the Alsa-devel mailing list