Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-alsa-utils: List of commits

external/alsa-utils


RSS
Rev. Tiempo Autor
2e0c01e pie-x86 q-x86 android-x86-9.0-r1 2019-11-25 18:11:58 Chih-Wei Huang

Android: add makefile and config.h

This is the initial porting of alsa-utils 1.2.1 to Android.
Four tools are built: alsa_amixer, alsa_aplay, alsa_ctl, alsa_ucm.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>

18fcbac 2019-11-25 18:11:52 Chih-Wei Huang

alsamixer: add exp10 for Android

Android doesn't have exp10 yet. Define it as before commit 116488e5f2f.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>

8f4365d 2019-11-25 18:11:52 Chih-Wei Huang

amixer: remove unnecessary prefix ../include/

All other files include "version.h" don't have the prefix ../include/.
It's unnecessary and causes trouble to Android porting.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>

c9dc401 2019-11-21 06:01:26 Rosen Penev

aplay: Limit VUMeter progress bar to 100 for negative as well

While the progress bar cannot be negative, GCC concludes that it can be
and assumes tmp can be written past the end. Fixes this GCC warning:

aplay.c:1747:18: warning: '%02d' directive writing between 2 and 11 bytes
into a region of size 4 [-Wformat-overflow=]
1747 | sprintf(tmp, "%02d%%", maxperc[c]);

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

ac82b65 2019-11-21 03:46:55 Rosen Penev

aplay: Adjust buffer sizes to fix snprintf warnings

It also reduces compiled size slightly.

