Discussion:
Portaudio Test fails on ARM
(too old to reply)
Arjav Parikh
2018-10-12 07:53:20 UTC
Permalink
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM platform using
below configuration:
*./configure --host=aarch64-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board. Changed the
paths mentioned under *relink_command* as it was showing the path of host
system. Then I run ./patest1 on board and below error is observed:

*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not
found/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
My /usr/bin contains:
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf

Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
Arjav Parikh
2018-10-16 06:59:35 UTC
Permalink
Hi,
On capturing strace for patest1 I get below output. Please let me know
which files it is looking for because libm.so.6 is present in /lib64 in my
board.
How do I solve below error when running ./patest1 on arm board:

*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not
found/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*

*Strace Output for above error:*

/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0) = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file
or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x517000
brk(0x538000) = 0x538000
getpid() = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [], 0}, 8) =
0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid() = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio", {st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4) = 0
read(3, "errexit off\nnoglob "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443, si_uid=0,
si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4) = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4) = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs", {st_mode=S_IFDIR|0775,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No such file
or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No such
file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755, st_size=69048, ...},
0) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4) = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452, si_uid=0,
si_status=2, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456, si_uid=0,
si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL) = -1 ECHILD (No child processes)
exit_group(1) = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM platform using
*./configure --host=aarch64-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board. Changed the
paths mentioned under *relink_command* as it was showing the path of host
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not
found/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-10-16 07:16:23 UTC
Permalink
Hello,

Which Gcc this is build on and is ARM binary? It seems that you have
build it diffrent GCC/Glibc and run on diffrent.

Tuukka
Post by Arjav Parikh
Hi,
On capturing strace for patest1 I get below output. Please let me know
which files it is looking for because libm.so.6 is present in /lib64
in my board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*
*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0)                                  = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) =
-1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid()                                = 0
brk(0)                                  = 0x517000
brk(0x538000)                           = 0x538000
getpid()                                = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [], 0},
8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid()                               = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio", {st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10)                   = 10
close(3)                                = 0
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4)                                = 0
read(3, "errexit         off\nnoglob      "..., 128) = 128
read(3, "        off\nxtrace          off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi              off\npipefail"..., 128) = 44
read(3, "", 128)                        = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n  case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n      else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4)                                = 0
read(3, ".\n", 128)                     = 2
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4)                                = 0
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4)                                = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128)                        = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No such
file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755, st_size=69048,
...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4)                                = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10)                   = 11
dup3(2, 1, 0)                           = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
fcntl(1, F_GETFL)                       = 0x20002 (flags O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n) = 71
dup3(11, 1, 0)                          = 1
close(11)                               = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
exit_group(1)                           = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM
*./configure --host=aarch64-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board. Changed
the paths mentioned under *relink_command* as it was showing the
path of host system. Then I run ./patest1 on board and below error
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-16 07:37:20 UTC
Permalink
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd, not stripped

Can you please guide further?
Post by Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems that you have build
it diffrent GCC/Glibc and run on diffrent.
Tuukka
Hi,
On capturing strace for patest1 I get below output. Please let me know
which files it is looking for because libm.so.6 is present in /lib64 in my
board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0) = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file
or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
= 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x517000
brk(0x538000) = 0x538000
getpid() = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [], 0}, 8)
= 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid() = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio", {st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4) = 0
read(3, "errexit off\nnoglob "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443, si_uid=0,
si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4) = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4) = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs", {st_mode=S_IFDIR|0775,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No such
file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No such
file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755, st_size=69048,
...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4) = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452, si_uid=0,
si_status=2, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456, si_uid=0,
si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL) = -1 ECHILD (No child processes)
exit_group(1) = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM platform using
*./configure --host=aarch64-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board. Changed the
paths mentioned under *relink_command* as it was showing the path of
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Tuukka Pasanen
2018-10-16 11:35:40 UTC
Permalink
Hello,

Ok it seems to be ARM binary and you have ARM64 SOC/ARM board. I just
noted (about your first email) that you have probably copied script
(which links to .libs) not executable? If it's executable and not script
then what does ldd say about so linked libraries.

I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy these libs) or copy under .libs-directory binary executable.

Tuukka
Post by Arjav Parikh
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for
GNU/Linux 3.7.0,
BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd, not stripped
Can you please guide further?
On Tue, Oct 16, 2018, 12:46 PM Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems that you
have build it diffrent GCC/Glibc and run on diffrent.
Tuukka
Post by Arjav Parikh
Hi,
On capturing strace for patest1 I get below output. Please let me
know which files it is looking for because libm.so.6 is present
in /lib64 in my board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
unexpected "("n/data/alexa/portaudio*
*
*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0)                                  = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC)
= -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid()                                = 0
brk(0)                                  = 0x517000
brk(0x538000)                           = 0x538000
getpid()                                = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL,
[], 0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid()                               = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio",
{st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10)                   = 10
close(3)                                = 0
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4)                                = 0
read(3, "errexit         off\nnoglob "..., 128) = 128
read(3, "        off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128)                        = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n  case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4)                                = 0
read(3, ".\n", 128)                     = 2
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4)                                = 0
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4)                                = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128)                        = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755,
st_size=69048, ...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4)                                = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10)                   = 11
dup3(2, 1, 0)                           = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL)  = -1 ECHILD (No child processes)
fcntl(1, F_GETFL)                       = 0x20002 (flags
O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
unexpected "("n) = 71
dup3(11, 1, 0)                          = 1
close(11)                               = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL)  = -1 ECHILD (No child processes)
exit_group(1)                           = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 12, 2018 at 1:23 PM Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM
*./configure --host=aarch64-linux-gnu
--build=x86_64-pc-linux-gnu --prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board.
Changed the paths mentioned under *relink_command* as it was
showing the path of host system. Then I run ./patest1 on
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
unexpected "("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-16 14:57:14 UTC
Permalink
Hi,
Post by Tuukka Pasanen
Post by Tuukka Pasanen
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy
Post by Tuukka Pasanen
Post by Tuukka Pasanen
these libs) or copy under .libs-directory binary executable.
I followed the same procedure. I copied script as well as .libs from bin
directory and .so library into standard path. In any case it did not show
the missing libraries error. The scripts present is a wrapper for binary.
Executing the *patest1* binary also throws same error.

Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have ARM64 SOC/ARM board. I just
noted (about your first email) that you have probably copied script (which
links to .libs) not executable? If it's executable and not script then what
does ldd say about so linked libraries.
I think easiest to over come this with autotools is make prefix somewhere
in your home dir and then 'make install' application (and then copy these
libs) or copy under .libs-directory binary executable.
Tuukka
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd, not stripped
Can you please guide further?
Post by Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems that you have
build it diffrent GCC/Glibc and run on diffrent.
Tuukka
Hi,
On capturing strace for patest1 I get below output. Please let me know
which files it is looking for because libm.so.6 is present in /lib64 in my
board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0) = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file
or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
= 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
= 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x517000
brk(0x538000) = 0x538000
getpid() = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [], 0}, 8)
= 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid() = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio", {st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4) = 0
read(3, "errexit off\nnoglob "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443, si_uid=0,
si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4) = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4) = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No such
file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755, st_size=69048,
...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4) = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452, si_uid=0,
si_status=2, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456, si_uid=0,
si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL) = -1 ECHILD (No child processes)
exit_group(1) = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM platform
*./configure --host=aarch64-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board. Changed the
paths mentioned under *relink_command* as it was showing the path of
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-17 04:40:46 UTC
Permalink
Hi,
From strace of patest1 binary I find *newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1", 0x7fdb369aa0, 0) = -1 ENOENT
(No such file or directory)* error.
How do I find this file or generate by rebuilding portaudio? Because in the
build I prepared does not contain this file. Is this file really required
for patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hi,
Post by Tuukka Pasanen
Post by Tuukka Pasanen
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy
Post by Tuukka Pasanen
Post by Tuukka Pasanen
these libs) or copy under .libs-directory binary executable.
I followed the same procedure. I copied script as well as .libs from bin
directory and .so library into standard path. In any case it did not show
the missing libraries error. The scripts present is a wrapper for binary.
Executing the *patest1* binary also throws same error.
Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have ARM64 SOC/ARM board. I just
noted (about your first email) that you have probably copied script (which
links to .libs) not executable? If it's executable and not script then what
does ldd say about so linked libraries.
I think easiest to over come this with autotools is make prefix somewhere
in your home dir and then 'make install' application (and then copy these
libs) or copy under .libs-directory binary executable.
Tuukka
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd, not stripped
Can you please guide further?
Post by Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems that you have
build it diffrent GCC/Glibc and run on diffrent.
Tuukka
Hi,
On capturing strace for patest1 I get below output. Please let me know
which files it is looking for because libm.so.6 is present in /lib64 in my
board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0) = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) =
-1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
= 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x517000
brk(0x538000) = 0x538000
getpid() = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [], 0},
8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid() = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio", {st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4) = 0
read(3, "errexit off\nnoglob "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4) = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4) = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No such
file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755, st_size=69048,
...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4) = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL) = -1 ECHILD (No child processes)
exit_group(1) = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM platform
*./configure --host=aarch64-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board. Changed the
paths mentioned under *relink_command* as it was showing the path of
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Tuukka Pasanen
2018-10-17 06:17:10 UTC
Permalink
Hello,

As it tries to point it's on cross-build machine
'/data/alexa/portaudio/.libs/lt-patest1'.

File which is named patest1 is just bash-script which makes sure that
when you run application on development it picks up shared object. You
can use cat|more|less to make sure that it's really just bash-script.

Tuukka
Post by Arjav Parikh
Hi,
From strace of patest1 binary I find *newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1", 0x7fdb369aa0, 0) = -1
ENOENT (No such file or directory)* error.
How do I find this file or generate by rebuilding portaudio? Because
in the build I prepared does not contain this file. Is this file
really required for patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
Hi,
Post by Arjav Parikh
Post by Tuukka Pasanen
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application
(and then copy
Post by Arjav Parikh
Post by Tuukka Pasanen
these libs) or copy under .libs-directory binary executable.
I followed the same procedure. I copied script as well as .libs
from bin directory and .so library into standard path. In any case
it did not show the missing libraries error. The scripts present
is a wrapper for binary. Executing the *patest1* binary also
throws same error.
Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 5:06 PM Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have ARM64 SOC/ARM board.
I just noted (about your first email) that you have probably
copied script (which links to .libs) not executable? If it's
executable and not script then what does ldd say about so
linked libraries.
I think easiest to over come this with autotools is make
prefix somewhere in your home dir and then 'make install'
application (and then copy these libs) or copy under
.libs-directory binary executable.
Tuukka
Post by Arjav Parikh
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1
(SYSV), dynamically linked, interpreter
/lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0,
BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd, not stripped
Can you please guide further?
On Tue, Oct 16, 2018, 12:46 PM Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems
that you have build it diffrent GCC/Glibc and run on
diffrent.
Tuukka
Post by Tuukka Pasanen
Hi,
On capturing strace for patest1 I get below output.
Please let me know which files it is looking for because
libm.so.6 is present in /lib64 in my board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
unexpected "("n/data/alexa/portaudio*
*
*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0)                                  = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC)
= -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190,
0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0)
= -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) =
0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid()                                = 0
brk(0)                                  = 0x517000
brk(0x538000)                           = 0x538000
getpid()                                = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART},
{SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART},
{SIG_DFL, [], 0}, 8) = 0
getppid()                               = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio",
{st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10)                   = 10
close(3)                                = 0
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4)                                = 0
read(3, "errexit off\nnoglob      "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED,
si_pid=7442, si_uid=0, si_status=0, si_utime=0,
si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0,
NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0,
NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED,
si_pid=7443, si_uid=0, si_status=0, si_utime=0,
si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n  case \" $* "..., 1023)
= 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4)                                = 0
read(3, ".\n", 128)                     = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED,
si_pid=7444, si_uid=0, si_status=0, si_utime=0,
si_stime=0} ---
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0,
NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4)                                = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED,
si_pid=7447, si_uid=0, si_status=0, si_utime=0,
si_stime=0} ---
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0,
NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4)                                = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED,
si_pid=7450, si_uid=0, si_status=0, si_utime=0,
si_stime=0} ---
read(3, "", 128) = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0,
NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/lt-patest1", 0x7fdb369aa0,
0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) =
-1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755,
st_size=69048, ...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0,
NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED,
si_pid=7451, si_uid=0, si_status=0, si_utime=0,
si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4)                                = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED,
si_pid=7452, si_uid=0, si_status=2, si_utime=0,
si_stime=0} ---
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0,
NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
fcntl(1, F_DUPFD, 10)                   = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
fcntl(1, F_GETFL) = 0x20002 (flags O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0),
...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax
error: unexpected "("n) = 71
dup3(11, 1, 0) = 1
close(11)                               = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0,
NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED,
si_pid=7456, si_uid=0, si_status=0, si_utime=0,
si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL)  = -1 ECHILD (No
child processes)
exit_group(1)                           = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 12, 2018 at 1:23 PM Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030)
*./configure --host=aarch64-linux-gnu
--build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied
libportaudio.a & libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my
board. Changed the paths mentioned under
*relink_command* as it was showing the path of host
system. Then I run ./patest1 on board and below
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not
found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax
error: unexpected "("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-19 13:13:58 UTC
Permalink
Hi,

I am trying to play patest1 or patest_sine8 binary I get below error for
each:
1. *./patest1*
patest1.c
Ring modulate input for 20 seconds.
Error: No input default device.
bye

2. *./patest_sine8*
PortAudio Test: output signed 8 bit sine wave.
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success

I verified the speaker using aplay & tinyplay utility & I can hear sound.
What is missing with portaudio?
*ldd patest1*
linux-vdso.so.1 (0x0000007fb652c000)
libportaudio.so.2 => /usr/lib64/libportaudio.so.2 (0x0000007fb64c2000)
libm.so.6 => /lib64/libm.so.6 (0x0000007fb6420000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000007fb63f4000)
libc.so.6 => /lib64/libc.so.6 (0x0000007fb629b000)
/lib/ld-linux-aarch64.so.1 (0x0000007fb64ff000)
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hello,
As it tries to point it's on cross-build machine
'/data/alexa/portaudio/.libs/lt-patest1'.
File which is named patest1 is just bash-script which makes sure that when
you run application on development it picks up shared object. You can use
cat|more|less to make sure that it's really just bash-script.
Tuukka
Hi,
From strace of patest1 binary I find *newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1", 0x7fdb369aa0, 0) = -1 ENOENT
(No such file or directory)* error.
How do I find this file or generate by rebuilding portaudio? Because in
the build I prepared does not contain this file. Is this file really
required for patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hi,
Post by Tuukka Pasanen
Post by Tuukka Pasanen
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy
Post by Tuukka Pasanen
Post by Tuukka Pasanen
these libs) or copy under .libs-directory binary executable.
I followed the same procedure. I copied script as well as .libs from bin
directory and .so library into standard path. In any case it did not show
the missing libraries error. The scripts present is a wrapper for binary.
Executing the *patest1* binary also throws same error.
Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have ARM64 SOC/ARM board. I just
noted (about your first email) that you have probably copied script (which
links to .libs) not executable? If it's executable and not script then what
does ldd say about so linked libraries.
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy these libs) or copy under .libs-directory binary executable.
Tuukka
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd, not stripped
Can you please guide further?
Post by Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems that you have
build it diffrent GCC/Glibc and run on diffrent.
Tuukka
Hi,
On capturing strace for patest1 I get below output. Please let me know
which files it is looking for because libm.so.6 is present in /lib64 in my
board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0) = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) =
-1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x517000
brk(0x538000) = 0x538000
getpid() = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [], 0},
8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid() = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio", {st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4) = 0
read(3, "errexit off\nnoglob "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4) = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4) = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No such
file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755, st_size=69048,
...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4) = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL) = -1 ECHILD (No child processes)
exit_group(1) = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM platform
*./configure --host=aarch64-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board. Changed the
paths mentioned under *relink_command* as it was showing the path of
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-22 07:37:01 UTC
Permalink
Hi,

Using patest1 & patest_sine8, it shows *No input default device*. Also
using *pa_devs* it shows below output:
/data/alexa/portaudio/.libs # *./pa_devs*
PortAudio version: 0x00130600
Version text: 'PortAudio V19.6.0-devel, revision
396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 0
----------------------------------------------

My audio board with inbuilt mic is connected still it shows this error.
What is missing with portaudio?
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I am trying to play patest1 or patest_sine8 binary I get below error for
1. *./patest1*
patest1.c
Ring modulate input for 20 seconds.
Error: No input default device.
bye
2. *./patest_sine8*
PortAudio Test: output signed 8 bit sine wave.
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success
I verified the speaker using aplay & tinyplay utility & I can hear sound.
What is missing with portaudio?
*ldd patest1*
linux-vdso.so.1 (0x0000007fb652c000)
libportaudio.so.2 => /usr/lib64/libportaudio.so.2 (0x0000007fb64c2000)
libm.so.6 => /lib64/libm.so.6 (0x0000007fb6420000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000007fb63f4000)
libc.so.6 => /lib64/libc.so.6 (0x0000007fb629b000)
/lib/ld-linux-aarch64.so.1 (0x0000007fb64ff000)
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hello,
As it tries to point it's on cross-build machine
'/data/alexa/portaudio/.libs/lt-patest1'.
File which is named patest1 is just bash-script which makes sure that
when you run application on development it picks up shared object. You can
use cat|more|less to make sure that it's really just bash-script.
Tuukka
Hi,
From strace of patest1 binary I find *newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1", 0x7fdb369aa0, 0) = -1 ENOENT
(No such file or directory)* error.
How do I find this file or generate by rebuilding portaudio? Because in
the build I prepared does not contain this file. Is this file really
required for patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hi,
Post by Tuukka Pasanen
Post by Tuukka Pasanen
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy
Post by Tuukka Pasanen
Post by Tuukka Pasanen
these libs) or copy under .libs-directory binary executable.
I followed the same procedure. I copied script as well as .libs from bin
directory and .so library into standard path. In any case it did not show
the missing libraries error. The scripts present is a wrapper for binary.
Executing the *patest1* binary also throws same error.
Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have ARM64 SOC/ARM board. I just
noted (about your first email) that you have probably copied script (which
links to .libs) not executable? If it's executable and not script then what
does ldd say about so linked libraries.
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy these libs) or copy under .libs-directory binary executable.
Tuukka
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd, not stripped
Can you please guide further?
Post by Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems that you have
build it diffrent GCC/Glibc and run on diffrent.
Tuukka
Hi,
On capturing strace for patest1 I get below output. Please let me know
which files it is looking for because libm.so.6 is present in /lib64 in my
board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0) = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) =
-1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x517000
brk(0x538000) = 0x538000
getpid() = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [], 0},
8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid() = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio", {st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4) = 0
read(3, "errexit off\nnoglob "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4) = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4) = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No such
file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755, st_size=69048,
...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4) = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags
O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL) = -1 ECHILD (No child processes)
exit_group(1) = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM platform
*./configure --host=aarch64-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board. Changed
the paths mentioned under *relink_command* as it was showing the
path of host system. Then I run ./patest1 on board and below error is
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Tuukka Pasanen
2018-10-22 07:39:59 UTC
Permalink
Hello,

Does ALSA report any devices?

Tuukka
Post by Arjav Parikh
Hi,
Using patest1 & patest_sine8, it shows *No input default device*. Also
/data/alexa/portaudio/.libs # *./pa_devs*
PortAudio version: 0x00130600
Version text: 'PortAudio V19.6.0-devel, revision
396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 0
----------------------------------------------
My audio board with inbuilt mic is connected still it shows this
error. What is missing with portaudio?
--
Thanks & Regards,
Arjav Parikh
Hi,
I am trying to play patest1 or patest_sine8 binary I get below
1. *./patest1*
patest1.c
Ring modulate input for 20 seconds.
Error: No input default device.
bye
2. *./patest_sine8*
PortAudio Test: output signed 8 bit sine wave.
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success
I verified the speaker using aplay & tinyplay utility & I can hear
sound. What is missing with portaudio?
*ldd patest1*
    linux-vdso.so.1 (0x0000007fb652c000)
    libportaudio.so.2 => /usr/lib64/libportaudio.so.2
(0x0000007fb64c2000)
    libm.so.6 => /lib64/libm.so.6 (0x0000007fb6420000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x0000007fb63f4000)
    libc.so.6 => /lib64/libc.so.6 (0x0000007fb629b000)
    /lib/ld-linux-aarch64.so.1 (0x0000007fb64ff000)
--
Thanks & Regards,
Arjav Parikh
On Wed, Oct 17, 2018 at 11:47 AM Tuukka Pasanen
Hello,
As it tries to point it's on cross-build machine
'/data/alexa/portaudio/.libs/lt-patest1'.
File which is named patest1 is just bash-script which makes
sure that when you run application on development it picks up
shared object. You can use cat|more|less to make sure that
it's really just bash-script.
Tuukka
Post by Arjav Parikh
Hi,
From strace of patest1 binary I find *newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1", 0x7fdb369aa0, 0)
= -1 ENOENT (No such file or directory)* error.
How do I find this file or generate by rebuilding portaudio?
Because in the build I prepared does not contain this file.
Is this file really required for patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 8:27 PM Arjav Parikh
Hi,
Post by Arjav Parikh
Post by Tuukka Pasanen
I think easiest to over come this with autotools is
make prefix somewhere in your home dir and then 'make
install' application (and then copy
Post by Arjav Parikh
Post by Tuukka Pasanen
these libs) or copy under .libs-directory binary
executable.
I followed the same procedure. I copied script as well as
.libs from bin directory and .so library into standard
path. In any case it did not show the missing libraries
error. The scripts present is a wrapper for binary.
Executing the *patest1* binary also throws same error.
Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 5:06 PM Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have ARM64
SOC/ARM board. I just noted (about your first email)
that you have probably copied script (which links to
.libs) not executable? If it's executable and not
script then what does ldd say about so linked libraries.
I think easiest to over come this with autotools is
make prefix somewhere in your home dir and then 'make
install' application (and then copy these libs) or
copy under .libs-directory binary executable.
Tuukka
Post by Arjav Parikh
Hi,
I have cross compiled port audio for ARM using tool
chain aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM
compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64,
version 1 (SYSV), dynamically linked, interpreter
/lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0,
BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd,
not stripped
Can you please guide further?
On Tue, Oct 16, 2018, 12:46 PM Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It
seems that you have build it diffrent GCC/Glibc
and run on diffrent.
Tuukka
Post by Tuukka Pasanen
Hi,
On capturing strace for patest1 I get below
output. Please let me know which files it is
looking for because libm.so.6 is present in
/lib64 in my board.
How do I solve below error when running
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF
: not found
syntax error: unexpected "("n/data/alexa/portaudio*
*
*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars
*/]) = 0
brk(0)                                  = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK)
= -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file
or directory)
openat(AT_FDCWD,
"/lib64/tls/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file
or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64",
0x7fdb36a190, 0) = -1 ENOENT (No such file or
directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file
or directory)
newfstatat(AT_FDCWD, "/lib64/tls",
0x7fdb36a190, 0) = -1 ENOENT (No such file or
directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file
or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64",
0x7fdb36a190, 0) = -1 ENOENT (No such file or
directory)
openat(AT_FDCWD, "/lib64/libm.so.6",
O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712,
...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3,
0x90000) = 0x7fa133e000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libc.so.6",
O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755,
st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3,
0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) =
0x7fa129a000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid()                                = 0
brk(0)                                  = 0x517000
brk(0x538000)                           = 0x538000
getpid()                                = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD],
SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP],
SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid()                               = 7439
uname({sysname="Linux", nodename="apq8053",
...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio",
{st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".",
{st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3)                                = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1],
0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0},
8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1],
0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0},
8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1],
0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 -
temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4)                                = 0
read(3, "errexit off\nnoglob      "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7442, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) ==
0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
read(10, "X shell print the target directo"...,
1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) ==
0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7443, si_uid=0,
si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"...,
1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL)  = -1
ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and
t"..., 1023) = 1023
read(10, " the debug banner immediately:\n
"..., 1023) = 1023
read(10, "c_exec_program ()\n{\n  case \" $*
"..., 1023) = 1023
read(10, "cygwin/mingw when embedded
into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"...,
1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4)                                = 0
read(3, ".\n", 128)                     = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7444, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) ==
0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4)                                = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7447, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) ==
0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4)                                = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7450, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) ==
0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or
directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL)  = -1
ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0,
0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm",
0x7fdb3696e0, 0) = -1 ENOENT (No such file or
directory)
newfstatat(AT_FDCWD, "/bin/rm",
{st_mode=S_IFREG|0755, st_size=69048, ...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) ==
0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7451, si_uid=0,
si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL)  = -1
ECHILD (No child processes)
pipe2([3, 4], 0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4)                                = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7452, si_uid=0,
si_status=2, si_utime=0, si_stime=0} ---
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) ==
2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL)  = -1
ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620,
st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF
: not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
syntax error: unexpected "("n) = 71
dup3(11, 1, 0) = 1
close(11)                               = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) ==
0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7456, si_uid=0,
si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL)  = -1
ECHILD (No child processes)
exit_group(1)                           = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 12, 2018 at 1:23 PM Arjav Parikh
Hi,
I have cross compiled portaudio
(v190600_20161030) for ARM platform using
*./configure --host=aarch64-linux-gnu
--build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied
libportaudio.a & libportaudio.so.2.0.0 on
my board.
Also copied scripts & .lib folder under bin
onto my board. Changed the paths mentioned
under *relink_command* as it was showing
the path of host system. Then I run
ELF : not found
syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-22 08:12:31 UTC
Permalink
Hi,
Yes ALSA reports the devices. Executing cat /proc/asound/cards list the
devices.
Here is the output for reference:
*cat /proc/asound/cards*
0 [msm8953sndcardm]: msm8953-snd-car - msm8953-snd-card-mtp
msm8953-snd-card-mtp
Post by Tuukka Pasanen
Hello,
Does ALSA report any devices?
Tuukka
Hi,
Using patest1 & patest_sine8, it shows *No input default device*. Also
/data/alexa/portaudio/.libs # *./pa_devs*
PortAudio version: 0x00130600
Version text: 'PortAudio V19.6.0-devel, revision
396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 0
----------------------------------------------
My audio board with inbuilt mic is connected still it shows this error.
What is missing with portaudio?
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I am trying to play patest1 or patest_sine8 binary I get below error for
1. *./patest1*
patest1.c
Ring modulate input for 20 seconds.
Error: No input default device.
bye
2. *./patest_sine8*
PortAudio Test: output signed 8 bit sine wave.
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success
I verified the speaker using aplay & tinyplay utility & I can hear sound.
What is missing with portaudio?
*ldd patest1*
linux-vdso.so.1 (0x0000007fb652c000)
libportaudio.so.2 => /usr/lib64/libportaudio.so.2 (0x0000007fb64c2000)
libm.so.6 => /lib64/libm.so.6 (0x0000007fb6420000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000007fb63f4000)
libc.so.6 => /lib64/libc.so.6 (0x0000007fb629b000)
/lib/ld-linux-aarch64.so.1 (0x0000007fb64ff000)
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hello,
As it tries to point it's on cross-build machine
'/data/alexa/portaudio/.libs/lt-patest1'.
File which is named patest1 is just bash-script which makes sure that
when you run application on development it picks up shared object. You can
use cat|more|less to make sure that it's really just bash-script.
Tuukka
Hi,
From strace of patest1 binary I find *newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1", 0x7fdb369aa0, 0) = -1
ENOENT (No such file or directory)* error.
How do I find this file or generate by rebuilding portaudio? Because in
the build I prepared does not contain this file. Is this file really
required for patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hi,
Post by Tuukka Pasanen
Post by Tuukka Pasanen
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy
Post by Tuukka Pasanen
Post by Tuukka Pasanen
these libs) or copy under .libs-directory binary executable.
I followed the same procedure. I copied script as well as .libs from
bin directory and .so library into standard path. In any case it did not
show the missing libraries error. The scripts present is a wrapper for
binary. Executing the *patest1* binary also throws same error.
Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 5:06 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have ARM64 SOC/ARM board. I just
noted (about your first email) that you have probably copied script (which
links to .libs) not executable? If it's executable and not script then what
does ldd say about so linked libraries.
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy these libs) or copy under .libs-directory binary executable.
Tuukka
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd, not stripped
Can you please guide further?
On Tue, Oct 16, 2018, 12:46 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems that you have
build it diffrent GCC/Glibc and run on diffrent.
Tuukka
Hi,
On capturing strace for patest1 I get below output. Please let me
know which files it is looking for because libm.so.6 is present in /lib64
in my board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0) = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC)
= -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x517000
brk(0x538000) = 0x538000
getpid() = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [],
0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid() = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio", {st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4) = 0
read(3, "errexit off\nnoglob "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4) = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4) = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755, st_size=69048,
...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4) = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags
O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL) = -1 ECHILD (No child processes)
exit_group(1) = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM platform
*./configure --host=aarch64-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board. Changed
the paths mentioned under *relink_command* as it was showing the
path of host system. Then I run ./patest1 on board and below error is
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Arjav Parikh
2018-10-22 09:35:25 UTC
Permalink
Hi,

Attaching the strace for patest1 for reference. From the logs I can see
that it is looking for /dev/dsp entry which is not present. So what
modifications are expected?
Post by Arjav Parikh
Hi,
Yes ALSA reports the devices. Executing cat /proc/asound/cards list the
devices.
*cat /proc/asound/cards*
0 [msm8953sndcardm]: msm8953-snd-car - msm8953-snd-card-mtp
msm8953-snd-card-mtp
Post by Tuukka Pasanen
Hello,
Does ALSA report any devices?
Tuukka
Hi,
Using patest1 & patest_sine8, it shows *No input default device*. Also
/data/alexa/portaudio/.libs # *./pa_devs*
PortAudio version: 0x00130600
Version text: 'PortAudio V19.6.0-devel, revision
396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 0
----------------------------------------------
My audio board with inbuilt mic is connected still it shows this error.
What is missing with portaudio?
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I am trying to play patest1 or patest_sine8 binary I get below error for
1. *./patest1*
patest1.c
Ring modulate input for 20 seconds.
Error: No input default device.
bye
2. *./patest_sine8*
PortAudio Test: output signed 8 bit sine wave.
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success
I verified the speaker using aplay & tinyplay utility & I can hear
sound. What is missing with portaudio?
*ldd patest1*
linux-vdso.so.1 (0x0000007fb652c000)
libportaudio.so.2 => /usr/lib64/libportaudio.so.2
(0x0000007fb64c2000)
libm.so.6 => /lib64/libm.so.6 (0x0000007fb6420000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000007fb63f4000)
libc.so.6 => /lib64/libc.so.6 (0x0000007fb629b000)
/lib/ld-linux-aarch64.so.1 (0x0000007fb64ff000)
--
Thanks & Regards,
Arjav Parikh
On Wed, Oct 17, 2018 at 11:47 AM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
As it tries to point it's on cross-build machine
'/data/alexa/portaudio/.libs/lt-patest1'.
File which is named patest1 is just bash-script which makes sure that
when you run application on development it picks up shared object. You can
use cat|more|less to make sure that it's really just bash-script.
Tuukka
Hi,
From strace of patest1 binary I find *newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1", 0x7fdb369aa0, 0) = -1
ENOENT (No such file or directory)* error.
How do I find this file or generate by rebuilding portaudio? Because in
the build I prepared does not contain this file. Is this file really
required for patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hi,
Post by Tuukka Pasanen
Post by Tuukka Pasanen
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy
Post by Tuukka Pasanen
Post by Tuukka Pasanen
these libs) or copy under .libs-directory binary executable.
I followed the same procedure. I copied script as well as .libs from
bin directory and .so library into standard path. In any case it did not
show the missing libraries error. The scripts present is a wrapper for
binary. Executing the *patest1* binary also throws same error.
Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 5:06 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have ARM64 SOC/ARM board. I just
noted (about your first email) that you have probably copied script (which
links to .libs) not executable? If it's executable and not script then what
does ldd say about so linked libraries.
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy these libs) or copy under .libs-directory binary executable.
Tuukka
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd, not stripped
Can you please guide further?
On Tue, Oct 16, 2018, 12:46 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems that you have
build it diffrent GCC/Glibc and run on diffrent.
Tuukka
Hi,
On capturing strace for patest1 I get below output. Please let me
know which files it is looking for because libm.so.6 is present in /lib64
in my board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0) = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC)
= -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) =
-1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x517000
brk(0x538000) = 0x538000
getpid() = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [],
0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid() = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio", {st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4) = 0
read(3, "errexit off\nnoglob "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4) = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4) = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755,
st_size=69048, ...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4) = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags
O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL) = -1 ECHILD (No child processes)
exit_group(1) = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 12, 2018 at 1:23 PM Arjav Parikh <
Post by Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM platform
*./configure --host=aarch64-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board. Changed
the paths mentioned under *relink_command* as it was showing the
path of host system. Then I run ./patest1 on board and below error is
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-10-22 09:39:14 UTC
Permalink
Hello,

Disable OSS but it shouldn't behave like that.. You should little bit
examine source and documents as this is open source project and we are
volunteer people so mainly I can't walk you through every step of debugging.

Tuukka
Post by Arjav Parikh
Hi,
Attaching the strace for patest1 for reference. From the logs I can
see that it is looking for /dev/dsp entry which is not present. So
what modifications are expected?
Hi,
Yes ALSA reports the devices. Executing cat /proc/asound/cards
list the devices.
*cat /proc/asound/cards*
 0 [msm8953sndcardm]: msm8953-snd-car - msm8953-snd-card-mtp
                      msm8953-snd-card-mtp
On Mon, Oct 22, 2018 at 1:10 PM Tuukka Pasanen
Hello,
Does ALSA report any devices?
Tuukka
Post by Arjav Parikh
Hi,
Using patest1 & patest_sine8, it shows *No input default
/data/alexa/portaudio/.libs # *./pa_devs*
PortAudio version: 0x00130600
Version text: 'PortAudio V19.6.0-devel, revision
396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 0
----------------------------------------------
My audio board with inbuilt mic is connected still it shows
this error. What is missing with portaudio?
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 19, 2018 at 6:43 PM Arjav Parikh
Hi,
I am trying to play patest1 or patest_sine8 binary I get
1. *./patest1*
patest1.c
Ring modulate input for 20 seconds.
Error: No input default device.
bye
2. *./patest_sine8*
PortAudio Test: output signed 8 bit sine wave.
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success
I verified the speaker using aplay & tinyplay utility & I
can hear sound. What is missing with portaudio?
*ldd patest1*
    linux-vdso.so.1 (0x0000007fb652c000)
    libportaudio.so.2 => /usr/lib64/libportaudio.so.2
(0x0000007fb64c2000)
    libm.so.6 => /lib64/libm.so.6 (0x0000007fb6420000)
    libpthread.so.0 => /lib64/libpthread.so.0
(0x0000007fb63f4000)
    libc.so.6 => /lib64/libc.so.6 (0x0000007fb629b000)
    /lib/ld-linux-aarch64.so.1 (0x0000007fb64ff000)
