[alsa-devel] SALSA and aplay

Takashi Iwai tiwai at suse.de
Tue Jul 17 13:58:40 CEST 2007


At Tue, 17 Jul 2007 12:33:36 +0100,
Alan Horstmann wrote:
> 
> On Monday 16 July 2007 13:30, you wrote:
> > At Mon, 16 Jul 2007 13:40:23 +0100,
> >
> > Alan Horstmann wrote:
> > > Quick questions:
> > >
> > > 1. Does SALSA provide everything needed by aplay?
> >
> > Most but not everything.  The missing features are:
> > - snd_pcm_mmap_read*/write*() (corresponding to -M option)
> > - device listing (namehint)
> 
> Thanks.  Presumably that explains 'undeclared' error for 'snd_devname_t' and 
> 'snd_config' when linking aplay code to salsa.  I commented out all 
> applicable bits and it is OK.
> 
> Can salsa-lib be installed at the same time as alsa-lib?  There seems to be 
> conflicts.  For now I have uninstalled and installed alternately.

For the runtime environment, yes, but not for the development since
both salsa and alsa-lib use the same header file location.
But, in principle, it doesn't make much sense to use salsa-lib where
alsa-lib is available and needed.

> I have very crudely hacked the aplay code and included it as a function in 
> code to make a simple key-press play a set file.  Linking -lasound this seems 
> to work fine.  However, linking -lsalsa results in the file playing too fast, 
> but not as much as double.

Probably you are playing the samples with the hardware parameters that
the hardware doesn't support.  alsa-lib has plugin layer which can
convert appropriatley on the fly.

> As my experimental system has ice1712 card, I am having to use a 10 track WAV 
> file S32_LE as I think that is the only format supported, the card working 
> with 24-bits loose fitted in 32-bits.  Is that right?

Yes.

>  Is there still 
> something that alsa-lib is doing to the data that salsa doesn't?  My example 
> wav file was recorded using standard  aplay, and has meaningful sound just on 
> the first 4 tracks, which appear correctly in pcm out 1-4 (visible in 
> envy24control), at the correct level, just too fast.  The included aplay 
> correctly reports
> 
> 	try3.wav' : Signed 32 bit Little Endian, Rate 44100 Hz, Channels 10
> 
> when begining to play.

ice1712 always requires 10-channel interleaved format, regardless how
many physical I/O the device has.


Takashi


More information about the Alsa-devel mailing list