2011/11/23 Andrew Eikum aeikum@codeweavers.com:
Tweaked the snd_pcm_hw_params_t description to reflect how ALSA is intended to work, even if that's not how some plugins (pulse) currently work due to bugs.
include/pcm.h | 17 ++++++++++++++++- src/pcm/pcm.c | 10 +++++++++- 2 files changed, 25 insertions(+), 2 deletions(-)
But Tick time is already deprecated.
Some sound cards such au88x0 may return error when there is no enough SRC
and there is another error for plughw with snd-hda-intel
./alsa_period_count plughw:1 min periods 0 dir 1 max periods 4294967295 dir 0 min_buffer_frames: 10240 set max buffer size: 10240 snd_pcm_hw_params: -22 [raymond@localhost ~]$ export LIBASOUND_DEBUG=1 [raymond@localhost ~]$ ./alsa_period_count plughw:1 min periods 0 dir 1 max periods 4294967295 dir 0 min_buffer_frames: 10240 set max buffer size: 10240 ALSA ERROR hw_params: set (RATE) value = 4000 : Invalid argument ACCESS: MMAP_INTERLEAVED RW_INTERLEAVED FORMAT: S16_LE S32_LE SUBFORMAT: STD SAMPLE_BITS: [16 32] FRAME_BITS: [32 448] CHANNELS: [2 14] RATE: [8000 192000] PERIOD_TIME: (15 1024000] PERIOD_SIZE: [3 8192] PERIOD_BYTES: [128 458752] PERIODS: [2 32] BUFFER_TIME: (31 2048000] BUFFER_SIZE: [6 16384] BUFFER_BYTES: [128 65536] TICK_TIME: ALL ALSA ERROR hw_params: set (RATE) value = 4000 : Invalid argument ACCESS: MMAP_INTERLEAVED RW_INTERLEAVED FORMAT: S16_LE S32_LE SUBFORMAT: STD SAMPLE_BITS: [16 32] FRAME_BITS: [32 448] CHANNELS: [2 14] RATE: [8000 192000] PERIOD_TIME: (15 1024000] PERIOD_SIZE: [3 8192] PERIOD_BYTES: [128 458752] PERIODS: [2 32] BUFFER_TIME: (31 2048000] BUFFER_SIZE: [6 16384] BUFFER_BYTES: [128 65536] TICK_TIME: ALL snd_pcm_hw_params: -22