[alsa-devel] using ALSA one call

Clemens Ladisch clemens at ladisch.de
Wed Feb 11 09:55:00 CET 2009

Alfs Kurmis wrote:
> As given here
> http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#g6aa164ed37308d66bcc079f5cd265a09
> latency         required overall latency in us (0 = optimum latency for players)
> i have try to set  optimum latency = 0;

That documentation is wrong; 0 is not allowed.  Just use 0.5 s, or some
larger value.

> But why i can not play my wave on notebook sound device "hw:0,0" ??

Because the "hw" device goes straight to the hardware and disallows
any conversion of sample rate/format.

Use "default", or something like "default:0" to select a specific card.

> snd_pcm_set_params(handle, SND_PCM_FORMAT_S16_LE, SND_PCM_ACCESS_RW_INTERLEAVED,
>                    channelz, samplerate ,  0, 500000)

... and setting soft_resample to 0 disallows resampling in any case.


More information about the Alsa-devel mailing list