0

While trying tinyalsa in Android 9.0 pcm_is_ready call fails as pcm->fd is < 0. This is because pcm->fd = open(fn, O_RDWR|O_NONBLOCK); open call is failing. And i have made selinux as permissive. and given chmod 777 -R to /dev/snd So how to solve this issue in android???

i have made selinux as permissive. and given chmod 777 -R to /dev/snd

Archie
  • 1
  • 1
  • I'd recommend, before you do anything else, to check `errno` if the `open` call fails. This way you'll have a little more information to work with. – Jan Krüger Apr 10 '19 at 11:53
  • errno is 13 which is permission denied.. – Archie Apr 11 '19 at 06:31
  • Hi Jan,when is check in /proc/asound and do cat /devices cat /cards cat /pcm all of them are fine. There is no issue. But when i do cat /dev/snd/pcmC0D0c it says File descriptor in bad state.. so how do i solve this issue – Archie Apr 11 '19 at 06:33
  • @Archie The device must be configured/prepared (with `ioctl()` system call) before read/write. That's why it is in bad state. TinyALSA handles this for you. – psqli Jun 09 '20 at 01:32

0 Answers0