aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-09-15Merge pull request #62 from gkasten/pcm_config_zeroSimon Wilson
initialize pcm_config to zero
2015-09-02initialize pcm_config to zeroHaynes Mathew George
sw_params ioctl() is failing with 'invalid parameter' error since pointer to pcm_config passed from tinyplay is not zero initialized, hence invalid values are passed for some parameters. authored-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org> Bug: 23525433 Change-Id: I841f29c82ec3fb7646ad8c47fca25963b5f77945
2015-08-30Merge pull request #61 from tpetazzoni/gcc5-fixSimon Wilson
tinypcminfo: make function pcm_get_format_name() static
2015-08-26tinypcminfo: make function pcm_get_format_name() staticThomas Petazzoni
When building tinyalsa with gcc 5.x, the following warnings appear: tinypcminfo.c:97:52: warning: 'format_lookup' is static but used in inline function 'pcm_get_format_name' which is not static return bit_index < ARRAY_SIZE(format_lookup) ? format_lookup[bit_index] : NULL; ^ tinypcminfo.c:97:35: warning: 'format_lookup' is static but used in inline function 'pcm_get_format_name' which is not static return bit_index < ARRAY_SIZE(format_lookup) ? format_lookup[bit_index] : NULL; And the build fails with: tinypcminfo.o: In function `main': tinypcminfo.c:(.text+0x2f0): undefined reference to `pcm_get_format_name' collect2: error: ld returned 1 exit status To fix this, this patch marks the pcm_get_format_name() as static, since it's anyway only used in tinypcminfo.c. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-08-07Added tinywavinfo utilityJaydeep Dhole
-This utility displays average power of each channel in the wave file. -This utility quickly checks the audio input path is up or not by analysing wav file captured by tinycap Signed-off-by: Jaydeep Dhole <jaydeepdhole@gmail.com>
2015-05-21Merge pull request #58 from vinodkoul/tlv_support2Simon Wilson
Tlv support2
2015-05-04tinymix: Remove the unused parameter from tinymix_set_byte_ctl()Samreen Nilofer
The control pointer is not used in the tinymix_set_byte_ctl(), hence removing it. Signed-off-by: Samreen Nilofer <samreen.nilofer@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2015-05-04tinymix: Support more that 512 bytes in byte controlSamreen Nilofer
The set/get byte control support more than 512 bytes. This is utilized by tlv type controls. Signed-off-by: Samreen Nilofer <samreen.nilofer@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2015-05-04mixer: add support for TLV based byte controlsMythri P K
Add tinyasla support for bytes controls with TLV type Signed-off-by: Mythri P K <mythri.p.k@intel.com> Signed-off-by: Samreen Nilofer <samreen.nilofer@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-24Defer filling enum-type mixers informationDavid.Coutherut
Currently, all information about all mixers are fetched during mixer_open(). For enum mixers, an additional step gets the string for each enumerated value - this can lead to a lot of ioctls and take time even when these mixers aren't used afterward. Defer fetching integer/string mapping values when needed (when getting/setting a enum mixer). Change-Id: I3681699eb55631a2bc7a1e66bf08aff3a845534f Signed-off-by: David Coutherut <davidx.coutherut@intel.com> Signed-off-by: David Wagner <david.wagner@intel.com> Author-Tracking-BZ: 113043
2014-09-09mixer: Add mixer_ctl_get_idRichard Fitzgerald
Add a function to get an id of a control that can be passed to mixer_get_ctl(). This can be used to lookup a control by name and store its id for later use rather than have the overhead of name lookup each time it is used. Lookup by id is quick and avoids the disadvantage that storing a pointer to the mixer_ctl object creates a client with a dependency on the address of the internal control array. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
2014-09-04Merge pull request #50 from charleskeepax/masterSimon Wilson
Revert "mixer: Control input value in mixer_ctl_set_value"
2014-09-04Merge pull request #49 from vinodkoul/fixesSimon Wilson
Allow setting of single byte control and make error from percent_to_int more consistent.
2014-08-18Revert "mixer: Control input value in mixer_ctl_set_value"Charles Keepax
This reverts commit 0e07647e4b9c52bb5f3766f9564ed38b6030e556. This commit disables reporting of an error when somebody requests an out of range value from a control which seems like a bad goal to start with, if something invalid is requested we should return an error not set things to the nearest valid state. Secondly since mixer_ctl_get_range_max returns an error for all control types except TYPE_INTEGER, all controls that are not integers will be set to -EINVAL with this patch included. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-08-12tinyalsa: add pcm_get_subdevice()David Wagner
The users of tinyalsa had no way of knowing on which subdevice a stream had been created. A new API, "unsigned int pcm_get_subdevice(struct *pcm)" returns it. This information is filled during the pcm_open() Change-Id: Ie866e10e06ce6691ede09e2ca46a24441723ea8b Signed-off-by: David Wagner <david.wagner@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-12Tinyalsa: add pcm_delay()Hardik T Shah
ALSA supports reporting of pcm_delay, make that availble to the users of tinyalsa too Change-Id: Ic460f5c55137d263fdf7b142503d3bd52c4b7ebd Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com> Signed-off-by: Apelete Seketeli <apeletex.seketeli@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-12Tinyalsa: allow pcm_wait to wait on POLLIN eventsApelete Seketeli
Tinyalsa pcm_wait() function does not wait on POLLIN events, preventing it to be used when recording audio data. This allows pcm_wait to wait on POLLIN events. Change-Id: I2e4bd0f4f57415add37213f8785a3602897f2c8a Signed-off-by: Apelete Seketeli <apeletex.seketeli@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-12tinyalsa: unable to set BYTE mixerDavid.Coutherut
tinyalsa set mixer function didn't support BYTE element type Add BYTE element type support Change-Id: I95d1d82150805f16cc5103bac9c9c9500210bbbf Signed-off-by: David Coutherut <davidx.coutherut@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-12Tinyalsa: standardize error message for wrong input valueBaptiste Robert
Currently, if a user sets a mixer with a percentage value greater than the maximum, tinyalsa does not inform the user about this "error" and silently replaces the user's value by the maximum. However, if a user sets a mixer with an integer value greater than the maximum, tinyalsa informs the user with an error. This patch purpose is to define the same behaviour in both quoted cases: user is informed through an error. Change-Id: I79547758266d1eb08a65d7b1355ec9859f3b27bb Signed-off-by: Baptiste Robert <baptistex.robert@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-06-03Update tinypcminfo to display format informationAndy Hung
Change-Id: I0e6a04da5a4b122a3748b16c7eb01c4a224c3d84 Signed-off-by: Andy Hung <hunga@google.com>
2014-06-03Merge pull request #34 from elaurent/masterSimon Wilson
add support for mmap read
2014-05-08Merge pull request #33 from gkasten/CL_avsyncSimon Wilson
pcm_get_htimestamp can now use CLOCK_MONOTONIC
2014-05-07Merge pull request #40 from dawagner/check-mixer-input-valueSimon Wilson
Mixer: Check validity of input value
2014-05-07Merge branch 'charleskeepax-master'Simon Wilson
2014-05-07Merge branch 'master' of git://github.com/charleskeepax/tinyalsa into ↵Simon Wilson
charleskeepax-master Conflicts: tinymix.c
2014-05-06Mixer: Check validity of input valueBaptiste Robert
When the user wants to set a mixer with a value greater than the maximum or smaller than the minimum, the mixer is set at an undefined value. This patch set purpose is to return a error if the input value is out of range. Signed-off-by: Baptiste Robert <baptistex.robert@intel.com> Signed-off-by: David Wagner <david.wagner@intel.com> Author-Tracking-BZ: 129089
2014-05-06Merge pull request #31 from rfvirgil/masterSimon Wilson
tinycap: support streaming captured PCM to stdout
2014-05-06mixer: Control input value in mixer_ctl_set_valueAndroidict
When user want to set a mixer control with a value out of range, the mixer control will be set at its maximum
2014-05-06Merge pull request #23 from roml/cleanupSimon Wilson
Clean up asoundlib.h header file
2014-05-06Merge pull request #21 from quantumdream/masterSimon Wilson
Setting binary controls
2014-04-30Merge pull request #39 from dawagner/separate-pcm-prepareSimon Wilson
Add separate call for pcm prepare
2014-04-29tinyalsa: add separate call for pcm prepareOmair Mohammed Abdullah
Tinyalsa combines PREPARE and START calls to the driver in the pcm_start() function. Typically, this is needed for making a driver allocating hardware resources that are not related to a PCM stream. Change-Id: Ic83fad784936bbebab28e8e425debd449182db88 Signed-off-by: Omair Mohammed Abdullah <omair.m.abdullah@linux.intel.com> Signed-off-by: David Wagner <david.wagner@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-Tracking-BZ: 73509
2014-04-22Add a function to disambiguate duplicate control namesFrédéric Boisnard
Control names are not unique and can be shared by multiple mixers controls. When this happens, there is no way of accessing the mixer using its control name, because mixer_get_ctl_by_name() always returns the first match. The only way of accessing the mixer is through its control number, i.e. using mixer_get_ctl(). This patch adds the function mixer_get_ctl_by_name_and_index() to offer the possibility to retrieve a control through its name and index. This index corresponds to the nth occurence of the control name in the global supported controls names list. Change-Id: Ie29bf2a949ecf69f106bbe359155cdbfbe98928c Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Signed-off-by: David Wagner <david.wagner@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-Tracking-BZ: 139255
2014-03-17Update pcm.cStevenNAN
avail will be wrong when avail is same with pcm->boundary.
2013-11-19tinymix: Improve detect of integer valuesCharles Keepax
Tinymix detected integer values when setting controls simply by calling isdigit on the first character of the value being set. This causes problems with enumerated controls whos values start with digits. This patch improves this to provide more robust detection of integer values.
2013-10-30tinymix: Add support for setting/getting a binary controlDimitris Papastamos
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
2013-09-27add support for mmap readEric Laurent
2013-09-03pcm_get_htimestamp can now use CLOCK_MONOTONICGlenn Kasten
Previously the timebase was not documented. Now a new pcm_open flag can be used to specify the clock. If flag PCM_MONOTONIC is specified, then pcm_open uses SNDRV_PCM_IOCTL_TTSTAMP with parameter SNDRV_PCM_TSTAMP_TYPE_MONOTONIC to request timestamps in CLOCK_MONOTONIC. Change-Id: I40ce359cb38d686cbb2521fb0602a8a17ab4f925
2013-08-13tinycap: support streaming captured PCM to stdoutRichard Fitzgerald
It is sometimes useful for testing to be able to stream the captured PCM to another tool instead of being forced to save it to a WAV file. Using '--' instead of the target filename will send the raw PCM to stdout (without any header). Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
2013-07-17tinymix: only print mixer name for full mixer dumpSimon Wilson
2013-07-17tinycap: support 24 bit captureSimon Wilson
2013-07-17pcm: support S24_LE formatSimon Wilson
S24_LE is 24 bit audio in a 32 bit sample size. Also make the pcm_format_to_bits() function part of the API since it will be required for tinycap.
2013-06-28mixer: add mixer_get_name() APISimon Wilson
2013-06-28mixer: add mixer_ctl_update() APISimon Wilson
Some sound cards update their controls due to external events, such as HDMI EDID byte data changing when an HDMI cable is connected. This API allows the count of elements to be updated.
2013-05-07mixer: add get/set_array APISimon Wilson
This replaces (and extends) the existing get/set_bytes API, which is no longer required.
2013-04-30tinycap: convert size from frames to bytesceskobassman
2012-12-18Clean up asoundlib.h header fileRom Lemarchand
Remove unused constants and unimplemented functions.
2012-12-14Merge pull request #22 from roml/errmsgSimon Wilson
tinyplay: Make error messages more meaningful
2012-12-14Makefile: remove tinypcminfo during cleanSimon Wilson
2012-12-14tinyplay: Make error messages more meaningfulRom Lemarchand
Compare file parameters with device capabilities and print out the reason(s) why a certain file couldn't be played.