The Advanced Linux Sound Architecture (ALSA) - library
Find a file
Andreas Pape 9a495cfc90 pcm: direct: correctly apply existing interval settings
Feature 'variable periodsize' allows to extend user period size up to buffer_size/2 independent of slave period.
On enlargement of the settings for period_time.max and period_size.max the setting for openmax was not updated.

This lead to the effect, that if the slave period itself had openmax set it was still set on the extended size.
Configuration of a period matching half buffer size was thus rejected.

Example for failure: period size of 384 (half buffer size) is requested which is rejected and rounded down to 352:

root@oracle-virtualbox:~# arecord -DDSNOOP_32 -r48000 -fS16_LE -c2 --period-size=382 -vv --dump-hw-params > /dev/null
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
HW Params of device "DSNOOP_32":
--------------------
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED RW_NONINTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (666 7334)
PERIOD_SIZE: [32 352]
PERIOD_BYTES: [128 1408]
PERIODS: [2 24]
BUFFER_TIME: (1333 16000]
BUFFER_SIZE: [64 768]
BUFFER_BYTES: [256 3072]
TICK_TIME: ALL
--------------------
Direct Snoop PCM
Its setup is:
  stream       : CAPTURE
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 704
  period_size  : 352
  period_time  : 7333
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 352
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 704
  silence_threshold: 0
  silence_size : 0
  boundary     : 6341068275337658368
Hardware PCM card 0 'Intel 82801AA-ICH' device 0 subdevice 0
Its setup is:
  stream       : CAPTURE
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 768
  period_size  : 32
  period_time  : 666
  tstamp_mode  : ENABLE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 32
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 6917529027641081856
  silence_threshold: 0
  silence_size : 0
  boundary     : 6917529027641081856
  appl_ptr     : 0
  hw_ptr       : 224

When correctly applying the openmax setting:

root@oracle-virtualbox:~# arecord -DDSNOOP_32 -r48000 -fS16_LE -c2 --period-size=382 -vv --dump-hw-params > /dev/null
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
HW Params of device "DSNOOP_32":
--------------------
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED RW_NONINTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (666 8000]
PERIOD_SIZE: [32 384]
PERIOD_BYTES: [128 1536]
PERIODS: [2 24]
BUFFER_TIME: (1333 16000]
BUFFER_SIZE: [64 768]
BUFFER_BYTES: [256 3072]
TICK_TIME: ALL
--------------------
Direct Snoop PCM
Its setup is:
  stream       : CAPTURE
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 768
  period_size  : 384
  period_time  : 8000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 384
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 768
  silence_threshold: 0
  silence_size : 0
  boundary     : 6917529027641081856
Hardware PCM card 0 'Intel 82801AA-ICH' device 0 subdevice 0
Its setup is:
  stream       : CAPTURE
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 768
  period_size  : 32
  period_time  : 666
  tstamp_mode  : ENABLE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 32
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 6917529027641081856
  silence_threshold: 0
  silence_size : 0
  boundary     : 6917529027641081856
  appl_ptr     : 0
  hw_ptr       : 224

Signed-off-by: Andreas Pape <apape@de.adit-jv.com>
2020-06-17 13:42:35 +02:00
.github/workflows github actions: ubuntu - fix the non-interactive build 2020-06-02 13:16:55 +02:00
alsalisp Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
aserver Use __func__ instead of __FUNCTION__ 2019-06-12 08:52:07 +02:00
doc doxygen: Suppress timestamp 2016-06-23 16:29:07 +02:00
include use-case.h: define Linked variable 2020-06-07 17:41:04 +02:00
m4 Update the attributes.m4 macro file from xine 2020-01-03 19:13:13 +01:00
modules snd_dlopen: implement the relocatable version for glibc 2020-06-04 19:09:58 +02:00
src pcm: direct: correctly apply existing interval settings 2020-06-17 13:42:35 +02:00
test test: pcm_min - add snd_pcm_drain() call and indentation fixes 2020-05-03 20:07:55 +02:00
utils alsa.m4: another fix to not link all binaries with -latopology 2020-02-18 19:45:19 +01:00
.gitignore initial version of .travis.yml file 2018-10-24 16:07:58 +02:00
.travis.yml initial version of .travis.yml file 2018-10-24 16:07:58 +02:00
acinclude.m4 fixed for the recent autoconf. 2004-01-26 15:52:17 +00:00
ChangeLog * update to libtool 1.3.3 1999-07-22 12:18:42 +00:00
configure.ac Release v1.2.3 2020-06-08 13:42:38 +02:00
COPYING Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
gitcompile add support for GCC's LTO 2019-04-09 12:44:14 +02:00
INSTALL pcm: Add thread-safety to PCM API 2016-07-11 15:25:30 +02:00
Makefile.am create separated libatopology library with the topology routines 2019-11-14 15:01:12 +01:00
MEMORY-LEAK Initial version 2003-02-04 14:56:07 +00:00
NOTES Change assert condition in error message handler 2007-10-24 12:53:08 +02:00
README.md README.md: add build status badge 2020-02-18 15:04:52 +01:00
TODO Added snd_config_load_override(). 2002-01-09 21:28:15 +00:00

alsa-lib

Advanced Linux Sound Architecture (ALSA) project

Build alsa-lib

The alsa-lib is a library to interface with ALSA in the Linux kernel and virtual devices using a plugin system.

The up-to-date reference generated from sources can be accessed here:

http://www.alsa-project.org/alsa-doc/alsa-lib/

You may give a look for more information about the ALSA project to URL http://www.alsa-project.org.