aplay.c: In function 'capture':
aplay.c:3055:34: error: '-01' directive output may be truncated writing 3
bytes into a region of size between 1 and 4097 [-Werror=format-truncation=
]
3055 | snprintf(namebuf, namelen, "%s-01", buf);
| ^~~
aplay.c:3055:4: note: 'snprintf' output between 4 and 4100 bytes into a
destination of size 4097
3055 | snprintf(namebuf, namelen, "%s-01", buf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aplay.c:3053:34: error: '-01.' directive output may be truncated writing 4
bytes into a region of size between 1 and 4097 [-Werror=format-truncation=
]
3053 | snprintf(namebuf, namelen, "%s-01.%s", buf, s);
| ^~~~
aplay.c:3053:4: note: 'snprintf' output 5 or more bytes (assuming 4101)
into a destination of size 4097
3053 | snprintf(namebuf, namelen, "%s-01.%s", buf, s);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aplay.c:3065:34: error: '%02i' directive output may be truncated writing
between 2 and 10 bytes into a region of size between 0 and 4096 [-Werror=
format-truncation=]
3065 | snprintf(namebuf, namelen, "%s-%02i", buf, filecount);
| ^~~~
aplay.c:3065:30: note: directive argument in the range [1, 2147483647]
3065 | snprintf(namebuf, namelen, "%s-%02i", buf, filecount);
| ^~~~~~~~~
aplay.c:3065:3: note: 'snprintf' output between 4 and 4108 bytes into a
destination of size 4097
3065 | snprintf(namebuf, namelen, "%s-%02i", buf, filecount);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aplay.c:3063:34: error: '%02i' directive output may be truncated writing
between 2 and 10 bytes into a region of size between 0 and 4096 [-Werror=
format-truncation=]
3063 | snprintf(namebuf, namelen, "%s-%02i.%s", buf, filecount, s);
| ^~~~
aplay.c:3063:30: note: directive argument in the range [1, 2147483647]
3063 | snprintf(namebuf, namelen, "%s-%02i.%s", buf, filecount, s);
| ^~~~~~~~~~~~
aplay.c:3063:3: note: 'snprintf' output 5 or more bytes (assuming 4109)
into a destination of size 4097
3063 | snprintf(namebuf, namelen, "%s-%02i.%s", buf, filecount, s);

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

80fd81f 2019-11-21 03:46:17 Rosen Penev

treewide: Fix printf formats

Found with cppcheck

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

66e9a81 2019-11-21 03:45:57 Rosen Penev

treewide: Fix wrong formats on 32-bit

uint64_t evaluates to unsigned long long on 32-bit, not unsigned long.
Use the proper formats.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

5e6df5a 2019-11-21 03:44:02 Rosen Penev

treewide: sys/poll to poll

Fixes warning on musl:

warning redirecting incorrect #include <sys/poll.h> to <poll.h>

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

c0591c5 2019-11-15 02:02:29 Jaroslav Kysela

Release v1.2.1

Signed-off-by: Jaroslav Kysela <perex@perex.cz>

d207574 2019-11-15 02:01:10 Jaroslav Kysela

alsaucm: fix the implicit card open

Signed-off-by: Jaroslav Kysela <perex@perex.cz>

c8fdd38 2019-11-13 03:39:42 Jaroslav Kysela

alsaucm, topology: LDADD cleanups and add support for libatopology

Signed-off-by: Jaroslav Kysela <perex@perex.cz>

d2b0b91 2019-11-10 06:20:00 Jaroslav Kysela

alsaucm: do the implicit ucm open only when the command requires it

Signed-off-by: Jaroslav Kysela <perex@perex.cz>

94401f7 2019-11-05 02:38:59 Jaroslav Kysela

alsaucm: call snd_config_update_free_global() to make valgrind more happy

Signed-off-by: Jaroslav Kysela <perex@perex.cz>

5828279 2019-11-01 01:33:00 Jaroslav Kysela

amixer: do not double LF for container type

Signed-off-by: Jaroslav Kysela <perex@perex.cz>

7d7c988 2019-10-30 21:13:22 Takashi Sakamoto

axfer: handle -ETIMEDOUT before non-block I/O operation

When running for IRQ-based scheduling model, transmission backend is
expected to queue PCM event in different context from the main thread.
When queueing no events during time equivalent to one period of PCM
buffer, the backend has problems.

This commit outputs report it for non-blocking operation for IRQ-based
scheduling model. The timeout is equivalent to all frames in buffer,
instead of period for safe.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

498ca99 2019-10-30 21:13:22 Takashi Sakamoto

axfer: code refactoring for a helper function to wait for avail buffer space

This commit applies code refactoring for waiting PCM event queued
per period of PCM buffer in copying operation for IRQ-based scheduling
model.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

a07eb8e 2019-10-30 21:13:22 Takashi Sakamoto

axfer: handle -ETIMEDOUT before handle mmap I/O operation

When running for IRQ-based scheduling model, transmission backend is
expected to queue PCM event in different context from the main thread.
When queueing no events during time equivalent to one period of PCM
buffer, the backend has problems.

This commit outputs report it for mmap operation for IRQ-based
scheduling model. The timeout is equivalent to all frames in buffer,
instead of period for safe.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

e5e6a78 2019-10-30 21:13:22 Takashi Sakamoto

axfer: return ETIMEDOUT when no event occurs after waiter expiration

Although the waiter abstraction handles timeout as success, it should
report for callers to know timeout.

This commit takes the waiter to return -ETIMEDOUT when timeout expires.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

1c17128 2019-10-30 21:13:22 Takashi Sakamoto

axfer: fix to return error code when a call of select(2) fails

A call of select(2) returns negative code and report errors via errno
local variable, howver current waiter implementation for select(2)
returns the negative code instead of errno.

This commit fixes it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

178a1f1 2019-10-30 21:13:22 Takashi Sakamoto

axfer: return the number of file descriptors for I/O events from select(2) waiter

A call of select(2) returns error code at failure, the number of file
descriptors available I/O at success. Current implementation of
waiter abstraction for select(2) returns 0 at success and callers
can't get the number.

This commit fixes it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

d40e724 2019-09-25 16:57:19 chunxu.li

aplay: fix memory leak when setup_chmap() fail

setup_chmap() will return with error number if hw_map calloc fail or
channels doesn't match with hw_params, but memory free was ignored when
error occurs.

Signed-off-by: chunxu.li <chunxuxiao@gmail.com>
Reviewed-by: Takashi Sakamoto o-takashi@sakamocchi.jp
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

192fb62 2019-09-03 19:17:41 Rosen Penev

alsamixer: Remove exp10 usage

exp10 is a GNU extension and not available everywhere (eg. uClibc-ng).

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

fbb222c 2019-07-31 22:58:46 Takashi Sakamoto

axfer: test: fix invalid comparison of 64 bit storage in ILP32 data type

In system V ABIs with ILP32 data model, bit shift for '1ul' can brings
undefined behaviour when the calculation result is over 32 bit width.

This commit fixes the bug.

Reported-by: Rolf Eike Beer <eike@sf-mail.de>
Reference: https://bugs.gentoo.org/681652
Reference: https://github.com/alsa-project/alsa-utils/issues/23
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

0bc366a 2019-07-31 22:57:28 Takashi Sakamoto

axfer: mapper: fix parameter check for demuxer

Each container should be configured to store one saple per frame in
demuxer case. This commit fixes the bug.

Fixes: 25c8e3bebb53 ('axfer: add support for a mapper for multiple target')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

3aea4fe 2019-05-27 22:37:05 Jaroslav Kysela

axfer: remove unused variable warnings

Signed-off-by: Jaroslav Kysela <perex@perex.cz>

7a3ca6f 2019-05-10 15:57:22 Jaroslav Kysela

Release v1.1.9

Signed-off-by: Jaroslav Kysela <perex@perex.cz>

0b07c56 2019-05-07 15:33:01 Takashi Sakamoto

axfer/test: fix uninitialized warning

This commit fixes uninitialized return value from a call of test_mux() and
text_demux() to suppress warnings below:

$ make check
...
gcc -DHAVE_CONFIG_H -I. -I../../include -O2 -Wall -pipe -g -MT mapper-test.o -MD -MP -MF .deps/mapper-test.Tpo -c -o mapper-test.o mapper-test.c
mapper-test.c: In function ‘test_mapper’:
mapper-test.c:241:9: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
return err;
^~~
mapper-test.c:231:5: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (err < 0)
^

Fixes: 39d1ab8a0cb4: ('axfer: add a unit test for mapper interface')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

0248c29 2019-05-07 15:32:53 Takashi Sakamoto

axfer/test: fix uninitialized warning

This commit fixes uninitialized return value from a call of test_vector()
to suppress a warning below.

gcc -DHAVE_CONFIG_H -I. -I../../include -O2 -Wall -pipe -g -MT mapper-test.o -MD -MP -MF .deps/mapper-test.Tpo -c -o mapper-test.o mapper-test.c
mapper-test.c: In function ‘test_vector’:
mapper-test.c:293:6: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
int err;
^~~

Fixes: 39d1ab8a0cb4: ('axfer: add a unit test for mapper interface')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

c43a621 2019-05-07 15:30:25 Samuel Holland

axfer: Declare global variables as 'extern' in header

This avoids multiple definitions of the same global variable (one in
each file that includes this header), and fixes a linking error when
compiled with -fno-common.

Fixes: 96110793b3e5 ("axfer: add support for a container of raw data")

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

60f7886 2019-05-07 15:28:31 Samuel Holland

axfer: Fix creation of v1.2 headers on big-endian systems

struct block_v120_format defines these members as uint8_t. On
little-endian systems, no swapping is done, and the generated block
header is fine. However, on big-endian machines, the value is swapped to
the high byte and then truncated by the assignment, causing both
bits_per_sample and samples_per_frame to be zero.

This fixes an assertion failure in container-test when later
parsing the header ["assert(*samples_per_frame > 0);" in
container_context_pre_process()].

Fixes: 4ab7510f3a18: ("axfer: add support for a container of Creative Tech. voice format")

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

Show on old repository browser