aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-01-08pcm: Put mmap functions togetherRicardo Biehl Pasquali
pcm_mmap_transfer() will be rewritten. Put together functions related to mmap transfer. Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08pcm: Add macro for PREPARED stateRicardo Biehl Pasquali
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08pcm: Rewrite pcm_get_htimestamp()Ricardo Biehl Pasquali
Use pcm_avail_update(), check avail for timestamp coherence. Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08pcm: Move pcm_get_htimestamp()Ricardo Biehl Pasquali
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-08pcm: Get values from kernel in avail_updateRicardo Biehl Pasquali
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-08pcm: Call HWSYNC ioctl when status is mmapedRicardo Biehl Pasquali
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-08pcm: Remove HWSYNC before available calculationRicardo Biehl Pasquali
Hardware pointer should not be updated in available calculation. Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08pcm: Do not set values after control/status mmapRicardo Biehl Pasquali
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-08pcm: Get appl_ptr and avail_min after prepareRicardo Biehl Pasquali
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-08pcm: Remove 'prepared' variable from pcm structureRicardo Biehl Pasquali
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-08pcm: Remove prepare before startRicardo Biehl Pasquali
Prepare is done in pcm_open(). Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08pcm: Remove start before readRicardo Biehl Pasquali
Start is done by kernel when start_threshold or more frames are requested. Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08pcm: Prepare after overrunRicardo Biehl Pasquali
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08pcm: Remove code assuming start after writeRicardo Biehl Pasquali
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-08pcm: Move prepare action to xrun handlingRicardo Biehl Pasquali
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2019-01-08pcm: Do prepare action in pcm_open()Ricardo Biehl Pasquali
This eliminates the need for prepare in transfer functions and pcm_start(). Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
2018-12-22Fixed some doxygen references.Taylor Holberton
2018-12-17Installing ninja on travis build.Taylor Holberton
2018-12-17Installing correct version of python-setuptoolsTaylor Holberton
2018-12-17Installing python setup tools, checking with clangTaylor Holberton
2018-12-17Upgrading pip before meson install.Taylor Holberton
2018-12-17Using xenial for Travis build.Taylor Holberton
2018-12-17Putting version.py in scripts folderTaylor Holberton
2018-12-17Testing all build systems in Travis CITaylor Holberton
2018-12-17Merge pull request #121 from tp-m/meson-extract-version-from-headerTaylor Holberton
meson: extract project version from header file and version .so
2018-12-16meson: extract project version from header file and version .soTim-Philipp Müller
- Extract project version from tinyalsa/version.h for easier maintainability - Version shared lib: tinyalsa.so -> tinyalsa.so.1.1.1
2018-12-15Merge pull request #120 from tp-m/mesonTaylor Holberton
Add support for Meson as build system
2018-12-15Add support for Meson as build systemTim-Philipp Müller
The Meson build system is being adopted by projects such as GNOME, PulseAudio, GStreamer, VLC, systemd, Mesa, Wayland, X.org, and many others. Having a meson build upstream in tinyalsa would allow for easy use of tinyalsa as a Meson subproject in other projects. https://mesonbuild.com
2018-11-28Fixed make build using clangTaylor Holberton
2018-11-28Added ifndef around macrosTaylor Holberton
2018-11-28Checking for definition of __bitwise, __force, __userTaylor Holberton
2018-10-30Added -fPIC and -pie flags to utility buildsTaylor Holberton
2018-07-20Merge pull request #115 from mgaio/fix/pcm_linkTaylor Holberton
Fix/pcm link
2018-07-17Fixed pcm_start when pcm is linked to other pcm deviceMiguel Gaio
When pcm device is linked to other pcm device, the start call may be triggered by other pcm device. Handle this condition by checing pcm state before start call. Signed-off-by: Miguel Gaio <mgaio35@gmail.com>
2018-07-17Corrected pcm_sync_ptr() on dma mmap coherent architectureMiguel Gaio
It is valid to get null sync_ptr on dma mmap coherent architecture. In this case pcm_sync_ptr() is a nop. Signed-off-by: Miguel Gaio <mgaio35@gmail.com>
2018-05-08Merge pull request #112 from charleskeepax/masterTaylor Holberton
Minor tweaks to enum controls
2018-04-11Update output format for enumerated controlsCharles Keepax
The current format of the data printed for enumeration controls is to list all the control values with no separator between them and to place a comma before the currently selected value. This format is hard to parse as a human and very difficult to parse automatically. Change this to separate individual values with a comma and mark the selected value with a right angle bracket. For example, the following output is given for the "AEC Loopback" control on one of our CODECs: HPOUT1LHPOUT1R, SPKOUTSPKDATLSPKDATR After the change this becomes: HPOUT1L, HPOUT1R, > SPKOUT, SPKDATL, SPKDATR, Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
2018-04-11Pull mixer_ctl_get_value out of loop in tinymix_print_enumCharles Keepax
It is only required to obtain the value of the control once whilst processing tinymix_print_enum. This will significantly reduce the amount of IOCTLs sent for reading an enum control. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
2018-04-11Fixup some minor code formatting issuesCharles Keepax
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
2018-04-10Merge pull request #111 from mgaio/topic/fix-pcm_readiTaylor Holberton
Fix pcm_writei return value if pcm is in not running state.
2018-04-10Fix pcm_writei return value if pcm is in not running state.Miguel GAIO
As per comment, on success, pcm_writei returns the number of frames written. Fix the case of pcm not running. Signed-off-by: Miguel GAIO <mgaio35@gmail.com>
2018-01-03Merge pull request #108 from dongjinguang-china/masterTaylor Holberton
Fixed potential risk of wild pointer
2018-01-03Fixed potential risk of wild pointerDong Jinguang
2017-12-15Merge pull request #107 from magicalvidyakitty/masterTaylor Holberton
Added reading from stdin.
2017-12-15Added reading from stdin.Magickal Feline
2017-11-06fixed short option in tinyplayTaylor Holberton
2017-10-19Merge pull request #104 from rfvirgil/masterTaylor Holberton
Replace old style Android.mk with new Android.bp
2017-10-19Replace old style Android.mk with new Android.bpRichard Fitzgerald
Create a new Android.bp file used by Android Oreo. There are dependencies on tinyalsa from other components in Oreo that use the new build system and these break if tinyalsa is using the older Android.mk build system. Oreo still picks up and tries to build the Android.mk found in the jni directory and this leads to a build conflict so it has been deleted. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
2017-10-12Fixed segfaultTaylor Holberton
2017-10-12added PCM_NONBLOCK macroTaylor Holberton