Topic: Audio Capture using PortAudio on Chumby8
Hello,
I'm porting a piece of software to chumby. It uses PortAudio as an abstraction layer to playback/capture audio.
I have compiled PortAudio on Chumby 8 (fw version 1.8.2) and compiled my software with the installed gcc toolchain.
Playing back audio works fine.
However, it can't capture audio samples, i.e. portaudio callback is never invoked. I'm capturing audio samples as 16 bits / 1 channel / 44100 Hz.
I'm using portaudio V19 (latest stable svn rev 1647) and the ALSA implementation that goes with fw 1.8.2 (i.e. didn't recompile it).
I did extract the ALSA header files from 1.8.1 from http://files.chumby.com/source/ using alsa-lib_1.0.23.tar.gz so portaudio could compile on chumby (ALSA header files were missing).
Portaudio even compiled with debug output doesn't complain or report issues: it just sits there and callback is not called.
The same code on any other linux distrib (like ubuntu) or embedded flavor (e.g. freescale eval boards) works just fine.
Do you know if something specific needs to be done to enable audio capture/record?
I have noted that when the control panel is NOT stopped, the callback is invoked, however the sample values don't look right: you get a bunch of samples with the same value (e.g. ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180, ffffc180).
Thanks!
Greg
--
additional information, here is the settings of amixer:
numid=2,iface=MIXER,name='Headphone Left Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=127,step=0
: values=105
| dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=3,iface=MIXER,name='Headphone Right Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=127,step=0
: values=105
| dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=9,iface=MIXER,name='Headphone Secondary Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=7,step=0
: values=7,7
| dBscale-min=-7.00dB,step=1.00dB,mute=0
numid=10,iface=MIXER,name='Headphone ZC Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=1,iface=MIXER,name='Headphone Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
: values=105,105
| dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=11,iface=MIXER,name='Mic Bias'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=17,iface=MIXER,name='ADC High Pass Filter Mode'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'Hi-fi'
; Item #1 'Voice 1'
; Item #2 'Voice 2'
; Item #3 'Voice 3'
: values=0
numid=16,iface=MIXER,name='ADC High Pass Filter Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=18,iface=MIXER,name='Capture Boost Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0
: values=2,2
| dBrange-
0x00000001,0x00000008,0x00000000,0x00000000,0x00000001,0x00000008,0x0000000d,0x00000000,0x00000001,0x00000008,0x00000014,0x00000000,0x00000001,0x00000008,0x0000001d,0x00000000,0xbf0534d0,0xbf0534d5,0xbf0534db,0xbf0534e3,0xbf0534e9,0xbf0534ef,0xbf0534f7,0xbf0534ff,
numid=21,iface=MIXER,name='Capture PGA Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=19,iface=MIXER,name='Capture PGA Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=62,step=0
: values=50,50
| dBscale-min=-23.25dB,step=0.75dB,mute=0
numid=20,iface=MIXER,name='Capture PGA ZC Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=8,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
: values=96,96
| dBscale-min=-72.00dB,step=0.75dB,mute=1
numid=15,iface=MIXER,name='DAC Deemphasis'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'None'
; Item #1 '32kHz'
; Item #2 '44.1kHz'
; Item #3 '48kHz'
: values=0
numid=14,iface=MIXER,name='DAC x128 OSR Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=13,iface=MIXER,name='Speaker AC Gain'
; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
: values=7
numid=6,iface=MIXER,name='Speaker Left Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=127,step=0
: values=114
| dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=7,iface=MIXER,name='Speaker Right Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=127,step=0
: values=114
| dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=5,iface=MIXER,name='Speaker Switch'
; type=BOOLEAN,access=rw---R--,values=2
: values=on,on
| dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=4,iface=MIXER,name='Speaker Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
: values=114,114
| dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=12,iface=MIXER,name='Speaker ZC Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on