--
Thanks & Regards,
Arjav Parikh
On Wed, Oct 17, 2018 at 11:47 AM Tuukka Pasanen
Hello,
As it tries to point it's on cross-build machine
'/data/alexa/portaudio/.libs/lt-patest1'.
File which is named patest1 is just bash-script which
makes sure that when you run application on
development it picks up shared object. You can use
cat|more|less to make sure that it's really just
bash-script.
Tuukka
Post by Arjav Parikh
Hi,
From strace of patest1 binary I find
*newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or
directory)* error.
How do I find this file or generate by rebuilding
portaudio? Because in the build I prepared does not
contain this file. Is this file really required for
patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 8:27 PM Arjav Parikh
Hi,
Post by Arjav Parikh
Post by Tuukka Pasanen
I think easiest to over come this with
autotools is make prefix somewhere in your home
dir and then 'make install' application (and
then copy
Post by Arjav Parikh
Post by Tuukka Pasanen
these libs) or copy under .libs-directory
binary executable.
I followed the same procedure. I copied script
as well as .libs from bin directory and .so
library into standard path. In any case it did
not show the missing libraries error. The
scripts present is a wrapper for binary.
Executing the *patest1* binary also throws same
error.
Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 5:06 PM Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have
ARM64 SOC/ARM board. I just noted (about
your first email) that you have probably
copied script (which links to .libs) not
executable? If it's executable and not
script then what does ldd say about so
linked libraries.
I think easiest to over come this with
autotools is make prefix somewhere in your
home dir and then 'make install' application
(and then copy these libs) or copy under
.libs-directory binary executable.
Tuukka
Post by Arjav Parikh
Hi,
I have cross compiled port audio for ARM
using tool chain aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is
ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM
aarch64, version 1 (SYSV), dynamically
linked, interpreter
/lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0,
BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd,
not stripped
Can you please guide further?
On Tue, Oct 16, 2018, 12:46 PM Tuukka
Hello,
Which Gcc this is build on and is ARM
binary? It seems that you have build it
diffrent GCC/Glibc and run on diffrent.
Tuukka
Post by Tuukka Pasanen
Hi,
On capturing strace for patest1 I get
below output. Please let me know which
files it is looking for because
libm.so.6 is present in /lib64 in my
board.
How do I solve below error when
line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line
2: syntax error: unexpected
"("n/data/alexa/portaudio*
*
*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/*
18 vars */]) = 0
brk(0)                                 
= 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fa136b000
faccessat(AT_FDCWD,
"/etc/ld.so.preload", R_OK) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD,
"/lib64/tls/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD,
"/lib64/tls/aarch64", 0x7fdb36a190, 0)
= -1 ENOENT (No such file or directory)
openat(AT_FDCWD,
"/lib64/tls/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls",
0x7fdb36a190, 0) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD,
"/lib64/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64",
0x7fdb36a190, 0) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6",
O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755,
st_size=596712, ...}) = 0
mmap(NULL, 660120,
PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7fa129e000
mprotect(0x7fa132f000, 61440,
PROT_NONE) = 0
mmap(0x7fa133e000, 8192,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE,
3, 0x90000) = 0x7fa133e000
close(3)                               
= 0
openat(AT_FDCWD, "/lib64/libc.so.6",
O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755,
st_size=1336848, ...}) = 0
mmap(NULL, 1409952,
PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7fa1145000
mprotect(0x7fa1284000, 65536,
PROT_NONE) = 0
mmap(0x7fa1294000, 24576,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE,
3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS,
-1, 0) = 0x7fa129a000
close(3)                               
= 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fa1369000
mprotect(0x7fa1294000, 16384,
PROT_READ) = 0
mprotect(0x7fa133e000, 4096,
PROT_READ) = 0
mprotect(0x7fa136e000, 4096,
PROT_READ) = 0
getuid()                               
= 0
brk(0)                                 
= 0x517000
brk(0x538000)                          
= 0x538000
getpid()                               
= 7441
rt_sigaction(SIGCHLD, {SIG_DFL,
[CHLD], SA_RESTART}, {SIG_DFL, [], 0},
8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP],
SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid()                              
= 7439
uname({sysname="Linux",
nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD,
"/data/alexa/portaudio",
{st_mode=S_IFDIR|0777, st_size=4096,
...}, 0) = 0
newfstatat(AT_FDCWD, ".",
{st_mode=S_IFDIR|0777, st_size=4096,
...}, 0) = 0
openat(AT_FDCWD, "./patest1",
O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3)                               
= 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL,
[], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c,
~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL,
[], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN,
~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL,
[], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL,
~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1
- temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4)                               
= 0
read(3, "errexit off\nnoglob     
"..., 128) = 128
read(3, " off\nxtrace off\n"..., 128)
= 128
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0, si_utime=0,
si_stime=0} ---
read(3, "off\nvi off\npipefail"...,
128) = 44
read(3, "", 128) = 0
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
read(10, "X shell print the target
directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0, si_utime=0,
si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1
-DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/
and t"..., 1023) = 1023
read(10, " the debug banner
immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n  case
\" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded
into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n
else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4)                               
= 0
read(3, ".\n",
128)                     = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0, si_utime=0,
si_stime=0} ---
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4)                               
= 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0, si_utime=0,
si_stime=0} ---
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4)                               
= 0
read(3, "/data/alexa/portaudio\n",
128) = 22
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0, si_utime=0,
si_stime=0} ---
read(3, "", 128) = 0
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such
file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096,
...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm",
0x7fdb3696e0, 0) = -1 ENOENT (No such
file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm",
0x7fdb3696e0, 0) = -1 ENOENT (No such
file or directory)
newfstatat(AT_FDCWD, "/bin/rm",
{st_mode=S_IFREG|0755, st_size=69048,
...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0, si_utime=0,
si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4)                               
= 0
read(3,
"/usr/bin/aarch64-linux-gnu-gcc-5"...,
128) = 63
read(3,
"/usr/bin/aarch64-linux-gnu-gcc-5"...,
128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2, si_utime=0,
si_stime=0} ---
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags
O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620,
st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fa1135000
write(1,
"/usr/bin/aarch64-linux-gnu-gcc-5"...,
line 1: ELF : not found
) = 63
write(1,
"/usr/bin/aarch64-linux-gnu-gcc-5"...,
line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11)                              
= 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0, si_utime=0,
si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG,
NULL)  = -1 ECHILD (No child processes)
exit_group(1)                          
= ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 12, 2018 at 1:23 PM Arjav
Hi,
I have cross compiled portaudio
(v190600_20161030) for ARM
*./configure
--host=aarch64-linux-gnu
--build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install
I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder
under bin onto my board. Changed
the paths mentioned under
*relink_command* as it was showing
the path of host system. Then I
run ./patest1 on board and below
line 1: ELF : not found
line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-22 14:05:13 UTC
Permalink
Hi,
Thanks for your support. Disabling OSS removed /the /dev/dsp entry.
Attached debugs for reference just to get in right direction.
Executing patest1 or patest_sine8 it gets me segmentation fault. Any
suggestions for what could be the reasons it is causing segmentation fault?
After segmentation fault, audio board does not play anything.
Just before segmentation fault error, I observe below debugs:

write(2, "FillInDevInfo: Adding device msm"..., 65FillInDevInfo: Adding
device msm8953-snd-card-mtp: - (hw:0,4): 4
) = 65
write(2, "FillInDevInfo: Filling device in"..., 73FillInDevInfo: Filling
device info for: msm8953-snd-card-mtp: - (hw:0,5)
) = 73
newfstatat(AT_FDCWD,
"/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib/share/alsa/alsa.conf",
{st_mode=S_IFREG|0666, st_size=9665, ...}, 0) = 0
openat(AT_FDCWD, "/dev/snd/controlC0", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
ioctl(3, SNDRV_CTL_IOCTL_CARD_INFO, 0x7fcfe5bf30) = 0
close(3) = 0
openat(AT_FDCWD, "/dev/snd/controlC0", O_RDWR|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
ioctl(3, SNDRV_CTL_IOCTL_PVERSION, 0x7fcfe5c0fc) = 0
ioctl(3, SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE, 0x7fcfe5c12c) = 0
openat(AT_FDCWD, "/dev/snd/pcmC0D5p", O_RDWR|O_NONBLOCK|O_CLOEXEC
<unfinished ...>
+++ killed by SIGSEGV +++
Segmentation fault
Post by Tuukka Pasanen
Hello,
Disable OSS but it shouldn't behave like that.. You should little bit
examine source and documents as this is open source project and we are
volunteer people so mainly I can't walk you through every step of debugging.
Tuukka
Hi,
Attaching the strace for patest1 for reference. From the logs I can see
that it is looking for /dev/dsp entry which is not present. So what
modifications are expected?
Post by Arjav Parikh
Hi,
Yes ALSA reports the devices. Executing cat /proc/asound/cards list the
devices.
*cat /proc/asound/cards*
0 [msm8953sndcardm]: msm8953-snd-car - msm8953-snd-card-mtp
msm8953-snd-card-mtp
Post by Tuukka Pasanen
Hello,
Does ALSA report any devices?
Tuukka
Hi,
Using patest1 & patest_sine8, it shows *No input default device*. Also
/data/alexa/portaudio/.libs # *./pa_devs*
PortAudio version: 0x00130600
Version text: 'PortAudio V19.6.0-devel, revision
396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 0
----------------------------------------------
My audio board with inbuilt mic is connected still it shows this error.
What is missing with portaudio?
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I am trying to play patest1 or patest_sine8 binary I get below error
1. *./patest1*
patest1.c
Ring modulate input for 20 seconds.
Error: No input default device.
bye
2. *./patest_sine8*
PortAudio Test: output signed 8 bit sine wave.
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success
I verified the speaker using aplay & tinyplay utility & I can hear
sound. What is missing with portaudio?
*ldd patest1*
linux-vdso.so.1 (0x0000007fb652c000)
libportaudio.so.2 => /usr/lib64/libportaudio.so.2
(0x0000007fb64c2000)
libm.so.6 => /lib64/libm.so.6 (0x0000007fb6420000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000007fb63f4000)
libc.so.6 => /lib64/libc.so.6 (0x0000007fb629b000)
/lib/ld-linux-aarch64.so.1 (0x0000007fb64ff000)
--
Thanks & Regards,
Arjav Parikh
On Wed, Oct 17, 2018 at 11:47 AM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
As it tries to point it's on cross-build machine
'/data/alexa/portaudio/.libs/lt-patest1'.
File which is named patest1 is just bash-script which makes sure that
when you run application on development it picks up shared object. You can
use cat|more|less to make sure that it's really just bash-script.
Tuukka
Hi,
From strace of patest1 binary I find *newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1", 0x7fdb369aa0, 0) = -1
ENOENT (No such file or directory)* error.
How do I find this file or generate by rebuilding portaudio? Because
in the build I prepared does not contain this file. Is this file really
required for patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hi,
Post by Tuukka Pasanen
Post by Tuukka Pasanen
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy
Post by Tuukka Pasanen
Post by Tuukka Pasanen
these libs) or copy under .libs-directory binary executable.
I followed the same procedure. I copied script as well as .libs from
bin directory and .so library into standard path. In any case it did not
show the missing libraries error. The scripts present is a wrapper for
binary. Executing the *patest1* binary also throws same error.
Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 5:06 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have ARM64 SOC/ARM board. I
just noted (about your first email) that you have probably copied script
(which links to .libs) not executable? If it's executable and not script
then what does ldd say about so linked libraries.
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy these libs) or copy under .libs-directory binary executable.
Tuukka
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd, not stripped
Can you please guide further?
On Tue, Oct 16, 2018, 12:46 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems that you
have build it diffrent GCC/Glibc and run on diffrent.
Tuukka
Hi,
On capturing strace for patest1 I get below output. Please let me
know which files it is looking for because libm.so.6 is present in /lib64
in my board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0) = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) =
-1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x517000
brk(0x538000) = 0x538000
getpid() = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [],
0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid() = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio",
{st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4) = 0
read(3, "errexit off\nnoglob "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4) = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4) = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755,
st_size=69048, ...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4) = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL) = -1 ECHILD (No child processes)
exit_group(1) = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 12, 2018 at 1:23 PM Arjav Parikh <
Post by Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM
*./configure --host=aarch64-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board. Changed
the paths mentioned under *relink_command* as it was showing the
path of host system. Then I run ./patest1 on board and below error is
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-10-23 06:50:34 UTC
Permalink
Hello,

Can you compile with debug symbols on and attach remote/local gdb to it
and backtrace? After that we can see where it really crashes. There is
some ALSA problem in parsing card entry.

Your audio card is some USB, on board or bluetooth mobile MTP? Do you
have correct group info for you i.e you belong audio group (probably
because you get ALSA info for msm8953). Does aplay for example (if you
have it in your system) or it this android board?

Probably it crashes ALSA pipes or messes up setting up configuration
when it SIGSEGV.

Tuukka
Post by Arjav Parikh
Hi,
Thanks for your support. Disabling OSS removed /the /dev/dsp entry.
Attached debugs for reference just to get in right direction.
Executing patest1 or patest_sine8 it gets me segmentation fault. Any
suggestions for what could be the reasons it is causing segmentation
fault? After segmentation fault, audio board does not play anything.
Adding device msm8953-snd-card-mtp: - (hw:0,4): 4
) = 65
Filling device info for: msm8953-snd-card-mtp: - (hw:0,5)
) = 73
newfstatat(AT_FDCWD,
"/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib/share/alsa/alsa.conf",
{st_mode=S_IFREG|0666, st_size=9665, ...}, 0) = 0
openat(AT_FDCWD, "/dev/snd/controlC0", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
ioctl(3, SNDRV_CTL_IOCTL_CARD_INFO, 0x7fcfe5bf30) = 0
close(3)                                = 0
openat(AT_FDCWD, "/dev/snd/controlC0", O_RDWR|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
ioctl(3, SNDRV_CTL_IOCTL_PVERSION, 0x7fcfe5c0fc) = 0
ioctl(3, SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE, 0x7fcfe5c12c) = 0
openat(AT_FDCWD, "/dev/snd/pcmC0D5p", O_RDWR|O_NONBLOCK|O_CLOEXEC
<unfinished ...>
+++ killed by SIGSEGV +++
Segmentation fault
On Mon, Oct 22, 2018 at 3:09 PM Tuukka Pasanen
Hello,
Disable OSS but it shouldn't behave like that.. You should little
bit examine source and documents as this is open source project
and we are volunteer people so mainly I can't walk you through
every step of debugging.
Tuukka
Post by Arjav Parikh
Hi,
Attaching the strace for patest1 for reference. From the logs I
can see that it is looking for /dev/dsp entry which is not
present. So what modifications are expected?
On Mon, Oct 22, 2018 at 1:42 PM Arjav Parikh
Hi,
Yes ALSA reports the devices. Executing cat
/proc/asound/cards list the devices.
*cat /proc/asound/cards*
 0 [msm8953sndcardm]: msm8953-snd-car - msm8953-snd-card-mtp
                      msm8953-snd-card-mtp
On Mon, Oct 22, 2018 at 1:10 PM Tuukka Pasanen
Hello,
Does ALSA report any devices?
Tuukka
Post by Arjav Parikh
Hi,
Using patest1 & patest_sine8, it shows *No input default
/data/alexa/portaudio/.libs # *./pa_devs*
PortAudio version: 0x00130600
Version text: 'PortAudio V19.6.0-devel, revision
396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 0
----------------------------------------------
My audio board with inbuilt mic is connected still it
shows this error. What is missing with portaudio?
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 19, 2018 at 6:43 PM Arjav Parikh
Hi,
I am trying to play patest1 or patest_sine8 binary I
1. *./patest1*
patest1.c
Ring modulate input for 20 seconds.
Error: No input default device.
bye
2. *./patest_sine8*
PortAudio Test: output signed 8 bit sine wave.
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success
I verified the speaker using aplay & tinyplay
utility & I can hear sound. What is missing with
portaudio?
*ldd patest1*
    linux-vdso.so.1 (0x0000007fb652c000)
    libportaudio.so.2 =>
/usr/lib64/libportaudio.so.2 (0x0000007fb64c2000)
    libm.so.6 => /lib64/libm.so.6 (0x0000007fb6420000)
    libpthread.so.0 => /lib64/libpthread.so.0
(0x0000007fb63f4000)
    libc.so.6 => /lib64/libc.so.6 (0x0000007fb629b000)
    /lib/ld-linux-aarch64.so.1 (0x0000007fb64ff000)
--
Thanks & Regards,
Arjav Parikh
On Wed, Oct 17, 2018 at 11:47 AM Tuukka Pasanen
Hello,
As it tries to point it's on cross-build machine
'/data/alexa/portaudio/.libs/lt-patest1'.
File which is named patest1 is just bash-script
which makes sure that when you run application
on development it picks up shared object. You
can use cat|more|less to make sure that it's
really just bash-script.
Tuukka
Post by Arjav Parikh
Hi,
From strace of patest1 binary I find
*newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or
directory)* error.
How do I find this file or generate by
rebuilding portaudio? Because in the build I
prepared does not contain this file. Is this
file really required for patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 8:27 PM Arjav Parikh
Hi,
Post by Arjav Parikh
Post by Tuukka Pasanen
I think easiest to over come this with
autotools is make prefix somewhere in your
home dir and then 'make install'
application (and then copy
Post by Arjav Parikh
Post by Tuukka Pasanen
these libs) or copy under
.libs-directory binary executable.
I followed the same procedure. I copied
script as well as .libs from bin directory
and .so library into standard path. In any
case it did not show the missing libraries
error. The scripts present is a wrapper for
binary. Executing the *patest1* binary also
throws same error.
Can you please suggest how to debug more
into this?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 5:06 PM Tuukka
Hello,
Ok it seems to be ARM binary and you
have ARM64 SOC/ARM board. I just noted
(about your first email) that you have
probably copied script (which links to
.libs) not executable? If it's
executable and not script then what
does ldd say about so linked libraries.
I think easiest to over come this with
autotools is make prefix somewhere in
your home dir and then 'make install'
application (and then copy these libs)
or copy under .libs-directory binary
executable.
Tuukka
Post by Arjav Parikh
Hi,
I have cross compiled port audio for
ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs
is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable,
ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter
/lib/ld-linux-aarch64.so.1, for
GNU/Linux 3.7.0,
BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd,
not stripped
Can you please guide further?
On Tue, Oct 16, 2018, 12:46 PM Tuukka
Hello,
Which Gcc this is build on and is
ARM binary? It seems that you have
build it diffrent GCC/Glibc and
run on diffrent.
Tuukka
On 16/10/2018 09:59, Arjav Parikh
Post by Tuukka Pasanen
Hi,
On capturing strace for patest1 I
get below output. Please let me
know which files it is looking
for because libm.so.6 is present
in /lib64 in my board.
How do I solve below error when
line 1: ELF : not found
line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*
*
*Strace Output for above error:*
/data/alexa/portaudio # strace
./patest1
execve("./patest1",
["./patest1"], [/* 18 vars */]) = 0
brk(0)                                 
= 0x517000
mmap(NULL, 4096,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fa136b000
faccessat(AT_FDCWD,
"/etc/ld.so.preload", R_OK) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD,
"/etc/ld.so.cache",
O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD,
"/lib64/tls/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD,
"/lib64/tls/aarch64",
0x7fdb36a190, 0) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD,
"/lib64/tls/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD,
"/lib64/tls", 0x7fdb36a190, 0) =
-1 ENOENT (No such file or directory)
openat(AT_FDCWD,
"/lib64/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD,
"/lib64/aarch64", 0x7fdb36a190,
0) = -1 ENOENT (No such file or
directory)
openat(AT_FDCWD,
"/lib64/libm.so.6",
O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755,
st_size=596712, ...}) = 0
mmap(NULL, 660120,
PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
= 0x7fa129e000
mprotect(0x7fa132f000, 61440,
PROT_NONE) = 0
mmap(0x7fa133e000, 8192,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE,
3, 0x90000) = 0x7fa133e000
close(3)                               
= 0
openat(AT_FDCWD,
"/lib64/libc.so.6",
O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755,
st_size=1336848, ...}) = 0
mmap(NULL, 1409952,
PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
= 0x7fa1145000
mprotect(0x7fa1284000, 65536,
PROT_NONE) = 0
mmap(0x7fa1294000, 24576,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE,
3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS,
-1, 0) = 0x7fa129a000
close(3)                               
= 0
mmap(NULL, 4096,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fa136a000
mmap(NULL, 4096,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fa1369000
mprotect(0x7fa1294000, 16384,
PROT_READ) = 0
mprotect(0x7fa133e000, 4096,
PROT_READ) = 0
mprotect(0x7fa136e000, 4096,
PROT_READ) = 0
getuid()                               
= 0
brk(0)                                 
= 0x517000
brk(0x538000)                          
= 0x538000
getpid()                               
= 7441
rt_sigaction(SIGCHLD, {SIG_DFL,
[CHLD], SA_RESTART}, {SIG_DFL,
[], 0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_DFL,
[HUP], SA_RESTART}, {SIG_DFL, [],
0}, 8) = 0
getppid()                              
= 7439
uname({sysname="Linux",
nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD,
"/data/alexa/portaudio",
{st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".",
{st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1",
O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3)                               
= 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL,
{SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c,
~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL,
{SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN,
~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL,
{SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL,
~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n#
bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36a27c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4)                               
= 0
read(3, "errexit off\nnoglob     
"..., 128) = 128
read(3, " off\nxtrace off\n"...,
128) = 128
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0,
si_utime=0, si_stime=0} ---
read(3, "off\nvi
off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) =
7442
wait4(-1, 0x7fdb36a41c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36a41c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36a41c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36a41c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
read(10, "X shell print the
target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) =
7443
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0,
si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
read(10, "NUX_SOUNDCARD_H=1
-DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
read(10, "een the wrapper\n#
/script/ and t"..., 1023) = 1023
read(10, " the debug banner
immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n 
case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when
embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n
else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36853c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb3681fc, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36839c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb3686dc, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb368efc, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb3685cc, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb3685cc, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36876c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4)                               
= 0
read(3, ".\n",
128)                     = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0,
si_utime=0, si_stime=0} ---
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) =
7444
wait4(-1, 0x7fdb36909c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36909c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4)                               
= 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0,
si_utime=0, si_stime=0} ---
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) =
7447
wait4(-1, 0x7fdb3693dc, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36938c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36971c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36971c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4)                               
= 0
read(3,
"/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0,
si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) =
7450
wait4(-1, 0x7fdb369a5c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb369a5c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb369a5c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb369d9c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb369f3c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb369d9c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No
such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36971c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm",
0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD,
"/usr/sbin/rm", 0x7fdb3696e0, 0)
= -1 ENOENT (No such file or
directory)
newfstatat(AT_FDCWD, "/bin/rm",
{st_mode=S_IFREG|0755,
st_size=69048, ...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) =
7451
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0,
si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4)                               
= 0
read(3,
"/usr/bin/aarch64-linux-gnu-gcc-5"...,
128) = 63
read(3,
"/usr/bin/aarch64-linux-gnu-gcc-5"...,
128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2,
si_utime=0, si_stime=0} ---
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 2}], 0, NULL) =
7452
wait4(-1, 0x7fdb36971c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
fcntl(1, F_GETFL) = 0x20002
(flags O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620,
st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fa1135000
write(1,
"/usr/bin/aarch64-linux-gnu-gcc-5"...,
line 1: ELF : not found
) = 63
write(1,
"/usr/bin/aarch64-linux-gnu-gcc-5"...,
line 2: syntax error: unexpected
"("n) = 71
dup3(11, 1, 0) = 1
close(11)                              
= 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0, NULL) =
7456
--- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0,
si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG,
NULL)  = -1 ECHILD (No child
processes)
exit_group(1)                          
= ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 12, 2018 at 1:23 PM
Arjav Parikh
Hi,
I have cross compiled
portaudio (v190600_20161030)
for ARM platform using below
*./configure
--host=aarch64-linux-gnu
--build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make
install I copied
libportaudio.a &
libportaudio.so.2.0.0 on my
board.
Also copied scripts & .lib
folder under bin onto my
board. Changed the paths
mentioned under
*relink_command* as it was
showing the path of host
system. Then I run ./patest1
on board and below error is
line 1: ELF : not found
unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this
problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-24 07:05:58 UTC
Permalink
Hi,
On compiling with debug symbols and running gdb on board but backtrace
shows 'no stack'. Attaching the gdb debug for reference
(gdb_patest_sine8.txt). I found that in file "*pa_linux_alsa.c*" it gets
stuck in function FillInDevInfo. Just an observation, if i run patest_sine8
for first time then it shows '*Filling device info for*' debug hw:0,0 to
hw:0,5 and executing patest_sine8 again it stops at *FillInDevInfo: Filling
device info for: msm8953-snd-card-mtp: - (hw:0,0)*. After this I cannot
access the terminal. It gets freeze.

My audio card is on board connected through spi/i2s. My board (APQ8009 SOC
for reference) is running linux and have aplay inbuilt.
As you doubt that there is ALSA problem in parsing card entry, so is some
configuration required to be done in alsa.conf or any other alsa specific
files?
Post by Tuukka Pasanen
Hello,
Can you compile with debug symbols on and attach remote/local gdb to it
and backtrace? After that we can see where it really crashes. There is some
ALSA problem in parsing card entry.
Your audio card is some USB, on board or bluetooth mobile MTP? Do you have
correct group info for you i.e you belong audio group (probably because you
get ALSA info for msm8953). Does aplay for example (if you have it in your
system) or it this android board?
Probably it crashes ALSA pipes or messes up setting up configuration when
it SIGSEGV.
Tuukka
Hi,
Thanks for your support. Disabling OSS removed /the /dev/dsp entry.
Attached debugs for reference just to get in right direction.
Executing patest1 or patest_sine8 it gets me segmentation fault. Any
suggestions for what could be the reasons it is causing segmentation fault?
After segmentation fault, audio board does not play anything.
write(2, "FillInDevInfo: Adding device msm"..., 65FillInDevInfo: Adding
device msm8953-snd-card-mtp: - (hw:0,4): 4
) = 65
write(2, "FillInDevInfo: Filling device in"..., 73FillInDevInfo: Filling
device info for: msm8953-snd-card-mtp: - (hw:0,5)
) = 73
newfstatat(AT_FDCWD,
"/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib/share/alsa/alsa.conf",
{st_mode=S_IFREG|0666, st_size=9665, ...}, 0) = 0
openat(AT_FDCWD, "/dev/snd/controlC0", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
ioctl(3, SNDRV_CTL_IOCTL_CARD_INFO, 0x7fcfe5bf30) = 0
close(3) = 0
openat(AT_FDCWD, "/dev/snd/controlC0", O_RDWR|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
ioctl(3, SNDRV_CTL_IOCTL_PVERSION, 0x7fcfe5c0fc) = 0
ioctl(3, SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE, 0x7fcfe5c12c) = 0
openat(AT_FDCWD, "/dev/snd/pcmC0D5p", O_RDWR|O_NONBLOCK|O_CLOEXEC
<unfinished ...>
+++ killed by SIGSEGV +++
Segmentation fault
Post by Tuukka Pasanen
Hello,
Disable OSS but it shouldn't behave like that.. You should little bit
examine source and documents as this is open source project and we are
volunteer people so mainly I can't walk you through every step of debugging.
Tuukka
Hi,
Attaching the strace for patest1 for reference. From the logs I can see
that it is looking for /dev/dsp entry which is not present. So what
modifications are expected?
Post by Arjav Parikh
Hi,
Yes ALSA reports the devices. Executing cat /proc/asound/cards list the
devices.
*cat /proc/asound/cards*
0 [msm8953sndcardm]: msm8953-snd-car - msm8953-snd-card-mtp
msm8953-snd-card-mtp
Post by Tuukka Pasanen
Hello,
Does ALSA report any devices?
Tuukka
Hi,
Using patest1 & patest_sine8, it shows *No input default device*. Also
/data/alexa/portaudio/.libs # *./pa_devs*
PortAudio version: 0x00130600
Version text: 'PortAudio V19.6.0-devel, revision
396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 0
----------------------------------------------
My audio board with inbuilt mic is connected still it shows this error.
What is missing with portaudio?
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I am trying to play patest1 or patest_sine8 binary I get below error
1. *./patest1*
patest1.c
Ring modulate input for 20 seconds.
Error: No input default device.
bye
2. *./patest_sine8*
PortAudio Test: output signed 8 bit sine wave.
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success
I verified the speaker using aplay & tinyplay utility & I can hear
sound. What is missing with portaudio?
*ldd patest1*
linux-vdso.so.1 (0x0000007fb652c000)
libportaudio.so.2 => /usr/lib64/libportaudio.so.2
(0x0000007fb64c2000)
libm.so.6 => /lib64/libm.so.6 (0x0000007fb6420000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000007fb63f4000)
libc.so.6 => /lib64/libc.so.6 (0x0000007fb629b000)
/lib/ld-linux-aarch64.so.1 (0x0000007fb64ff000)
--
Thanks & Regards,
Arjav Parikh
On Wed, Oct 17, 2018 at 11:47 AM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
As it tries to point it's on cross-build machine
'/data/alexa/portaudio/.libs/lt-patest1'.
File which is named patest1 is just bash-script which makes sure that
when you run application on development it picks up shared object. You can
use cat|more|less to make sure that it's really just bash-script.
Tuukka
Hi,
From strace of patest1 binary I find *newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1", 0x7fdb369aa0, 0) = -1
ENOENT (No such file or directory)* error.
How do I find this file or generate by rebuilding portaudio? Because
in the build I prepared does not contain this file. Is this file really
required for patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
Post by Tuukka Pasanen
Hi,
Post by Tuukka Pasanen
Post by Tuukka Pasanen
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy
Post by Tuukka Pasanen
Post by Tuukka Pasanen
these libs) or copy under .libs-directory binary executable.
I followed the same procedure. I copied script as well as .libs from
bin directory and .so library into standard path. In any case it did not
show the missing libraries error. The scripts present is a wrapper for
binary. Executing the *patest1* binary also throws same error.
Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 5:06 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have ARM64 SOC/ARM board. I
just noted (about your first email) that you have probably copied script
(which links to .libs) not executable? If it's executable and not script
then what does ldd say about so linked libraries.
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy these libs) or copy under .libs-directory binary executable.
Tuukka
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd, not stripped
Can you please guide further?
On Tue, Oct 16, 2018, 12:46 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems that you
have build it diffrent GCC/Glibc and run on diffrent.
Tuukka
Hi,
On capturing strace for patest1 I get below output. Please let me
know which files it is looking for because libm.so.6 is present in /lib64
in my board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0) = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) =
-1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x517000
brk(0x538000) = 0x538000
getpid() = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [],
0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
getppid() = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio",
{st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4) = 0
read(3, "errexit off\nnoglob "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4) = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4) = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755,
st_size=69048, ...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4) = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL) = -1 ECHILD (No child processes)
exit_group(1) = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 12, 2018 at 1:23 PM Arjav Parikh <
Post by Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM
*./configure --host=aarch64-linux-gnu --build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board.
Changed the paths mentioned under *relink_command* as it was
showing the path of host system. Then I run ./patest1 on board and below
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-10-24 08:35:17 UTC
Permalink
Hello,

Crash happens in function (As you may allready noticed):

https://app.assembla.com/spaces/portaudio/git/source/master/src/hostapi/alsa/pa_linux_alsa.c#ln1149

So as it seems to crash very very harsh as there is no gdb stack or it's
some weird ARM binary which doesn't produce stack. So you have to debug
by adding PA_DEBUG prints and see what is the last place where it prints
and crashes. This sounds memory corruption but I can see how.

