Age | Commit message (Collapse) | Author |
|
https://github.com/dawagner/tinyalsa into dawagner-address-duplicate-control-names
|
|
include time.h, to prevent use of struct timespec before definition
|
|
|
|
|
|
|
|
mixer: check for overflow and NULL return
|
|
Signed-off-by: Ben Zhang <benzh@google.com>
|
|
In some old (2.6.32.x) kernel headers, asound.h does not include linux time.h
when __KERNEL__ is undefined, which may break userspace.
The build failures caused by this are similar to those fixed by c8333f8c.
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
|
|
tinycap: add capture time parameter
|
|
build: Redo Makefile a bit
|
|
fix some cppcheck warnings
|
|
A few changes:
* Don't hardcode 'gcc' and use $(CC) instead
* Split off CFLAGS/LDFLAGS so we can pick them up from the environment
* Add a static library build
|
|
|
|
|
|
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
|
|
Added raw file support in tinyplay
|
|
Fixes an error if the number of bytes available is zero.
Also remove unused len variable.
|
|
-Added raw file support in tinyplay to play PCM raw files
Signed-off-by: Jaydeep Dhole <jaydeepdhole@gmail.com>
|
|
asound.h: include <time.h> to get struct timespec prototype
|
|
mixer: remove separate info list
|
|
Each mixer_ctl has an associated snd_ctl_elem_info, which was
kept in a separate array with pointers from the mixer_ctl to
its corresponding snd_ctl_elem_info. This means double
pointer dereferences when looking up the info. It also means
extra work to add support for extending the arrays to include
dynamically added controls because the pointers from the ctl
array to the info array would have to be updated.
This patch removes the info list and gives each mixer_ctl struct
its own local snd_ctl_elem_info, removing the additional pointer
dereferencing.
Change-Id: I03f7d411afd9e37f58b984584712fee64d85ef4e
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
|
|
without including it, we get
In file included from mixer.c:44:0:
include/sound/asound.h:337:18: error: field 'trigger_tstamp' has incomplete type
include/sound/asound.h:338:18: error: field 'tstamp' has incomplete type
etc.
|
|
Wait delay
|
|
Added tinywavinfo utility
|
|
mixer: Add mixer_ctl_get_id
|
|
avail issue
|
|
initialize pcm_config to zero
|
|
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
|
|
tinypcminfo: make function pcm_get_format_name() static
|
|
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>
|
|
-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>
|
|
Tlv support2
|
|
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>
|
|
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>
|
|
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>
|
|
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
|
|
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>
|
|
Revert "mixer: Control input value in mixer_ctl_set_value"
|
|
Allow setting of single byte control and make error from percent_to_int more consistent.
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: I0e6a04da5a4b122a3748b16c7eb01c4a224c3d84
Signed-off-by: Andy Hung <hunga@google.com>
|
|
add support for mmap read
|
|
pcm_get_htimestamp can now use CLOCK_MONOTONIC
|
|
Mixer: Check validity of input value
|
|
|