Commit Graph

401 Commits

Author SHA1 Message Date
Lucas Tanure 25e6dba5ae makefile: Don't overwrite CROSS_COMPILE variable
Signed-off-by: Lucas Tanure <tanure@linux.com>
2019-05-11 09:35:13 +01:00
Taylor Holberton 82498f8328 Merge pull request #128 from alexonea/master
Easier Version Specification
2019-04-13 23:14:34 -04:00
Taylor Holberton d233d98fb0 Merge pull request #130 from pasqualirb/master
pcm: Remove setting unnecessary parameters
2019-04-13 23:03:17 -04:00
Ricardo Biehl Pasquali dedf7159f9 pcm: Remove setting unnecessary parameters
SUBFORMAT is always zero.

SAMPLE_BITS and FRAME_BITS are refined by ALSA based on the
already set FORMAT and CHANNELS.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-04-12 14:48:16 -03:00
Taylor Holberton 50faa7e851 Merge pull request #129 from DanielaBistrean/master
Fix integer division issue in int_to_percent function
2019-04-11 19:23:36 -04:00
Daniela-Marinela Bistrean b098275b93 Fix integer division issue in int_to_percent function
Changed order of operations to preserve the precision during the division.
2019-04-12 01:27:52 +03:00
Alexandru N. Onea 2d56242143 Move changelog check ver. from build systems to CI
This commit moves the changelog version check to the CI instead of the build
systems. Rationale is: the failure to update the changelog is not a build
failure / issue but rather an integration failure and it should be detected at
integration testing. The closest to integration testing is the CI testing which
is mandatory before pull requests and new features integration.

Additionally, the old version.py script is removed because it is relying on the
old version of include/tinyalsa/version.h where the TINYALSA_VERSION_STRING
macro is defiend as an explicit string literal. Since now the version string is
defined piece-wise and based on the individual version numbers, and since the
introduction of version.sh and its use within meson build system to get the
version from the version file, the old version.py script is obsolete.
2019-04-11 13:02:35 +03:00
Alexandru N. Onea b7a6c7b04d Rename version-bump to just version 2019-04-10 01:00:58 +03:00
Alexandru N. Onea be4b2632c8 Add dry-run option to version-bump.sh 2019-04-10 00:45:38 +03:00
Alexandru N. Onea 1230f141c0 Minor improvements to version-bump.sh 2019-04-10 00:30:22 +03:00
Alexandru N. Onea 7d859aeadd Add check action to version-bump.sh; Activate checks 2019-04-09 22:16:23 +03:00
Alexandru N. Onea 0c63459cd5 Add release action to version-bump.sh 2019-04-09 21:16:34 +03:00
Alexandru N. Onea ad1f0e569c Initial version-bump.sh 2019-04-09 01:23:10 +03:00
Alexandru N. Onea 5879db0e35 Generate final version string and number based on major, minor and patch 2019-04-08 12:20:28 +03:00
Taylor Holberton a78d541b78 Merge pull request #125 from afordcirrus/master
tinymix: fix use of -D with set command
2019-01-15 06:52:22 -05:00
Andrew Ford eade1f9124 tinymix: fix use of -D with set command
Signed-off-by: Andrew Ford <aford@opensource.cirrus.com>
2019-01-15 10:54:29 +00:00
Taylor Holberton 9203fe8030 Checking for error in pcm_writei example 2019-01-13 13:23:46 -05:00
Taylor Holberton 7cbd38cbdd Merge branch 'develop' 2019-01-13 13:16:52 -05:00
Taylor Holberton 0178c72b88 Added the 'attributes.h' header 2019-01-13 13:10:47 -05:00
Ricardo Biehl Pasquali f98e01afc2 pcm: Check for error after setting appl_ptr
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 16:48:19 -02:00
Ricardo Biehl Pasquali 85d24bb721 pcm: Cleanup control/status when setup fails
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 16:48:19 -02:00
Ricardo Biehl Pasquali a51d11460c pcm: Replace 'underruns' with 'xruns'
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 16:48:19 -02:00
Ricardo Biehl Pasquali a384607242 pcm: Create generic transfer
Group read/write transfer into pcm_rw_transfer().

Create pcm_generic_transfer() for read/write and mmap
transfer modes. This recovers from xrun and suspended.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 16:48:19 -02:00
Ricardo Biehl Pasquali 738c48eb12 pcm: Put transfer functions together
A generic transfer function will be created. Put together
functions related to it.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 16:48:19 -02:00
Ricardo Biehl Pasquali 865dcf79e0 pcm: Remove 'running' variable from pcm structure
It is not needed.

