View Single Post
Old 06-01-2016, 01:16 PM   #124
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by knc1 View Post
[...]
Note 3:
It would be nice to play with this, to see if the OTG dongle support recently added to the silent Kindles could be made to support the microphone input. [...]
Okay, I did a test on my PW3 -- a KUAL extension that displays some audio stats, then attempts to record 10 seconds, and then play it back. Not successful. The script exited almost immediately, before it had time to record anything. Here is the script I launched from KUAL:
PHP Code:
root@kindle /]# cat /mnt/us/extensions/gmecho/bin/gmecho.sh
#!/bin/sh
(
echo 
" #> cat /proc/asound/cards"
cat /proc/asound/cards
echo " #> arecord -l"
arecord -l
echo " #> arecord -d 10 /tmp/test-mic.wav"
arecord -d 10 /tmp/test-mic.wav
echo " #> aplay /tmp/test-mic.wav"
aplay /tmp/test-mic.wav
) > /mnt/us/gmecho.log 2>&1

[root@kindle /]

When that script was run from KUAL (after my PW3 stopped complaining about the missing voice file), with a headset and microphone inserted into the USB dongle, it created this log file:
PHP Code:
[root@kindle root]# cat /mnt/us/gmecho.log
 #> cat /proc/asound/cards
 
[Set            ]: USB-Audio USB Headphone Set
                      USB Headphone Set at usb
-fsl-ehci.0-1full speed
 
#> arecord -l
**** List of CAPTURE Hardware Devices ****
card 0Set [USB Headphone Set], device 0USB Audio [USB Audio]
  
Subdevices1/1
  Subdevice 
#0: subdevice #0
 #> arecord -d 10 /tmp/test-mic.wav
Recording WAVE '/tmp/test-mic.wav' Unsigned 8 bitRate 8000 HzMono
Aborted by signal Terminated
...
 
#> aplay /tmp/test-mic.wav
ALSA lib confmisc.c:768:(parse_cardcannot find card '0'
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_card_driver returned errorNo such file or directory
ALSA lib confmisc
.c:392:(snd_func_concaterror evaluating strings
ALSA lib conf
.c:4154:(_snd_config_evaluate) function snd_func_concat returned errorNo such file or directory
ALSA lib confmisc
.c:1251:(snd_func_refererror evaluating name
ALSA lib conf
.c:4154:(_snd_config_evaluate) function snd_func_refer returned errorNo such file or directory
ALSA lib conf
.c:4633:(snd_config_expandEvaluate errorNo such file or directory
ALSA lib pcm
.c:2211:(snd_pcm_open_noupdateUnknown PCM default
aplaymain:608audio open errorNo such file or directory
[root@kindle root]

When I run twobob's "Balsamic" demo (also from a KUAL extension), it does play audio (for awhile, before it segfaults on my PW3), but recording seems to not work, unless I need extra parameters on the "arecord" command...

EDIT: Though as you can see, "aplay" was complaining about "no sound card" before it whined about a missing sound file. So twoboob's Balsamic demo MUST be accessing the sound hardware differently than arecord and aplay, because his demo works. So perhaps we CAN get microphone input to work, using whatever "trick" twobob used to get sound output working on these USB dongles.

Last edited by geekmaster; 06-01-2016 at 01:35 PM.
geekmaster is offline   Reply With Quote