Tuukka
Post by Arjav Parikh
Hi,
On compiling with debug symbols and running gdb on board but backtrace
shows 'no stack'. Attaching the gdb debug for reference
(gdb_patest_sine8.txt). I found that in file "*pa_linux_alsa.c*" it
gets stuck in function FillInDevInfo. Just an observation, if i run
patest_sine8 for first time then it shows '*Filling device info for*'
debug hw:0,0 to hw:0,5 and executing patest_sine8 again it stops at
*FillInDevInfo: Filling device info for: msm8953-snd-card-mtp: -
(hw:0,0)*. After this I cannot access the terminal. It gets freeze.
My audio card is on board connected through spi/i2s. My board (APQ8009
SOC for reference) is running linux and have aplay inbuilt.
As you doubt that there is ALSA problem in parsing card entry, so is
some configuration required to be done in alsa.conf or any other alsa
specific files?
On Tue, Oct 23, 2018 at 12:20 PM Tuukka Pasanen
Hello,
Can you compile with debug symbols on and attach remote/local gdb
to it and backtrace? After that we can see where it really
crashes. There is some ALSA problem in parsing card entry.
Your audio card is some USB, on board or bluetooth mobile MTP? Do
you have correct group info for you i.e you belong audio group
(probably because you get ALSA info for msm8953). Does aplay for
example (if you have it in your system) or it this android board?
Probably it crashes ALSA pipes or messes up setting up
configuration when it SIGSEGV.
Tuukka
Post by Arjav Parikh
Hi,
Thanks for your support. Disabling OSS removed /the /dev/dsp
entry. Attached debugs for reference just to get in right direction.
Executing patest1 or patest_sine8 it gets me segmentation fault.
Any suggestions for what could be the reasons it is causing
segmentation fault? After segmentation fault, audio board does
not play anything.
Adding device msm8953-snd-card-mtp: - (hw:0,4): 4
) = 65
Filling device info for: msm8953-snd-card-mtp: - (hw:0,5)
) = 73
newfstatat(AT_FDCWD,
"/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib/share/alsa/alsa.conf",
{st_mode=S_IFREG|0666, st_size=9665, ...}, 0) = 0
openat(AT_FDCWD, "/dev/snd/controlC0", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
ioctl(3, SNDRV_CTL_IOCTL_CARD_INFO, 0x7fcfe5bf30) = 0
close(3)                                = 0
openat(AT_FDCWD, "/dev/snd/controlC0", O_RDWR|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
ioctl(3, SNDRV_CTL_IOCTL_PVERSION, 0x7fcfe5c0fc) = 0
ioctl(3, SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE, 0x7fcfe5c12c) = 0
openat(AT_FDCWD, "/dev/snd/pcmC0D5p", O_RDWR|O_NONBLOCK|O_CLOEXEC
<unfinished ...>
+++ killed by SIGSEGV +++
Segmentation fault
On Mon, Oct 22, 2018 at 3:09 PM Tuukka Pasanen
Hello,
Disable OSS but it shouldn't behave like that.. You should
little bit examine source and documents as this is open
source project and we are volunteer people so mainly I can't
walk you through every step of debugging.
Tuukka
Post by Arjav Parikh
Hi,
Attaching the strace for patest1 for reference. From the
logs I can see that it is looking for /dev/dsp entry which
is not present. So what modifications are expected?
On Mon, Oct 22, 2018 at 1:42 PM Arjav Parikh
Hi,
Yes ALSA reports the devices. Executing cat
/proc/asound/cards list the devices.
*cat /proc/asound/cards*
 0 [msm8953sndcardm]: msm8953-snd-car - msm8953-snd-card-mtp
msm8953-snd-card-mtp
On Mon, Oct 22, 2018 at 1:10 PM Tuukka Pasanen
Hello,
Does ALSA report any devices?
Tuukka
Post by Arjav Parikh
Hi,
Using patest1 & patest_sine8, it shows *No input
default device*. Also using *pa_devs* it shows
/data/alexa/portaudio/.libs # *./pa_devs*
PortAudio version: 0x00130600
Version text: 'PortAudio V19.6.0-devel, revision
396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 0
----------------------------------------------
My audio board with inbuilt mic is connected still
it shows this error. What is missing with portaudio?
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 19, 2018 at 6:43 PM Arjav Parikh
Hi,
I am trying to play patest1 or patest_sine8
1. *./patest1*
patest1.c
Ring modulate input for 20 seconds.
Error: No input default device.
bye
2. *./patest_sine8*
PortAudio Test: output signed 8 bit sine wave.
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success
I verified the speaker using aplay & tinyplay
utility & I can hear sound. What is missing
with portaudio?
*ldd patest1*
    linux-vdso.so.1 (0x0000007fb652c000)
    libportaudio.so.2 =>
/usr/lib64/libportaudio.so.2 (0x0000007fb64c2000)
    libm.so.6 => /lib64/libm.so.6
(0x0000007fb6420000)
    libpthread.so.0 => /lib64/libpthread.so.0
(0x0000007fb63f4000)
    libc.so.6 => /lib64/libc.so.6
(0x0000007fb629b000)
/lib/ld-linux-aarch64.so.1 (0x0000007fb64ff000)
--
Thanks & Regards,
Arjav Parikh
On Wed, Oct 17, 2018 at 11:47 AM Tuukka Pasanen
Hello,
As it tries to point it's on cross-build
machine
'/data/alexa/portaudio/.libs/lt-patest1'.
File which is named patest1 is just
bash-script which makes sure that when you
run application on development it picks up
shared object. You can use cat|more|less to
make sure that it's really just bash-script.
Tuukka
Post by Arjav Parikh
Hi,
From strace of patest1 binary I find
*newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file
or directory)* error.
How do I find this file or generate by
rebuilding portaudio? Because in the build
I prepared does not contain this file. Is
this file really required for patest1 to
execute?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 8:27 PM Arjav
Hi,
Post by Arjav Parikh
Post by Tuukka Pasanen
I think easiest to over come this
with autotools is make prefix
somewhere in your home dir and then
'make install' application (and then copy
Post by Arjav Parikh
Post by Tuukka Pasanen
these libs) or copy under
.libs-directory binary executable.
I followed the same procedure. I
copied script as well as .libs from
bin directory and .so library into
standard path. In any case it did not
show the missing libraries error. The
scripts present is a wrapper for
binary. Executing the *patest1* binary
also throws same error.
Can you please suggest how to debug
more into this?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 5:06 PM Tuukka
Hello,
Ok it seems to be ARM binary and
you have ARM64 SOC/ARM board. I
just noted (about your first
email) that you have probably
copied script (which links to
.libs) not executable? If it's
executable and not script then
what does ldd say about so linked
libraries.
I think easiest to over come this
with autotools is make prefix
somewhere in your home dir and
then 'make install' application
(and then copy these libs) or copy
under .libs-directory binary
executable.
Tuukka
On 16/10/2018 10:37, Arjav Parikh
Post by Arjav Parikh
Hi,
I have cross compiled port audio
for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under
bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB
executable, ARM aarch64, version
1 (SYSV), dynamically linked,
interpreter
/lib/ld-linux-aarch64.so.1, for
GNU/Linux 3.7.0,
BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd,
not stripped
Can you please guide further?
On Tue, Oct 16, 2018, 12:46 PM
Tuukka Pasanen
Hello,
Which Gcc this is build on
and is ARM binary? It seems
that you have build it
diffrent GCC/Glibc and run on
diffrent.
Tuukka
On 16/10/2018 09:59, Arjav
Post by Tuukka Pasanen
Hi,
On capturing strace for
patest1 I get below output.
Please let me know which
files it is looking for
because libm.so.6 is present
in /lib64 in my board.
How do I solve below error
when running ./patest1 on
line 1: ELF : not found
unexpected
"("n/data/alexa/portaudio*
*
*
*Strace Output for above error:*
/data/alexa/portaudio #
strace ./patest1
execve("./patest1",
["./patest1"], [/* 18 vars
*/]) = 0
brk(0)                                 
= 0x517000
mmap(NULL, 4096,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa136b000
faccessat(AT_FDCWD,
"/etc/ld.so.preload", R_OK)
= -1 ENOENT (No such file or
directory)
openat(AT_FDCWD,
"/etc/ld.so.cache",
O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or
directory)
openat(AT_FDCWD,
"/lib64/tls/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or
directory)
newfstatat(AT_FDCWD,
"/lib64/tls/aarch64",
0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD,
"/lib64/tls/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or
directory)
newfstatat(AT_FDCWD,
"/lib64/tls", 0x7fdb36a190,
0) = -1 ENOENT (No such file
or directory)
openat(AT_FDCWD,
"/lib64/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or
directory)
newfstatat(AT_FDCWD,
"/lib64/aarch64",
0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD,
"/lib64/libm.so.6",
O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3,
{st_mode=S_IFREG|0755,
st_size=596712, ...}) = 0
mmap(NULL, 660120,
PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x7fa129e000
mprotect(0x7fa132f000,
61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE,
3, 0x90000) = 0x7fa133e000
close(3)                               
= 0
openat(AT_FDCWD,
"/lib64/libc.so.6",
O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3,
{st_mode=S_IFREG|0755,
st_size=1336848, ...}) = 0
mmap(NULL, 1409952,
PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x7fa1145000
mprotect(0x7fa1284000,
65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE,
3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS,
-1, 0) = 0x7fa129a000
close(3)                               
= 0
mmap(NULL, 4096,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa136a000
mmap(NULL, 4096,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa1369000
mprotect(0x7fa1294000,
16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096,
PROT_READ) = 0
mprotect(0x7fa136e000, 4096,
PROT_READ) = 0
getuid()                               
= 0
brk(0)                                 
= 0x517000
brk(0x538000)                          
= 0x538000
getpid()                               
= 7441
rt_sigaction(SIGCHLD,
{SIG_DFL, [CHLD],
SA_RESTART}, {SIG_DFL, [],
0}, 8) = 0
rt_sigaction(SIGHUP,
{SIG_DFL, [HUP],
SA_RESTART}, {SIG_DFL, [],
0}, 8) = 0
getppid()                              
= 7439
uname({sysname="Linux",
nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD,
"/data/alexa/portaudio",
{st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".",
{st_mode=S_IFDIR|0777,
st_size=4096, ...}, 0) = 0
openat(AT_FDCWD,
"./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3)                               
= 0
fcntl(10, F_SETFD,
FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL,
{SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT,
{0x45dd2c, ~[RTMIN RT_1],
0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL,
{SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT,
{SIG_IGN, ~[RTMIN RT_1], 0},
NULL, 8) = 0
rt_sigaction(SIGTERM, NULL,
{SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM,
{SIG_DFL, ~[RTMIN RT_1], 0},
NULL, 8) = 0
read(10, "#! /bin/sh\n\n#
bin/patest1 - temp"...,
1023) = 1023
wait4(-1, 0x7fdb36a5bc,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb36a27c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) =
7442
close(4)                               
= 0
read(3, "errexit
off\nnoglob      "..., 128)
= 128
read(3, " off\nxtrace
off\n"..., 128) = 128
--- SIGCHLD
{si_signo=SIGCHLD,
si_code=CLD_EXITED,
si_pid=7442, si_uid=0,
si_status=0, si_utime=0,
si_stime=0} ---
read(3, "off\nvi
off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0,
NULL) = 7442
wait4(-1, 0x7fdb36a41c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb36a41c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb36a41c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb36a41c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
read(10, "X shell print the
target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) =
7443
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0,
NULL) = 7443
--- SIGCHLD
{si_signo=SIGCHLD,
si_code=CLD_EXITED,
si_pid=7443, si_uid=0,
si_status=0, si_utime=0,
si_stime=1} ---
wait4(-1, 0x7fdb36a41c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
read(10, "NUX_SOUNDCARD_H=1
-DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
read(10, "een the wrapper\n#
/script/ and t"..., 1023) = 1023
read(10, " the debug banner
immediately:\n "..., 1023) =
1023
read(10, "c_exec_program
()\n{\n  case \" $* "...,
1023) = 1023
read(10, "cygwin/mingw when
embedded into\n"..., 1023) =
1023
read(10, "d 2>&1`; then :\n
else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb36853c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb3681fc,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb36839c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb3686dc,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb368efc,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb3685cc,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb3685cc,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb36876c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) =
7444
close(4)                               
= 0
read(3, ".\n",
128)                     = 2
read(3, "", 128) = 0
--- SIGCHLD
{si_signo=SIGCHLD,
si_code=CLD_EXITED,
si_pid=7444, si_uid=0,
si_status=0, si_utime=0,
si_stime=0} ---
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0,
NULL) = 7444
wait4(-1, 0x7fdb36909c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb36909c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) =
7447
close(4)                               
= 0
read(3, "", 128) = 0
--- SIGCHLD
{si_signo=SIGCHLD,
si_code=CLD_EXITED,
si_pid=7447, si_uid=0,
si_status=0, si_utime=0,
si_stime=0} ---
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0,
NULL) = 7447
wait4(-1, 0x7fdb3693dc,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb36938c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb36971c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb36971c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) =
7450
close(4)                               
= 0
read(3,
"/data/alexa/portaudio\n",
128) = 22
--- SIGCHLD
{si_signo=SIGCHLD,
si_code=CLD_EXITED,
si_pid=7450, si_uid=0,
si_status=0, si_utime=0,
si_stime=0} ---
read(3, "", 128) = 0
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0,
NULL) = 7450
wait4(-1, 0x7fdb369a5c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb369a5c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb369a5c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb369d9c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb369f3c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb369d9c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT
(No such file or directory)
wait4(-1, 0x7fdb3698bc,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
wait4(-1, 0x7fdb36971c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775,
st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD,
"/sbin/rm", 0x7fdb3696e0, 0)
= -1 ENOENT (No such file or
directory)
newfstatat(AT_FDCWD,
"/usr/sbin/rm",
0x7fdb3696e0, 0) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD,
"/bin/rm",
{st_mode=S_IFREG|0755,
st_size=69048, ...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) =
7451
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0,
NULL) = 7451
--- SIGCHLD
{si_signo=SIGCHLD,
si_code=CLD_EXITED,
si_pid=7451, si_uid=0,
si_status=0, si_utime=0,
si_stime=0} ---
wait4(-1, 0x7fdb3698bc,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
pipe2([3, 4],
0)                        = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) =
7452
close(4)                               
= 0
read(3,
"/usr/bin/aarch64-linux-gnu-gcc-5"...,
128) = 63
read(3,
"/usr/bin/aarch64-linux-gnu-gcc-5"...,
128) = 71
read(3, "", 128) = 0
--- SIGCHLD
{si_signo=SIGCHLD,
si_code=CLD_EXITED,
si_pid=7452, si_uid=0,
si_status=2, si_utime=0,
si_stime=0} ---
close(3)                               
= 0
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 2}], 0,
NULL) = 7452
wait4(-1, 0x7fdb36971c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
fcntl(1, F_GETFL) = 0x20002
(flags O_RDWR|0x20000)
fstat(1,
{st_mode=S_IFCHR|0620,
st_rdev=makedev(136, 0),
...}) = 0
mmap(NULL, 65536,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa1135000
write(1,
"/usr/bin/aarch64-linux-gnu-gcc-5"...,
line 1: ELF : not found
) = 63
write(1,
"/usr/bin/aarch64-linux-gnu-gcc-5"...,
unexpected "("n) = 71
dup3(11, 1, 0) = 1
close(11)                              
= 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) =
7456
wait4(-1, [{WIFEXITED(s) &&
WEXITSTATUS(s) == 0}], 0,
NULL) = 7456
--- SIGCHLD
{si_signo=SIGCHLD,
si_code=CLD_EXITED,
si_pid=7456, si_uid=0,
si_status=0, si_utime=0,
si_stime=1} ---
wait4(-1, 0x7fdb36957c,
WNOHANG, NULL)  = -1 ECHILD
(No child processes)
exit_group(1)                          
= ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 12, 2018 at 1:23
PM Arjav Parikh
Hi,
I have cross compiled
portaudio
(v190600_20161030) for
ARM platform using below
*./configure
--host=aarch64-linux-gnu
--build=x86_64-pc-linux-gnu
--prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and
make install I copied
libportaudio.a &
libportaudio.so.2.0.0 on
my board.
Also copied scripts &
.lib folder under bin
onto my board. Changed
the paths mentioned
under *relink_command*
as it was showing the
path of host system.
Then I run ./patest1 on
board and below error is
line 1: ELF : not found
unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve
this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Darwin Sese
2018-10-24 08:36:32 UTC
Permalink
Hello,
is your board provided audio line in?
Post by Tuukka Pasanen
Hello,
https://app.assembla.com/spaces/portaudio/git/source/master/src/hostapi/alsa/pa_linux_alsa.c#ln1149
So as it seems to crash very very harsh as there is no gdb stack or it's
some weird ARM binary which doesn't produce stack. So you have to debug by
adding PA_DEBUG prints and see what is the last place where it prints and
crashes. This sounds memory corruption but I can see how.
Tuukka
Hi,
On compiling with debug symbols and running gdb on board but backtrace
shows 'no stack'. Attaching the gdb debug for reference
(gdb_patest_sine8.txt). I found that in file "*pa_linux_alsa.c*" it gets
stuck in function FillInDevInfo. Just an observation, if i run patest_sine8
for first time then it shows '*Filling device info for*' debug hw:0,0 to
Filling device info for: msm8953-snd-card-mtp: - (hw:0,0)*. After this I
cannot access the terminal. It gets freeze.
My audio card is on board connected through spi/i2s. My board (APQ8009 SOC
for reference) is running linux and have aplay inbuilt.
As you doubt that there is ALSA problem in parsing card entry, so is some
configuration required to be done in alsa.conf or any other alsa specific
files?
Post by Tuukka Pasanen
Hello,
Can you compile with debug symbols on and attach remote/local gdb to it
and backtrace? After that we can see where it really crashes. There is some
ALSA problem in parsing card entry.
Your audio card is some USB, on board or bluetooth mobile MTP? Do you
have correct group info for you i.e you belong audio group (probably
because you get ALSA info for msm8953). Does aplay for example (if you have
it in your system) or it this android board?
Probably it crashes ALSA pipes or messes up setting up configuration when
it SIGSEGV.
Tuukka
Hi,
Thanks for your support. Disabling OSS removed /the /dev/dsp entry.
Attached debugs for reference just to get in right direction.
Executing patest1 or patest_sine8 it gets me segmentation fault. Any
suggestions for what could be the reasons it is causing segmentation fault?
After segmentation fault, audio board does not play anything.
write(2, "FillInDevInfo: Adding device msm"..., 65FillInDevInfo: Adding
device msm8953-snd-card-mtp: - (hw:0,4): 4
) = 65
write(2, "FillInDevInfo: Filling device in"..., 73FillInDevInfo: Filling
device info for: msm8953-snd-card-mtp: - (hw:0,5)
) = 73
newfstatat(AT_FDCWD,
"/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib/share/alsa/alsa.conf",
{st_mode=S_IFREG|0666, st_size=9665, ...}, 0) = 0
openat(AT_FDCWD, "/dev/snd/controlC0", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
ioctl(3, SNDRV_CTL_IOCTL_CARD_INFO, 0x7fcfe5bf30) = 0
close(3) = 0
openat(AT_FDCWD, "/dev/snd/controlC0", O_RDWR|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
ioctl(3, SNDRV_CTL_IOCTL_PVERSION, 0x7fcfe5c0fc) = 0
ioctl(3, SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE, 0x7fcfe5c12c) = 0
openat(AT_FDCWD, "/dev/snd/pcmC0D5p", O_RDWR|O_NONBLOCK|O_CLOEXEC
<unfinished ...>
+++ killed by SIGSEGV +++
Segmentation fault
Post by Tuukka Pasanen
Hello,
Disable OSS but it shouldn't behave like that.. You should little bit
examine source and documents as this is open source project and we are
volunteer people so mainly I can't walk you through every step of debugging.
Tuukka
Hi,
Attaching the strace for patest1 for reference. From the logs I can see
that it is looking for /dev/dsp entry which is not present. So what
modifications are expected?
Post by Arjav Parikh
Hi,
Yes ALSA reports the devices. Executing cat /proc/asound/cards list the
devices.
*cat /proc/asound/cards*
0 [msm8953sndcardm]: msm8953-snd-car - msm8953-snd-card-mtp
msm8953-snd-card-mtp
On Mon, Oct 22, 2018 at 1:10 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Does ALSA report any devices?
Tuukka
Hi,
Using patest1 & patest_sine8, it shows *No input default device*.
/data/alexa/portaudio/.libs # *./pa_devs*
PortAudio version: 0x00130600
Version text: 'PortAudio V19.6.0-devel, revision
396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 0
----------------------------------------------
My audio board with inbuilt mic is connected still it shows this
error. What is missing with portaudio?
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I am trying to play patest1 or patest_sine8 binary I get below error
1. *./patest1*
patest1.c
Ring modulate input for 20 seconds.
Error: No input default device.
bye
2. *./patest_sine8*
PortAudio Test: output signed 8 bit sine wave.
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success
I verified the speaker using aplay & tinyplay utility & I can hear
sound. What is missing with portaudio?
*ldd patest1*
linux-vdso.so.1 (0x0000007fb652c000)
libportaudio.so.2 => /usr/lib64/libportaudio.so.2
(0x0000007fb64c2000)
libm.so.6 => /lib64/libm.so.6 (0x0000007fb6420000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000007fb63f4000)
libc.so.6 => /lib64/libc.so.6 (0x0000007fb629b000)
/lib/ld-linux-aarch64.so.1 (0x0000007fb64ff000)
--
Thanks & Regards,
Arjav Parikh
On Wed, Oct 17, 2018 at 11:47 AM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
As it tries to point it's on cross-build machine
'/data/alexa/portaudio/.libs/lt-patest1'.
File which is named patest1 is just bash-script which makes sure
that when you run application on development it picks up shared object. You
can use cat|more|less to make sure that it's really just bash-script.
Tuukka
Hi,
From strace of patest1 binary I find *newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1", 0x7fdb369aa0, 0) = -1
ENOENT (No such file or directory)* error.
How do I find this file or generate by rebuilding portaudio? Because
in the build I prepared does not contain this file. Is this file really
required for patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 8:27 PM Arjav Parikh <
Post by Tuukka Pasanen
Hi,
Post by Tuukka Pasanen
Post by Tuukka Pasanen
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy
Post by Tuukka Pasanen
Post by Tuukka Pasanen
these libs) or copy under .libs-directory binary executable.
I followed the same procedure. I copied script as well as .libs
from bin directory and .so library into standard path. In any case it did
not show the missing libraries error. The scripts present is a wrapper for
binary. Executing the *patest1* binary also throws same error.
Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 5:06 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have ARM64 SOC/ARM board. I
just noted (about your first email) that you have probably copied script
(which links to .libs) not executable? If it's executable and not script
then what does ldd say about so linked libraries.
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy these libs) or copy under .libs-directory binary executable.
Tuukka
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd, not stripped
Can you please guide further?
On Tue, Oct 16, 2018, 12:46 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems that you
have build it diffrent GCC/Glibc and run on diffrent.
Tuukka
Hi,
On capturing strace for patest1 I get below output. Please let me
know which files it is looking for because libm.so.6 is present in /lib64
in my board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0) = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC)
= -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x517000
brk(0x538000) = 0x538000
getpid() = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL,
[], 0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [],
0}, 8) = 0
getppid() = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio",
{st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096,
...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4) = 0
read(3, "errexit off\nnoglob "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4) = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4) = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT (No
such file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755,
st_size=69048, ...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4) = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
fcntl(1, F_GETFL) = 0x20002 (flags O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL) = -1 ECHILD (No child processes)
exit_group(1) = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 12, 2018 at 1:23 PM Arjav Parikh <
Post by Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM
*./configure --host=aarch64-linux-gnu
--build=x86_64-pc-linux-gnu --prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board.
Changed the paths mentioned under *relink_command* as it was
showing the path of host system. Then I run ./patest1 on board and below
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Darwin Sese
<http://www.earnmailer.com/link/14976efb59a73c20>

<http://www.earnmailer.com/alert/confirm/14976efb59a73c20>
<http://www.earnmailer.com/>
Arjav Parikh
2018-10-25 08:35:55 UTC
Permalink
Hi,
I added debugs in pa_linux_alsa.c file and found that before getting
segmentation fault "*alsa_snd_pcm_open*" under OpenPcm function is the last
function called and gets crashed. I am attaching the debug for reference (
*patest_sine8_crash_debug.tx*t).
Is there some issue with alsa library or some conf file related to alsa
need to be set? I am using alsa-lib-1.1.6.

Yes the board is provided audio in.
Post by Tuukka Pasanen
Hello,
is your board provided audio line in?
Post by Tuukka Pasanen
Hello,
https://app.assembla.com/spaces/portaudio/git/source/master/src/hostapi/alsa/pa_linux_alsa.c#ln1149
So as it seems to crash very very harsh as there is no gdb stack or it's
some weird ARM binary which doesn't produce stack. So you have to debug by
adding PA_DEBUG prints and see what is the last place where it prints and
crashes. This sounds memory corruption but I can see how.
Tuukka
Hi,
On compiling with debug symbols and running gdb on board but backtrace
shows 'no stack'. Attaching the gdb debug for reference
(gdb_patest_sine8.txt). I found that in file "*pa_linux_alsa.c*" it gets
stuck in function FillInDevInfo. Just an observation, if i run patest_sine8
for first time then it shows '*Filling device info for*' debug hw:0,0 to
Filling device info for: msm8953-snd-card-mtp: - (hw:0,0)*. After this I
cannot access the terminal. It gets freeze.
My audio card is on board connected through spi/i2s. My board (APQ8009
SOC for reference) is running linux and have aplay inbuilt.
As you doubt that there is ALSA problem in parsing card entry, so is some
configuration required to be done in alsa.conf or any other alsa specific
files?
Post by Tuukka Pasanen
Hello,
Can you compile with debug symbols on and attach remote/local gdb to it
and backtrace? After that we can see where it really crashes. There is some
ALSA problem in parsing card entry.
Your audio card is some USB, on board or bluetooth mobile MTP? Do you
have correct group info for you i.e you belong audio group (probably
because you get ALSA info for msm8953). Does aplay for example (if you have
it in your system) or it this android board?
Probably it crashes ALSA pipes or messes up setting up configuration
when it SIGSEGV.
Tuukka
Hi,
Thanks for your support. Disabling OSS removed /the /dev/dsp entry.
Attached debugs for reference just to get in right direction.
Executing patest1 or patest_sine8 it gets me segmentation fault. Any
suggestions for what could be the reasons it is causing segmentation fault?
After segmentation fault, audio board does not play anything.
write(2, "FillInDevInfo: Adding device msm"..., 65FillInDevInfo: Adding
device msm8953-snd-card-mtp: - (hw:0,4): 4
) = 65
write(2, "FillInDevInfo: Filling device in"..., 73FillInDevInfo: Filling
device info for: msm8953-snd-card-mtp: - (hw:0,5)
) = 73
newfstatat(AT_FDCWD,
"/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib/share/alsa/alsa.conf",
{st_mode=S_IFREG|0666, st_size=9665, ...}, 0) = 0
openat(AT_FDCWD, "/dev/snd/controlC0", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
ioctl(3, SNDRV_CTL_IOCTL_CARD_INFO, 0x7fcfe5bf30) = 0
close(3) = 0
openat(AT_FDCWD, "/dev/snd/controlC0", O_RDWR|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
ioctl(3, SNDRV_CTL_IOCTL_PVERSION, 0x7fcfe5c0fc) = 0
ioctl(3, SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE, 0x7fcfe5c12c) = 0
openat(AT_FDCWD, "/dev/snd/pcmC0D5p", O_RDWR|O_NONBLOCK|O_CLOEXEC
<unfinished ...>
+++ killed by SIGSEGV +++
Segmentation fault
Post by Tuukka Pasanen
Hello,
Disable OSS but it shouldn't behave like that.. You should little bit
examine source and documents as this is open source project and we are
volunteer people so mainly I can't walk you through every step of debugging.
Tuukka
Hi,
Attaching the strace for patest1 for reference. From the logs I can see
that it is looking for /dev/dsp entry which is not present. So what
modifications are expected?
Post by Arjav Parikh
Hi,
Yes ALSA reports the devices. Executing cat /proc/asound/cards list
the devices.
*cat /proc/asound/cards*
0 [msm8953sndcardm]: msm8953-snd-car - msm8953-snd-card-mtp
msm8953-snd-card-mtp
On Mon, Oct 22, 2018 at 1:10 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Does ALSA report any devices?
Tuukka
Hi,
Using patest1 & patest_sine8, it shows *No input default device*.
/data/alexa/portaudio/.libs # *./pa_devs*
PortAudio version: 0x00130600
Version text: 'PortAudio V19.6.0-devel, revision
396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 0
----------------------------------------------
My audio board with inbuilt mic is connected still it shows this
error. What is missing with portaudio?
--
Thanks & Regards,
Arjav Parikh
Post by Arjav Parikh
Hi,
I am trying to play patest1 or patest_sine8 binary I get below error
1. *./patest1*
patest1.c
Ring modulate input for 20 seconds.
Error: No input default device.
bye
2. *./patest_sine8*
PortAudio Test: output signed 8 bit sine wave.
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success
I verified the speaker using aplay & tinyplay utility & I can hear
sound. What is missing with portaudio?
*ldd patest1*
linux-vdso.so.1 (0x0000007fb652c000)
libportaudio.so.2 => /usr/lib64/libportaudio.so.2
(0x0000007fb64c2000)
libm.so.6 => /lib64/libm.so.6 (0x0000007fb6420000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000007fb63f4000)
libc.so.6 => /lib64/libc.so.6 (0x0000007fb629b000)
/lib/ld-linux-aarch64.so.1 (0x0000007fb64ff000)
--
Thanks & Regards,
Arjav Parikh
On Wed, Oct 17, 2018 at 11:47 AM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
As it tries to point it's on cross-build machine
'/data/alexa/portaudio/.libs/lt-patest1'.
File which is named patest1 is just bash-script which makes sure
that when you run application on development it picks up shared object. You
can use cat|more|less to make sure that it's really just bash-script.
Tuukka
Hi,
From strace of patest1 binary I find *newfstatat(AT_FDCWD,
"/data/alexa/portaudio/.libs/**lt-patest1", 0x7fdb369aa0, 0) = -1
ENOENT (No such file or directory)* error.
How do I find this file or generate by rebuilding portaudio?
Because in the build I prepared does not contain this file. Is this file
really required for patest1 to execute?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 8:27 PM Arjav Parikh <
Post by Tuukka Pasanen
Hi,
Post by Tuukka Pasanen
Post by Tuukka Pasanen
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy
Post by Tuukka Pasanen
Post by Tuukka Pasanen
these libs) or copy under .libs-directory binary executable.
I followed the same procedure. I copied script as well as .libs
from bin directory and .so library into standard path. In any case it did
not show the missing libraries error. The scripts present is a wrapper for
binary. Executing the *patest1* binary also throws same error.
Can you please suggest how to debug more into this?
--
Thanks & Regards,
Arjav Parikh
On Tue, Oct 16, 2018 at 5:06 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Ok it seems to be ARM binary and you have ARM64 SOC/ARM board. I
just noted (about your first email) that you have probably copied script
(which links to .libs) not executable? If it's executable and not script
then what does ldd say about so linked libraries.
I think easiest to over come this with autotools is make prefix
somewhere in your home dir and then 'make install' application (and then
copy these libs) or copy under .libs-directory binary executable.
Tuukka
Hi,
I have cross compiled port audio for ARM using tool chain
aarch64-linux-gnu-gcc-5.
patest1 binary created under bin/.libs is ARM compatible.
*file ./patest1*
patest1: ELF 64-bit LSB executable, ARM aarch64, version 1
(SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for
GNU/Linux 3.7.0, BuildID[sha1]=41bcc7f37ae402143d94e31ce69e7e0147954dbd,
not stripped
Can you please guide further?
On Tue, Oct 16, 2018, 12:46 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Which Gcc this is build on and is ARM binary? It seems that you
have build it diffrent GCC/Glibc and run on diffrent.
Tuukka
Hi,
On capturing strace for patest1 I get below output. Please let
me know which files it is looking for because libm.so.6 is present in
/lib64 in my board.
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
*Strace Output for above error:*
/data/alexa/portaudio # strace ./patest1
execve("./patest1", ["./patest1"], [/* 18 vars */]) = 0
brk(0) = 0x517000
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa136b000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/aarch64/libm.so.6",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) =
-1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/tls", 0x7fdb36a190, 0) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC)
= -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib64/aarch64", 0x7fdb36a190, 0) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300Q\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596712, ...}) = 0
mmap(NULL, 660120, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa129e000
mprotect(0x7fa132f000, 61440, PROT_NONE) = 0
mmap(0x7fa133e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x7fa133e000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0h\372\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1336848, ...}) = 0
mmap(NULL, 1409952, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa1145000
mprotect(0x7fa1284000, 65536, PROT_NONE) = 0
mmap(0x7fa1294000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x7fa1294000
mmap(0x7fa129a000, 13216, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa129a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa136a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa1369000
mprotect(0x7fa1294000, 16384, PROT_READ) = 0
mprotect(0x7fa133e000, 4096, PROT_READ) = 0
mprotect(0x7fa136e000, 4096, PROT_READ) = 0
getuid() = 0
brk(0) = 0x517000
brk(0x538000) = 0x538000
getpid() = 7441
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL,
[], 0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {SIG_DFL, [],
0}, 8) = 0
getppid() = 7439
uname({sysname="Linux", nodename="apq8053", ...}) = 0
newfstatat(AT_FDCWD, "/data/alexa/portaudio",
{st_mode=S_IFDIR|0777, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0777, st_size=4096,
...}, 0) = 0
openat(AT_FDCWD, "./patest1", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x45dd2c, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#! /bin/sh\n\n# bin/patest1 - temp"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36a27c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7442
close(4) = 0
read(3, "errexit off\nnoglob "..., 128) = 128
read(3, " off\nxtrace off\n"..., 128) = 128
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7442,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "off\nvi off\npipefail"..., 128) = 44
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7442
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
read(10, "X shell print the target directo"..., 1023) = 1023
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7443
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7443
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7443,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
read(10, "NUX_SOUNDCARD_H=1 -DSIZEOF_SHORT"..., 1023) = 1023
wait4(-1, 0x7fdb36a5bc, WNOHANG, NULL) = -1 ECHILD (No child
processes)
read(10, "een the wrapper\n# /script/ and t"..., 1023) = 1023
read(10, " the debug banner immediately:\n "..., 1023) = 1023
read(10, "c_exec_program ()\n{\n case \" $* "..., 1023) = 1023
read(10, "cygwin/mingw when embedded into\n"..., 1023) = 1023
read(10, "d 2>&1`; then :\n else\n\tprin"..., 1023) = 751
wait4(-1, 0x7fdb36a41c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36853c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb3681fc, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36839c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb3686dc, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb368efc, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb3685cc, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36876c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7444
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7444,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7444
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36909c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7447
close(4) = 0
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7447,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7447
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36938c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7450
close(4) = 0
read(3, "/data/alexa/portaudio\n", 128) = 22
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7450,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7450
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb369a5c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb369f3c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb369d9c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs/lt-patest1",
0x7fdb369aa0, 0) = -1 ENOENT (No such file or directory)
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child
processes)
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
newfstatat(AT_FDCWD, "/data/alexa/portaudio/.libs",
{st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/sbin/rm", 0x7fdb3696e0, 0) = -1 ENOENT
(No such file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/rm", 0x7fdb3696e0, 0) = -1
ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/bin/rm", {st_mode=S_IFREG|0755,
st_size=69048, ...}, 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7451
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7451
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7451,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fdb3698bc, WNOHANG, NULL) = -1 ECHILD (No child
processes)
pipe2([3, 4], 0) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7452
close(4) = 0
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 63
read(3, "/usr/bin/aarch64-linux-gnu-gcc-5"..., 128) = 71
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7452,
si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 7452
wait4(-1, 0x7fdb36971c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
fcntl(1, F_DUPFD, 10) = 11
dup3(2, 1, 0) = 1
wait4(-1, 0x7fdb3693dc, WNOHANG, NULL) = -1 ECHILD (No child
processes)
fcntl(1, F_GETFL) = 0x20002 (flags
O_RDWR|0x20000)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa1135000
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
63/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
) = 63
write(1, "/usr/bin/aarch64-linux-gnu-gcc-5"...,
71/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected "("n)
= 71
dup3(11, 1, 0) = 1
close(11) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fa13690d0) = 7456
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7456
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=7456,
si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
wait4(-1, 0x7fdb36957c, WNOHANG, NULL) = -1 ECHILD (No child
processes)
exit_group(1) = ?
+++ exited with 1 +++
--
Thanks & Regards,
Arjav Parikh
On Fri, Oct 12, 2018 at 1:23 PM Arjav Parikh <
Post by Arjav Parikh
Hi,
I have cross compiled portaudio (v190600_20161030) for ARM
*./configure --host=aarch64-linux-gnu
--build=x86_64-pc-linux-gnu --prefix=/usr/local/portaudio
--with-alsa=/home/ap/Desktop/VVDN_AVS/alexa/local_build_arm/alsa-lib
--with-jack=no *
After doing make and make install I copied libportaudio.a &
libportaudio.so.2.0.0 on my board.
Also copied scripts & .lib folder under bin onto my board.
Changed the paths mentioned under *relink_command* as it was
showing the path of host system. Then I run ./patest1 on board and below
*/usr/bin/aarch64-linux-gnu-gcc-5: line 1: ELF : not found
/usr/bin/aarch64-linux-gnu-gcc-5: line 2: syntax error: unexpected
"("n/data/alexa/portaudio*
aarch64-linux-gnu-ar
aarch64-linux-gnu-elfedit
aarch64-linux-gnu-g++-5
aarch64-linux-gnu-gcc-5
aarch64-linux-gnu-ld
aarch64-linux-gnu-ranlib
aarch64-linux-gnu-readelf
Please guide me to solve this problem.
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Darwin Sese
<http://www.earnmailer.com/link/14976efb59a73c20>
<http://www.earnmailer.com/alert/confirm/14976efb59a73c20>
<http://www.earnmailer.com/>
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Phil Burk
2018-10-25 14:10:41 UTC
Permalink
Hello,

I cannot comment on the details of your cross compilation. But I will just
make a couple quick suggestions.

Please see the instructions for cross compiling for Beagle Board. There may
be some clues there.

https://app.assembla.com/wiki/show/portaudio/Platforms_BeagleBoard

I recommend using static linking with PortAudio library instead of shared
libraries.
I think --disable-shared will do that.

Also try to verify ALSA installation using aplay or other ALSA program
before using PortAudio.

And if you finally find out the secret to making this work, then please let
us know and we can update the Wiki for PortAudio.

Also, thanks Tukka and others for being so helpful.

Phil Burk
Arjav Parikh
2018-10-26 05:51:35 UTC
Permalink
Hi,
I tried using static library instead of shared library and also referred
the steps mentioned for cross compilation but still the same segmentation
fault is observed.
Also verified ALSA by playing a wav file using aplay before using
PortAudio. It is working.

Thank you Phil and Tukka for your support.
Post by Tuukka Pasanen
Hello,
I cannot comment on the details of your cross compilation. But I will just
make a couple quick suggestions.
Please see the instructions for cross compiling for Beagle Board. There
may be some clues there.
https://app.assembla.com/wiki/show/portaudio/Platforms_BeagleBoard
I recommend using static linking with PortAudio library instead of shared
libraries.
I think --disable-shared will do that.
Also try to verify ALSA installation using aplay or other ALSA program
before using PortAudio.
And if you finally find out the secret to making this work, then please
let us know and we can update the Wiki for PortAudio.
Also, thanks Tukka and others for being so helpful.
Phil Burk
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-10-26 06:12:04 UTC
Permalink
Hello,

Ok you need to add openPCM debugs also so we see what's crashing. I'm
having my doubts but have be sure.

Tuukka
Post by Arjav Parikh
Hi,
I tried using static library instead of shared library and also
referred the steps mentioned for cross compilation but still the same
segmentation fault is observed.
Also verified ALSA by playing a wav file using aplay before using
PortAudio. It is working.
Thank you Phil and Tukka for your support.
Hello,
I cannot comment on the details of your cross compilation. But I
will just make a couple quick suggestions.
Please see the instructions for cross compiling for Beagle Board.
There may be some clues there.
https://app.assembla.com/wiki/show/portaudio/Platforms_BeagleBoard
I recommend using static linking with PortAudio library instead of
shared libraries.
I think --disable-shared will do that.
Also try to verify ALSA installation using aplay or other ALSA
program before using PortAudio.
And if you finally find out the secret to making this work, then
please let us know and we can update the Wiki for PortAudio.
Also, thanks Tukka and others for being so helpful.
Phil Burk
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-26 09:08:51 UTC
Permalink
Hi,
After adding debugs in OpenPCM function it is observed that below for loop
is not executed because maxTries value remains 0:
ret = alsa_snd_pcm_open( pcmp, name, stream, mode );
PA_DEBUG(( "%s: ret before loop is : %d\n", __FUNCTION__, ret));

for( tries = 0; tries < maxTries && -EBUSY == ret; ++tries )
{
Pa_Sleep( 10 );
PA_DEBUG(( "%s: Loop name:%s, ptr: %p, stream:%d, mode:%d,
waitonBusy:%d, maxTries:%d, tries:%d \n",
__FUNCTION__,name,*pcmp,stream,mode,waitOnBusy,maxTries, tries));
ret = alsa_snd_pcm_open( pcmp, name, stream, mode );
PA_DEBUG(( "ret is :%d \n", ret));
if( -EBUSY != ret )
{
PA_DEBUG(( "%s: Successfully opened initially busy device after
%d tries\n", __FUNCTION__, tries ));
}
}

Attached debug file for reference (*patest_sine8_crash_debug_2.txt*).
Kindly let me know in case of any additional information required from my
end.
Post by Tuukka Pasanen
Hello,
Ok you need to add openPCM debugs also so we see what's crashing. I'm
having my doubts but have be sure.
Tuukka
Hi,
I tried using static library instead of shared library and also referred
the steps mentioned for cross compilation but still the same segmentation
fault is observed.
Also verified ALSA by playing a wav file using aplay before using
PortAudio. It is working.
Thank you Phil and Tukka for your support.
Post by Tuukka Pasanen
Hello,
I cannot comment on the details of your cross compilation. But I will
just make a couple quick suggestions.
Please see the instructions for cross compiling for Beagle Board. There
may be some clues there.
https://app.assembla.com/wiki/show/portaudio/Platforms_BeagleBoard
I recommend using static linking with PortAudio library instead of shared
libraries.
I think --disable-shared will do that.
Also try to verify ALSA installation using aplay or other ALSA program
before using PortAudio.
And if you finally find out the secret to making this work, then please
let us know and we can update the Wiki for PortAudio.
Also, thanks Tukka and others for being so helpful.
Phil Burk
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-10-26 10:24:12 UTC
Permalink
Hello,

Hmm... If I understand correct your ALSA is hw:0,2 and hw:0,4. Second
opening crashes everything. Does aplay -l also report this as two
separated devices?

Tuukka
Post by Arjav Parikh
Hi,
After adding debugs in OpenPCM function it is observed that below for
    ret = alsa_snd_pcm_open( pcmp, name, stream, mode );
    PA_DEBUG(( "%s: ret before loop is : %d\n", __FUNCTION__, ret));
    for( tries = 0; tries < maxTries && -EBUSY == ret; ++tries )
    {
        Pa_Sleep( 10 );
        PA_DEBUG(( "%s: Loop name:%s, ptr: %p, stream:%d, mode:%d,
waitonBusy:%d, maxTries:%d, tries:%d \n",
__FUNCTION__,name,*pcmp,stream,mode,waitOnBusy,maxTries, tries));
        ret = alsa_snd_pcm_open( pcmp, name, stream, mode );
        PA_DEBUG(( "ret is :%d \n", ret));
        if( -EBUSY != ret )
        {
            PA_DEBUG(( "%s: Successfully opened initially busy device
after %d tries\n", __FUNCTION__, tries ));
        }
    }
Attached debug file for reference (*patest_sine8_crash_debug_2.txt*).
Kindly let me know in case of any additional information required from
my end.
On Fri, Oct 26, 2018 at 11:42 AM Tuukka Pasanen
Hello,
Ok you need to add openPCM debugs also so we see what's crashing.
I'm having my doubts but have be sure.
Tuukka
Post by Arjav Parikh
Hi,
I tried using static library instead of shared library and also
referred the steps mentioned for cross compilation but still the
same segmentation fault is observed.
Also verified ALSA by playing a wav file using aplay before using
PortAudio. It is working.
Thank you Phil and Tukka for your support.
Hello,
I cannot comment on the details of your cross compilation.
But I will just make a couple quick suggestions.
Please see the instructions for cross compiling for Beagle
Board. There may be some clues there.
https://app.assembla.com/wiki/show/portaudio/Platforms_BeagleBoard
I recommend using static linking with PortAudio library
instead of shared libraries.
I think --disable-shared will do that.
Also try to verify ALSA installation using aplay or other
ALSA program before using PortAudio.
And if you finally find out the secret to making this work,
then please let us know and we can update the Wiki for PortAudio.
Also, thanks Tukka and others for being so helpful.
Phil Burk
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-26 11:09:45 UTC
Permalink
Hi,
Actually aplay -l shows invalid option. Doing cat /proc/asound/cards list
entry of 1 card.
aplay -V mentions *pcm_open(0x00000001)device hw:0,0*.

Output:
*cat /proc/asound/cards *
0 [msm8953sndcardm]: msm8953-snd-car - msm8953-snd-card-mtp
msm8953-snd-card-mtp

*aplay -V*
pcm_open(0x00000001)device hw:0,0
pcm_open() /dev/snd/pcmC0D0p
device = 0
subdevice = 0
stream = 0
card = 0
id = 'MultiMedia1 (*)'
name = ''
subname = 'subdevice #0'
dev_class = 0
dev_subclass = 0
subdevices_count = 1
subdevices_avail = 0
access = 0000000000000008
format = 0000000000000004
subformat = 0000000000000001
sample_bits = (16,16) omin=0 omax=0 int=1 empty=0
frame_bits = (32,32) omin=0 omax=0 int=1 empty=0
channels = (2,2) omin=0 omax=0 int=1 empty=0
rate = (44100,44100) omin=0 omax=0 int=1 empty=0
period_time = (725,726) omin=1 omax=1 int=0 empty=0
period_size = (32,32) omin=0 omax=0 int=1 empty=0
period_bytes = (128,128) omin=0 omax=0 int=1 empty=0
periods = (8,8) omin=0 omax=0 int=1 empty=0
buffer_time = (5804,5805) omin=1 omax=1 int=0 empty=0
buffer_size = (256,256) omin=0 omax=0 int=1 empty=0
buffer_bytes = (1024,1024) omin=0 omax=0 int=1 empty=0
tick_time = (0,0) omin=0 omax=0 int=1 empty=0
info = 000d0103
msbits = 16
rate = 44100/1
fifo = 0
buffer_bytes = (1024,1024) omin=0 omax=0 int=1 empty=0
period_bytes = (128,128) omin=0 omax=0 int=1 empty=0
period_cnt = 8
period_size = 128
buffer_size = 1024
sparams->avail_min= 32
sparams->start_threshold= 32
sparams->stop_threshold= 1024
sparams->xfer_align= 32
sparams->boundary= 2305843009213693952

*cat /proc/asound/devices *
2: [ 0] : control
3: [ 0- 0]: digital audio playback
4: [ 0- 0]: digital audio capture
5: [ 0- 1]: digital audio playback
6: [ 0- 1]: digital audio capture
7: [ 0- 2]: digital audio playback
8: [ 0- 2]: digital audio capture
9: [ 0- 3]: digital audio playback
10: [ 0- 3]: digital audio capture
11: [ 0- 4]: digital audio playback
12: [ 0- 5]: digital audio playback
13: [ 0- 6]: digital audio capture
14: [ 0- 7]: digital audio playback
15: [ 0- 8]: digital audio capture
16: [ 0-10]: digital audio playback
17: [ 0-10]: digital audio capture
18: [ 0-11]: digital audio capture
19: [ 0-12]: digital audio playback
20: [ 0-12]: digital audio capture
21: [ 0-13]: digital audio playback
22: [ 0-13]: digital audio capture
23: [ 0-14]: digital audio playback
24: [ 0-14]: digital audio capture
25: [ 0-15]: digital audio playback
26: [ 0-15]: digital audio capture
27: [ 0-16]: digital audio playback
28: [ 0-16]: digital audio capture
29: [ 0-17]: digital audio playback
30: [ 0-17]: digital audio capture
31: [ 0-18]: digital audio playback
33: : timer
34: [ 0-18]: digital audio capture
35: [ 0-19]: digital audio capture
36: [ 0-20]: digital audio capture
37: [ 0-21]: digital audio capture
38: [ 0-22]: digital audio capture
39: [ 0-23]: digital audio capture
40: [ 0-25]: digital audio playback
41: [ 0-26]: digital audio capture
42: [ 0-34]: digital audio playback
43: [ 0-34]: digital audio capture
44: [ 0-35]: digital audio playback
45: [ 0-35]: digital audio capture
46: [ 0-36]: digital audio playback
47: [ 0-36]: digital audio capture
48: [ 0-37]: digital audio playback
49: [ 0-37]: digital audio capture
50: [ 0- 9]: ?
51: [ 0-24]: ?
52: [ 0-27]: ?
53: [ 0-28]: ?
54: [ 0-29]: ?
55: [ 0-30]: ?
56: [ 0-31]: ?
57: [ 0-32]: ?
58: [ 0-33]: ?
59: [ 0-38]: ?
60: [ 0-39]: ?
61: [ 0-40]: ?
62: [ 0-34]: hardware dependent
63: [ 0-32]: hardware dependent
65: [ 0-37]: hardware dependent
66: [ 0-30]: hardware dependent
67: [ 0-31]: hardware dependent
68: [ 0-11]: hardware dependent
69: [ 0-12]: hardware dependent
70: [ 0- 5]: hardware dependent
71: [ 0- 6]: hardware dependent
72: [ 0- 7]: hardware dependent
73: [ 0- 8]: hardware dependent
74: [ 0- 9]: hardware dependent
75: [ 0-10]: hardware dependent
76: [ 0-16]: hardware dependent
77: [ 0-15]: hardware dependent
78: [ 0-13]: hardware dependent
79: [ 0-14]: hardware dependent
80: [ 0-47]: hardware dependent
81: [ 0-46]: hardware dependent
Post by Tuukka Pasanen
Hello,
Hmm... If I understand correct your ALSA is hw:0,2 and hw:0,4. Second
opening crashes everything. Does aplay -l also report this as two separated
devices?
Tuukka
Hi,
After adding debugs in OpenPCM function it is observed that below for loop
ret = alsa_snd_pcm_open( pcmp, name, stream, mode );
PA_DEBUG(( "%s: ret before loop is : %d\n", __FUNCTION__, ret));
for( tries = 0; tries < maxTries && -EBUSY == ret; ++tries )
{
Pa_Sleep( 10 );
PA_DEBUG(( "%s: Loop name:%s, ptr: %p, stream:%d, mode:%d,
waitonBusy:%d, maxTries:%d, tries:%d \n",
__FUNCTION__,name,*pcmp,stream,mode,waitOnBusy,maxTries, tries));
ret = alsa_snd_pcm_open( pcmp, name, stream, mode );
PA_DEBUG(( "ret is :%d \n", ret));
if( -EBUSY != ret )
{
PA_DEBUG(( "%s: Successfully opened initially busy device
after %d tries\n", __FUNCTION__, tries ));
}
}
Attached debug file for reference (*patest_sine8_crash_debug_2.txt*).
Kindly let me know in case of any additional information required from my
end.
Post by Tuukka Pasanen
Hello,
Ok you need to add openPCM debugs also so we see what's crashing. I'm
having my doubts but have be sure.
Tuukka
Hi,
I tried using static library instead of shared library and also referred
the steps mentioned for cross compilation but still the same segmentation
fault is observed.
Also verified ALSA by playing a wav file using aplay before using
PortAudio. It is working.
Thank you Phil and Tukka for your support.
Post by Tuukka Pasanen
Hello,
I cannot comment on the details of your cross compilation. But I will
just make a couple quick suggestions.
Please see the instructions for cross compiling for Beagle Board. There
may be some clues there.
https://app.assembla.com/wiki/show/portaudio/Platforms_BeagleBoard
I recommend using static linking with PortAudio library instead of
shared libraries.
I think --disable-shared will do that.
Also try to verify ALSA installation using aplay or other ALSA program
before using PortAudio.
And if you finally find out the secret to making this work, then please
let us know and we can update the Wiki for PortAudio.
Also, thanks Tukka and others for being so helpful.
Phil Burk
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-10-27 12:34:17 UTC
Permalink
Hello,

Sorry it was aplay -L not -l. If crashes on hw:0,4 same as portaudio
then it works same as portaudio if not then we can look code how it
doesn't. There is huge amount of outputs in that card.

Tuukka
Post by Arjav Parikh
Hi,
Actually aplay -l shows invalid option. Doing cat /proc/asound/cards
list entry of 1 card.
aplay -V mentions *pcm_open(0x00000001)device hw:0,0*.
*cat /proc/asound/cards *
 0 [msm8953sndcardm]: msm8953-snd-car - msm8953-snd-card-mtp
                      msm8953-snd-card-mtp
*aplay -V*
pcm_open(0x00000001)device hw:0,0
pcm_open() /dev/snd/pcmC0D0p
device = 0
subdevice = 0
stream = 0
card = 0
id = 'MultiMedia1 (*)'
name = ''
subname = 'subdevice #0'
dev_class = 0
dev_subclass = 0
subdevices_count = 1
subdevices_avail = 0
access = 0000000000000008
format = 0000000000000004
subformat = 0000000000000001
sample_bits = (16,16) omin=0 omax=0 int=1 empty=0
frame_bits = (32,32) omin=0 omax=0 int=1 empty=0
channels = (2,2) omin=0 omax=0 int=1 empty=0
rate = (44100,44100) omin=0 omax=0 int=1 empty=0
period_time = (725,726) omin=1 omax=1 int=0 empty=0
period_size = (32,32) omin=0 omax=0 int=1 empty=0
period_bytes = (128,128) omin=0 omax=0 int=1 empty=0
periods = (8,8) omin=0 omax=0 int=1 empty=0
buffer_time = (5804,5805) omin=1 omax=1 int=0 empty=0
buffer_size = (256,256) omin=0 omax=0 int=1 empty=0
buffer_bytes = (1024,1024) omin=0 omax=0 int=1 empty=0
tick_time = (0,0) omin=0 omax=0 int=1 empty=0
info = 000d0103
msbits = 16
rate = 44100/1
fifo = 0
buffer_bytes = (1024,1024) omin=0 omax=0 int=1 empty=0
period_bytes = (128,128) omin=0 omax=0 int=1 empty=0
period_cnt = 8
period_size = 128
buffer_size = 1024
sparams->avail_min= 32
 sparams->start_threshold= 32
 sparams->stop_threshold= 1024
 sparams->xfer_align= 32
 sparams->boundary= 2305843009213693952
*cat /proc/asound/devices *
  2: [ 0]   : control
  3: [ 0- 0]: digital audio playback
  4: [ 0- 0]: digital audio capture
  5: [ 0- 1]: digital audio playback
  6: [ 0- 1]: digital audio capture
  7: [ 0- 2]: digital audio playback
  8: [ 0- 2]: digital audio capture
  9: [ 0- 3]: digital audio playback
 10: [ 0- 3]: digital audio capture
 11: [ 0- 4]: digital audio playback
 12: [ 0- 5]: digital audio playback
 13: [ 0- 6]: digital audio capture
 14: [ 0- 7]: digital audio playback
 15: [ 0- 8]: digital audio capture
 16: [ 0-10]: digital audio playback
 17: [ 0-10]: digital audio capture
 18: [ 0-11]: digital audio capture
 19: [ 0-12]: digital audio playback
 20: [ 0-12]: digital audio capture
 21: [ 0-13]: digital audio playback
 22: [ 0-13]: digital audio capture
 23: [ 0-14]: digital audio playback
 24: [ 0-14]: digital audio capture
 25: [ 0-15]: digital audio playback
 26: [ 0-15]: digital audio capture
 27: [ 0-16]: digital audio playback
 28: [ 0-16]: digital audio capture
 29: [ 0-17]: digital audio playback
 30: [ 0-17]: digital audio capture
 31: [ 0-18]: digital audio playback
 33:        : timer
 34: [ 0-18]: digital audio capture
 35: [ 0-19]: digital audio capture
 36: [ 0-20]: digital audio capture
 37: [ 0-21]: digital audio capture
 38: [ 0-22]: digital audio capture
 39: [ 0-23]: digital audio capture
 40: [ 0-25]: digital audio playback
 41: [ 0-26]: digital audio capture
 42: [ 0-34]: digital audio playback
 43: [ 0-34]: digital audio capture
 44: [ 0-35]: digital audio playback
 45: [ 0-35]: digital audio capture
 46: [ 0-36]: digital audio playback
 47: [ 0-36]: digital audio capture
 48: [ 0-37]: digital audio playback
 49: [ 0-37]: digital audio capture
 50: [ 0- 9]: ?
 51: [ 0-24]: ?
 52: [ 0-27]: ?
 53: [ 0-28]: ?
 54: [ 0-29]: ?
 55: [ 0-30]: ?
 56: [ 0-31]: ?
 57: [ 0-32]: ?
 58: [ 0-33]: ?
 59: [ 0-38]: ?
 60: [ 0-39]: ?
 61: [ 0-40]: ?
 62: [ 0-34]: hardware dependent
 63: [ 0-32]: hardware dependent
 65: [ 0-37]: hardware dependent
 66: [ 0-30]: hardware dependent
 67: [ 0-31]: hardware dependent
 68: [ 0-11]: hardware dependent
 69: [ 0-12]: hardware dependent
 70: [ 0- 5]: hardware dependent
 71: [ 0- 6]: hardware dependent
 72: [ 0- 7]: hardware dependent
 73: [ 0- 8]: hardware dependent
 74: [ 0- 9]: hardware dependent
 75: [ 0-10]: hardware dependent
 76: [ 0-16]: hardware dependent
 77: [ 0-15]: hardware dependent
 78: [ 0-13]: hardware dependent
 79: [ 0-14]: hardware dependent
 80: [ 0-47]: hardware dependent
 81: [ 0-46]: hardware dependent
On Fri, Oct 26, 2018 at 3:54 PM Tuukka Pasanen
Hello,
Hmm... If I understand correct your ALSA is hw:0,2 and hw:0,4.
Second opening crashes everything. Does aplay -l also report this
as two separated devices?
Tuukka
Post by Arjav Parikh
Hi,
After adding debugs in OpenPCM function it is observed that below
    ret = alsa_snd_pcm_open( pcmp, name, stream, mode );
    PA_DEBUG(( "%s: ret before loop is : %d\n", __FUNCTION__, ret));
    for( tries = 0; tries < maxTries && -EBUSY == ret; ++tries )
    {
        Pa_Sleep( 10 );
        PA_DEBUG(( "%s: Loop name:%s, ptr: %p, stream:%d,
mode:%d, waitonBusy:%d, maxTries:%d, tries:%d \n",
__FUNCTION__,name,*pcmp,stream,mode,waitOnBusy,maxTries, tries));
        ret = alsa_snd_pcm_open( pcmp, name, stream, mode );
        PA_DEBUG(( "ret is :%d \n", ret));
        if( -EBUSY != ret )
        {
            PA_DEBUG(( "%s: Successfully opened initially busy
device after %d tries\n", __FUNCTION__, tries ));
        }
    }
Attached debug file for reference
(*patest_sine8_crash_debug_2.txt*). Kindly let me know in case of
any additional information required from my end.
On Fri, Oct 26, 2018 at 11:42 AM Tuukka Pasanen
Hello,
Ok you need to add openPCM debugs also so we see what's
crashing. I'm having my doubts but have be sure.
Tuukka
Post by Arjav Parikh
Hi,
I tried using static library instead of shared library and
also referred the steps mentioned for cross compilation but
still the same segmentation fault is observed.
Also verified ALSA by playing a wav file using aplay before
using PortAudio. It is working.
Thank you Phil and Tukka for your support.
On Thu, Oct 25, 2018 at 7:41 PM Phil Burk
Hello,
I cannot comment on the details of your cross
compilation. But I will just make a couple quick
suggestions.
Please see the instructions for cross compiling for
Beagle Board. There may be some clues there.
https://app.assembla.com/wiki/show/portaudio/Platforms_BeagleBoard
I recommend using static linking with PortAudio library
instead of shared libraries.
I think --disable-shared will do that.
Also try to verify ALSA installation using aplay or
other ALSA program before using PortAudio.
And if you finally find out the secret to making this
work, then please let us know and we can update the Wiki
for PortAudio.
Also, thanks Tukka and others for being so helpful.
Phil Burk
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-27 15:00:24 UTC
Permalink
Hi,
Actually aplay -L also doesn't work. It shows same output as invalid
option. As aplay is being used for embedded software so maybe it is having
limited options.
How do I confirm that it crashes only on hw0,4? From aplay -V debug it
shows only subdevice 0.

Is it possible to check Portuadio on ARM platform for anyone because the
same code works on X86? As it is a audio sound card from ZL38063 so it is
showing huge amount of outputs.
Post by Tuukka Pasanen
Hello,
Sorry it was aplay -L not -l. If crashes on hw:0,4 same as portaudio then
it works same as portaudio if not then we can look code how it doesn't.
There is huge amount of outputs in that card.
Tuukka
Hi,
Actually aplay -l shows invalid option. Doing cat /proc/asound/cards list
entry of 1 card.
aplay -V mentions *pcm_open(0x00000001)device hw:0,0*.
*cat /proc/asound/cards *
0 [msm8953sndcardm]: msm8953-snd-car - msm8953-snd-card-mtp
msm8953-snd-card-mtp
*aplay -V*
pcm_open(0x00000001)device hw:0,0
pcm_open() /dev/snd/pcmC0D0p
device = 0
subdevice = 0
stream = 0
card = 0
id = 'MultiMedia1 (*)'
name = ''
subname = 'subdevice #0'
dev_class = 0
dev_subclass = 0
subdevices_count = 1
subdevices_avail = 0
access = 0000000000000008
format = 0000000000000004
subformat = 0000000000000001
sample_bits = (16,16) omin=0 omax=0 int=1 empty=0
frame_bits = (32,32) omin=0 omax=0 int=1 empty=0
channels = (2,2) omin=0 omax=0 int=1 empty=0
rate = (44100,44100) omin=0 omax=0 int=1 empty=0
period_time = (725,726) omin=1 omax=1 int=0 empty=0
period_size = (32,32) omin=0 omax=0 int=1 empty=0
period_bytes = (128,128) omin=0 omax=0 int=1 empty=0
periods = (8,8) omin=0 omax=0 int=1 empty=0
buffer_time = (5804,5805) omin=1 omax=1 int=0 empty=0
buffer_size = (256,256) omin=0 omax=0 int=1 empty=0
buffer_bytes = (1024,1024) omin=0 omax=0 int=1 empty=0
tick_time = (0,0) omin=0 omax=0 int=1 empty=0
info = 000d0103
msbits = 16
rate = 44100/1
fifo = 0
buffer_bytes = (1024,1024) omin=0 omax=0 int=1 empty=0
period_bytes = (128,128) omin=0 omax=0 int=1 empty=0
period_cnt = 8
period_size = 128
buffer_size = 1024
sparams->avail_min= 32
sparams->start_threshold= 32
sparams->stop_threshold= 1024
sparams->xfer_align= 32
sparams->boundary= 2305843009213693952
*cat /proc/asound/devices *
2: [ 0] : control
3: [ 0- 0]: digital audio playback
4: [ 0- 0]: digital audio capture
5: [ 0- 1]: digital audio playback
6: [ 0- 1]: digital audio capture
7: [ 0- 2]: digital audio playback
8: [ 0- 2]: digital audio capture
9: [ 0- 3]: digital audio playback
10: [ 0- 3]: digital audio capture
11: [ 0- 4]: digital audio playback
12: [ 0- 5]: digital audio playback
13: [ 0- 6]: digital audio capture
14: [ 0- 7]: digital audio playback
15: [ 0- 8]: digital audio capture
16: [ 0-10]: digital audio playback
17: [ 0-10]: digital audio capture
18: [ 0-11]: digital audio capture
19: [ 0-12]: digital audio playback
20: [ 0-12]: digital audio capture
21: [ 0-13]: digital audio playback
22: [ 0-13]: digital audio capture
23: [ 0-14]: digital audio playback
24: [ 0-14]: digital audio capture
25: [ 0-15]: digital audio playback
26: [ 0-15]: digital audio capture
27: [ 0-16]: digital audio playback
28: [ 0-16]: digital audio capture
29: [ 0-17]: digital audio playback
30: [ 0-17]: digital audio capture
31: [ 0-18]: digital audio playback
33: : timer
34: [ 0-18]: digital audio capture
35: [ 0-19]: digital audio capture
36: [ 0-20]: digital audio capture
37: [ 0-21]: digital audio capture
38: [ 0-22]: digital audio capture
39: [ 0-23]: digital audio capture
40: [ 0-25]: digital audio playback
41: [ 0-26]: digital audio capture
42: [ 0-34]: digital audio playback
43: [ 0-34]: digital audio capture
44: [ 0-35]: digital audio playback
45: [ 0-35]: digital audio capture
46: [ 0-36]: digital audio playback
47: [ 0-36]: digital audio capture
48: [ 0-37]: digital audio playback
49: [ 0-37]: digital audio capture
50: [ 0- 9]: ?
51: [ 0-24]: ?
52: [ 0-27]: ?
53: [ 0-28]: ?
54: [ 0-29]: ?
55: [ 0-30]: ?
56: [ 0-31]: ?
57: [ 0-32]: ?
58: [ 0-33]: ?
59: [ 0-38]: ?
60: [ 0-39]: ?
61: [ 0-40]: ?
62: [ 0-34]: hardware dependent
63: [ 0-32]: hardware dependent
65: [ 0-37]: hardware dependent
66: [ 0-30]: hardware dependent
67: [ 0-31]: hardware dependent
68: [ 0-11]: hardware dependent
69: [ 0-12]: hardware dependent
70: [ 0- 5]: hardware dependent
71: [ 0- 6]: hardware dependent
72: [ 0- 7]: hardware dependent
73: [ 0- 8]: hardware dependent
74: [ 0- 9]: hardware dependent
75: [ 0-10]: hardware dependent
76: [ 0-16]: hardware dependent
77: [ 0-15]: hardware dependent
78: [ 0-13]: hardware dependent
79: [ 0-14]: hardware dependent
80: [ 0-47]: hardware dependent
81: [ 0-46]: hardware dependent
Post by Tuukka Pasanen
Hello,
Hmm... If I understand correct your ALSA is hw:0,2 and hw:0,4. Second
opening crashes everything. Does aplay -l also report this as two separated
devices?
Tuukka
Hi,
After adding debugs in OpenPCM function it is observed that below for
ret = alsa_snd_pcm_open( pcmp, name, stream, mode );
PA_DEBUG(( "%s: ret before loop is : %d\n", __FUNCTION__, ret));
for( tries = 0; tries < maxTries && -EBUSY == ret; ++tries )
{
Pa_Sleep( 10 );
PA_DEBUG(( "%s: Loop name:%s, ptr: %p, stream:%d, mode:%d,
waitonBusy:%d, maxTries:%d, tries:%d \n",
__FUNCTION__,name,*pcmp,stream,mode,waitOnBusy,maxTries, tries));
ret = alsa_snd_pcm_open( pcmp, name, stream, mode );
PA_DEBUG(( "ret is :%d \n", ret));
if( -EBUSY != ret )
{
PA_DEBUG(( "%s: Successfully opened initially busy device
after %d tries\n", __FUNCTION__, tries ));
}
}
Attached debug file for reference (*patest_sine8_crash_debug_2.txt*).
Kindly let me know in case of any additional information required from my
end.
Post by Tuukka Pasanen
Hello,
Ok you need to add openPCM debugs also so we see what's crashing. I'm
having my doubts but have be sure.
Tuukka
Hi,
I tried using static library instead of shared library and also referred
the steps mentioned for cross compilation but still the same segmentation
fault is observed.
Also verified ALSA by playing a wav file using aplay before using
PortAudio. It is working.
Thank you Phil and Tukka for your support.
Post by Tuukka Pasanen
Hello,
I cannot comment on the details of your cross compilation. But I will
just make a couple quick suggestions.
Please see the instructions for cross compiling for Beagle Board. There
may be some clues there.
https://app.assembla.com/wiki/show/portaudio/Platforms_BeagleBoard
I recommend using static linking with PortAudio library instead of
shared libraries.
I think --disable-shared will do that.
Also try to verify ALSA installation using aplay or other ALSA program
before using PortAudio.
And if you finally find out the secret to making this work, then please
let us know and we can update the Wiki for PortAudio.
Also, thanks Tukka and others for being so helpful.
Phil Burk
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Alberto di Bene
2018-10-27 18:49:53 UTC
Permalink
Is it possible to check Portuadio on ARM platform for anyone because the same code works on X86? As it is a audio
sound card from ZL38063 so it is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the past I wrote a small demonstration program for the
Raspberry Pi 3B, under Raspbian, that used Portaudio to playback a WAV file. It worked without problems. The GUI was
written in Free Pascal using Lazarus, and the processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel platform, then the source code was transferred
to the Raspberry and recompiled there, without any problems.

73  Alberto  I2PHD
Arjav Parikh
2018-10-29 05:26:53 UTC
Permalink
Hi,
Actually after enabling alsa-utils with other options I could get the
output for aplay -L. Please find below the output for aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device

*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 0: MultiMedia1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 1: MultiMedia2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary MI2S_RX
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 7: AFE-PROXY RX
msm-stub-rx-7 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM Hostless
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 12: MultiMedia5 (*)
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 14: MultiMedia9 (*)
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 17: INT_HFP_BT
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 18: MultiMedia6 (*)
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 25: QUAT_MI2S
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 34: VoiceMMode1 (*)
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 35: VoiceMMode2 (*)
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 36: MultiMedia8 (*)
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone because the
same code works on X86? As it is a audio sound card from ZL38063 so it is
showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the past I
wrote a small demonstration program for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to playback a WAV file. It worked without
problems. The GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel
platform, then the source code was transferred to the Raspberry and
recompiled there, without any problems.
73 Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-10-29 09:32:57 UTC
Permalink
Hello,

What does aplay -D hw:0,4

if it doesn't do anything what does aplay -D hw:0,4

I have to look what does aplay do otherwise. Are they both compiled with
same

Tuukka
Post by Arjav Parikh
Hi,
Actually after enabling alsa-utils with other options I could get the
output for aplay -L. Please find below the output for aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
    msm8953-snd-card-mtp,
    Default Audio Device
sysdefault:CARD=msm8953sndcardm
    msm8953-snd-card-mtp,
    Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 0: MultiMedia1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 1: MultiMedia2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary
MI2S_RX Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 7: AFE-PROXY RX
msm-stub-rx-7 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 12: MultiMedia5
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 14: MultiMedia9
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 17: INT_HFP_BT
Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 18: MultiMedia6
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 25: QUAT_MI2S
Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 34: VoiceMMode1
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 35: VoiceMMode2
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 36: MultiMedia8
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone
because the same code works on X86? As it is a audio sound card
from ZL38063 so it is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the
past I wrote a small demonstration program for the Raspberry Pi
3B, under Raspbian, that used Portaudio to playback a WAV file. It
worked without problems. The GUI was written in Free Pascal using
Lazarus, and the processing code, Portaudio interfacing included,
in straight C code. The application was firstly developed and
debugged under Kubuntu on an Intel platform, then the source code
was transferred to the Raspberry and recompiled there, without any
problems.
73  Alberto  I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Tuukka Pasanen
2018-10-29 09:40:08 UTC
Permalink
Hello,

Sorry wrong button..

Are aplay and all compiled with same enviroment. I assume this is Yocto
or similar project.

Tuukka
Post by Arjav Parikh
Hi,
Actually after enabling alsa-utils with other options I could get the
output for aplay -L. Please find below the output for aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
    msm8953-snd-card-mtp,
    Default Audio Device
sysdefault:CARD=msm8953sndcardm
    msm8953-snd-card-mtp,
    Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 0: MultiMedia1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 1: MultiMedia2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary
MI2S_RX Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 7: AFE-PROXY RX
msm-stub-rx-7 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 12: MultiMedia5
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 14: MultiMedia9
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 17: INT_HFP_BT
Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 18: MultiMedia6
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 25: QUAT_MI2S
Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 34: VoiceMMode1
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 35: VoiceMMode2
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 36: MultiMedia8
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone
because the same code works on X86? As it is a audio sound card
from ZL38063 so it is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the
past I wrote a small demonstration program for the Raspberry Pi
3B, under Raspbian, that used Portaudio to playback a WAV file. It
worked without problems. The GUI was written in Free Pascal using
Lazarus, and the processing code, Portaudio interfacing included,
in straight C code. The application was firstly developed and
debugged under Kubuntu on an Intel platform, then the source code
was transferred to the Raspberry and recompiled there, without any
problems.
73  Alberto  I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-29 10:38:45 UTC
Permalink
Hi,
*aplay -D hw:0,4* do not output anything. This command as well as *aplay -D
hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment. This is
yocto project.
Post by Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume this is Yocto or
similar project.
Tuukka
Hi,
Actually after enabling alsa-utils with other options I could get the
output for aplay -L. Please find below the output for aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 0: MultiMedia1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 1: MultiMedia2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary MI2S_RX
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 7: AFE-PROXY RX
msm-stub-rx-7 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM Hostless
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 12: MultiMedia5 (*)
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 14: MultiMedia9 (*)
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 17: INT_HFP_BT
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 18: MultiMedia6 (*)
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 25: QUAT_MI2S
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 34: VoiceMMode1 (*)
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 35: VoiceMMode2 (*)
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 36: MultiMedia8 (*)
[]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone because the
same code works on X86? As it is a audio sound card from ZL38063 so it is
showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the past I
wrote a small demonstration program for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to playback a WAV file. It worked without
problems. The GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel
platform, then the source code was transferred to the Raspberry and
recompiled there, without any problems.
73 Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-10-29 11:04:08 UTC
Permalink
Hello,

Ok you should but some wav after that it tries to play something. You
can also test with hw:0,5 or make script loop and test until it doesn't
work or crash until hw:0,somethig. If it works with aplay then there is
some problem in portaudio.

Tuukka
Post by Arjav Parikh
Hi,
*aplay -D hw:0,4* do not output anything. This command as well as
*aplay -D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment. This
is yocto project.
On Mon, Oct 29, 2018 at 3:10 PM Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume this is
Yocto or similar project.
Tuukka
Post by Arjav Parikh
Hi,
Actually after enabling alsa-utils with other options I could get
the output for aplay -L. Please find below the output for aplay
-L and aplay -l.
*/usr/bin # aplay -L*
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
    msm8953-snd-card-mtp,
    Default Audio Device
sysdefault:CARD=msm8953sndcardm
    msm8953-snd-card-mtp,
    Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
MultiMedia1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
MultiMedia2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
CS-Voice (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary
MI2S_RX Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
AFE-PROXY RX msm-stub-rx-7 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
MultiMedia5 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
MultiMedia9 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
INT_HFP_BT Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
MultiMedia6 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
QUAT_MI2S Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
VoiceMMode1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
VoiceMMode2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
MultiMedia8 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone
because the same code works on X86? As it is a audio sound
card from ZL38063 so it is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in
the past I wrote a small demonstration program for the
Raspberry Pi 3B, under Raspbian, that used Portaudio to
playback a WAV file. It worked without problems. The GUI was
written in Free Pascal using Lazarus, and the processing
code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu
on an Intel platform, then the source code was transferred to
the Raspberry and recompiled there, without any problems.
73  Alberto  I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-29 11:48:42 UTC
Permalink
Hi,
As per your suggestion I tried aplay -D with multiple hw:0,.... options and
below are the observations:
aplay -D hw:0,0 /data/Haze.wav - File gets played and can hear sound on
speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav - File does
not get played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*

"If it works with aplay then there is some problem in portaudio." - Does
the about output confirms that problem is with alsa-lib?

aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav Output :
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
Mono
aplay: set_params:1305: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171) - This parameter value changes with every
hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value changes with every
hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes with every hw:0,.. value
TICK_TIME: 0
Post by Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries to play something. You can
also test with hw:0,5 or make script loop and test until it doesn't work or
crash until hw:0,somethig. If it works with aplay then there is some
problem in portaudio.
Tuukka
Hi,
*aplay -D hw:0,4* do not output anything. This command as well as *aplay
-D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment. This is
yocto project.
Post by Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume this is Yocto
or similar project.
Tuukka
Hi,
Actually after enabling alsa-utils with other options I could get the
output for aplay -L. Please find below the output for aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 0: MultiMedia1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 1: MultiMedia2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary MI2S_RX
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 7: AFE-PROXY RX
msm-stub-rx-7 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 12: MultiMedia5
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 14: MultiMedia9
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 17: INT_HFP_BT
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 18: MultiMedia6
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 25: QUAT_MI2S
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 34: VoiceMMode1
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 35: VoiceMMode2
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 36: MultiMedia8
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone because the
same code works on X86? As it is a audio sound card from ZL38063 so it is
showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the past I
wrote a small demonstration program for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to playback a WAV file. It worked without
problems. The GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel
platform, then the source code was transferred to the Raspberry and
recompiled there, without any problems.
73 Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-10-30 07:44:20 UTC
Permalink
Hello,

Yes this more ALSA and kernel than Portaudio problem. If l read list
correctly 0,4 is ULL (what ever that is?) and 0,5 should be Primary
MI2S_RX Hostless (I2S Host?).

It would help to ask from ALSA IRC or mailing list why they crash and if
there is nothing to do (as they are reported automatically and can't be
probed to be crashing) then I think you need to make .alsarc but have no
idea which kind to prevent their appearance or use Pulseaudio/JACK if
possible.

Sincerely,

Tuukka
Post by Arjav Parikh
Hi,
As per your suggestion I tried aplay -D with multiple hw:0,....
aplay -D hw:0,0 /data/Haze.wav - File gets played and can hear sound
on speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav - File
does not get played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*
"If it works with aplay then there is some problem in portaudio." -
Does the about output confirms that problem is with alsa-lib?
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little Endian, Rate
44100 Hz, Mono
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171)  - This parameter value changes with
every hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value changes with every
hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes with every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34 PM Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries to play something.
You can also test with hw:0,5 or make script loop and test until
it doesn't work or crash until hw:0,somethig. If it works with
aplay then there is some problem in portaudio.
Tuukka
Post by Arjav Parikh
Hi,
*aplay -D hw:0,4* do not output anything. This command as well as
*aplay -D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment.
This is yocto project.
On Mon, Oct 29, 2018 at 3:10 PM Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume
this is Yocto or similar project.
Tuukka
Post by Arjav Parikh
Hi,
Actually after enabling alsa-utils with other options I
could get the output for aplay -L. Please find below the
output for aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
    Discard all samples (playback) or generate zero samples
(capture)
default:CARD=msm8953sndcardm
    msm8953-snd-card-mtp,
    Default Audio Device
sysdefault:CARD=msm8953sndcardm
    msm8953-snd-card-mtp,
    Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
MultiMedia1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
MultiMedia2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
CS-Voice (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Primary MI2S_RX Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
AFE-PROXY RX msm-stub-rx-7 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
AUXPCM Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
MultiMedia5 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Voice2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
MultiMedia9 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
VoWLAN (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
INT_HFP_BT Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
MultiMedia6 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
QUAT_MI2S Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
VoiceMMode1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
VoiceMMode2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
MultiMedia8 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
On Sun, Oct 28, 2018 at 12:20 AM Alberto di Bene
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for
anyone because the same code works on X86? As it is a
audio sound card from ZL38063 so it is showing huge
amount of outputs.
I don't know if this info can be of any help to you, but
in the past I wrote a small demonstration program for
the Raspberry Pi 3B, under Raspbian, that used Portaudio
to playback a WAV file. It worked without problems. The
GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in
straight C code. The application was firstly developed
and debugged under Kubuntu on an Intel platform, then
the source code was transferred to the Raspberry and
recompiled there, without any problems.
73  Alberto  I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-10-31 06:13:53 UTC
Permalink
Hi,
As aplay works (I mean sound is heard) only on hw:0,0 and as cat
/proc/asound/pcm shows 0,0 with playback & capture interface then is it
possible in portaudio to fill device info only for hw:0,0 (i.e 1 device
which is working) instead of all 47 devices? Also in crash debugs we can
see that there is no address for hw:0,4 & hw:0,5.

*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) : : playback 1 : capture 1
00-01: MultiMedia2 (*) : : playback 1 : capture 1
00-02: CS-Voice (*) : : playback 1 : capture 1
00-03: VoIP (*) : : playback 1 : capture 1
00-04: ULL (*) : : playback 1
00-05: Primary MI2S_RX Hostless (*) : : playback 1
00-06: INT_FM Hostless (*) : : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 : : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 : : capture 1
00-09: (Compress1) : : playback 1 : capture 1
00-10: AUXPCM Hostless (*) : : playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*) : : capture 1
00-12: MultiMedia5 (*) : : playback 1 : capture 1
00-13: Voice2 (*) : : playback 1 : capture 1
00-14: MultiMedia9 (*) : : playback 1 : capture 1
00-15: VoLTE (*) : : playback 1 : capture 1
00-16: VoWLAN (*) : : playback 1 : capture 1
00-17: INT_HFP_BT Hostless (*) : : playback 1 : capture 1
00-18: MultiMedia6 (*) : : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) : : capture 1
00-20: Listen 2 Audio Service (*) : : capture 1
00-21: Listen 3 Audio Service (*) : : capture 1
00-22: Listen 4 Audio Service (*) : : capture 1
00-23: Listen 5 Audio Service (*) : : capture 1
00-24: (Compress2) : : playback 1
00-25: QUAT_MI2S Hostless (*) : : playback 1
00-26: Senary_mi2s Capture snd-soc-dummy-dai-26 : : capture 1
00-27: (Compress3) : : playback 1
00-28: (Compress4) : : playback 1
00-29: (Compress5) : : playback 1
00-30: (Compress6) : : playback 1
00-31: (Compress7) : : playback 1
00-32: (Compress8) : : playback 1
00-33: (Compress9) : : playback 1
00-34: VoiceMMode1 (*) : : playback 1 : capture 1
00-35: VoiceMMode2 (*) : : playback 1 : capture 1
00-36: MultiMedia8 (*) : : playback 1 : capture 1
00-37: QCHAT (*) : : playback 1 : capture 1
00-38: (Compress10) : : capture 1
00-39: (Compress11) : : capture 1
00-40: (Compress12) : : capture 1
00-41: (Primary MI2S Playback) : : playback 1
00-42: (Secondary MI2S Playback) : : playback 1
00-43: (Tertiary MI2S Capture) : : capture 1
00-44: (Quaternary MI2S Playback) : : playback 1
00-45: (Quaternary MI2S Capture) : : capture 1
00-46: (AUX PCM Playback) : : playback 1
00-47: (AUX PCM Capture) : : capture 1
00-48: (Internal BT-SCO Playback) : : playback 1
00-49: (Internal BT-SCO Capture) : : capture 1
00-50: (Internal FM Playback) : : playback 1
00-51: (Internal FM Capture) : : capture 1
00-52: (AFE Playback) : : playback 1
00-53: (AFE Capture) : : capture 1
00-54: (Voice Uplink Capture) : : capture 1
00-55: (Voice Downlink Capture) : : capture 1
00-56: (Voice Farend Playback) : : playback 1
00-57: (Voice2 Farend Playback) : : playback 1
00-58: (Quinary MI2S Capture) : : capture 1
00-59: (Quinary MI2S Playback) : : playback 1
Post by Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than Portaudio problem. If l read list
correctly 0,4 is ULL (what ever that is?) and 0,5 should be Primary MI2S_RX
Hostless (I2S Host?).
It would help to ask from ALSA IRC or mailing list why they crash and if
there is nothing to do (as they are reported automatically and can't be
probed to be crashing) then I think you need to make .alsarc but have no
idea which kind to prevent their appearance or use Pulseaudio/JACK if
possible.
Sincerely,
Tuukka
Hi,
As per your suggestion I tried aplay -D with multiple hw:0,.... options
aplay -D hw:0,0 /data/Haze.wav - File gets played and can hear sound on
speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav - File
does not get played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*
"If it works with aplay then there is some problem in portaudio." - Does
the about output confirms that problem is with alsa-lib?
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little Endian, Rate 44100
Hz, Mono
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171) - This parameter value changes with every
hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value changes with every
hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes with every hw:0,.. value
TICK_TIME: 0
Post by Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries to play something. You can
also test with hw:0,5 or make script loop and test until it doesn't work or
crash until hw:0,somethig. If it works with aplay then there is some
problem in portaudio.
Tuukka
Hi,
*aplay -D hw:0,4* do not output anything. This command as well as *aplay
-D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment. This is
yocto project.
Post by Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume this is Yocto
or similar project.
Tuukka
Hi,
Actually after enabling alsa-utils with other options I could get the
output for aplay -L. Please find below the output for aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 0: MultiMedia1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 1: MultiMedia2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary
MI2S_RX Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 7: AFE-PROXY RX
msm-stub-rx-7 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 12: MultiMedia5
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 14: MultiMedia9
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 17: INT_HFP_BT
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 18: MultiMedia6
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 25: QUAT_MI2S
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 34: VoiceMMode1
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 35: VoiceMMode2
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 36: MultiMedia8
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone because
the same code works on X86? As it is a audio sound card from ZL38063 so it
is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the past I
wrote a small demonstration program for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to playback a WAV file. It worked without
problems. The GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel
platform, then the source code was transferred to the Raspberry and
recompiled there, without any problems.
73 Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-11-03 07:56:23 UTC
Permalink
Hello,

Did this one solved? Portaudio tries to find every ALSA devices which is
most of times what people want.

Tuukka
Post by Arjav Parikh
Hi,
As aplay works (I mean sound is heard) only on hw:0,0 and as cat
/proc/asound/pcm shows 0,0 with playback & capture interface then is
it possible in portaudio to fill device info only for hw:0,0 (i.e 1
device which is working) instead of all 47 devices? Also in crash
debugs we can see that there is no address for hw:0,4 & hw:0,5. *
*
*
*
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) :  : playback 1 : capture 1
00-01: MultiMedia2 (*) :  : playback 1 : capture 1
00-02: CS-Voice (*) :  : playback 1 : capture 1
00-03: VoIP (*) :  : playback 1 : capture 1
00-04: ULL (*) :  : playback 1
00-05: Primary MI2S_RX Hostless (*) :  : playback 1
00-06: INT_FM Hostless (*) :  : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 :  : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 :  : capture 1
00-09: (Compress1) :  : playback 1 : capture 1
00-10: AUXPCM Hostless (*) :  : playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*) :  : capture 1
00-12: MultiMedia5 (*) :  : playback 1 : capture 1
00-13: Voice2 (*) :  : playback 1 : capture 1
00-14: MultiMedia9 (*) :  : playback 1 : capture 1
00-15: VoLTE (*) :  : playback 1 : capture 1
00-16: VoWLAN (*) :  : playback 1 : capture 1
00-17: INT_HFP_BT Hostless (*) :  : playback 1 : capture 1
00-18: MultiMedia6 (*) :  : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) :  : capture 1
00-20: Listen 2 Audio Service (*) :  : capture 1
00-21: Listen 3 Audio Service (*) :  : capture 1
00-22: Listen 4 Audio Service (*) :  : capture 1
00-23: Listen 5 Audio Service (*) :  : capture 1
00-24: (Compress2) :  : playback 1
00-25: QUAT_MI2S Hostless (*) :  : playback 1
00-26: Senary_mi2s Capture snd-soc-dummy-dai-26 :  : capture 1
00-27: (Compress3) :  : playback 1
00-28: (Compress4) :  : playback 1
00-29: (Compress5) :  : playback 1
00-30: (Compress6) :  : playback 1
00-31: (Compress7) :  : playback 1
00-32: (Compress8) :  : playback 1
00-33: (Compress9) :  : playback 1
00-34: VoiceMMode1 (*) :  : playback 1 : capture 1
00-35: VoiceMMode2 (*) :  : playback 1 : capture 1
00-36: MultiMedia8 (*) :  : playback 1 : capture 1
00-37: QCHAT (*) :  : playback 1 : capture 1
00-38: (Compress10) :  : capture 1
00-39: (Compress11) :  : capture 1
00-40: (Compress12) :  : capture 1
00-41: (Primary MI2S Playback) :  : playback 1
00-42: (Secondary MI2S Playback) :  : playback 1
00-43: (Tertiary MI2S Capture) :  : capture 1
00-44: (Quaternary MI2S Playback) :  : playback 1
00-45: (Quaternary MI2S Capture) :  : capture 1
00-46: (AUX PCM Playback) :  : playback 1
00-47: (AUX PCM Capture) :  : capture 1
00-48: (Internal BT-SCO Playback) :  : playback 1
00-49: (Internal BT-SCO Capture) :  : capture 1
00-50: (Internal FM Playback) :  : playback 1
00-51: (Internal FM Capture) :  : capture 1
00-52: (AFE Playback) :  : playback 1
00-53: (AFE Capture) :  : capture 1
00-54: (Voice Uplink Capture) :  : capture 1
00-55: (Voice Downlink Capture) :  : capture 1
00-56: (Voice Farend Playback) :  : playback 1
00-57: (Voice2 Farend Playback) :  : playback 1
00-58: (Quinary MI2S Capture) :  : capture 1
00-59: (Quinary MI2S Playback) :  : playback 1
On Tue, Oct 30, 2018 at 1:14 PM Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than Portaudio problem. If l read
list correctly 0,4 is ULL (what ever that is?) and 0,5 should be
Primary MI2S_RX Hostless (I2S Host?).
It would help to ask from ALSA IRC or mailing list why they crash
and if there is nothing to do (as they are reported automatically
and can't be probed to be crashing) then I think you need to make
.alsarc but have no idea which kind to prevent their appearance or
use Pulseaudio/JACK if possible.
Sincerely,
Tuukka
Post by Arjav Parikh
Hi,
As per your suggestion I tried aplay -D with multiple hw:0,....
aplay -D hw:0,0 /data/Haze.wav - File gets played and can hear
sound on speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav -
File does not get played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*
"If it works with aplay then there is some problem in portaudio."
- Does the about output confirms that problem is with alsa-lib?
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little Endian, Rate
44100 Hz, Mono
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171)  - This parameter value changes with
every hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value changes with
every hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes with every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34 PM Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries to play
something. You can also test with hw:0,5 or make script loop
and test until it doesn't work or crash until hw:0,somethig.
If it works with aplay then there is some problem in portaudio.
Tuukka
Post by Arjav Parikh
Hi,
*aplay -D hw:0,4* do not output anything. This command as
well as *aplay -D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same
environment. This is yocto project.
On Mon, Oct 29, 2018 at 3:10 PM Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I
assume this is Yocto or similar project.
Tuukka
Post by Arjav Parikh
Hi,
Actually after enabling alsa-utils with other options I
could get the output for aplay -L. Please find below
the output for aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
    Discard all samples (playback) or generate zero
samples (capture)
default:CARD=msm8953sndcardm
    msm8953-snd-card-mtp,
    Default Audio Device
sysdefault:CARD=msm8953sndcardm
    msm8953-snd-card-mtp,
    Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
0: MultiMedia1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
1: MultiMedia2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
2: CS-Voice (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
3: VoIP (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
4: ULL (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
5: Primary MI2S_RX Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
7: AFE-PROXY RX msm-stub-rx-7 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
10: AUXPCM Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
12: MultiMedia5 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
13: Voice2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
14: MultiMedia9 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
15: VoLTE (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
16: VoWLAN (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
17: INT_HFP_BT Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
18: MultiMedia6 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
25: QUAT_MI2S Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
34: VoiceMMode1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
35: VoiceMMode2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
36: MultiMedia8 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device
37: QCHAT (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
On Sun, Oct 28, 2018 at 12:20 AM Alberto di Bene
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform
for anyone because the same code works on X86? As
it is a audio sound card from ZL38063 so it is
showing huge amount of outputs.
I don't know if this info can be of any help to
you, but in the past I wrote a small demonstration
program for the Raspberry Pi 3B, under Raspbian,
that used Portaudio to playback a WAV file. It
worked without problems. The GUI was written in
Free Pascal using Lazarus, and the processing code,
Portaudio interfacing included, in straight C code.
The application was firstly developed and debugged
under Kubuntu on an Intel platform, then the source
code was transferred to the Raspberry and
recompiled there, without any problems.
73  Alberto  I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-11-03 08:03:50 UTC
Permalink
Hi,

I could not find the patch mentioned in the SVN. Raised the query on Alsa
MailList as well but no response from them. As per your another suggestion
I am trying to create alsarc file.
Post by Tuukka Pasanen
Hello,
Did this one solved? Portaudio tries to find every ALSA devices which is
most of times what people want.
Tuukka
Hi,
As aplay works (I mean sound is heard) only on hw:0,0 and as cat
/proc/asound/pcm shows 0,0 with playback & capture interface then is it
possible in portaudio to fill device info only for hw:0,0 (i.e 1 device
which is working) instead of all 47 devices? Also in crash debugs we can
see that there is no address for hw:0,4 & hw:0,5.
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) : : playback 1 : capture 1
00-01: MultiMedia2 (*) : : playback 1 : capture 1
00-02: CS-Voice (*) : : playback 1 : capture 1
00-03: VoIP (*) : : playback 1 : capture 1
00-04: ULL (*) : : playback 1
00-05: Primary MI2S_RX Hostless (*) : : playback 1
00-06: INT_FM Hostless (*) : : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 : : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 : : capture 1
00-09: (Compress1) : : playback 1 : capture 1
00-10: AUXPCM Hostless (*) : : playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*) : : capture 1
00-12: MultiMedia5 (*) : : playback 1 : capture 1
00-13: Voice2 (*) : : playback 1 : capture 1
00-14: MultiMedia9 (*) : : playback 1 : capture 1
00-15: VoLTE (*) : : playback 1 : capture 1
00-16: VoWLAN (*) : : playback 1 : capture 1
00-17: INT_HFP_BT Hostless (*) : : playback 1 : capture 1
00-18: MultiMedia6 (*) : : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) : : capture 1
00-20: Listen 2 Audio Service (*) : : capture 1
00-21: Listen 3 Audio Service (*) : : capture 1
00-22: Listen 4 Audio Service (*) : : capture 1
00-23: Listen 5 Audio Service (*) : : capture 1
00-24: (Compress2) : : playback 1
00-25: QUAT_MI2S Hostless (*) : : playback 1
00-26: Senary_mi2s Capture snd-soc-dummy-dai-26 : : capture 1
00-27: (Compress3) : : playback 1
00-28: (Compress4) : : playback 1
00-29: (Compress5) : : playback 1
00-30: (Compress6) : : playback 1
00-31: (Compress7) : : playback 1
00-32: (Compress8) : : playback 1
00-33: (Compress9) : : playback 1
00-34: VoiceMMode1 (*) : : playback 1 : capture 1
00-35: VoiceMMode2 (*) : : playback 1 : capture 1
00-36: MultiMedia8 (*) : : playback 1 : capture 1
00-37: QCHAT (*) : : playback 1 : capture 1
00-38: (Compress10) : : capture 1
00-39: (Compress11) : : capture 1
00-40: (Compress12) : : capture 1
00-41: (Primary MI2S Playback) : : playback 1
00-42: (Secondary MI2S Playback) : : playback 1
00-43: (Tertiary MI2S Capture) : : capture 1
00-44: (Quaternary MI2S Playback) : : playback 1
00-45: (Quaternary MI2S Capture) : : capture 1
00-46: (AUX PCM Playback) : : playback 1
00-47: (AUX PCM Capture) : : capture 1
00-48: (Internal BT-SCO Playback) : : playback 1
00-49: (Internal BT-SCO Capture) : : capture 1
00-50: (Internal FM Playback) : : playback 1
00-51: (Internal FM Capture) : : capture 1
00-52: (AFE Playback) : : playback 1
00-53: (AFE Capture) : : capture 1
00-54: (Voice Uplink Capture) : : capture 1
00-55: (Voice Downlink Capture) : : capture 1
00-56: (Voice Farend Playback) : : playback 1
00-57: (Voice2 Farend Playback) : : playback 1
00-58: (Quinary MI2S Capture) : : capture 1
00-59: (Quinary MI2S Playback) : : playback 1
Post by Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than Portaudio problem. If l read list
correctly 0,4 is ULL (what ever that is?) and 0,5 should be Primary MI2S_RX
Hostless (I2S Host?).
It would help to ask from ALSA IRC or mailing list why they crash and if
there is nothing to do (as they are reported automatically and can't be
probed to be crashing) then I think you need to make .alsarc but have no
idea which kind to prevent their appearance or use Pulseaudio/JACK if
possible.
Sincerely,
Tuukka
Hi,
As per your suggestion I tried aplay -D with multiple hw:0,.... options
aplay -D hw:0,0 /data/Haze.wav - File gets played and can hear sound on
speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav - File
does not get played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*
"If it works with aplay then there is some problem in portaudio." - Does
the about output confirms that problem is with alsa-lib?
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little Endian, Rate 44100
Hz, Mono
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171) - This parameter value changes with every
hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value changes with every
hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes with every hw:0,.. value
TICK_TIME: 0
Post by Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries to play something. You
can also test with hw:0,5 or make script loop and test until it doesn't
work or crash until hw:0,somethig. If it works with aplay then there is
some problem in portaudio.
Tuukka
Hi,
*aplay -D hw:0,4* do not output anything. This command as well as *aplay
-D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment. This is
yocto project.
Post by Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume this is Yocto
or similar project.
Tuukka
Hi,
Actually after enabling alsa-utils with other options I could get the
output for aplay -L. Please find below the output for aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 0: MultiMedia1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 1: MultiMedia2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary
MI2S_RX Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 7: AFE-PROXY RX
msm-stub-rx-7 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 12: MultiMedia5
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 14: MultiMedia9
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 17: INT_HFP_BT
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 18: MultiMedia6
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 25: QUAT_MI2S
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 34: VoiceMMode1
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 35: VoiceMMode2
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 36: MultiMedia8
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone because
the same code works on X86? As it is a audio sound card from ZL38063 so it
is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the past I
wrote a small demonstration program for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to playback a WAV file. It worked without
problems. The GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel
platform, then the source code was transferred to the Raspberry and
recompiled there, without any problems.
73 Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Arjav Parikh
2018-11-03 10:10:43 UTC
Permalink
Hi,

I created /etc/asound.conf and ~/.asoundrc with below contents but still
observe the Segmentation Fault. I think if somehow we restrict Portaudio to
fetch details of only hw:0,0 then may be this Segmentation Fault Issue
could be resolved.

pcm.!default {
type hw
card 0
device 0
}

ctl.!default {
type hw
card 0
device 0
}
Post by Arjav Parikh
Hi,
I could not find the patch mentioned in the SVN. Raised the query on Alsa
MailList as well but no response from them. As per your another suggestion
I am trying to create alsarc file.
Post by Tuukka Pasanen
Hello,
Did this one solved? Portaudio tries to find every ALSA devices which is
most of times what people want.
Tuukka
Hi,
As aplay works (I mean sound is heard) only on hw:0,0 and as cat
/proc/asound/pcm shows 0,0 with playback & capture interface then is it
possible in portaudio to fill device info only for hw:0,0 (i.e 1 device
which is working) instead of all 47 devices? Also in crash debugs we can
see that there is no address for hw:0,4 & hw:0,5.
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) : : playback 1 : capture 1
00-01: MultiMedia2 (*) : : playback 1 : capture 1
00-02: CS-Voice (*) : : playback 1 : capture 1
00-03: VoIP (*) : : playback 1 : capture 1
00-04: ULL (*) : : playback 1
00-05: Primary MI2S_RX Hostless (*) : : playback 1
00-06: INT_FM Hostless (*) : : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 : : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 : : capture 1
00-09: (Compress1) : : playback 1 : capture 1
00-10: AUXPCM Hostless (*) : : playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*) : : capture 1
00-12: MultiMedia5 (*) : : playback 1 : capture 1
00-13: Voice2 (*) : : playback 1 : capture 1
00-14: MultiMedia9 (*) : : playback 1 : capture 1
00-15: VoLTE (*) : : playback 1 : capture 1
00-16: VoWLAN (*) : : playback 1 : capture 1
00-17: INT_HFP_BT Hostless (*) : : playback 1 : capture 1
00-18: MultiMedia6 (*) : : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) : : capture 1
00-20: Listen 2 Audio Service (*) : : capture 1
00-21: Listen 3 Audio Service (*) : : capture 1
00-22: Listen 4 Audio Service (*) : : capture 1
00-23: Listen 5 Audio Service (*) : : capture 1
00-24: (Compress2) : : playback 1
00-25: QUAT_MI2S Hostless (*) : : playback 1
00-26: Senary_mi2s Capture snd-soc-dummy-dai-26 : : capture 1
00-27: (Compress3) : : playback 1
00-28: (Compress4) : : playback 1
00-29: (Compress5) : : playback 1
00-30: (Compress6) : : playback 1
00-31: (Compress7) : : playback 1
00-32: (Compress8) : : playback 1
00-33: (Compress9) : : playback 1
00-34: VoiceMMode1 (*) : : playback 1 : capture 1
00-35: VoiceMMode2 (*) : : playback 1 : capture 1
00-36: MultiMedia8 (*) : : playback 1 : capture 1
00-37: QCHAT (*) : : playback 1 : capture 1
00-38: (Compress10) : : capture 1
00-39: (Compress11) : : capture 1
00-40: (Compress12) : : capture 1
00-41: (Primary MI2S Playback) : : playback 1
00-42: (Secondary MI2S Playback) : : playback 1
00-43: (Tertiary MI2S Capture) : : capture 1
00-44: (Quaternary MI2S Playback) : : playback 1
00-45: (Quaternary MI2S Capture) : : capture 1
00-46: (AUX PCM Playback) : : playback 1
00-47: (AUX PCM Capture) : : capture 1
00-48: (Internal BT-SCO Playback) : : playback 1
00-49: (Internal BT-SCO Capture) : : capture 1
00-50: (Internal FM Playback) : : playback 1
00-51: (Internal FM Capture) : : capture 1
00-52: (AFE Playback) : : playback 1
00-53: (AFE Capture) : : capture 1
00-54: (Voice Uplink Capture) : : capture 1
00-55: (Voice Downlink Capture) : : capture 1
00-56: (Voice Farend Playback) : : playback 1
00-57: (Voice2 Farend Playback) : : playback 1
00-58: (Quinary MI2S Capture) : : capture 1
00-59: (Quinary MI2S Playback) : : playback 1
Post by Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than Portaudio problem. If l read list
correctly 0,4 is ULL (what ever that is?) and 0,5 should be Primary MI2S_RX
Hostless (I2S Host?).
It would help to ask from ALSA IRC or mailing list why they crash and if
there is nothing to do (as they are reported automatically and can't be
probed to be crashing) then I think you need to make .alsarc but have no
idea which kind to prevent their appearance or use Pulseaudio/JACK if
possible.
Sincerely,
Tuukka
Hi,
As per your suggestion I tried aplay -D with multiple hw:0,.... options
aplay -D hw:0,0 /data/Haze.wav - File gets played and can hear sound on
speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav - File
does not get played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*
"If it works with aplay then there is some problem in portaudio." - Does
the about output confirms that problem is with alsa-lib?
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little Endian, Rate 44100
Hz, Mono
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171) - This parameter value changes with every
hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value changes with every
hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes with every hw:0,.. value
TICK_TIME: 0
Post by Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries to play something. You
can also test with hw:0,5 or make script loop and test until it doesn't
work or crash until hw:0,somethig. If it works with aplay then there is
some problem in portaudio.
Tuukka
Hi,
*aplay -D hw:0,4* do not output anything. This command as well as *aplay
-D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment. This
is yocto project.
On Mon, Oct 29, 2018 at 3:10 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume this is
Yocto or similar project.
Tuukka
Hi,
Actually after enabling alsa-utils with other options I could get the
output for aplay -L. Please find below the output for aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 0: MultiMedia1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 1: MultiMedia2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary
MI2S_RX Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 7: AFE-PROXY RX
msm-stub-rx-7 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 12: MultiMedia5
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 14: MultiMedia9
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 17: INT_HFP_BT
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 18: MultiMedia6
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 25: QUAT_MI2S
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 34: VoiceMMode1
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 35: VoiceMMode2
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 36: MultiMedia8
(*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone because
the same code works on X86? As it is a audio sound card from ZL38063 so it
is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the past
I wrote a small demonstration program for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to playback a WAV file. It worked without
problems. The GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel
platform, then the source code was transferred to the Raspberry and
recompiled there, without any problems.
73 Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
Arjav Parikh
2018-11-03 11:44:35 UTC
Permalink
Hi,

I made below modifications in *src/hostapi/alsa/pa_linux_alsa.c* function
*BuildDeviceList* to limit the *numDeviceNames = 1 *& commenting* assert
operation.*
*numDeviceNames = 1; //patch*
for( i = 0, devIdx = 0; i < numDeviceNames; ++i )
{
}
*//assert( devIdx < numDeviceNames ); //patch*
/* Now inspect 'dmix' and 'default' plugins */

After adding above 2 patches I can hear sound by running patest_sine8 but
get crash dump after sometime. Also error is observed in patest1.
What other modifications to make it success for numDeviceNames = 1?
Attaching the debug for patest_sine8, patest1 & pa_devs for reference (
*patest_sine8_core_dump.txt*).
Post by Arjav Parikh
Hi,
I created /etc/asound.conf and ~/.asoundrc with below contents but still
observe the Segmentation Fault. I think if somehow we restrict Portaudio to
fetch details of only hw:0,0 then may be this Segmentation Fault Issue
could be resolved.
pcm.!default {
type hw
card 0
device 0
}
ctl.!default {
type hw
card 0
device 0
}
Post by Arjav Parikh
Hi,
I could not find the patch mentioned in the SVN. Raised the query on Alsa
MailList as well but no response from them. As per your another suggestion
I am trying to create alsarc file.
Post by Tuukka Pasanen
Hello,
Did this one solved? Portaudio tries to find every ALSA devices which is
most of times what people want.
Tuukka
Hi,
As aplay works (I mean sound is heard) only on hw:0,0 and as cat
/proc/asound/pcm shows 0,0 with playback & capture interface then is it
possible in portaudio to fill device info only for hw:0,0 (i.e 1 device
which is working) instead of all 47 devices? Also in crash debugs we can
see that there is no address for hw:0,4 & hw:0,5.
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) : : playback 1 : capture 1
00-01: MultiMedia2 (*) : : playback 1 : capture 1
00-02: CS-Voice (*) : : playback 1 : capture 1
00-03: VoIP (*) : : playback 1 : capture 1
00-04: ULL (*) : : playback 1
00-05: Primary MI2S_RX Hostless (*) : : playback 1
00-06: INT_FM Hostless (*) : : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 : : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 : : capture 1
00-09: (Compress1) : : playback 1 : capture 1
00-10: AUXPCM Hostless (*) : : playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*) : : capture 1
00-12: MultiMedia5 (*) : : playback 1 : capture 1
00-13: Voice2 (*) : : playback 1 : capture 1
00-14: MultiMedia9 (*) : : playback 1 : capture 1
00-15: VoLTE (*) : : playback 1 : capture 1
00-16: VoWLAN (*) : : playback 1 : capture 1
00-17: INT_HFP_BT Hostless (*) : : playback 1 : capture 1
00-18: MultiMedia6 (*) : : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) : : capture 1
00-20: Listen 2 Audio Service (*) : : capture 1
00-21: Listen 3 Audio Service (*) : : capture 1
00-22: Listen 4 Audio Service (*) : : capture 1
00-23: Listen 5 Audio Service (*) : : capture 1
00-24: (Compress2) : : playback 1
00-25: QUAT_MI2S Hostless (*) : : playback 1
00-26: Senary_mi2s Capture snd-soc-dummy-dai-26 : : capture 1
00-27: (Compress3) : : playback 1
00-28: (Compress4) : : playback 1
00-29: (Compress5) : : playback 1
00-30: (Compress6) : : playback 1
00-31: (Compress7) : : playback 1
00-32: (Compress8) : : playback 1
00-33: (Compress9) : : playback 1
00-34: VoiceMMode1 (*) : : playback 1 : capture 1
00-35: VoiceMMode2 (*) : : playback 1 : capture 1
00-36: MultiMedia8 (*) : : playback 1 : capture 1
00-37: QCHAT (*) : : playback 1 : capture 1
00-38: (Compress10) : : capture 1
00-39: (Compress11) : : capture 1
00-40: (Compress12) : : capture 1
00-41: (Primary MI2S Playback) : : playback 1
00-42: (Secondary MI2S Playback) : : playback 1
00-43: (Tertiary MI2S Capture) : : capture 1
00-44: (Quaternary MI2S Playback) : : playback 1
00-45: (Quaternary MI2S Capture) : : capture 1
00-46: (AUX PCM Playback) : : playback 1
00-47: (AUX PCM Capture) : : capture 1
00-48: (Internal BT-SCO Playback) : : playback 1
00-49: (Internal BT-SCO Capture) : : capture 1
00-50: (Internal FM Playback) : : playback 1
00-51: (Internal FM Capture) : : capture 1
00-52: (AFE Playback) : : playback 1
00-53: (AFE Capture) : : capture 1
00-54: (Voice Uplink Capture) : : capture 1
00-55: (Voice Downlink Capture) : : capture 1
00-56: (Voice Farend Playback) : : playback 1
00-57: (Voice2 Farend Playback) : : playback 1
00-58: (Quinary MI2S Capture) : : capture 1
00-59: (Quinary MI2S Playback) : : playback 1
Post by Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than Portaudio problem. If l read list
correctly 0,4 is ULL (what ever that is?) and 0,5 should be Primary MI2S_RX
Hostless (I2S Host?).
It would help to ask from ALSA IRC or mailing list why they crash and
if there is nothing to do (as they are reported automatically and can't be
probed to be crashing) then I think you need to make .alsarc but have no
idea which kind to prevent their appearance or use Pulseaudio/JACK if
possible.
Sincerely,
Tuukka
Hi,
As per your suggestion I tried aplay -D with multiple hw:0,.... options
aplay -D hw:0,0 /data/Haze.wav - File gets played and can hear sound on
speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav - File
does not get played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*
"If it works with aplay then there is some problem in portaudio." -
Does the about output confirms that problem is with alsa-lib?
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little Endian, Rate 44100
Hz, Mono
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171) - This parameter value changes with every
hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value changes with every
hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes with every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries to play something. You
can also test with hw:0,5 or make script loop and test until it doesn't
work or crash until hw:0,somethig. If it works with aplay then there is
some problem in portaudio.
Tuukka
Hi,
*aplay -D hw:0,4* do not output anything. This command as well as *aplay
-D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment. This
is yocto project.
On Mon, Oct 29, 2018 at 3:10 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume this is
Yocto or similar project.
Tuukka
Hi,
Actually after enabling alsa-utils with other options I could get the
output for aplay -L. Please find below the output for aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 0: MultiMedia1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 1: MultiMedia2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary
MI2S_RX Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 7: AFE-PROXY
RX msm-stub-rx-7 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia5 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia9 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 17: INT_HFP_BT
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia6 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 25: QUAT_MI2S
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoiceMMode1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoiceMMode2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia8 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone because
the same code works on X86? As it is a audio sound card from ZL38063 so it
is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the past
I wrote a small demonstration program for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to playback a WAV file. It worked without
problems. The GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel
platform, then the source code was transferred to the Raspberry and
recompiled there, without any problems.
73 Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-11-04 17:09:16 UTC
Permalink
Hello,

Can you check if it crashes with aplay (if you play something that is
longer)? Which kernel do you use?

Tuukka
Post by Arjav Parikh
Hi,
I made below modifications in *src/hostapi/alsa/pa_linux_alsa.c*
function *BuildDeviceList* to limit the *numDeviceNames = 1 *&
commenting*assert operation.*
*numDeviceNames = 1; //patch*
for( i = 0, devIdx = 0; i < numDeviceNames; ++i )
    {
    }
*//assert( devIdx < numDeviceNames ); //patch*
    /* Now inspect 'dmix' and 'default' plugins */
After adding above 2 patches I can hear sound by running patest_sine8
but get crash dump after sometime. Also error is observed in patest1.
What other modifications to make it success for numDeviceNames = 1?
Attaching the debug for patest_sine8, patest1 & pa_devs for reference
(*patest_sine8_core_dump.txt*).
Hi,
I created /etc/asound.conf and ~/.asoundrc with below contents but
still observe the Segmentation Fault. I think if somehow we
restrict Portaudio to fetch details of only hw:0,0 then may be
this Segmentation Fault Issue could be resolved.
pcm.!default {
        type hw
        card 0
        device 0
}
ctl.!default {
        type hw
        card 0
        device 0
}
On Sat, Nov 3, 2018 at 1:33 PM Arjav Parikh
Hi,
I could not find the patch mentioned in the SVN. Raised the
query on Alsa MailList as well but no response from them. As
per your another suggestion I am trying to create alsarc file.
On Sat, Nov 3, 2018 at 1:26 PM Tuukka Pasanen
Hello,
Did this one solved? Portaudio tries to find every ALSA
devices which is most of times what people want.
Tuukka
Post by Arjav Parikh
Hi,
As aplay works (I mean sound is heard) only on hw:0,0 and
as cat /proc/asound/pcm shows 0,0 with playback & capture
interface then is it possible in portaudio to fill device
info only for hw:0,0 (i.e 1 device which is working)
instead of all 47 devices? Also in crash debugs we can
see that there is no address for hw:0,4 & hw:0,5. *
*
*
*
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) :  : playback 1 : capture 1
00-01: MultiMedia2 (*) :  : playback 1 : capture 1
00-02: CS-Voice (*) :  : playback 1 : capture 1
00-03: VoIP (*) :  : playback 1 : capture 1
00-04: ULL (*) :  : playback 1
00-05: Primary MI2S_RX Hostless (*) :  : playback 1
00-06: INT_FM Hostless (*) :  : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 :  : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 :  : capture 1
00-09: (Compress1) :  : playback 1 : capture 1
00-10: AUXPCM Hostless (*) :  : playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*) : : capture 1
00-12: MultiMedia5 (*) :  : playback 1 : capture 1
00-13: Voice2 (*) :  : playback 1 : capture 1
00-14: MultiMedia9 (*) :  : playback 1 : capture 1
00-15: VoLTE (*) :  : playback 1 : capture 1
00-16: VoWLAN (*) :  : playback 1 : capture 1
00-17: INT_HFP_BT Hostless (*) :  : playback 1 : capture 1
00-18: MultiMedia6 (*) :  : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) :  : capture 1
00-20: Listen 2 Audio Service (*) :  : capture 1
00-21: Listen 3 Audio Service (*) :  : capture 1
00-22: Listen 4 Audio Service (*) :  : capture 1
00-23: Listen 5 Audio Service (*) :  : capture 1
00-24: (Compress2) :  : playback 1
00-25: QUAT_MI2S Hostless (*) :  : playback 1
00-26: Senary_mi2s Capture snd-soc-dummy-dai-26 :  : capture 1
00-27: (Compress3) :  : playback 1
00-28: (Compress4) :  : playback 1
00-29: (Compress5) :  : playback 1
00-30: (Compress6) :  : playback 1
00-31: (Compress7) :  : playback 1
00-32: (Compress8) :  : playback 1
00-33: (Compress9) :  : playback 1
00-34: VoiceMMode1 (*) :  : playback 1 : capture 1
00-35: VoiceMMode2 (*) :  : playback 1 : capture 1
00-36: MultiMedia8 (*) :  : playback 1 : capture 1
00-37: QCHAT (*) :  : playback 1 : capture 1
00-38: (Compress10) :  : capture 1
00-39: (Compress11) :  : capture 1
00-40: (Compress12) :  : capture 1
00-41: (Primary MI2S Playback) :  : playback 1
00-42: (Secondary MI2S Playback) :  : playback 1
00-43: (Tertiary MI2S Capture) :  : capture 1
00-44: (Quaternary MI2S Playback) :  : playback 1
00-45: (Quaternary MI2S Capture) :  : capture 1
00-46: (AUX PCM Playback) :  : playback 1
00-47: (AUX PCM Capture) :  : capture 1
00-48: (Internal BT-SCO Playback) :  : playback 1
00-49: (Internal BT-SCO Capture) :  : capture 1
00-50: (Internal FM Playback) :  : playback 1
00-51: (Internal FM Capture) :  : capture 1
00-52: (AFE Playback) :  : playback 1
00-53: (AFE Capture) :  : capture 1
00-54: (Voice Uplink Capture) :  : capture 1
00-55: (Voice Downlink Capture) :  : capture 1
00-56: (Voice Farend Playback) :  : playback 1
00-57: (Voice2 Farend Playback) :  : playback 1
00-58: (Quinary MI2S Capture) :  : capture 1
00-59: (Quinary MI2S Playback) :  : playback 1
On Tue, Oct 30, 2018 at 1:14 PM Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than Portaudio problem.
If l read list correctly 0,4 is ULL (what ever that
is?) and 0,5 should be Primary MI2S_RX Hostless (I2S
Host?).
It would help to ask from ALSA IRC or mailing list
why they crash and if there is nothing to do (as they
are reported automatically and can't be probed to be
crashing) then I think you need to make .alsarc but
have no idea which kind to prevent their appearance
or use Pulseaudio/JACK if possible.
Sincerely,
Tuukka
Post by Arjav Parikh
Hi,
As per your suggestion I tried aplay -D with
multiple hw:0,.... options and below are the
aplay -D hw:0,0 /data/Haze.wav - File gets played
and can hear sound on speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4
/data/Haze.wav - File does not get played and
observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*
"If it works with aplay then there is some problem
in portaudio." - Does the about output confirms that
problem is with alsa-lib?
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little
Endian, Rate 44100 Hz, Mono
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171)  - This parameter value
changes with every hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes
with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes
with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every
hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value
changes with every hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes
with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes
with every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34 PM Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries
to play something. You can also test with hw:0,5
or make script loop and test until it doesn't
work or crash until hw:0,somethig. If it works
with aplay then there is some problem in portaudio.
Tuukka
Post by Arjav Parikh
Hi,
*aplay -D hw:0,4* do not output anything. This
command as well as *aplay -D hw:0,0 *does not
show any output.
Yes aplay and other components are compiled in
same environment. This is yocto project.
On Mon, Oct 29, 2018 at 3:10 PM Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same
enviroment. I assume this is Yocto or
similar project.
Tuukka
Post by Arjav Parikh
Hi,
Actually after enabling alsa-utils with
other options I could get the output for
aplay -L. Please find below the output for
aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
    Discard all samples (playback) or
generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
    Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
    Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm
MultiMedia1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
MultiMedia2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device 2: CS-Voice
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device 3: VoIP (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device 4: ULL (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device 5: Primary
MI2S_RX Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
AFE-PROXY RX msm-stub-rx-7 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
MultiMedia5 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device 13: Voice2
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
MultiMedia9 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device 15: VoLTE
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device 16: VoWLAN
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
INT_HFP_BT Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
MultiMedia6 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
QUAT_MI2S Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
VoiceMMode1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
VoiceMMode2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
MultiMedia8 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device 37: QCHAT
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
On Sun, Oct 28, 2018 at 12:20 AM Alberto
Post by Arjav Parikh
Is it possible to check Portuadio on
ARM platform for anyone because the
same code works on X86? As it is a
audio sound card from ZL38063 so it
is showing huge amount of outputs.
I don't know if this info can be of
any help to you, but in the past I
wrote a small demonstration program
for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to
playback a WAV file. It worked without
problems. The GUI was written in Free
Pascal using Lazarus, and the
processing code, Portaudio interfacing
included, in straight C code. The
application was firstly developed and
debugged under Kubuntu on an Intel
platform, then the source code was
transferred to the Raspberry and
recompiled there, without any problems.
73  Alberto  I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-11-05 05:35:52 UTC
Permalink
Hi,

I verified playing 30 sec long file and did not observe any crash whereas
patest_sine8 plays file for approx duration of 4 sec and then it crashes.
Can you guide why patest1 also throws error.
Post by Tuukka Pasanen
Hello,
Can you check if it crashes with aplay (if you play something that is
longer)? Which kernel do you use?
Tuukka
Hi,
I made below modifications in *src/hostapi/alsa/pa_linux_alsa.c* function
*BuildDeviceList* to limit the *numDeviceNames = 1 *& commenting* assert
operation.*
*numDeviceNames = 1; //patch*
for( i = 0, devIdx = 0; i < numDeviceNames; ++i )
{
}
*//assert( devIdx < numDeviceNames ); //patch*
/* Now inspect 'dmix' and 'default' plugins */
After adding above 2 patches I can hear sound by running patest_sine8 but
get crash dump after sometime. Also error is observed in patest1.
What other modifications to make it success for numDeviceNames = 1?
Attaching the debug for patest_sine8, patest1 & pa_devs for reference (
*patest_sine8_core_dump.txt*).
Post by Arjav Parikh
Hi,
I created /etc/asound.conf and ~/.asoundrc with below contents but still
observe the Segmentation Fault. I think if somehow we restrict Portaudio to
fetch details of only hw:0,0 then may be this Segmentation Fault Issue
could be resolved.
pcm.!default {
type hw
card 0
device 0
}
ctl.!default {
type hw
card 0
device 0
}
Post by Arjav Parikh
Hi,
I could not find the patch mentioned in the SVN. Raised the query on
Alsa MailList as well but no response from them. As per your another
suggestion I am trying to create alsarc file.
Post by Tuukka Pasanen
Hello,
Did this one solved? Portaudio tries to find every ALSA devices which
is most of times what people want.
Tuukka
Hi,
As aplay works (I mean sound is heard) only on hw:0,0 and as cat
/proc/asound/pcm shows 0,0 with playback & capture interface then is it
possible in portaudio to fill device info only for hw:0,0 (i.e 1 device
which is working) instead of all 47 devices? Also in crash debugs we can
see that there is no address for hw:0,4 & hw:0,5.
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) : : playback 1 : capture 1
00-01: MultiMedia2 (*) : : playback 1 : capture 1
00-02: CS-Voice (*) : : playback 1 : capture 1
00-03: VoIP (*) : : playback 1 : capture 1
00-04: ULL (*) : : playback 1
00-05: Primary MI2S_RX Hostless (*) : : playback 1
00-06: INT_FM Hostless (*) : : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 : : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 : : capture 1
00-09: (Compress1) : : playback 1 : capture 1
00-10: AUXPCM Hostless (*) : : playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*) : : capture 1
00-12: MultiMedia5 (*) : : playback 1 : capture 1
00-13: Voice2 (*) : : playback 1 : capture 1
00-14: MultiMedia9 (*) : : playback 1 : capture 1
00-15: VoLTE (*) : : playback 1 : capture 1
00-16: VoWLAN (*) : : playback 1 : capture 1
00-17: INT_HFP_BT Hostless (*) : : playback 1 : capture 1
00-18: MultiMedia6 (*) : : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) : : capture 1
00-20: Listen 2 Audio Service (*) : : capture 1
00-21: Listen 3 Audio Service (*) : : capture 1
00-22: Listen 4 Audio Service (*) : : capture 1
00-23: Listen 5 Audio Service (*) : : capture 1
00-24: (Compress2) : : playback 1
00-25: QUAT_MI2S Hostless (*) : : playback 1
00-26: Senary_mi2s Capture snd-soc-dummy-dai-26 : : capture 1
00-27: (Compress3) : : playback 1
00-28: (Compress4) : : playback 1
00-29: (Compress5) : : playback 1
00-30: (Compress6) : : playback 1
00-31: (Compress7) : : playback 1
00-32: (Compress8) : : playback 1
00-33: (Compress9) : : playback 1
00-34: VoiceMMode1 (*) : : playback 1 : capture 1
00-35: VoiceMMode2 (*) : : playback 1 : capture 1
00-36: MultiMedia8 (*) : : playback 1 : capture 1
00-37: QCHAT (*) : : playback 1 : capture 1
00-38: (Compress10) : : capture 1
00-39: (Compress11) : : capture 1
00-40: (Compress12) : : capture 1
00-41: (Primary MI2S Playback) : : playback 1
00-42: (Secondary MI2S Playback) : : playback 1
00-43: (Tertiary MI2S Capture) : : capture 1
00-44: (Quaternary MI2S Playback) : : playback 1
00-45: (Quaternary MI2S Capture) : : capture 1
00-46: (AUX PCM Playback) : : playback 1
00-47: (AUX PCM Capture) : : capture 1
00-48: (Internal BT-SCO Playback) : : playback 1
00-49: (Internal BT-SCO Capture) : : capture 1
00-50: (Internal FM Playback) : : playback 1
00-51: (Internal FM Capture) : : capture 1
00-52: (AFE Playback) : : playback 1
00-53: (AFE Capture) : : capture 1
00-54: (Voice Uplink Capture) : : capture 1
00-55: (Voice Downlink Capture) : : capture 1
00-56: (Voice Farend Playback) : : playback 1
00-57: (Voice2 Farend Playback) : : playback 1
00-58: (Quinary MI2S Capture) : : capture 1
00-59: (Quinary MI2S Playback) : : playback 1
On Tue, Oct 30, 2018 at 1:14 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than Portaudio problem. If l read list
correctly 0,4 is ULL (what ever that is?) and 0,5 should be Primary MI2S_RX
Hostless (I2S Host?).
It would help to ask from ALSA IRC or mailing list why they crash and
if there is nothing to do (as they are reported automatically and can't be
probed to be crashing) then I think you need to make .alsarc but have no
idea which kind to prevent their appearance or use Pulseaudio/JACK if
possible.
Sincerely,
Tuukka
Hi,
As per your suggestion I tried aplay -D with multiple hw:0,....
aplay -D hw:0,0 /data/Haze.wav - File gets played and can hear sound
on speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav - File
does not get played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*
"If it works with aplay then there is some problem in portaudio." -
Does the about output confirms that problem is with alsa-lib?
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little Endian, Rate
44100 Hz, Mono
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171) - This parameter value changes with
every hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value changes with every
hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes with every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries to play something. You
can also test with hw:0,5 or make script loop and test until it doesn't
work or crash until hw:0,somethig. If it works with aplay then there is
some problem in portaudio.
Tuukka
Hi,
*aplay -D hw:0,4* do not output anything. This command as well as *aplay
-D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment. This
is yocto project.
On Mon, Oct 29, 2018 at 3:10 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume this is
Yocto or similar project.
Tuukka
Hi,
Actually after enabling alsa-utils with other options I could get
the output for aplay -L. Please find below the output for aplay -L and
aplay -l.
*/usr/bin # aplay -L*
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 0: MultiMedia1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 1: MultiMedia2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary
MI2S_RX Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 7: AFE-PROXY
RX msm-stub-rx-7 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia5 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia9 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
INT_HFP_BT Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia6 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 25: QUAT_MI2S
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoiceMMode1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoiceMMode2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia8 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone
because the same code works on X86? As it is a audio sound card from
ZL38063 so it is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the
past I wrote a small demonstration program for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to playback a WAV file. It worked without
problems. The GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel
platform, then the source code was transferred to the Raspberry and
recompiled there, without any problems.
73 Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-11-05 12:24:06 UTC
Permalink
Hello,

Can't say with that debug information as can't see where it crashes and
why it stops. If I have to make guess it's something to do with threads
and implementation that in your ARM board.

You can try other example with no callback and does it also crash.

Tuukka
Post by Arjav Parikh
Hi,
I verified playing 30 sec long file and did not observe any crash
whereas patest_sine8 plays file for approx duration of 4 sec and then
it crashes.
Can you guide why patest1 also throws error.
On Sun, Nov 4, 2018 at 10:39 PM Tuukka Pasanen
Hello,
Can you check if it crashes with aplay (if you play something that
is longer)? Which kernel do you use?
Tuukka
Post by Arjav Parikh
Hi,
I made below modifications in *src/hostapi/alsa/pa_linux_alsa.c*
function *BuildDeviceList* to limit the *numDeviceNames = 1 *&
commenting*assert operation.*
*numDeviceNames = 1; //patch*
for( i = 0, devIdx = 0; i < numDeviceNames; ++i )
    {
    }
*//assert( devIdx < numDeviceNames ); //patch*
    /* Now inspect 'dmix' and 'default' plugins */
After adding above 2 patches I can hear sound by running
patest_sine8 but get crash dump after sometime. Also error is
observed in patest1.
What other modifications to make it success for numDeviceNames = 1?
Attaching the debug for patest_sine8, patest1 & pa_devs for
reference (*patest_sine8_core_dump.txt*).
On Sat, Nov 3, 2018 at 3:40 PM Arjav Parikh
Hi,
I created /etc/asound.conf and ~/.asoundrc with below
contents but still observe the Segmentation Fault. I think if
somehow we restrict Portaudio to fetch details of only hw:0,0
then may be this Segmentation Fault Issue could be resolved.
pcm.!default {
        type hw
        card 0
        device 0
}
ctl.!default {
        type hw
        card 0
        device 0
}
On Sat, Nov 3, 2018 at 1:33 PM Arjav Parikh
Hi,
I could not find the patch mentioned in the SVN. Raised
the query on Alsa MailList as well but no response from
them. As per your another suggestion I am trying to
create alsarc file.
On Sat, Nov 3, 2018 at 1:26 PM Tuukka Pasanen
Hello,
Did this one solved? Portaudio tries to find every
ALSA devices which is most of times what people want.
Tuukka
Post by Arjav Parikh
Hi,
As aplay works (I mean sound is heard) only on
hw:0,0 and as cat /proc/asound/pcm shows 0,0 with
playback & capture interface then is it possible in
portaudio to fill device info only for hw:0,0 (i.e 1
device which is working) instead of all 47 devices?
Also in crash debugs we can see that there is no
address for hw:0,4 & hw:0,5. *
*
*
*
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) :  : playback 1 : capture 1
00-01: MultiMedia2 (*) :  : playback 1 : capture 1
00-02: CS-Voice (*) :  : playback 1 : capture 1
00-03: VoIP (*) :  : playback 1 : capture 1
00-04: ULL (*) :  : playback 1
00-05: Primary MI2S_RX Hostless (*) :  : playback 1
00-06: INT_FM Hostless (*) :  : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 :  : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 :  : capture 1
00-09: (Compress1) :  : playback 1 : capture 1
00-10: AUXPCM Hostless (*) :  : playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*) :  : capture 1
00-12: MultiMedia5 (*) :  : playback 1 : capture 1
00-13: Voice2 (*) :  : playback 1 : capture 1
00-14: MultiMedia9 (*) :  : playback 1 : capture 1
00-15: VoLTE (*) :  : playback 1 : capture 1
00-16: VoWLAN (*) :  : playback 1 : capture 1
capture 1
00-18: MultiMedia6 (*) :  : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) :  : capture 1
00-20: Listen 2 Audio Service (*) :  : capture 1
00-21: Listen 3 Audio Service (*) :  : capture 1
00-22: Listen 4 Audio Service (*) :  : capture 1
00-23: Listen 5 Audio Service (*) :  : capture 1
00-24: (Compress2) :  : playback 1
00-25: QUAT_MI2S Hostless (*) : : playback 1
capture 1
00-27: (Compress3) :  : playback 1
00-28: (Compress4) :  : playback 1
00-29: (Compress5) :  : playback 1
00-30: (Compress6) :  : playback 1
00-31: (Compress7) :  : playback 1
00-32: (Compress8) :  : playback 1
00-33: (Compress9) :  : playback 1
00-34: VoiceMMode1 (*) :  : playback 1 : capture 1
00-35: VoiceMMode2 (*) :  : playback 1 : capture 1
00-36: MultiMedia8 (*) :  : playback 1 : capture 1
00-37: QCHAT (*) :  : playback 1 : capture 1
00-38: (Compress10) :  : capture 1
00-39: (Compress11) :  : capture 1
00-40: (Compress12) :  : capture 1
00-41: (Primary MI2S Playback) :  : playback 1
00-42: (Secondary MI2S Playback) :  : playback 1
00-43: (Tertiary MI2S Capture) :  : capture 1
00-44: (Quaternary MI2S Playback) :  : playback 1
00-45: (Quaternary MI2S Capture) :  : capture 1
00-46: (AUX PCM Playback) :  : playback 1
00-47: (AUX PCM Capture) :  : capture 1
00-48: (Internal BT-SCO Playback) :  : playback 1
00-49: (Internal BT-SCO Capture) :  : capture 1
00-50: (Internal FM Playback) : : playback 1
00-51: (Internal FM Capture) : : capture 1
00-52: (AFE Playback) :  : playback 1
00-53: (AFE Capture) :  : capture 1
00-54: (Voice Uplink Capture) : : capture 1
00-55: (Voice Downlink Capture) :  : capture 1
00-56: (Voice Farend Playback) :  : playback 1
00-57: (Voice2 Farend Playback) :  : playback 1
00-58: (Quinary MI2S Capture) : : capture 1
00-59: (Quinary MI2S Playback) :  : playback 1
On Tue, Oct 30, 2018 at 1:14 PM Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than Portaudio
problem. If l read list correctly 0,4 is ULL
(what ever that is?) and 0,5 should be Primary
MI2S_RX Hostless (I2S Host?).
It would help to ask from ALSA IRC or mailing
list why they crash and if there is nothing to
do (as they are reported automatically and can't
be probed to be crashing) then I think you need
to make .alsarc but have no idea which kind to
prevent their appearance or use Pulseaudio/JACK
if possible.
Sincerely,
Tuukka
Post by Arjav Parikh
Hi,
As per your suggestion I tried aplay -D with
multiple hw:0,.... options and below are the
aplay -D hw:0,0 /data/Haze.wav - File gets
played and can hear sound on speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D
hw:0,4 /data/Haze.wav - File does not get
played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation
fault*
"If it works with aplay then there is some
problem in portaudio." - Does the about output
confirms that problem is with alsa-lib?
aplay -D hw:0,1 /data/Haze.wav - aplay -D
Playing WAVE '/data/Haze.wav' : Signed 16 bit
Little Endian, Rate 44100 Hz, Mono
aplay: set_params:1305: Unable to install hw
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171)  - This parameter
value changes with every hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value
changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value
changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with
every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter
value changes with every hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value
changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value
changes with every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34 PM Tuukka Pasanen
Hello,
Ok you should but some wav after that it
tries to play something. You can also test
with hw:0,5 or make script loop and test
until it doesn't work or crash until
hw:0,somethig. If it works with aplay then
there is some problem in portaudio.
Tuukka
Post by Arjav Parikh
Hi,
*aplay -D hw:0,4* do not output anything.
This command as well as *aplay -D hw:0,0
*does not show any output.
Yes aplay and other components are
compiled in same environment. This is
yocto project.
On Mon, Oct 29, 2018 at 3:10 PM Tuukka
Hello,
Sorry wrong button..
Are aplay and all compiled with same
enviroment. I assume this is Yocto or
similar project.
Tuukka
Post by Arjav Parikh
Hi,
Actually after enabling alsa-utils
with other options I could get the
output for aplay -L. Please find
below the output for aplay -L and
aplay -l.
*/usr/bin # aplay -L*
null
    Discard all samples (playback) or
generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
    Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
    Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware
Devices ****
card 0: msm8953sndcardm
MultiMedia1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
MultiMedia2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
CS-Voice (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
VoIP (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device 4: ULL
(*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
Primary MI2S_RX Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
AFE-PROXY RX msm-stub-rx-7 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
AUXPCM Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
MultiMedia5 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
Voice2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
MultiMedia9 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
VoLTE (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
VoWLAN (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
INT_HFP_BT Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
MultiMedia6 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
QUAT_MI2S Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
VoiceMMode1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
VoiceMMode2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
MultiMedia8 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
QCHAT (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
On Sun, Oct 28, 2018 at 12:20 AM
On 2018-10-27 17:00, Arjav Parikh
Post by Arjav Parikh
Is it possible to check
Portuadio on ARM platform for
anyone because the same code
works on X86? As it is a audio
sound card from ZL38063 so it is
showing huge amount of outputs.
I don't know if this info can be
of any help to you, but in the
past I wrote a small
demonstration program for the
Raspberry Pi 3B, under Raspbian,
that used Portaudio to playback a
WAV file. It worked without
problems. The GUI was written in
Free Pascal using Lazarus, and
the processing code, Portaudio
interfacing included, in straight
C code. The application was
firstly developed and debugged
under Kubuntu on an Intel
platform, then the source code
was transferred to the Raspberry
and recompiled there, without any
problems.
73  Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-11-05 12:41:10 UTC
Permalink
Hi,

On running gdb for patest_sine8, I get below information:






*Program received signal SIGABRT, Aborted.[Switching to LWP
3630]0x0000007f902b2d10 in raise () from /lib64/libc.so.6(gdb) backtrace#0
0x0000007f902b2d10 in raise () from /lib64/libc.so.6#1 0x0000007f902b6a14
in abort () from /lib64/libc.so.6#2 0x0000007f902b6a14 in abort () from
/lib64/libc.so.6*

Is it something related to libc library used in my ARM board? In case of
patest1, I see errors like below. Am I missing something?
Sorry for missing this information as requested previously:
Kernel Version: *3.18.71-perf*

Expression 'r' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2099
Host error description: Invalid argument
An error occured while using portaudio
unanticipated host error.
Error number: -22
Error text: Invalid argument
bye
Post by Tuukka Pasanen
Hello,
Can't say with that debug information as can't see where it crashes and
why it stops. If I have to make guess it's something to do with threads and
implementation that in your ARM board.
You can try other example with no callback and does it also crash.
Tuukka
Hi,
I verified playing 30 sec long file and did not observe any crash whereas
patest_sine8 plays file for approx duration of 4 sec and then it crashes.
Can you guide why patest1 also throws error.
Post by Tuukka Pasanen
Hello,
Can you check if it crashes with aplay (if you play something that is
longer)? Which kernel do you use?
Tuukka
Hi,
I made below modifications in *src/hostapi/alsa/pa_linux_alsa.c*
function *BuildDeviceList* to limit the *numDeviceNames = 1 *& commenting*
assert operation.*
*numDeviceNames = 1; //patch*
for( i = 0, devIdx = 0; i < numDeviceNames; ++i )
{
}
*//assert( devIdx < numDeviceNames ); //patch*
/* Now inspect 'dmix' and 'default' plugins */
After adding above 2 patches I can hear sound by running patest_sine8 but
get crash dump after sometime. Also error is observed in patest1.
What other modifications to make it success for numDeviceNames = 1?
Attaching the debug for patest_sine8, patest1 & pa_devs for reference (
*patest_sine8_core_dump.txt*).
Post by Arjav Parikh
Hi,
I created /etc/asound.conf and ~/.asoundrc with below contents but still
observe the Segmentation Fault. I think if somehow we restrict Portaudio to
fetch details of only hw:0,0 then may be this Segmentation Fault Issue
could be resolved.
pcm.!default {
type hw
card 0
device 0
}
ctl.!default {
type hw
card 0
device 0
}
Post by Arjav Parikh
Hi,
I could not find the patch mentioned in the SVN. Raised the query on
Alsa MailList as well but no response from them. As per your another
suggestion I am trying to create alsarc file.
Post by Tuukka Pasanen
Hello,
Did this one solved? Portaudio tries to find every ALSA devices which
is most of times what people want.
Tuukka
Hi,
As aplay works (I mean sound is heard) only on hw:0,0 and as cat
/proc/asound/pcm shows 0,0 with playback & capture interface then is it
possible in portaudio to fill device info only for hw:0,0 (i.e 1 device
which is working) instead of all 47 devices? Also in crash debugs we can
see that there is no address for hw:0,4 & hw:0,5.
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) : : playback 1 : capture 1
00-01: MultiMedia2 (*) : : playback 1 : capture 1
00-02: CS-Voice (*) : : playback 1 : capture 1
00-03: VoIP (*) : : playback 1 : capture 1
00-04: ULL (*) : : playback 1
00-05: Primary MI2S_RX Hostless (*) : : playback 1
00-06: INT_FM Hostless (*) : : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 : : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 : : capture 1
00-09: (Compress1) : : playback 1 : capture 1
00-10: AUXPCM Hostless (*) : : playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*) : : capture 1
00-12: MultiMedia5 (*) : : playback 1 : capture 1
00-13: Voice2 (*) : : playback 1 : capture 1
00-14: MultiMedia9 (*) : : playback 1 : capture 1
00-15: VoLTE (*) : : playback 1 : capture 1
00-16: VoWLAN (*) : : playback 1 : capture 1
00-17: INT_HFP_BT Hostless (*) : : playback 1 : capture 1
00-18: MultiMedia6 (*) : : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) : : capture 1
00-20: Listen 2 Audio Service (*) : : capture 1
00-21: Listen 3 Audio Service (*) : : capture 1
00-22: Listen 4 Audio Service (*) : : capture 1
00-23: Listen 5 Audio Service (*) : : capture 1
00-24: (Compress2) : : playback 1
00-25: QUAT_MI2S Hostless (*) : : playback 1
00-26: Senary_mi2s Capture snd-soc-dummy-dai-26 : : capture 1
00-27: (Compress3) : : playback 1
00-28: (Compress4) : : playback 1
00-29: (Compress5) : : playback 1
00-30: (Compress6) : : playback 1
00-31: (Compress7) : : playback 1
00-32: (Compress8) : : playback 1
00-33: (Compress9) : : playback 1
00-34: VoiceMMode1 (*) : : playback 1 : capture 1
00-35: VoiceMMode2 (*) : : playback 1 : capture 1
00-36: MultiMedia8 (*) : : playback 1 : capture 1
00-37: QCHAT (*) : : playback 1 : capture 1
00-38: (Compress10) : : capture 1
00-39: (Compress11) : : capture 1
00-40: (Compress12) : : capture 1
00-41: (Primary MI2S Playback) : : playback 1
00-42: (Secondary MI2S Playback) : : playback 1
00-43: (Tertiary MI2S Capture) : : capture 1
00-44: (Quaternary MI2S Playback) : : playback 1
00-45: (Quaternary MI2S Capture) : : capture 1
00-46: (AUX PCM Playback) : : playback 1
00-47: (AUX PCM Capture) : : capture 1
00-48: (Internal BT-SCO Playback) : : playback 1
00-49: (Internal BT-SCO Capture) : : capture 1
00-50: (Internal FM Playback) : : playback 1
00-51: (Internal FM Capture) : : capture 1
00-52: (AFE Playback) : : playback 1
00-53: (AFE Capture) : : capture 1
00-54: (Voice Uplink Capture) : : capture 1
00-55: (Voice Downlink Capture) : : capture 1
00-56: (Voice Farend Playback) : : playback 1
00-57: (Voice2 Farend Playback) : : playback 1
00-58: (Quinary MI2S Capture) : : capture 1
00-59: (Quinary MI2S Playback) : : playback 1
On Tue, Oct 30, 2018 at 1:14 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than Portaudio problem. If l read list
correctly 0,4 is ULL (what ever that is?) and 0,5 should be Primary MI2S_RX
Hostless (I2S Host?).
It would help to ask from ALSA IRC or mailing list why they crash and
if there is nothing to do (as they are reported automatically and can't be
probed to be crashing) then I think you need to make .alsarc but have no
idea which kind to prevent their appearance or use Pulseaudio/JACK if
possible.
Sincerely,
Tuukka
Hi,
As per your suggestion I tried aplay -D with multiple hw:0,....
aplay -D hw:0,0 /data/Haze.wav - File gets played and can hear sound
on speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav -
File does not get played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*
"If it works with aplay then there is some problem in portaudio." -
Does the about output confirms that problem is with alsa-lib?
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little Endian, Rate
44100 Hz, Mono
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171) - This parameter value changes with
every hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value changes with
every hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes with every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries to play something.
You can also test with hw:0,5 or make script loop and test until it doesn't
work or crash until hw:0,somethig. If it works with aplay then there is
some problem in portaudio.
Tuukka
Hi,
*aplay -D hw:0,4* do not output anything. This command as well as *aplay
-D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment.
This is yocto project.
On Mon, Oct 29, 2018 at 3:10 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume this is
Yocto or similar project.
Tuukka
Hi,
Actually after enabling alsa-utils with other options I could get
the output for aplay -L. Please find below the output for aplay -L and
aplay -l.
*/usr/bin # aplay -L*
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 0: MultiMedia1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 1: MultiMedia2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary
MI2S_RX Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 7: AFE-PROXY
RX msm-stub-rx-7 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia5 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia9 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
INT_HFP_BT Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia6 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
QUAT_MI2S Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoiceMMode1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoiceMMode2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia8 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone
because the same code works on X86? As it is a audio sound card from
ZL38063 so it is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the
past I wrote a small demonstration program for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to playback a WAV file. It worked without
problems. The GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel
platform, then the source code was transferred to the Raspberry and
recompiled there, without any problems.
73 Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-11-05 12:46:05 UTC
Permalink
Hello,

If I can understand this correctly it crashes when it tries to wake up
thread thread after that . Ok you use older gcc also and glibc?

You don't happen to have valgrind to test with because it's more for
situations like this.

Tuukka
Post by Arjav Parikh
Hi,
*Program received signal SIGABRT, Aborted.
[Switching to LWP 3630]
0x0000007f902b2d10 in raise () from /lib64/libc.so.6
(gdb) backtrace
#0  0x0000007f902b2d10 in raise () from /lib64/libc.so.6
#1  0x0000007f902b6a14 in abort () from /lib64/libc.so.6
#2  0x0000007f902b6a14 in abort () from /lib64/libc.so.6*
Is it something related to libc library used in my ARM board? In case
of patest1, I see errors like below. Am I missing something?
Kernel Version: *3.18.71-perf*
Expression 'r' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2099
Host error description: Invalid argument
An error occured while using portaudio
 unanticipated host error.
 Error number: -22
 Error text: Invalid argument
 bye
On Mon, Nov 5, 2018 at 5:54 PM Tuukka Pasanen
Hello,
Can't say with that debug information as can't see where it
crashes and why it stops. If I have to make guess it's something
to do with threads and implementation that in your ARM board.
You can try other example with no callback and does it also crash.
Tuukka
Post by Arjav Parikh
Hi,
I verified playing 30 sec long file and did not observe any crash
whereas patest_sine8 plays file for approx duration of 4 sec and
then it crashes.
Can you guide why patest1 also throws error.
On Sun, Nov 4, 2018 at 10:39 PM Tuukka Pasanen
Hello,
Can you check if it crashes with aplay (if you play something
that is longer)? Which kernel do you use?
Tuukka
Post by Arjav Parikh
Hi,
I made below modifications in
*src/hostapi/alsa/pa_linux_alsa.c* function
*BuildDeviceList* to limit the *numDeviceNames = 1 *&
commenting*assert operation.*
*numDeviceNames = 1; //patch*
for( i = 0, devIdx = 0; i < numDeviceNames; ++i )
    {
    }
*//assert( devIdx < numDeviceNames ); //patch*
    /* Now inspect 'dmix' and 'default' plugins */
After adding above 2 patches I can hear sound by running
patest_sine8 but get crash dump after sometime. Also error
is observed in patest1.
What other modifications to make it success for
numDeviceNames = 1?
Attaching the debug for patest_sine8, patest1 & pa_devs for
reference (*patest_sine8_core_dump.txt*).
On Sat, Nov 3, 2018 at 3:40 PM Arjav Parikh
Hi,
I created /etc/asound.conf and ~/.asoundrc with below
contents but still observe the Segmentation Fault. I
think if somehow we restrict Portaudio to fetch details
of only hw:0,0 then may be this Segmentation Fault Issue
could be resolved.
pcm.!default {
        type hw
        card 0
        device 0
}
ctl.!default {
        type hw
        card 0
        device 0
}
On Sat, Nov 3, 2018 at 1:33 PM Arjav Parikh
Hi,
I could not find the patch mentioned in the SVN.
Raised the query on Alsa MailList as well but no
response from them. As per your another suggestion I
am trying to create alsarc file.
On Sat, Nov 3, 2018 at 1:26 PM Tuukka Pasanen
Hello,
Did this one solved? Portaudio tries to find
every ALSA devices which is most of times what
people want.
Tuukka
Post by Arjav Parikh
Hi,
As aplay works (I mean sound is heard) only on
hw:0,0 and as cat /proc/asound/pcm shows 0,0
with playback & capture interface then is it
possible in portaudio to fill device info only
for hw:0,0 (i.e 1 device which is working)
instead of all 47 devices? Also in crash debugs
we can see that there is no address for hw:0,4
& hw:0,5. *
*
*
*
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) :  : playback 1 : capture 1
00-01: MultiMedia2 (*) :  : playback 1 : capture 1
00-02: CS-Voice (*) :  : playback 1 : capture 1
00-03: VoIP (*) :  : playback 1 : capture 1
00-04: ULL (*) :  : playback 1
00-05: Primary MI2S_RX Hostless (*) :  : playback 1
00-06: INT_FM Hostless (*) :  : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 :  : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 :  : capture 1
00-09: (Compress1) :  : playback 1 : capture 1
capture 1
00-11: Tertiary MI2S_TX Hostless (*) :  : capture 1
00-12: MultiMedia5 (*) :  : playback 1 : capture 1
00-13: Voice2 (*) :  : playback 1 : capture 1
00-14: MultiMedia9 (*) :  : playback 1 : capture 1
00-15: VoLTE (*) :  : playback 1 : capture 1
00-16: VoWLAN (*) :  : playback 1 : capture 1
00-17: INT_HFP_BT Hostless (*) :  : playback 1
: capture 1
00-18: MultiMedia6 (*) :  : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) :  : capture 1
00-20: Listen 2 Audio Service (*) :  : capture 1
00-21: Listen 3 Audio Service (*) :  : capture 1
00-22: Listen 4 Audio Service (*) :  : capture 1
00-23: Listen 5 Audio Service (*) :  : capture 1
00-24: (Compress2) :  : playback 1
00-25: QUAT_MI2S Hostless (*) :  : playback 1
00-26: Senary_mi2s Capture snd-soc-dummy-dai-26
: : capture 1
00-27: (Compress3) :  : playback 1
00-28: (Compress4) :  : playback 1
00-29: (Compress5) :  : playback 1
00-30: (Compress6) :  : playback 1
00-31: (Compress7) :  : playback 1
00-32: (Compress8) :  : playback 1
00-33: (Compress9) :  : playback 1
00-34: VoiceMMode1 (*) :  : playback 1 : capture 1
00-35: VoiceMMode2 (*) :  : playback 1 : capture 1
00-36: MultiMedia8 (*) :  : playback 1 : capture 1
00-37: QCHAT (*) :  : playback 1 : capture 1
00-38: (Compress10) :  : capture 1
00-39: (Compress11) :  : capture 1
00-40: (Compress12) :  : capture 1
00-41: (Primary MI2S Playback) :  : playback 1
00-42: (Secondary MI2S Playback) :  : playback 1
00-43: (Tertiary MI2S Capture) :  : capture 1
00-44: (Quaternary MI2S Playback) :  : playback 1
00-45: (Quaternary MI2S Capture) :  : capture 1
00-46: (AUX PCM Playback) :  : playback 1
00-47: (AUX PCM Capture) :  : capture 1
00-48: (Internal BT-SCO Playback) :  : playback 1
00-49: (Internal BT-SCO Capture) :  : capture 1
00-50: (Internal FM Playback) :  : playback 1
00-51: (Internal FM Capture) :  : capture 1
00-52: (AFE Playback) : : playback 1
00-53: (AFE Capture) : : capture 1
00-54: (Voice Uplink Capture) :  : capture 1
00-55: (Voice Downlink Capture) :  : capture 1
00-56: (Voice Farend Playback) :  : playback 1
00-57: (Voice2 Farend Playback) :  : playback 1
00-58: (Quinary MI2S Capture) :  : capture 1
00-59: (Quinary MI2S Playback) :  : playback 1
On Tue, Oct 30, 2018 at 1:14 PM Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than
Portaudio problem. If l read list correctly
0,4 is ULL (what ever that is?) and 0,5
should be Primary MI2S_RX Hostless (I2S Host?).
It would help to ask from ALSA IRC or
mailing list why they crash and if there is
nothing to do (as they are reported
automatically and can't be probed to be
crashing) then I think you need to make
.alsarc but have no idea which kind to
prevent their appearance or use
Pulseaudio/JACK if possible.
Sincerely,
Tuukka
Post by Arjav Parikh
Hi,
As per your suggestion I tried aplay -D
with multiple hw:0,.... options and below
aplay -D hw:0,0 /data/Haze.wav - File gets
played and can hear sound on speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D
hw:0,4 /data/Haze.wav - File does not get
played and observe below output.
aplay -D hw:0,5 /data/Haze.wav -
*Segmentation fault*
"If it works with aplay then there is some
problem in portaudio." - Does the about
output confirms that problem is with alsa-lib?
aplay -D hw:0,1 /data/Haze.wav - aplay -D
Playing WAVE '/data/Haze.wav' : Signed 16
bit Little Endian, Rate 44100 Hz, Mono
aplay: set_params:1305: Unable to install
ACCESS: RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171)  - This
parameter value changes with every hw:0,..
value
PERIOD_SIZE: 5520 - This parameter value
changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value
changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes
with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This
parameter value changes with every hw:0,..
value
BUFFER_SIZE: 22080 - This parameter value
changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value
changes with every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34 PM Tuukka
Hello,
Ok you should but some wav after that
it tries to play something. You can
also test with hw:0,5 or make script
loop and test until it doesn't work or
crash until hw:0,somethig. If it works
with aplay then there is some problem
in portaudio.
Tuukka
Post by Arjav Parikh
Hi,
*aplay -D hw:0,4* do not output
anything. This command as well as
*aplay -D hw:0,0 *does not show any
output.
Yes aplay and other components are
compiled in same environment. This is
yocto project.
On Mon, Oct 29, 2018 at 3:10 PM
Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with
same enviroment. I assume this is
Yocto or similar project.
Tuukka
On 29.10.2018 7.26, Arjav Parikh
Post by Arjav Parikh
Hi,
Actually after enabling
alsa-utils with other options I
could get the output for aplay
-L. Please find below the output
for aplay -L and aplay -l.
*/usr/bin # aplay -L*
null
    Discard all samples
(playback) or generate zero
samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
    Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
    Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware
Devices ****
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
0: MultiMedia1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
1: MultiMedia2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
2: CS-Voice (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
3: VoIP (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
4: ULL (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
5: Primary MI2S_RX Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
7: AFE-PROXY RX msm-stub-rx-7 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
10: AUXPCM Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
12: MultiMedia5 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
13: Voice2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
14: MultiMedia9 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
15: VoLTE (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
16: VoWLAN (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
17: INT_HFP_BT Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
18: MultiMedia6 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
25: QUAT_MI2S Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
34: VoiceMMode1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
35: VoiceMMode2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
36: MultiMedia8 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp], device
37: QCHAT (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
On Sun, Oct 28, 2018 at 12:20 AM
On 2018-10-27 17:00, Arjav
Post by Arjav Parikh
Is it possible to check
Portuadio on ARM platform
for anyone because the same
code works on X86? As it is
a audio sound card from
ZL38063 so it is showing
huge amount of outputs.
I don't know if this info
can be of any help to you,
but in the past I wrote a
small demonstration program
for the Raspberry Pi 3B,
under Raspbian, that used
Portaudio to playback a WAV
file. It worked without
problems. The GUI was
written in Free Pascal using
Lazarus, and the processing
code, Portaudio interfacing
included, in straight C
code. The application was
firstly developed and
debugged under Kubuntu on an
Intel platform, then the
source code was transferred
to the Raspberry and
recompiled there, without
any problems.
73  Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-11-05 12:52:20 UTC
Permalink
Hi,

gcc version is 4.9.3-r0 & glibc is 2.22-r0.
I will check for valgrind support for my build.
Post by Tuukka Pasanen
Hello,
If I can understand this correctly it crashes when it tries to wake up
thread thread after that . Ok you use older gcc also and glibc?
You don't happen to have valgrind to test with because it's more for
situations like this.
Tuukka
Hi,
*Program received signal SIGABRT, Aborted. [Switching to LWP 3630]
0x0000007f902b2d10 in raise () from /lib64/libc.so.6 (gdb) backtrace #0
0x0000007f902b2d10 in raise () from /lib64/libc.so.6 #1 0x0000007f902b6a14
in abort () from /lib64/libc.so.6 #2 0x0000007f902b6a14 in abort () from
/lib64/libc.so.6*
Is it something related to libc library used in my ARM board? In case of
patest1, I see errors like below. Am I missing something?
Kernel Version: *3.18.71-perf*
Expression 'r' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2099
Host error description: Invalid argument
An error occured while using portaudio
unanticipated host error.
Error number: -22
Error text: Invalid argument
bye
Post by Tuukka Pasanen
Hello,
Can't say with that debug information as can't see where it crashes and
why it stops. If I have to make guess it's something to do with threads and
implementation that in your ARM board.
You can try other example with no callback and does it also crash.
Tuukka
Hi,
I verified playing 30 sec long file and did not observe any crash whereas
patest_sine8 plays file for approx duration of 4 sec and then it crashes.
Can you guide why patest1 also throws error.
Post by Tuukka Pasanen
Hello,
Can you check if it crashes with aplay (if you play something that is
longer)? Which kernel do you use?
Tuukka
Hi,
I made below modifications in *src/hostapi/alsa/pa_linux_alsa.c*
function *BuildDeviceList* to limit the *numDeviceNames = 1 *&
commenting* assert operation.*
*numDeviceNames = 1; //patch*
for( i = 0, devIdx = 0; i < numDeviceNames; ++i )
{
}
*//assert( devIdx < numDeviceNames ); //patch*
/* Now inspect 'dmix' and 'default' plugins */
After adding above 2 patches I can hear sound by running patest_sine8
but get crash dump after sometime. Also error is observed in patest1.
What other modifications to make it success for numDeviceNames = 1?
Attaching the debug for patest_sine8, patest1 & pa_devs for reference (
*patest_sine8_core_dump.txt*).
Post by Arjav Parikh
Hi,
I created /etc/asound.conf and ~/.asoundrc with below contents but
still observe the Segmentation Fault. I think if somehow we restrict
Portaudio to fetch details of only hw:0,0 then may be this Segmentation
Fault Issue could be resolved.
pcm.!default {
type hw
card 0
device 0
}
ctl.!default {
type hw
card 0
device 0
}
Post by Arjav Parikh
Hi,
I could not find the patch mentioned in the SVN. Raised the query on
Alsa MailList as well but no response from them. As per your another
suggestion I am trying to create alsarc file.
On Sat, Nov 3, 2018 at 1:26 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Did this one solved? Portaudio tries to find every ALSA devices which
is most of times what people want.
Tuukka
Hi,
As aplay works (I mean sound is heard) only on hw:0,0 and as cat
/proc/asound/pcm shows 0,0 with playback & capture interface then is it
possible in portaudio to fill device info only for hw:0,0 (i.e 1 device
which is working) instead of all 47 devices? Also in crash debugs we can
see that there is no address for hw:0,4 & hw:0,5.
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) : : playback 1 : capture 1
00-01: MultiMedia2 (*) : : playback 1 : capture 1
00-02: CS-Voice (*) : : playback 1 : capture 1
00-03: VoIP (*) : : playback 1 : capture 1
00-04: ULL (*) : : playback 1
00-05: Primary MI2S_RX Hostless (*) : : playback 1
00-06: INT_FM Hostless (*) : : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 : : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 : : capture 1
00-09: (Compress1) : : playback 1 : capture 1
00-10: AUXPCM Hostless (*) : : playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*) : : capture 1
00-12: MultiMedia5 (*) : : playback 1 : capture 1
00-13: Voice2 (*) : : playback 1 : capture 1
00-14: MultiMedia9 (*) : : playback 1 : capture 1
00-15: VoLTE (*) : : playback 1 : capture 1
00-16: VoWLAN (*) : : playback 1 : capture 1
00-17: INT_HFP_BT Hostless (*) : : playback 1 : capture 1
00-18: MultiMedia6 (*) : : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) : : capture 1
00-20: Listen 2 Audio Service (*) : : capture 1
00-21: Listen 3 Audio Service (*) : : capture 1
00-22: Listen 4 Audio Service (*) : : capture 1
00-23: Listen 5 Audio Service (*) : : capture 1
00-24: (Compress2) : : playback 1
00-25: QUAT_MI2S Hostless (*) : : playback 1
00-26: Senary_mi2s Capture snd-soc-dummy-dai-26 : : capture 1
00-27: (Compress3) : : playback 1
00-28: (Compress4) : : playback 1
00-29: (Compress5) : : playback 1
00-30: (Compress6) : : playback 1
00-31: (Compress7) : : playback 1
00-32: (Compress8) : : playback 1
00-33: (Compress9) : : playback 1
00-34: VoiceMMode1 (*) : : playback 1 : capture 1
00-35: VoiceMMode2 (*) : : playback 1 : capture 1
00-36: MultiMedia8 (*) : : playback 1 : capture 1
00-37: QCHAT (*) : : playback 1 : capture 1
00-38: (Compress10) : : capture 1
00-39: (Compress11) : : capture 1
00-40: (Compress12) : : capture 1
00-41: (Primary MI2S Playback) : : playback 1
00-42: (Secondary MI2S Playback) : : playback 1
00-43: (Tertiary MI2S Capture) : : capture 1
00-44: (Quaternary MI2S Playback) : : playback 1
00-45: (Quaternary MI2S Capture) : : capture 1
00-46: (AUX PCM Playback) : : playback 1
00-47: (AUX PCM Capture) : : capture 1
00-48: (Internal BT-SCO Playback) : : playback 1
00-49: (Internal BT-SCO Capture) : : capture 1
00-50: (Internal FM Playback) : : playback 1
00-51: (Internal FM Capture) : : capture 1
00-52: (AFE Playback) : : playback 1
00-53: (AFE Capture) : : capture 1
00-54: (Voice Uplink Capture) : : capture 1
00-55: (Voice Downlink Capture) : : capture 1
00-56: (Voice Farend Playback) : : playback 1
00-57: (Voice2 Farend Playback) : : playback 1
00-58: (Quinary MI2S Capture) : : capture 1
00-59: (Quinary MI2S Playback) : : playback 1
On Tue, Oct 30, 2018 at 1:14 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than Portaudio problem. If l read list
correctly 0,4 is ULL (what ever that is?) and 0,5 should be Primary MI2S_RX
Hostless (I2S Host?).
It would help to ask from ALSA IRC or mailing list why they crash
and if there is nothing to do (as they are reported automatically and can't
be probed to be crashing) then I think you need to make .alsarc but have no
idea which kind to prevent their appearance or use Pulseaudio/JACK if
possible.
Sincerely,
Tuukka
Hi,
As per your suggestion I tried aplay -D with multiple hw:0,....
aplay -D hw:0,0 /data/Haze.wav - File gets played and can hear sound
on speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav -
File does not get played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*
"If it works with aplay then there is some problem in portaudio." -
Does the about output confirms that problem is with alsa-lib?
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little Endian, Rate
44100 Hz, Mono
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171) - This parameter value changes with
every hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value changes with
every hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes with every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries to play something.
You can also test with hw:0,5 or make script loop and test until it doesn't
work or crash until hw:0,somethig. If it works with aplay then there is
some problem in portaudio.
Tuukka
Hi,
*aplay -D hw:0,4* do not output anything. This command as well as *aplay
-D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment.
This is yocto project.
On Mon, Oct 29, 2018 at 3:10 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume this is
Yocto or similar project.
Tuukka
Hi,
Actually after enabling alsa-utils with other options I could get
the output for aplay -L. Please find below the output for aplay -L and
aplay -l.
*/usr/bin # aplay -L*
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
MultiMedia1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary
MI2S_RX Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
AFE-PROXY RX msm-stub-rx-7 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia5 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia9 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
INT_HFP_BT Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia6 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
QUAT_MI2S Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoiceMMode1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoiceMMode2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia8 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone
because the same code works on X86? As it is a audio sound card from
ZL38063 so it is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the
past I wrote a small demonstration program for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to playback a WAV file. It worked without
problems. The GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel
platform, then the source code was transferred to the Raspberry and
recompiled there, without any problems.
73 Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Arjav Parikh
2018-11-13 07:34:30 UTC
Permalink
Hi,

I used valgrind for patest_sine8 & patest1 binary. I see error related to
ld-2.22.so. Attached debugs for your reference.
Does Portaudio have any dependency on glibc version?
Post by Arjav Parikh
Hi,
gcc version is 4.9.3-r0 & glibc is 2.22-r0.
I will check for valgrind support for my build.
Post by Tuukka Pasanen
Hello,
If I can understand this correctly it crashes when it tries to wake up
thread thread after that . Ok you use older gcc also and glibc?
You don't happen to have valgrind to test with because it's more for
situations like this.
Tuukka
Hi,
*Program received signal SIGABRT, Aborted. [Switching to LWP 3630]
0x0000007f902b2d10 in raise () from /lib64/libc.so.6 (gdb) backtrace #0
0x0000007f902b2d10 in raise () from /lib64/libc.so.6 #1 0x0000007f902b6a14
in abort () from /lib64/libc.so.6 #2 0x0000007f902b6a14 in abort () from
/lib64/libc.so.6*
Is it something related to libc library used in my ARM board? In case of
patest1, I see errors like below. Am I missing something?
Kernel Version: *3.18.71-perf*
Expression 'r' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2099
Host error description: Invalid argument
An error occured while using portaudio
unanticipated host error.
Error number: -22
Error text: Invalid argument
bye
Post by Tuukka Pasanen
Hello,
Can't say with that debug information as can't see where it crashes and
why it stops. If I have to make guess it's something to do with threads and
implementation that in your ARM board.
You can try other example with no callback and does it also crash.
Tuukka
Hi,
I verified playing 30 sec long file and did not observe any crash
whereas patest_sine8 plays file for approx duration of 4 sec and then it
crashes.
Can you guide why patest1 also throws error.
Post by Tuukka Pasanen
Hello,
Can you check if it crashes with aplay (if you play something that is
longer)? Which kernel do you use?
Tuukka
Hi,
I made below modifications in *src/hostapi/alsa/pa_linux_alsa.c*
function *BuildDeviceList* to limit the *numDeviceNames = 1 *&
commenting* assert operation.*
*numDeviceNames = 1; //patch*
for( i = 0, devIdx = 0; i < numDeviceNames; ++i )
{
}
*//assert( devIdx < numDeviceNames ); //patch*
/* Now inspect 'dmix' and 'default' plugins */
After adding above 2 patches I can hear sound by running patest_sine8
but get crash dump after sometime. Also error is observed in patest1.
What other modifications to make it success for numDeviceNames = 1?
Attaching the debug for patest_sine8, patest1 & pa_devs for reference (
*patest_sine8_core_dump.txt*).
Post by Arjav Parikh
Hi,
I created /etc/asound.conf and ~/.asoundrc with below contents but
still observe the Segmentation Fault. I think if somehow we restrict
Portaudio to fetch details of only hw:0,0 then may be this Segmentation
Fault Issue could be resolved.
pcm.!default {
type hw
card 0
device 0
}
ctl.!default {
type hw
card 0
device 0
}
Post by Arjav Parikh
Hi,
I could not find the patch mentioned in the SVN. Raised the query on
Alsa MailList as well but no response from them. As per your another
suggestion I am trying to create alsarc file.
On Sat, Nov 3, 2018 at 1:26 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Did this one solved? Portaudio tries to find every ALSA devices
which is most of times what people want.
Tuukka
Hi,
As aplay works (I mean sound is heard) only on hw:0,0 and as cat
/proc/asound/pcm shows 0,0 with playback & capture interface then is it
possible in portaudio to fill device info only for hw:0,0 (i.e 1 device
which is working) instead of all 47 devices? Also in crash debugs we can
see that there is no address for hw:0,4 & hw:0,5.
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) : : playback 1 : capture 1
00-01: MultiMedia2 (*) : : playback 1 : capture 1
00-02: CS-Voice (*) : : playback 1 : capture 1
00-03: VoIP (*) : : playback 1 : capture 1
00-04: ULL (*) : : playback 1
00-05: Primary MI2S_RX Hostless (*) : : playback 1
00-06: INT_FM Hostless (*) : : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 : : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 : : capture 1
00-09: (Compress1) : : playback 1 : capture 1
00-10: AUXPCM Hostless (*) : : playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*) : : capture 1
00-12: MultiMedia5 (*) : : playback 1 : capture 1
00-13: Voice2 (*) : : playback 1 : capture 1
00-14: MultiMedia9 (*) : : playback 1 : capture 1
00-15: VoLTE (*) : : playback 1 : capture 1
00-16: VoWLAN (*) : : playback 1 : capture 1
00-17: INT_HFP_BT Hostless (*) : : playback 1 : capture 1
00-18: MultiMedia6 (*) : : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) : : capture 1
00-20: Listen 2 Audio Service (*) : : capture 1
00-21: Listen 3 Audio Service (*) : : capture 1
00-22: Listen 4 Audio Service (*) : : capture 1
00-23: Listen 5 Audio Service (*) : : capture 1
00-24: (Compress2) : : playback 1
00-25: QUAT_MI2S Hostless (*) : : playback 1
00-26: Senary_mi2s Capture snd-soc-dummy-dai-26 : : capture 1
00-27: (Compress3) : : playback 1
00-28: (Compress4) : : playback 1
00-29: (Compress5) : : playback 1
00-30: (Compress6) : : playback 1
00-31: (Compress7) : : playback 1
00-32: (Compress8) : : playback 1
00-33: (Compress9) : : playback 1
00-34: VoiceMMode1 (*) : : playback 1 : capture 1
00-35: VoiceMMode2 (*) : : playback 1 : capture 1
00-36: MultiMedia8 (*) : : playback 1 : capture 1
00-37: QCHAT (*) : : playback 1 : capture 1
00-38: (Compress10) : : capture 1
00-39: (Compress11) : : capture 1
00-40: (Compress12) : : capture 1
00-41: (Primary MI2S Playback) : : playback 1
00-42: (Secondary MI2S Playback) : : playback 1
00-43: (Tertiary MI2S Capture) : : capture 1
00-44: (Quaternary MI2S Playback) : : playback 1
00-45: (Quaternary MI2S Capture) : : capture 1
00-46: (AUX PCM Playback) : : playback 1
00-47: (AUX PCM Capture) : : capture 1
00-48: (Internal BT-SCO Playback) : : playback 1
00-49: (Internal BT-SCO Capture) : : capture 1
00-50: (Internal FM Playback) : : playback 1
00-51: (Internal FM Capture) : : capture 1
00-52: (AFE Playback) : : playback 1
00-53: (AFE Capture) : : capture 1
00-54: (Voice Uplink Capture) : : capture 1
00-55: (Voice Downlink Capture) : : capture 1
00-56: (Voice Farend Playback) : : playback 1
00-57: (Voice2 Farend Playback) : : playback 1
00-58: (Quinary MI2S Capture) : : capture 1
00-59: (Quinary MI2S Playback) : : playback 1
On Tue, Oct 30, 2018 at 1:14 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than Portaudio problem. If l read
list correctly 0,4 is ULL (what ever that is?) and 0,5 should be Primary
MI2S_RX Hostless (I2S Host?).
It would help to ask from ALSA IRC or mailing list why they crash
and if there is nothing to do (as they are reported automatically and can't
be probed to be crashing) then I think you need to make .alsarc but have no
idea which kind to prevent their appearance or use Pulseaudio/JACK if
possible.
Sincerely,
Tuukka
Hi,
As per your suggestion I tried aplay -D with multiple hw:0,....
aplay -D hw:0,0 /data/Haze.wav - File gets played and can hear
sound on speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav -
File does not get played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*
"If it works with aplay then there is some problem in portaudio." -
Does the about output confirms that problem is with alsa-lib?
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little Endian, Rate
44100 Hz, Mono
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171) - This parameter value changes with
every hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value changes with
every hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes with every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries to play something.
You can also test with hw:0,5 or make script loop and test until it doesn't
work or crash until hw:0,somethig. If it works with aplay then there is
some problem in portaudio.
Tuukka
Hi,
*aplay -D hw:0,4* do not output anything. This command as well as *aplay
-D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment.
This is yocto project.
On Mon, Oct 29, 2018 at 3:10 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume this is
Yocto or similar project.
Tuukka
Hi,
Actually after enabling alsa-utils with other options I could get
the output for aplay -L. Please find below the output for aplay -L and
aplay -l.
*/usr/bin # aplay -L*
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
MultiMedia1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 2: CS-Voice (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 5: Primary
MI2S_RX Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
AFE-PROXY RX msm-stub-rx-7 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 10: AUXPCM
Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia5 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 13: Voice2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia9 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 16: VoWLAN (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
INT_HFP_BT Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia6 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
QUAT_MI2S Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoiceMMode1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoiceMMode2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia8 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone
because the same code works on X86? As it is a audio sound card from
ZL38063 so it is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the
past I wrote a small demonstration program for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to playback a WAV file. It worked without
problems. The GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel
platform, then the source code was transferred to the Raspberry and
recompiled there, without any problems.
73 Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-11-13 08:26:53 UTC
Permalink
Hello,

Glibc 2.22 is new enough for Portaudio but if you have some shiny modern
dev board I don't know that or there is heck lot of uninitialized value
stuff like

==19409== Conditional jump or move depends on uninitialised value(s)
==19409==    at 0x488FA24: _snd_config_evaluate (conf.c:4272)
==19409==    by 0x488DFAF: snd_config_walk (conf.c:3999)
==19409==    by 0x488E063: snd_config_walk (conf.c:4006)
==19409==    by 0x488EDFB: snd_config_expand (conf.c:4769)
==19409==    by 0x488F0D7: snd_config_hook_load (conf.c:3492)
==19409==    by 0x489000B: snd_config_hooks_call (conf.c:3369)
==19409==    by 0x489000B: snd_config_hooks.constprop.29 (conf.c:3405)
==19409==    by 0x489062B: snd_config_update_r (conf.c:3818)
==19409==    by 0x4890A5F: snd_config_update (conf.c:3849)
==19409==    by 0x489B0E3: snd_ctl_open (control.c:973)
==19409==    by 0x40B97B: BuildDeviceList (pa_linux_alsa.c:1284)
==19409==    by 0x40F87B: PaAlsa_Initialize (pa_linux_alsa.c:766)
==19409==    by 0x404AF7: InitializeHostApis (pa_front.c:226)
==19409==    by 0x404AF7: Pa_Initialize (pa_front.c:374)
==19409==
==19409== Use of uninitialised value of size 8
==19409==    at 0x401520C: ??? (in /lib64/ld-2.22.so)
==19409==
==19409== Use of uninitialised value of size 8
==19409==    at 0x4015214: ??? (in /lib64/ld-2.22.so)
==19409==
==19409== Use of uninitialised value of size 8
==19409==    at 0x4015238: ??? (in /lib64/ld-2.22.so)
==19409==
==19409== Conditional jump or move depends on uninitialised value(s)
==19409==    at 0x48951EC: snd1_dlobj_cache_get (dlmisc.c:251)
==19409==    by 0x4899F4F: snd_ctl_open_conf (control.c:927)
==19409==    by 0x4899F4F: snd_ctl_open_noupdate (control.c:957)
==19409==    by 0x40B97B: BuildDeviceList (pa_linux_alsa.c:1284)
==19409==    by 0x40F87B: PaAlsa_Initialize (pa_linux_alsa.c:766)
==19409==    by 0x404AF7: InitializeHostApis (pa_front.c:226)
==19409==    by 0x404AF7: Pa_Initialize (pa_front.c:374)
==19409==    by 0x403FB7: main (patest1.c:125)

Which makes me little bit nervous as it sounds there is heavy leak
somewhere or it's just valgrind noise. Does valgrind aplay -L (list
devices) or playing with device that doesn't work produce same stuff in
valgrind.

Just trying to find if this is Kernel, ALSA or Portaudio stuff. Your
kernel is also little old but I assume you can't do nothing about it and
it shouldn't be issue. You can't test this I2CS with something like
RasPi 3 (Rasbian) and see if it behaves same.

What is version of ALSA?

Tuukka
Post by Arjav Parikh
Hi,
I used valgrind for patest_sine8 & patest1 binary. I see error related
to ld-2.22.so <http://ld-2.22.so>. Attached debugs for your reference.
Does Portaudio have any dependency on glibc version?
Hi,
gcc version is 4.9.3-r0 & glibc is 2.22-r0.
I will check for valgrind support for my build.
On Mon, Nov 5, 2018 at 6:16 PM Tuukka Pasanen
Hello,
If I can understand this correctly it crashes when it tries to
wake up thread thread after that . Ok you use older gcc also
and glibc?
You don't happen to have valgrind to test with because it's
more for situations like this.
Tuukka
Post by Arjav Parikh
Hi,
*Program received signal SIGABRT, Aborted.
[Switching to LWP 3630]
0x0000007f902b2d10 in raise () from /lib64/libc.so.6
(gdb) backtrace
#0  0x0000007f902b2d10 in raise () from /lib64/libc.so.6
#1  0x0000007f902b6a14 in abort () from /lib64/libc.so.6
#2  0x0000007f902b6a14 in abort () from /lib64/libc.so.6*
Is it something related to libc library used in my ARM board?
In case of patest1, I see errors like below. Am I missing
something?
Kernel Version: *3.18.71-perf*
Expression 'r' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2099
Host error description: Invalid argument
An error occured while using portaudio
 unanticipated host error.
 Error number: -22
 Error text: Invalid argument
 bye
On Mon, Nov 5, 2018 at 5:54 PM Tuukka Pasanen
Hello,
Can't say with that debug information as can't see where
it crashes and why it stops. If I have to make guess it's
something to do with threads and implementation that in
your ARM board.
You can try other example with no callback and does it
also crash.
Tuukka
Post by Arjav Parikh
Hi,
I verified playing 30 sec long file and did not observe
any crash whereas patest_sine8 plays file for approx
duration of 4 sec and then it crashes.
Can you guide why patest1 also throws error.
On Sun, Nov 4, 2018 at 10:39 PM Tuukka Pasanen
Hello,
Can you check if it crashes with aplay (if you play
something that is longer)? Which kernel do you use?
Tuukka
Post by Arjav Parikh
Hi,
I made below modifications in
*src/hostapi/alsa/pa_linux_alsa.c* function
*BuildDeviceList* to limit the *numDeviceNames = 1
*& commenting*assert operation.*
*numDeviceNames = 1; //patch*
for( i = 0, devIdx = 0; i < numDeviceNames; ++i )
    {
    }
*//assert( devIdx < numDeviceNames ); //patch*
    /* Now inspect 'dmix' and 'default' plugins */
After adding above 2 patches I can hear sound by
running patest_sine8 but get crash dump after
sometime. Also error is observed in patest1.
What other modifications to make it success for
numDeviceNames = 1?
Attaching the debug for patest_sine8, patest1 &
pa_devs for reference (*patest_sine8_core_dump.txt*).
On Sat, Nov 3, 2018 at 3:40 PM Arjav Parikh
Hi,
I created /etc/asound.conf and ~/.asoundrc with
below contents but still observe the
Segmentation Fault. I think if somehow we
restrict Portaudio to fetch details of only
hw:0,0 then may be this Segmentation Fault
Issue could be resolved.
pcm.!default {
        type hw
        card 0
        device 0
}
ctl.!default {
        type hw
        card 0
        device 0
}
On Sat, Nov 3, 2018 at 1:33 PM Arjav Parikh
Hi,
I could not find the patch mentioned in the
SVN. Raised the query on Alsa MailList as
well but no response from them. As per your
another suggestion I am trying to create
alsarc file.
On Sat, Nov 3, 2018 at 1:26 PM Tuukka
Hello,
Did this one solved? Portaudio tries to
find every ALSA devices which is most
of times what people want.
Tuukka
Post by Arjav Parikh
Hi,
As aplay works (I mean sound is heard)
only on hw:0,0 and as cat
/proc/asound/pcm shows 0,0 with
playback & capture interface then is
it possible in portaudio to fill
device info only for hw:0,0 (i.e 1
device which is working) instead of
all 47 devices? Also in crash debugs
we can see that there is no address
for hw:0,4 & hw:0,5. *
*
*
*
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) :  : playback 1
: capture 1
00-01: MultiMedia2 (*) :  : playback 1
: capture 1
capture 1
capture 1
00-04: ULL (*) :  : playback 1
00-05: Primary MI2S_RX Hostless (*) : 
: playback 1
00-06: INT_FM Hostless (*) :  : capture 1
playback 1
capture 1
capture 1
playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*)
:  : capture 1
00-12: MultiMedia5 (*) :  : playback 1
: capture 1
capture 1
00-14: MultiMedia9 (*) :  : playback 1
: capture 1
capture 1
capture 1
playback 1 : capture 1
00-18: MultiMedia6 (*) :  : playback 1
: capture 1
capture 1
capture 1
capture 1
capture 1
capture 1
00-24: (Compress2) : : playback 1
playback 1
00-26: Senary_mi2s Capture
snd-soc-dummy-dai-26 :  : capture 1
00-27: (Compress3) : : playback 1
00-28: (Compress4) : : playback 1
00-29: (Compress5) : : playback 1
00-30: (Compress6) : : playback 1
00-31: (Compress7) : : playback 1
00-32: (Compress8) : : playback 1
00-33: (Compress9) : : playback 1
00-34: VoiceMMode1 (*) :  : playback 1
: capture 1
00-35: VoiceMMode2 (*) :  : playback 1
: capture 1
00-36: MultiMedia8 (*) :  : playback 1
: capture 1
capture 1
00-38: (Compress10) :  : capture 1
00-39: (Compress11) :  : capture 1
00-40: (Compress12) :  : capture 1
playback 1
playback 1
capture 1
playback 1
capture 1
00-46: (AUX PCM Playback) :  : playback 1
00-47: (AUX PCM Capture) :  : capture 1
playback 1
capture 1
playback 1
capture 1
00-52: (AFE Playback) :  : playback 1
00-53: (AFE Capture) :  : capture 1
capture 1
capture 1
playback 1
playback 1
capture 1
playback 1
On Tue, Oct 30, 2018 at 1:14 PM Tuukka
Hello,
Yes this more ALSA and kernel than
Portaudio problem. If l read list
correctly 0,4 is ULL (what ever
that is?) and 0,5 should be
Primary MI2S_RX Hostless (I2S Host?).
It would help to ask from ALSA IRC
or mailing list why they crash and
if there is nothing to do (as they
are reported automatically and
can't be probed to be crashing)
then I think you need to make
.alsarc but have no idea which
kind to prevent their appearance
or use Pulseaudio/JACK if possible.
Sincerely,
Tuukka
On 29.10.2018 13.48, Arjav Parikh
Post by Arjav Parikh
Hi,
As per your suggestion I tried
aplay -D with multiple hw:0,....
options and below are the
aplay -D hw:0,0 /data/Haze.wav -
File gets played and can hear
sound on speaker.
aplay -D hw:0,1 /data/Haze.wav -
aplay -D hw:0,4 /data/Haze.wav -
File does not get played and
observe below output.
aplay -D hw:0,5 /data/Haze.wav -
*Segmentation fault*
"If it works with aplay then
there is some problem in
portaudio." - Does the about
output confirms that problem is
with alsa-lib?
aplay -D hw:0,1 /data/Haze.wav -
aplay -D hw:0,4 /data/Haze.wav
Signed 16 bit Little Endian, Rate
44100 Hz, Mono
aplay: set_params:1305: Unable to
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171)  -
This parameter value changes with
every hw:0,.. value
PERIOD_SIZE: 5520 - This
parameter value changes with
every hw:0,.. value
PERIOD_BYTES: 11040 - This
parameter value changes with
every hw:0,.. value
PERIODS: 4 - This parameter value
changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) -
This parameter value changes with
every hw:0,.. value
BUFFER_SIZE: 22080 - This
parameter value changes with
every hw:0,.. value
BUFFER_BYTES: 44160 - This
parameter value changes with
every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34 PM
Tuukka Pasanen
Hello,
Ok you should but some wav
after that it tries to play
something. You can also test
with hw:0,5 or make script
loop and test until it
doesn't work or crash until
hw:0,somethig. If it works
with aplay then there is some
problem in portaudio.
Tuukka
On 29.10.2018 12.38, Arjav
Post by Arjav Parikh
Hi,
*aplay -D hw:0,4* do not
output anything. This
command as well as *aplay -D
hw:0,0 *does not show any
output.
Yes aplay and other
components are compiled in
same environment. This is
yocto project.
On Mon, Oct 29, 2018 at 3:10
PM Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all
compiled with same
enviroment. I assume
this is Yocto or similar
project.
Tuukka
On 29.10.2018 7.26,
Post by Arjav Parikh
Hi,
Actually after enabling
alsa-utils with other
options I could get the
output for aplay -L.
Please find below the
output for aplay -L and
aplay -l.
*/usr/bin # aplay -L*
null
    Discard all samples
(playback) or generate
zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
    Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
    Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK
Hardware Devices ****
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 0: MultiMedia1
(*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 1: MultiMedia2
(*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 2: CS-Voice (*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 3: VoIP (*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 4: ULL (*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 5: Primary
MI2S_RX Hostless (*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 7: AFE-PROXY RX
msm-stub-rx-7 []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 10: AUXPCM
Hostless (*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 12: MultiMedia5
(*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 13: Voice2 (*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 14: MultiMedia9
(*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 15: VoLTE (*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 16: VoWLAN (*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 17: INT_HFP_BT
Hostless (*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 18: MultiMedia6
(*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 25: QUAT_MI2S
Hostless (*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 34: VoiceMMode1
(*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 35: VoiceMMode2
(*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 36: MultiMedia8
(*) []
  Subdevices: 1/1
subdevice #0
card 0: msm8953sndcardm
[msm8953-snd-card-mtp],
device 37: QCHAT (*) []
  Subdevices: 1/1
subdevice #0
On Sun, Oct 28, 2018 at
12:20 AM Alberto di
On 2018-10-27
17:00, Arjav Parikh
Post by Arjav Parikh
Is it possible to
check Portuadio on
ARM platform for
anyone because the
same code works on
X86? As it is a
audio sound card
from ZL38063 so it
is showing huge
amount of outputs.
I don't know if
this info can be of
any help to you,
but in the past I
wrote a small
demonstration
program for the
Raspberry Pi 3B,
under Raspbian,
that used Portaudio
to playback a WAV
file. It worked
without problems.
The GUI was written
in Free Pascal
using Lazarus, and
the processing
code, Portaudio
interfacing
included, in
straight C code.
The application was
firstly developed
and debugged under
Kubuntu on an Intel
platform, then the
source code was
transferred to the
Raspberry and
recompiled there,
without any problems.
73  Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Arjav Parikh
2018-11-14 06:17:44 UTC
Permalink
Hi,

I get similar logs as shared previously related to uninitialized value
stuff in *aplay -D hw:0,5 /data/Haze.wav* (This command used to throw
Segmentation Fault *valgrind_aplay_seg_fault.txt*) as well as *aplay -D
hw:0,0 /data/Haze.wav* (Working condition *valgrind_aplay_working.txt*) .
Attaching the debug for reference.
Also, the error observed on executing patest1 got resolved by providing the
properties related to MIC using tinymix utility.
Alsa build version and runtime version is 1.1.0

@Tuukka: I would like to thank you for the support provided due to which I
could get Alexa running on my board.
Post by Tuukka Pasanen
Hello,
Glibc 2.22 is new enough for Portaudio but if you have some shiny modern
dev board I don't know that or there is heck lot of uninitialized value
stuff like
==19409== Conditional jump or move depends on uninitialised value(s)
==19409== at 0x488FA24: _snd_config_evaluate (conf.c:4272)
==19409== by 0x488DFAF: snd_config_walk (conf.c:3999)
==19409== by 0x488E063: snd_config_walk (conf.c:4006)
==19409== by 0x488EDFB: snd_config_expand (conf.c:4769)
==19409== by 0x488F0D7: snd_config_hook_load (conf.c:3492)
==19409== by 0x489000B: snd_config_hooks_call (conf.c:3369)
==19409== by 0x489000B: snd_config_hooks.constprop.29 (conf.c:3405)
==19409== by 0x489062B: snd_config_update_r (conf.c:3818)
==19409== by 0x4890A5F: snd_config_update (conf.c:3849)
==19409== by 0x489B0E3: snd_ctl_open (control.c:973)
==19409== by 0x40B97B: BuildDeviceList (pa_linux_alsa.c:1284)
==19409== by 0x40F87B: PaAlsa_Initialize (pa_linux_alsa.c:766)
==19409== by 0x404AF7: InitializeHostApis (pa_front.c:226)
==19409== by 0x404AF7: Pa_Initialize (pa_front.c:374)
==19409==
==19409== Use of uninitialised value of size 8
==19409== at 0x401520C: ??? (in /lib64/ld-2.22.so)
==19409==
==19409== Use of uninitialised value of size 8
==19409== at 0x4015214: ??? (in /lib64/ld-2.22.so)
==19409==
==19409== Use of uninitialised value of size 8
==19409== at 0x4015238: ??? (in /lib64/ld-2.22.so)
==19409==
==19409== Conditional jump or move depends on uninitialised value(s)
==19409== at 0x48951EC: snd1_dlobj_cache_get (dlmisc.c:251)
==19409== by 0x4899F4F: snd_ctl_open_conf (control.c:927)
==19409== by 0x4899F4F: snd_ctl_open_noupdate (control.c:957)
==19409== by 0x40B97B: BuildDeviceList (pa_linux_alsa.c:1284)
==19409== by 0x40F87B: PaAlsa_Initialize (pa_linux_alsa.c:766)
==19409== by 0x404AF7: InitializeHostApis (pa_front.c:226)
==19409== by 0x404AF7: Pa_Initialize (pa_front.c:374)
==19409== by 0x403FB7: main (patest1.c:125)
Which makes me little bit nervous as it sounds there is heavy leak
somewhere or it's just valgrind noise. Does valgrind aplay -L (list
devices) or playing with device that doesn't work produce same stuff in
valgrind.
Just trying to find if this is Kernel, ALSA or Portaudio stuff. Your
kernel is also little old but I assume you can't do nothing about it and it
shouldn't be issue. You can't test this I2CS with something like RasPi 3
(Rasbian) and see if it behaves same.
What is version of ALSA?
Tuukka
Hi,
I used valgrind for patest_sine8 & patest1 binary. I see error related to
ld-2.22.so. Attached debugs for your reference.
Does Portaudio have any dependency on glibc version?
Post by Arjav Parikh
Hi,
gcc version is 4.9.3-r0 & glibc is 2.22-r0.
I will check for valgrind support for my build.
Post by Tuukka Pasanen
Hello,
If I can understand this correctly it crashes when it tries to wake up
thread thread after that . Ok you use older gcc also and glibc?
You don't happen to have valgrind to test with because it's more for
situations like this.
Tuukka
Hi,
*Program received signal SIGABRT, Aborted. [Switching to LWP 3630]
0x0000007f902b2d10 in raise () from /lib64/libc.so.6 (gdb) backtrace #0
0x0000007f902b2d10 in raise () from /lib64/libc.so.6 #1 0x0000007f902b6a14
in abort () from /lib64/libc.so.6 #2 0x0000007f902b6a14 in abort () from
/lib64/libc.so.6*
Is it something related to libc library used in my ARM board? In case of
patest1, I see errors like below. Am I missing something?
Kernel Version: *3.18.71-perf*
Expression 'r' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2099
Host error description: Invalid argument
An error occured while using portaudio
unanticipated host error.
Error number: -22
Error text: Invalid argument
bye
Post by Tuukka Pasanen
Hello,
Can't say with that debug information as can't see where it crashes and
why it stops. If I have to make guess it's something to do with threads and
implementation that in your ARM board.
You can try other example with no callback and does it also crash.
Tuukka
Hi,
I verified playing 30 sec long file and did not observe any crash
whereas patest_sine8 plays file for approx duration of 4 sec and then it
crashes.
Can you guide why patest1 also throws error.
On Sun, Nov 4, 2018 at 10:39 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Can you check if it crashes with aplay (if you play something that is
longer)? Which kernel do you use?
Tuukka
Hi,
I made below modifications in *src/hostapi/alsa/pa_linux_alsa.c*
function *BuildDeviceList* to limit the *numDeviceNames = 1 *&
commenting* assert operation.*
*numDeviceNames = 1; //patch*
for( i = 0, devIdx = 0; i < numDeviceNames; ++i )
{
}
*//assert( devIdx < numDeviceNames ); //patch*
/* Now inspect 'dmix' and 'default' plugins */
After adding above 2 patches I can hear sound by running patest_sine8
but get crash dump after sometime. Also error is observed in patest1.
What other modifications to make it success for numDeviceNames = 1?
Attaching the debug for patest_sine8, patest1 & pa_devs for reference (
*patest_sine8_core_dump.txt*).
Post by Arjav Parikh
Hi,
I created /etc/asound.conf and ~/.asoundrc with below contents but
still observe the Segmentation Fault. I think if somehow we restrict
Portaudio to fetch details of only hw:0,0 then may be this Segmentation
Fault Issue could be resolved.
pcm.!default {
type hw
card 0
device 0
}
ctl.!default {
type hw
card 0
device 0
}
Post by Arjav Parikh
Hi,
I could not find the patch mentioned in the SVN. Raised the query on
Alsa MailList as well but no response from them. As per your another
suggestion I am trying to create alsarc file.
On Sat, Nov 3, 2018 at 1:26 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Did this one solved? Portaudio tries to find every ALSA devices
which is most of times what people want.
Tuukka
Hi,
As aplay works (I mean sound is heard) only on hw:0,0 and as cat
/proc/asound/pcm shows 0,0 with playback & capture interface then is it
possible in portaudio to fill device info only for hw:0,0 (i.e 1 device
which is working) instead of all 47 devices? Also in crash debugs we can
see that there is no address for hw:0,4 & hw:0,5.
*cat /proc/asound/pcm*
00-00: MultiMedia1 (*) : : playback 1 : capture 1
00-01: MultiMedia2 (*) : : playback 1 : capture 1
00-02: CS-Voice (*) : : playback 1 : capture 1
00-03: VoIP (*) : : playback 1 : capture 1
00-04: ULL (*) : : playback 1
00-05: Primary MI2S_RX Hostless (*) : : playback 1
00-06: INT_FM Hostless (*) : : capture 1
00-07: AFE-PROXY RX msm-stub-rx-7 : : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8 : : capture 1
00-09: (Compress1) : : playback 1 : capture 1
00-10: AUXPCM Hostless (*) : : playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless (*) : : capture 1
00-12: MultiMedia5 (*) : : playback 1 : capture 1
00-13: Voice2 (*) : : playback 1 : capture 1
00-14: MultiMedia9 (*) : : playback 1 : capture 1
00-15: VoLTE (*) : : playback 1 : capture 1
00-16: VoWLAN (*) : : playback 1 : capture 1
00-17: INT_HFP_BT Hostless (*) : : playback 1 : capture 1
00-18: MultiMedia6 (*) : : playback 1 : capture 1
00-19: Listen 1 Audio Service (*) : : capture 1
00-20: Listen 2 Audio Service (*) : : capture 1
00-21: Listen 3 Audio Service (*) : : capture 1
00-22: Listen 4 Audio Service (*) : : capture 1
00-23: Listen 5 Audio Service (*) : : capture 1
00-24: (Compress2) : : playback 1
00-25: QUAT_MI2S Hostless (*) : : playback 1
00-26: Senary_mi2s Capture snd-soc-dummy-dai-26 : : capture 1
00-27: (Compress3) : : playback 1
00-28: (Compress4) : : playback 1
00-29: (Compress5) : : playback 1
00-30: (Compress6) : : playback 1
00-31: (Compress7) : : playback 1
00-32: (Compress8) : : playback 1
00-33: (Compress9) : : playback 1
00-34: VoiceMMode1 (*) : : playback 1 : capture 1
00-35: VoiceMMode2 (*) : : playback 1 : capture 1
00-36: MultiMedia8 (*) : : playback 1 : capture 1
00-37: QCHAT (*) : : playback 1 : capture 1
00-38: (Compress10) : : capture 1
00-39: (Compress11) : : capture 1
00-40: (Compress12) : : capture 1
00-41: (Primary MI2S Playback) : : playback 1
00-42: (Secondary MI2S Playback) : : playback 1
00-43: (Tertiary MI2S Capture) : : capture 1
00-44: (Quaternary MI2S Playback) : : playback 1
00-45: (Quaternary MI2S Capture) : : capture 1
00-46: (AUX PCM Playback) : : playback 1
00-47: (AUX PCM Capture) : : capture 1
00-48: (Internal BT-SCO Playback) : : playback 1
00-49: (Internal BT-SCO Capture) : : capture 1
00-50: (Internal FM Playback) : : playback 1
00-51: (Internal FM Capture) : : capture 1
00-52: (AFE Playback) : : playback 1
00-53: (AFE Capture) : : capture 1
00-54: (Voice Uplink Capture) : : capture 1
00-55: (Voice Downlink Capture) : : capture 1
00-56: (Voice Farend Playback) : : playback 1
00-57: (Voice2 Farend Playback) : : playback 1
00-58: (Quinary MI2S Capture) : : capture 1
00-59: (Quinary MI2S Playback) : : playback 1
On Tue, Oct 30, 2018 at 1:14 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Yes this more ALSA and kernel than Portaudio problem. If l read
list correctly 0,4 is ULL (what ever that is?) and 0,5 should be Primary
MI2S_RX Hostless (I2S Host?).
It would help to ask from ALSA IRC or mailing list why they crash
and if there is nothing to do (as they are reported automatically and can't
be probed to be crashing) then I think you need to make .alsarc but have no
idea which kind to prevent their appearance or use Pulseaudio/JACK if
possible.
Sincerely,
Tuukka
Hi,
As per your suggestion I tried aplay -D with multiple hw:0,....
aplay -D hw:0,0 /data/Haze.wav - File gets played and can hear
sound on speaker.
aplay -D hw:0,1 /data/Haze.wav - aplay -D hw:0,4 /data/Haze.wav -
File does not get played and observe below output.
aplay -D hw:0,5 /data/Haze.wav - *Segmentation fault*
"If it works with aplay then there is some problem in portaudio."
- Does the about output confirms that problem is with alsa-lib?
Playing WAVE '/data/Haze.wav' : Signed 16 bit Little Endian, Rate
44100 Hz, Mono
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170 125171) - This parameter value changes with
every hw:0,.. value
PERIOD_SIZE: 5520 - This parameter value changes with every hw:0,.. value
PERIOD_BYTES: 11040 - This parameter value changes with every hw:0,.. value
PERIODS: 4 - This parameter value changes with every hw:0,.. value
BUFFER_TIME: (500680 500681) - This parameter value changes with
every hw:0,.. value
BUFFER_SIZE: 22080 - This parameter value changes with every hw:0,.. value
BUFFER_BYTES: 44160 - This parameter value changes with every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Ok you should but some wav after that it tries to play something.
You can also test with hw:0,5 or make script loop and test until it doesn't
work or crash until hw:0,somethig. If it works with aplay then there is
some problem in portaudio.
Tuukka
Hi,
*aplay -D hw:0,4* do not output anything. This command as well
as *aplay -D hw:0,0 *does not show any output.
Yes aplay and other components are compiled in same environment.
This is yocto project.
On Mon, Oct 29, 2018 at 3:10 PM Tuukka Pasanen <
Post by Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all compiled with same enviroment. I assume this
is Yocto or similar project.
Tuukka
Hi,
Actually after enabling alsa-utils with other options I could
get the output for aplay -L. Please find below the output for aplay -L and
aplay -l.
*/usr/bin # aplay -L*
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
Default Audio Device
*/usr/bin # aplay -l*
**** List of PLAYBACK Hardware Devices ****
MultiMedia1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
CS-Voice (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 3: VoIP (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 4: ULL (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Primary MI2S_RX Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
AFE-PROXY RX msm-stub-rx-7 []
Subdevices: 1/1
Subdevice #0: subdevice #0
AUXPCM Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia5 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Voice2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia9 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 15: VoLTE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoWLAN (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
INT_HFP_BT Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia6 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
QUAT_MI2S Hostless (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoiceMMode1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
VoiceMMode2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
MultiMedia8 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: msm8953sndcardm [msm8953-snd-card-mtp], device 37: QCHAT (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Post by Arjav Parikh
Is it possible to check Portuadio on ARM platform for anyone
because the same code works on X86? As it is a audio sound card from
ZL38063 so it is showing huge amount of outputs.
I don't know if this info can be of any help to you, but in the
past I wrote a small demonstration program for the Raspberry Pi 3B, under
Raspbian, that used Portaudio to playback a WAV file. It worked without
problems. The GUI was written in Free Pascal using Lazarus, and the
processing code, Portaudio interfacing included, in straight C code. The
application was firstly developed and debugged under Kubuntu on an Intel
platform, then the source code was transferred to the Raspberry and
recompiled there, without any problems.
73 Alberto I2PHD
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
Tuukka Pasanen
2018-11-14 09:44:46 UTC
Permalink
Hello,

Nice to hear that. Good luck with Alexa.

Tuukka
Post by Arjav Parikh
Hi,
I get similar logs as shared previously related to uninitialized value
stuff in *aplay -D hw:0,5 /data/Haze.wav* (This command used to throw
Segmentation Fault *valgrind_aplay_seg_fault.txt*) as well as *aplay
-D hw:0,0 /data/Haze.wav* (Working condition
*valgrind_aplay_working.txt*) . Attaching the debug for reference.
Also, the error observed on executing patest1 got resolved by
providing the properties related to MIC using tinymix utility.
Alsa build version and runtime version is 1.1.0
@Tuukka: I would like to thank you for the support provided due to
which I could get Alexa running on my board.
On Tue, Nov 13, 2018 at 1:57 PM Tuukka Pasanen
Hello,
Glibc 2.22 is new enough for Portaudio but if you have some shiny
modern dev board I don't know that or there is heck lot of
uninitialized value stuff like
==19409== Conditional jump or move depends on uninitialised value(s)
==19409==    at 0x488FA24: _snd_config_evaluate (conf.c:4272)
==19409==    by 0x488DFAF: snd_config_walk (conf.c:3999)
==19409==    by 0x488E063: snd_config_walk (conf.c:4006)
==19409==    by 0x488EDFB: snd_config_expand (conf.c:4769)
==19409==    by 0x488F0D7: snd_config_hook_load (conf.c:3492)
==19409==    by 0x489000B: snd_config_hooks_call (conf.c:3369)
==19409==    by 0x489000B: snd_config_hooks.constprop.29 (conf.c:3405)
==19409==    by 0x489062B: snd_config_update_r (conf.c:3818)
==19409==    by 0x4890A5F: snd_config_update (conf.c:3849)
==19409==    by 0x489B0E3: snd_ctl_open (control.c:973)
==19409==    by 0x40B97B: BuildDeviceList (pa_linux_alsa.c:1284)
==19409==    by 0x40F87B: PaAlsa_Initialize (pa_linux_alsa.c:766)
==19409==    by 0x404AF7: InitializeHostApis (pa_front.c:226)
==19409==    by 0x404AF7: Pa_Initialize (pa_front.c:374)
==19409==
==19409== Use of uninitialised value of size 8
==19409==    at 0x401520C: ??? (in /lib64/ld-2.22.so
<http://ld-2.22.so>)
==19409==
==19409== Use of uninitialised value of size 8
==19409==    at 0x4015214: ??? (in /lib64/ld-2.22.so
<http://ld-2.22.so>)
==19409==
==19409== Use of uninitialised value of size 8
==19409==    at 0x4015238: ??? (in /lib64/ld-2.22.so
<http://ld-2.22.so>)
==19409==
==19409== Conditional jump or move depends on uninitialised value(s)
==19409==    at 0x48951EC: snd1_dlobj_cache_get (dlmisc.c:251)
==19409==    by 0x4899F4F: snd_ctl_open_conf (control.c:927)
==19409==    by 0x4899F4F: snd_ctl_open_noupdate (control.c:957)
==19409==    by 0x40B97B: BuildDeviceList (pa_linux_alsa.c:1284)
==19409==    by 0x40F87B: PaAlsa_Initialize (pa_linux_alsa.c:766)
==19409==    by 0x404AF7: InitializeHostApis (pa_front.c:226)
==19409==    by 0x404AF7: Pa_Initialize (pa_front.c:374)
==19409==    by 0x403FB7: main (patest1.c:125)
Which makes me little bit nervous as it sounds there is heavy leak
somewhere or it's just valgrind noise. Does valgrind aplay -L
(list devices) or playing with device that doesn't work produce
same stuff in valgrind.
Just trying to find if this is Kernel, ALSA or Portaudio stuff.
Your kernel is also little old but I assume you can't do nothing
about it and it shouldn't be issue. You can't test this I2CS with
something like RasPi 3 (Rasbian) and see if it behaves same.
What is version of ALSA?
Tuukka
Post by Arjav Parikh
Hi,
I used valgrind for patest_sine8 & patest1 binary. I see error
related to ld-2.22.so <http://ld-2.22.so>. Attached debugs for
your reference.
Does Portaudio have any dependency on glibc version?
On Mon, Nov 5, 2018 at 6:22 PM Arjav Parikh
Hi,
gcc version is 4.9.3-r0 & glibc is 2.22-r0.
I will check for valgrind support for my build.
On Mon, Nov 5, 2018 at 6:16 PM Tuukka Pasanen
Hello,
If I can understand this correctly it crashes when it
tries to wake up thread thread after that . Ok you use
older gcc also and glibc?
You don't happen to have valgrind to test with because
it's more for situations like this.
Tuukka
Post by Arjav Parikh
Hi,
*Program received signal SIGABRT, Aborted.
[Switching to LWP 3630]
0x0000007f902b2d10 in raise () from /lib64/libc.so.6
(gdb) backtrace
#0  0x0000007f902b2d10 in raise () from /lib64/libc.so.6
#1  0x0000007f902b6a14 in abort () from /lib64/libc.so.6
#2  0x0000007f902b6a14 in abort () from /lib64/libc.so.6*
Is it something related to libc library used in my ARM
board? In case of patest1, I see errors like below. Am I
missing something?
Kernel Version: *3.18.71-perf*
Expression 'r' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 2099
Host error description: Invalid argument
An error occured while using portaudio
 unanticipated host error.
 Error number: -22
 Error text: Invalid argument
 bye
On Mon, Nov 5, 2018 at 5:54 PM Tuukka Pasanen
Hello,
Can't say with that debug information as can't see
where it crashes and why it stops. If I have to make
guess it's something to do with threads and
implementation that in your ARM board.
You can try other example with no callback and does
it also crash.
Tuukka
Post by Arjav Parikh
Hi,
I verified playing 30 sec long file and did not
observe any crash whereas patest_sine8 plays file
for approx duration of 4 sec and then it crashes.
Can you guide why patest1 also throws error.
On Sun, Nov 4, 2018 at 10:39 PM Tuukka Pasanen
Hello,
Can you check if it crashes with aplay (if you
play something that is longer)? Which kernel do
you use?
Tuukka
Post by Arjav Parikh
Hi,
I made below modifications in
*src/hostapi/alsa/pa_linux_alsa.c* function
*BuildDeviceList* to limit the *numDeviceNames
= 1 *& commenting*assert operation.*
*numDeviceNames = 1; //patch*
for( i = 0, devIdx = 0; i < numDeviceNames; ++i )
    {
    }
*//assert( devIdx < numDeviceNames ); //patch*
    /* Now inspect 'dmix' and 'default' plugins */
After adding above 2 patches I can hear sound
by running patest_sine8 but get crash dump
after sometime. Also error is observed in patest1.
What other modifications to make it success
for numDeviceNames = 1?
Attaching the debug for patest_sine8, patest1
& pa_devs for reference
(*patest_sine8_core_dump.txt*).
On Sat, Nov 3, 2018 at 3:40 PM Arjav Parikh
Hi,
I created /etc/asound.conf and ~/.asoundrc
with below contents but still observe the
Segmentation Fault. I think if somehow we
restrict Portaudio to fetch details of
only hw:0,0 then may be this Segmentation
Fault Issue could be resolved.
pcm.!default {
        type hw
        card 0
        device 0
}
ctl.!default {
        type hw
        card 0
        device 0
}
On Sat, Nov 3, 2018 at 1:33 PM Arjav
Hi,
I could not find the patch mentioned
in the SVN. Raised the query on Alsa
MailList as well but no response from
them. As per your another suggestion I
am trying to create alsarc file.
On Sat, Nov 3, 2018 at 1:26 PM Tuukka
Hello,
Did this one solved? Portaudio
tries to find every ALSA devices
which is most of times what people
want.
Tuukka
On 31.10.2018 8.13, Arjav Parikh
Post by Arjav Parikh
Hi,
As aplay works (I mean sound is
heard) only on hw:0,0 and as cat
/proc/asound/pcm shows 0,0 with
playback & capture interface then
is it possible in portaudio to
fill device info only for hw:0,0
(i.e 1 device which is working)
instead of all 47 devices? Also
in crash debugs we can see that
there is no address for hw:0,4 &
hw:0,5. *
*
*
*
*cat /proc/asound/pcm*
playback 1 : capture 1
playback 1 : capture 1
00-02: CS-Voice (*) :  : playback
1 : capture 1
capture 1
00-04: ULL (*) :  : playback 1
00-05: Primary MI2S_RX Hostless
(*) :  : playback 1
capture 1
00-07: AFE-PROXY RX msm-stub-rx-7
:  : playback 1
00-08: AFE-PROXY TX msm-stub-tx-8
:  : capture 1
00-09: (Compress1) : : playback 1
: capture 1
playback 1 : capture 1
00-11: Tertiary MI2S_TX Hostless
(*) :  : capture 1
playback 1 : capture 1
00-13: Voice2 (*) :  : playback 1
: capture 1
playback 1 : capture 1
00-15: VoLTE (*) :  : playback 1
: capture 1
00-16: VoWLAN (*) :  : playback 1
: capture 1
00-17: INT_HFP_BT Hostless (*) : 
: playback 1 : capture 1
playback 1 : capture 1
00-19: Listen 1 Audio Service (*)
: : capture 1
00-20: Listen 2 Audio Service (*)
: : capture 1
00-21: Listen 3 Audio Service (*)
: : capture 1
00-22: Listen 4 Audio Service (*)
: : capture 1
00-23: Listen 5 Audio Service (*)
: : capture 1
00-24: (Compress2) : : playback 1
00-25: QUAT_MI2S Hostless (*) : 
: playback 1
00-26: Senary_mi2s Capture
snd-soc-dummy-dai-26 :  : capture 1
00-27: (Compress3) : : playback 1
00-28: (Compress4) : : playback 1
00-29: (Compress5) : : playback 1
00-30: (Compress6) : : playback 1
00-31: (Compress7) : : playback 1
00-32: (Compress8) : : playback 1
00-33: (Compress9) : : playback 1
playback 1 : capture 1
playback 1 : capture 1
playback 1 : capture 1
00-37: QCHAT (*) :  : playback 1
: capture 1
00-38: (Compress10) :  : capture 1
00-39: (Compress11) :  : capture 1
00-40: (Compress12) :  : capture 1
00-41: (Primary MI2S Playback) : 
: playback 1
00-42: (Secondary MI2S Playback)
:  : playback 1
00-43: (Tertiary MI2S Capture) : 
: capture 1
00-44: (Quaternary MI2S Playback)
:  : playback 1
00-45: (Quaternary MI2S Capture)
:  : capture 1
playback 1
capture 1
00-48: (Internal BT-SCO Playback)
:  : playback 1
00-49: (Internal BT-SCO Capture)
:  : capture 1
00-50: (Internal FM Playback) : 
: playback 1
capture 1
00-52: (AFE Playback) :  : playback 1
00-53: (AFE Capture) :  : capture 1
00-54: (Voice Uplink Capture) : 
: capture 1
00-55: (Voice Downlink Capture)
:  : capture 1
00-56: (Voice Farend Playback) : 
: playback 1
00-57: (Voice2 Farend Playback)
:  : playback 1
00-58: (Quinary MI2S Capture) : 
: capture 1
00-59: (Quinary MI2S Playback) : 
: playback 1
On Tue, Oct 30, 2018 at 1:14 PM
Tuukka Pasanen
Hello,
Yes this more ALSA and kernel
than Portaudio problem. If l
read list correctly 0,4 is
ULL (what ever that is?) and
0,5 should be Primary MI2S_RX
Hostless (I2S Host?).
It would help to ask from
ALSA IRC or mailing list why
they crash and if there is
nothing to do (as they are
reported automatically and
can't be probed to be
crashing) then I think you
need to make .alsarc but have
no idea which kind to prevent
their appearance or use
Pulseaudio/JACK if possible.
Sincerely,
Tuukka
On 29.10.2018 13.48, Arjav
Post by Arjav Parikh
Hi,
As per your suggestion I
tried aplay -D with multiple
hw:0,.... options and below
aplay -D hw:0,0
/data/Haze.wav - File gets
played and can hear sound on
speaker.
aplay -D hw:0,1
/data/Haze.wav - aplay -D
hw:0,4 /data/Haze.wav - File
does not get played and
observe below output.
aplay -D hw:0,5
/data/Haze.wav -
*Segmentation fault*
"If it works with aplay then
there is some problem in
portaudio." - Does the about
output confirms that problem
is with alsa-lib?
aplay -D hw:0,1
/data/Haze.wav - aplay -D
Playing WAVE
'/data/Haze.wav' : Signed 16
bit Little Endian, Rate
44100 Hz, Mono
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 44100
PERIOD_TIME: (125170
125171)  - This parameter
value changes with every
hw:0,.. value
PERIOD_SIZE: 5520 - This
parameter value changes with
every hw:0,.. value
PERIOD_BYTES: 11040 - This
parameter value changes with
every hw:0,.. value
PERIODS: 4 - This parameter
value changes with every
hw:0,.. value
BUFFER_TIME: (500680 500681)
- This parameter value
changes with every hw:0,.. value
BUFFER_SIZE: 22080 - This
parameter value changes with
every hw:0,.. value
BUFFER_BYTES: 44160 - This
parameter value changes with
every hw:0,.. value
TICK_TIME: 0
On Mon, Oct 29, 2018 at 4:34
PM Tuukka Pasanen
Hello,
Ok you should but some
wav after that it tries
to play something. You
can also test with
hw:0,5 or make script
loop and test until it
doesn't work or crash
until hw:0,somethig. If
it works with aplay then
there is some problem in
portaudio.
Tuukka
On 29.10.2018 12.38,
Post by Arjav Parikh
Hi,
*aplay -D hw:0,4* do
not output anything.
This command as well as
*aplay -D hw:0,0 *does
not show any output.
Yes aplay and other
components are compiled
in same environment.
This is yocto project.
On Mon, Oct 29, 2018 at
3:10 PM Tuukka Pasanen
Hello,
Sorry wrong button..
Are aplay and all
compiled with same
enviroment. I
assume this is
Yocto or similar
project.
Tuukka
On 29.10.2018 7.26,
Post by Arjav Parikh
Hi,
Actually after
enabling
alsa-utils with
other options I
could get the
output for aplay
-L. Please find
below the output
for aplay -L and
aplay -l.
*/usr/bin # aplay -L*
null
    Discard all
samples (playback)
or generate zero
samples (capture)
default:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
    Default Audio
Device
sysdefault:CARD=msm8953sndcardm
msm8953-snd-card-mtp,
    Default Audio
Device
*/usr/bin # aplay -l*
**** List of
PLAYBACK Hardware
Devices ****
msm8953sndcardm
[msm8953-snd-card-mtp],
MultiMedia1 (*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
MultiMedia2 (*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
device 2: CS-Voice
(*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
device 3: VoIP (*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
device 4: ULL (*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
device 5: Primary
MI2S_RX Hostless
(*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
AFE-PROXY RX
msm-stub-rx-7 []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
device 10: AUXPCM
Hostless (*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
MultiMedia5 (*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
device 13: Voice2
(*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
MultiMedia9 (*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
device 15: VoLTE
(*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
device 16: VoWLAN
(*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
INT_HFP_BT
Hostless (*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
MultiMedia6 (*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
QUAT_MI2S Hostless
(*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
VoiceMMode1 (*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
VoiceMMode2 (*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
MultiMedia8 (*) []
  Subdevices: 1/1
subdevice #0
msm8953sndcardm
[msm8953-snd-card-mtp],
device 37: QCHAT
(*) []
  Subdevices: 1/1
subdevice #0
On Sun, Oct 28,
2018 at 12:20 AM
Alberto di Bene
On 2018-10-27
17:00, Arjav
Post by Arjav Parikh
Is it
possible to
check
Portuadio on
ARM platform
for anyone
because the
same code
works on X86?
As it is a
audio sound
card from
ZL38063 so it
is showing
huge amount
of outputs.
I don't know
if this info
can be of any
help to you,
but in the
past I wrote a
small
demonstration
program for
the Raspberry
Pi 3B, under
Raspbian, that
used Portaudio
to playback a
WAV file. It
worked without
problems. The
GUI was
written in
Free Pascal
using Lazarus,
and the
processing
code,
Portaudio
interfacing
included, in
straight C
code. The
application
was firstly
developed and
debugged under
Kubuntu on an
Intel
platform, then
the source
code was
transferred to
the Raspberry
and recompiled
there, without
any problems.
73  Alberto I2PHD
_______________________________________________
Portaudio
mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Thanks & Regards,
Arjav Parikh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Loading...