On Thu, Aug 25, 2011 at 12:15 AM, Clemens Ladisch <cladisch@xxxxxxxxxxxxxx> wrote:
Raymond Toy wrote:This is possible. There isn't any particular combination of buffer/
> I'm working on an application where I wanted to do double-buffering and
> tried to set the buffer size to 4096 and the period size to 2048. However,
> the actual period size used by ALSA is 1365. In fact, it seems that
> whatever I choose for the buffer size, the period size used by ALSA is 1/3
> of the buffer size. Is this a limitation of the audio HW that I'm using?
period parameters that is guaranteed to be supported with all hardware.
If you want to have two periods, call snd_pcm_hw_params_set_periods
before try to set the other parameters, but this might fail.
I think I tried that and it failed, but I will try again to be sure.
HDA is quite flexible, but it's possible that you're using plugins that
> cat /proc/asound/cards says:
>
> 0 [Intel ]: HDA-Intel - HDA Intel
> HDA Intel at 0xf8000000 irq 21
introduce additional restrictions. What device name are you using in
your program? What plugins are shown when you run
"aplay -D devicename -v something.wav"?
It says:
Playing WAVE 'M1F1-int16WE-AFsp.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 8000
exact rate : 8000 (8000/1)
msbits : 16
buffer_size : 4000
period_size : 1000
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 1000
period_event : 0
start_threshold : 4000
stop_threshold : 4000
silence_threshold: 0
silence_size : 0
boundary : 9007199254740992000
I have read about PulseAudio potentially being a problem, but getting rid of it is not so easy. Besides, for the application I'm looking at, I won't have control over that.
Thanks,
Ray
------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________ Alsa-user mailing list Alsa-user@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-user