Commit Graph

320 Commits

Author SHA1 Message Date
Taylor Holberton df11091086 bumped version 1.1.1 2017-05-23 21:23:57 -07:00
Taylor Holberton 967ca5ca87 Merge pull request #97 from xpahos/master
Debian debug package
2017-05-23 20:53:26 -07:00
xpahos e57b43b93a Debian debug package 2017-05-23 22:11:58 +03:00
Taylor Holberton 3a4402855c Merge pull request #96 from subhransu-intel/master
Fix to pass num_frames to pcm_writei
2017-04-13 06:08:33 -07:00
Jaikrishna Nemallapudi e125261297 Fix to pass num_frames to pcm_writei
pcm_writei expects size of data in frames, whereas currently size
is passed as number of bytes. So convert number of bytes to frames
for argument to pcm_writei.

Signed-off-by: Jaikrishna Nemallapudi <jaikrishnax.nemallapudi@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
2017-04-13 14:06:15 +05:30
Taylor Holberton 001b25ef86 adding bounds check only when needed 2017-04-10 12:42:06 -07:00
Taylor Holberton 04b47b0831 corrected set_config function 2017-04-10 12:36:15 -07:00
Taylor Holberton 861da7ab05 moved code in pcm_open() to pcm_set_config() 2017-04-10 12:05:51 -07:00
Taylor Holberton cad23d2482 added prototypes for _get_config() and _set_config() 2017-04-10 11:47:32 -07:00
Taylor Holberton 25976dc2f1 removed tab characters 2017-04-10 11:46:40 -07:00
Taylor Holberton 08bb59091c added pcm_get_config() 2017-04-10 11:45:44 -07:00
Taylor Holberton ea06b977fa simplified pcm_read() and pcm_write() 2017-04-06 23:14:19 -07:00
Taylor Holberton 851dd8073e checking limits of frame counts 2017-04-06 23:12:01 -07:00
Taylor Holberton 1137fc70bb removed debug statement 2017-04-06 23:06:36 -07:00
Taylor Holberton d6e7e04edb added limits for frames and channels 2017-04-06 23:04:20 -07:00
Taylor Holberton f1080d3337 added interval structures 2017-04-06 23:04:06 -07:00
Taylor Holberton 5f9d22f568 removed stray tab 2017-04-06 22:21:46 -07:00
Taylor Holberton 1369a0ff99 fixed indentation on if statement 2017-01-19 14:46:43 -08:00
Taylor Holberton 78e03c198e Merge pull request #95 from plbossart/master
tinymix: fix segfaults with set command
2017-01-19 17:45:28 -05:00
Pierre-Louis Bossart a6947c624c tinymix: fix segfaults with set command
The arguments passed after the set command are not handled properly,
leading to segfaults or inability to set controls

Example with control 0 which is Headset Volume on my NUC:

before fix
$ ./tinymix set 0
Segmentation fault
$ ./tinymix set 0 10
Segmentation fault
$ ./tinymix set 0 10 20
Error: 3 values given, but control only takes 2

After correction
$ ./tinymix set 0
no value(s) specified
$ ./tinymix set 0 10
$ ./tinymix set 0 10 10
$ ./tinymix set 0 10 10 10
Error: 3 values given, but control only takes 2

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2017-01-19 15:16:37 -06:00
Taylor Holberton 04fa39f287 linking with static libtinyalsa 2017-01-14 12:09:56 -08:00
Taylor Holberton e1c6374e7b updated read handling for pcm_readi 2017-01-14 11:30:55 -08:00
Taylor Holberton 30f7ec55df added clean target 2017-01-14 10:51:26 -08:00
Taylor Holberton 1482988aef added ndk-build directories 2017-01-14 10:51:03 -08:00
Taylor Holberton 7098557f80 added jni/Android.mk for Android NDK 2017-01-14 10:50:47 -08:00
Taylor Holberton fe4a22cca1 added cross compile var to examples 2017-01-14 09:08:58 -08:00
Taylor Holberton e123a65654 added doc on pcm_open and null checking pcm_is_ready 2017-01-13 21:39:48 -08:00
Taylor Holberton e737183ffc Merge pull request #94 from bpankajl/mixer_wait_event
Fix mixer_wait_event function comments
2017-01-11 09:03:05 -05:00
Pankaj Bharadiya 95c79d8797 Fix mixer_wait_event function comments
The @return comment description incorrect.
Fix it.

Change-Id: I148a5ebf3e05eb4824beb4c8fa1032a38272d86d
Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
2017-01-11 11:29:23 +05:30
Taylor Holberton aec640a29d Merge pull request #93 from bpankajl/mixer_wait_event
Tinyalsa: Add support to poll on alsa control
2017-01-11 00:31:58 -05:00
Pankaj Bharadiya 010121a131 Tinyalsa: Add support to poll on alsa control
ALSA controls support polling on the kcontrols, this is used in HD-A for
jack notifcation. In tinyalsa we can use this for notfication from sound
card for any events detected by DSP

