[Portaudio] Portaudio "queries" on ARM

Ajay Garg ajaygargnsit at gmail.com
Sat Mar 31 13:34:19 EDT 2012


Thanks Alan.


a)
I built "portaudio" with "./configure --with-alsa=yes --with-jack=no
/prefix=/usr/"





b)
Checked the cards present on ARM.

###################################################################################
[olpc at xo-c5-b9-6c audacity-src-2.0.0]$ cat /proc/asound/cards

 0 [XO175          ]:  - OLPC XO-1.75

                      OLPC XO-1.75
###################################################################################





c)
Set the default audio devices (as seen by contents of "/etc/asound.conf")

###################################################################################
[olpc at xo-c5-b9-6c audacity-src-2.0.0]$ cat /etc/asound.conf

#

# Place your global alsa-lib configuration here...

#



defaults.ctl.card 0

defaults.pcm.card 0

defaults.timer.card 0
###################################################################################






d)
Checked "pa_devs". Now, it could see some audio device. Thanks Alan :-)

###################################################################################
[olpc at xo-c5-b9-6c audacity-src-2.0.0]$ ~/portaudio/portaudio/bin/pa_devs

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline

ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports
only playback stream

PortAudio version number = 1899

PortAudio version text = 'PortAudio V19-devel (built Mar 31 2012 22:22:33)'

Number of devices = 3

--------------------------------------- device #0

Name                        = OLPC XO-1.75:  (hw:0,0)

Host API                    = ALSA

Max inputs = 2, Max outputs = 2

Default low input latency   =   0.0116

Default low output latency  =   0.0107

Default high input latency  =   0.0464

Default high output latency =   0.0427

Default sample rate         = 48000.00

Supported standard sample rates

 for half-duplex 16 bit 2 channel input =

	 8000.00, 11025.00, 16000.00, 22050.00,

	32000.00, 44100.00, 48000.00, 88200.00,

	96000.00

Supported standard sample rates

 for half-duplex 16 bit 2 channel output =

	 8000.00, 11025.00, 16000.00, 22050.00,

	32000.00, 48000.00

Supported standard sample rates

 for full-duplex 16 bit 2 channel input, 2 channel output =

	 8000.00, 11025.00, 16000.00, 22050.00,

	32000.00, 48000.00

--------------------------------------- device #1

[ Default Input, Default Output ]

Name                        = default

Host API                    = ALSA

Max inputs = 128, Max outputs = 128

Default low input latency   =   0.0116

Default low output latency  =   0.0116

Default high input latency  =   0.0464

Default high output latency =   0.0464

Default sample rate         = 44100.00

Supported standard sample rates

 for half-duplex 16 bit 128 channel input =

	 8000.00,  9600.00, 11025.00, 12000.00,

	16000.00, 22050.00, 24000.00, 32000.00,

	44100.00, 48000.00, 88200.00, 96000.00,

	192000.00

Supported standard sample rates

 for half-duplex 16 bit 128 channel output =

	 8000.00,  9600.00, 11025.00, 12000.00,

	16000.00, 22050.00, 24000.00, 32000.00,

	44100.00, 48000.00, 88200.00, 96000.00,

	192000.00

Supported standard sample rates

 for full-duplex 16 bit 128 channel input, 128 channel output =

	 8000.00,  9600.00, 11025.00, 12000.00,

	16000.00, 22050.00, 24000.00, 32000.00,

	44100.00, 48000.00, 88200.00, 96000.00,

	192000.00

--------------------------------------- device #2

Name                        = dmix

Host API                    = ALSA

Max inputs = 0, Max outputs = 2

Default low input latency   =  -1.0000

Default low output latency  =   0.0427

Default high input latency  =  -1.0000

Default high output latency =   0.0427

Default sample rate         = 48000.00

Supported standard sample rates

 for half-duplex 16 bit 2 channel output =

	48000.00

----------------------------------------------
###################################################################################





e)
Checked "paex_sine". Now, it could see some audio device. Thanks Alan :-)

###################################################################################
[olpc at xo-c5-b9-6c audacity-src-2.0.0]$ ~/portaudio/portaudio/bin/paex_sine

PortAudio Test: output sine wave. SR = 44100, BufSize = 64

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline

ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports
only playback stream

Play for 5 seconds.

Stream Completed: No Message

Test finished.
###################################################################################





f)
Finally, checked audacity. UNFORTUNATELY, IT REFUSES TO BE MOVED :~ :~ :~

###################################################################################
[olpc at xo-c5-b9-6c audacity-src-2.0.0]$ ./audacity

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline

ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline

ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports
only playback stream

Cannot connect to server socket err = No such file or directory

Cannot connect to server socket

jack server is not running or cannot be started

Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1035

Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir,
&self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1192

Expression 'PaAlsaStreamComponent_Initialize( &self->playback,
alsaApi, outParams, StreamDirection_Out, NULL != callback )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1437

Expression 'PaAlsaStream_Initialize( stream, alsaHostApi,
inputParameters, outputParameters, sampleRate, framesPerBuffer,
callback, streamFlags, userData )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 2105

Expression 'stream->playback.pcm' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 3875

Expression 'stream->playback.pcm' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 3875

Expression 'stream->playback.pcm' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
###################################################################################

I STILL CANNOT GET TO "Import Audio".




Alan, I myself am a coder.
Any particular piece of code that you would like me to look into?




Regards,
Ajay


On Sat, Mar 31, 2012 at 9:42 PM, Alan Horstmann <gineera at aspect135.co.uk> wrote:
> Hi Ajay,
>
> On Saturday 31 March 2012 15:18, you wrote:
>> I was just following your procedure; checking out portaudio.
>> My ultimate aim is still to get the "Import Audio" feature working in
>> audacity.
>>
>> "aplay mp3>" works.
>
> Unless you *really* need it, don't use/build/worry about Jack.  Portaudio will
> use Alsa directly.  Leave them off your cc list too!
>
> Most of the Portaudio messages are harmless warnings, including
>
> "jack server is not running or cannot be started"
>
>
> However, when pa_devs reports
>
> "Number of devices = 0"
>
> It is explaining it has found no Alsa devices at all.  It is not going to work
> then.  Hence paex_sine says
>
> "Error: No default output device."
>
> Compile Portaudio without Jack support, then there will only be one set of
> warnings to analyse!
>
>> > Just a quick comment - what are you trying to get going?  Jack is not
>> > needed to use Portaudio (and in fact Portaudio-jack is believed rather
>> > buggy ATM). If you don't need Jack, leave it out - either compile without
>> > jack support or ignore the message when Portaudio initializes saying that
>> > jack is not running.  It is just probing for the api.
>
>
>  Alan


More information about the Portaudio mailing list