As the pcm structure is opaque to user it can be safely
removed.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 16:48:19 -02:00
Ricardo Biehl Pasquali 25685b5829 pcm: Rewrite pcm_mmap_transfer() for compatibility
Make pcm_mmap_transfer() compatible with read/write IO.

start_threshold check was not valid for capture.

pcm->running checks were removed.

NOIRQ fallback was removed. Clocks of sound devices may
differ from the system, leading to desynchronization.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 16:48:19 -02:00
Ricardo Biehl Pasquali fb1683e0cc pcm: Exit loop when there are no available frames
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 16:48:19 -02:00
Ricardo Biehl Pasquali 1832b6911b pcm: Put mmap functions together
pcm_mmap_transfer() will be rewritten. Put together
functions related to mmap transfer.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 16:48:19 -02:00
Ricardo Biehl Pasquali 08aff7bde2 pcm: Add macro for PREPARED state
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 16:48:19 -02:00
Ricardo Biehl Pasquali 7a1de1965e pcm: Rewrite pcm_get_htimestamp()
Use pcm_avail_update(), check avail for timestamp
coherence.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 16:48:07 -02:00
Ricardo Biehl Pasquali dd8ec69106 pcm: Move pcm_get_htimestamp()
pcm_get_htimestamp() will be rewritten. Place it after
pcm_avail_update(), which will be used in the rewrite.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:06:19 -02:00
Ricardo Biehl Pasquali 57efda93e7 pcm: Get values from kernel in avail_update
Instead of sending appl_ptr and avail_min to the kernel,
get them. This is the behavior of alsa-lib.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:06:19 -02:00
Ricardo Biehl Pasquali 323d2f5a41 pcm: Call HWSYNC ioctl when status is mmaped
When hardware pointer update is requested and status
structure is mmaped, call HWSYNC ioctl.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:06:19 -02:00
Ricardo Biehl Pasquali c8ef079a06 pcm: Remove HWSYNC before available calculation
Hardware pointer should not be updated in available
calculation.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:06:19 -02:00
Ricardo Biehl Pasquali 795995b3f1 pcm: Do not set values after control/status mmap
It's not necessary to send appl_ptr or avail_min to the
kernel here.

In prepare action, called later in pcm_open(), appl_ptr
becomes zero.

avail_min is already defined in software parameters.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:06:19 -02:00
Ricardo Biehl Pasquali 9b0847fbca pcm: Get appl_ptr and avail_min after prepare
appl_ptr becomes zero in prepare action. avail_min is the
same as when it was set in software parameters.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:06:18 -02:00
Ricardo Biehl Pasquali 444290cc9b pcm: Remove 'prepared' variable from pcm structure
It is not needed.

As the pcm structure is opaque to user it can be safely
removed.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:06:18 -02:00
Ricardo Biehl Pasquali 1124ab002f pcm: Remove prepare before start
Prepare is done in pcm_open().

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:06:18 -02:00
Ricardo Biehl Pasquali c97c854762 pcm: Remove start before read
Start is done by kernel when start_threshold or more frames
are requested.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:06:18 -02:00
Ricardo Biehl Pasquali 90683e0e22 pcm: Prepare after overrun
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:06:18 -02:00
Ricardo Biehl Pasquali 447f8ff75f pcm: Remove code assuming start after write
The state cannot be assumed as RUNNING after a write
because start_threshold may not have elapsed.

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:06:18 -02:00
Ricardo Biehl Pasquali 30a18cbb52 pcm: Move prepare action to xrun handling
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:06:18 -02:00
Ricardo Biehl Pasquali 5a66a188ee pcm: Do prepare action in pcm_open()
This eliminates the need for prepare in transfer functions
and pcm_start().

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08 13:05:27 -02:00
Taylor Holberton e6c9e35c11 Fixed some doxygen references. 2018-12-22 10:20:15 -05:00
Taylor Holberton 6a3ff009f8 Installing ninja on travis build. 2018-12-17 14:56:53 +00:00
Taylor Holberton 1573fd70f1 Installing correct version of python-setuptools 2018-12-17 14:51:49 +00:00
Taylor Holberton 067a674671 Installing python setup tools, checking with clang 2018-12-17 14:48:08 +00:00
Taylor Holberton 15e0da3494 Upgrading pip before meson install. 2018-12-17 14:21:54 +00:00
Taylor Holberton dd10bf1a30 Using xenial for Travis build. 2018-12-17 14:17:00 +00:00
Taylor Holberton e74b1942ce Putting version.py in scripts folder 2018-12-17 14:00:34 +00:00