Change-Id: I4193809bfcdb60f4dc11e1c2ad6a07b29cfa80e9
Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
2017-01-11 10:38:28 +05:30
Taylor Holberton 3e9a64211e Merge pull request #92 from bpankajl/tvl_fix
Tvl fix
2017-01-10 08:04:04 -05:00
Pankaj Bharadiya 3f813e4778 Fix the byte control set/get method
The TLV byte controls expect a TLV header as well. Check for TLV
access and add TLV header size before invoking mixer API.

Change-Id: I12ba129e5bbc0676e80eb920e85b3683decfe0db
Signed-off-by: Pawse, GuruprasadX <guruprasadx.pawse@intel.com>
Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
2017-01-10 13:50:53 +05:30
Pankaj Bharadiya 9698d03a63 mixer: Add support for TLV RW access check api
Tinyalsa doesn't expose an api to check TLV RW access

Add mixer_ctl_is_access_tlv_rw().

This api will get used by tinymix and audio HALs for checking TLV RW
access before managing the byte related mixer controls.

Change-Id: Ib5707fabf479de638e1c7abd4cd149e7637ff9c2
Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
2017-01-10 13:50:39 +05:30
Taylor Holberton 6e8e6374e7 Merge pull request #91 from ricardobiehl/master
pcm.h -- (over/under)run definition
2016-12-28 11:47:49 -08:00
Ricardo Biehl Pasquali c848ea519f corrected (over/under)run definition in pcm.h
overrun is in capture and underrun is in playback.
Look:

'+' has data / '-' hasn't data

overrun (capture):

 You should have
 read until here
                v
        |+++++++|++     <- buffer over(run/flow)

underrun (playback):

 You should have
 written until here
                   v
           |+++++++|--  <- buffer under(run/flow)
2016-12-28 14:42:18 -02:00
Taylor Holberton c6f908ee87 Added pcm_open_by_name()
This function parses a PCM name similar to the ALSA library.
This is done so that the differences between alsa-lib and tinyalsa
are a little more transparent to the user.
2016-12-24 20:33:33 -08:00
Taylor Holberton bd6ed24d37 Added include directory in CFLAGS variable 2016-12-04 13:43:59 -08:00
Taylor Holberton 558e594ba2 Added pcm_link and pcm_unlink functions
The link function is necessary for time sychronization between multiple PCMs.
2016-12-04 13:42:28 -08:00
Taylor Holberton 0cceb33199 added ../examples to example path 2016-12-04 13:28:15 -08:00
Taylor Holberton 4faab339a2 Added examples subdir to 'all' and 'clean' targets 2016-12-04 13:19:29 -08:00
Taylor Holberton 5317e1ce90 Added examples for basic IO
Added an example of pcm_writei usage and an example of pcm_readi
usage. Both examples use a common file called 'audio.raw'.
2016-12-04 13:17:53 -08:00
Taylor Holberton 9d1b7f22f5 Added new ignore patterns
Added ignore patterns for files in the new 'examples' directory.
The file 'audio.raw' is generated by running pcm-writei.
2016-12-04 13:17:00 -08:00
Taylor Holberton f8fc8deaf1 Removed asound.h
It was added because bionic didn't have a copy of the file in 2011.

But, it was finally added in 2013 and update since.

There is no longer a need for this file.
2016-12-02 12:18:07 -08:00
Taylor Holberton 48e60721e9 Merge pull request #90 from rfvirgil/control-update
mixer: add ability to update control list with new controls
2016-12-02 11:33:56 -08:00
Richard Fitzgerald fd3290357e mixer: add ability to update control list with new controls
New controls could appear during runtime, for example if a
new firmware is downloaded to a DSP. Since ALSA drivers are
not supposed to delete or renumber existing controls we can
assume that any new controls will be after any controls we
already know about. We can use this to enable extending our
current list of controls, which is more efficient than
closing the mixer session and recreating it.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
2016-12-02 16:39:38 +00:00
Taylor Holberton 15e6231a1b Merge branch 'master' of https://github.com/tinyalsa/tinyalsa 1.1.0 2016-12-01 21:40:29 -08:00
Taylor Holberton 053a009cab Merge branch 'develop'
This merges all the changes for the 1.1.0 release to the master branch.
2016-12-01 21:39:53 -08:00
Taylor Holberton 6860acb720 added changelog for version 1.1.0 2016-12-01 21:38:59 -08:00
Taylor Holberton 9df0309a78 added soversion with minor and patch number 2016-12-01 21:28:32 -08:00