[Portaudio] Portaudio Test fails on ARM

Arjav Parikh parikharjav24 at gmail.com
Sat Nov 3 07:44:35 EDT 2018


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 <parikharjav24 at gmail.com> wrote:

> 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 <parikharjav24 at gmail.com>
> wrote:
>
>> 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 <pasanen.tuukka at gmail.com>
>> wrote:
>>
>>> 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 wrote:
>>>
>>> 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 <pasanen.tuukka at gmail.com>
>>> wrote:
>>>
>>>> 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 wrote:
>>>>
>>>> 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
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Mon, Oct 29, 2018 at 4:34 PM Tuukka Pasanen <
>>>> pasanen.tuukka at gmail.com> wrote:
>>>>
>>>>> 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 Parikh wrote:
>>>>>
>>>>> 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 <
>>>>> pasanen.tuukka at gmail.com> wrote:
>>>>>
>>>>>> 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 wrote:
>>>>>>
>>>>>> 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 <dibene at usa.net>
>>>>>> wrote:
>>>>>>
>>>>>>> On 2018-10-27 17:00, Arjav Parikh wrote:
>>>>>>>
>>>>>>>
>>>>>>> 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
>>>>>>> Portaudio at lists.columbia.edu
>>>>>>> https://lists.columbia.edu/mailman/listinfo/portaudio
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thanks & Regards,
>>>>>> Arjav Parikh
>>>>>>
>>>>>> _______________________________________________
>>>>>> Portaudio mailing listPortaudio at lists.columbia.eduhttps://lists.columbia.edu/mailman/listinfo/portaudio
>>>>>>
>>>>>> _______________________________________________
>>>>>> Portaudio mailing list
>>>>>> Portaudio at lists.columbia.edu
>>>>>> https://lists.columbia.edu/mailman/listinfo/portaudio
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks & Regards,
>>>>> Arjav Parikh
>>>>>
>>>>> _______________________________________________
>>>>> Portaudio mailing listPortaudio at lists.columbia.eduhttps://lists.columbia.edu/mailman/listinfo/portaudio
>>>>>
>>>>> _______________________________________________
>>>>> Portaudio mailing list
>>>>> Portaudio at lists.columbia.edu
>>>>> https://lists.columbia.edu/mailman/listinfo/portaudio
>>>>
>>>>
>>>>
>>>> --
>>>> Thanks & Regards,
>>>> Arjav Parikh
>>>>
>>>> _______________________________________________
>>>> Portaudio mailing listPortaudio at lists.columbia.eduhttps://lists.columbia.edu/mailman/listinfo/portaudio
>>>>
>>>> _______________________________________________
>>>> Portaudio mailing list
>>>> Portaudio at lists.columbia.edu
>>>> https://lists.columbia.edu/mailman/listinfo/portaudio
>>>
>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Arjav Parikh
>>>
>>> _______________________________________________
>>> Portaudio mailing listPortaudio at lists.columbia.eduhttps://lists.columbia.edu/mailman/listinfo/portaudio
>>>
>>> _______________________________________________
>>> Portaudio mailing list
>>> Portaudio at lists.columbia.edu
>>> https://lists.columbia.edu/mailman/listinfo/portaudio
>>
>>
>>
>> --
>> Thanks & Regards,
>> Arjav Parikh
>>
>
>
> --
> Thanks & Regards,
> Arjav Parikh
>


-- 
Thanks & Regards,
Arjav Parikh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.columbia.edu/pipermail/portaudio/attachments/20181103/4b8f4b8a/attachment-0001.html>
-------------- next part --------------
/data/alexa/portaudio # ./patest1
patest1.c
Ring modulate input for 20 seconds.
before paHostApiInitializers[0].
ALSA version (build): 1.1.0
ALSA version (runtime): 1.1.0
BuildDeviceList: Ignoring ALSA plugin device [cards] of type [unknown]
BuildDeviceList: Found plugin [sysdefault] of type [unknown]
BuildDeviceList: Found plugin [front] of type [unknown]
BuildDeviceList: Found plugin [rear] of type [unknown]
BuildDeviceList: Found plugin [center_lfe] of type [unknown]
BuildDeviceList: Found plugin [side] of type [unknown]
BuildDeviceList: Found plugin [surround21] of type [unknown]
BuildDeviceList: Found plugin [surround40] of type [unknown]
BuildDeviceList: Found plugin [surround41] of type [unknown]
BuildDeviceList: Found plugin [surround50] of type [unknown]
BuildDeviceList: Found plugin [surround51] of type [unknown]
BuildDeviceList: Found plugin [surround71] of type [unknown]
BuildDeviceList: Found plugin [iec958] of type [unknown]
BuildDeviceList: Found plugin [spdif] of type [unknown]
BuildDeviceList: Found plugin [hdmi] of type [unknown]
BuildDeviceList: Found plugin [dmix] of type [unknown]
BuildDeviceList: Ignoring ALSA plugin device [dsnoop] of type [unknown]
BuildDeviceList: Found plugin [modem] of type [unknown]
BuildDeviceList: Found plugin [phoneline] of type [unknown]
BuildDeviceList: Ignoring ALSA plugin device [hw] of type [hw]
BuildDeviceList: Ignoring ALSA plugin device [plughw] of type [plug]
BuildDeviceList: Ignoring ALSA plugin device [plug] of type [plug]
BuildDeviceList: Ignoring ALSA plugin device [shm] of type [shm]
BuildDeviceList: Ignoring ALSA plugin device [tee] of type [file]
BuildDeviceList: Ignoring ALSA plugin device [file] of type [file]
BuildDeviceList: Ignoring ALSA plugin device [null] of type [null]
BuildDeviceList: Found plugin [default] of type [hw]
BuildDeviceList: Filling device info for 47 devices
BuildDeviceList: VVDN numDeviceNames: 1 
FillInDevInfo: Filling device info for: msm8953-snd-card-mtp: - (hw:0,0)
GropeDevice: collecting info ..
GropeDevice: collecting info ..
Default input device: msm8953-snd-card-mtp: - (hw:0,0)
Default output device: msm8953-snd-card-mtp: - (hw:0,0)
FillInDevInfo: Adding device msm8953-snd-card-mtp: - (hw:0,0): 0
BuildDeviceList: Building device list took 0.026095 seconds
after paHostApiInitializers[0].
PaAlsaStreamComponent_Initialize: Host Chans C 2
AlsaOpen: Opening device hw:0,0
PaAlsaStreamComponent_Initialize: Host Chans P 2
AlsaOpen: Opening device hw:0,0
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_INTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_NONINTERLEAVED: NO
PaAlsaStreamComponent_InitialConfigure: device can MMAP: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_INTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_NONINTERLEAVED: NO
PaAlsaStreamComponent_InitialConfigure: device can MMAP: YES
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (frames)           = 512
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (sec)              = 0.011610
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested latency (sec)        = 0.005805
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (frames) = 1024
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (sec)    = 0.023220
PaAlsaStreamComponent_DetermineFramesPerBuffer: periods min = 2, max = 8, req = 4 
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer period   = 512 
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum          = 64
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period maximum          = 10240
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period             = 512
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period latency     = 0.011610
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S24_3LE
SUBFORMAT:  STD
SAMPLE_BITS: 24
FRAME_BITS: 48
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (11609 11610)
PERIOD_SIZE: 512
PERIOD_BYTES: 3072
PERIODS: 2
BUFFER_TIME: (23219 23220)
BUFFER_SIZE: 1024
BUFFER_BYTES: 6144
TICK_TIME: 0
Expression 'r' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2099
Host error description: Invalid argument
Expression 'PaAlsaStreamComponent_FinishConfigure( &self->capture, hwParamsCapture, inParams, self->primeBuffers, realSr, inputLatency )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2733
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2845
OpenStream: Stream in error, terminating
TerminateHostApis in 
TerminateHostApis out
An error occured while using portaudio
 unanticipated host error.
 Error number: -22
 Error text: Invalid argument
bye


/data/alexa/portaudio # ./pa_devs 
before paHostApiInitializers[0].
ALSA version (build): 1.1.0
ALSA version (runtime): 1.1.0
BuildDeviceList: Ignoring ALSA plugin device [cards] of type [unknown]
BuildDeviceList: Found plugin [sysdefault] of type [unknown]
BuildDeviceList: Found plugin [front] of type [unknown]
BuildDeviceList: Found plugin [rear] of type [unknown]
BuildDeviceList: Found plugin [center_lfe] of type [unknown]
BuildDeviceList: Found plugin [side] of type [unknown]
BuildDeviceList: Found plugin [surround21] of type [unknown]
BuildDeviceList: Found plugin [surround40] of type [unknown]
BuildDeviceList: Found plugin [surround41] of type [unknown]
BuildDeviceList: Found plugin [surround50] of type [unknown]
BuildDeviceList: Found plugin [surround51] of type [unknown]
BuildDeviceList: Found plugin [surround71] of type [unknown]
BuildDeviceList: Found plugin [iec958] of type [unknown]
BuildDeviceList: Found plugin [spdif] of type [unknown]
BuildDeviceList: Found plugin [hdmi] of type [unknown]
BuildDeviceList: Found plugin [dmix] of type [unknown]
BuildDeviceList: Ignoring ALSA plugin device [dsnoop] of type [unknown]
BuildDeviceList: Found plugin [modem] of type [unknown]
BuildDeviceList: Found plugin [phoneline] of type [unknown]
BuildDeviceList: Ignoring ALSA plugin device [hw] of type [hw]
BuildDeviceList: Ignoring ALSA plugin device [plughw] of type [plug]
BuildDeviceList: Ignoring ALSA plugin device [plug] of type [plug]
BuildDeviceList: Ignoring ALSA plugin device [shm] of type [shm]
BuildDeviceList: Ignoring ALSA plugin device [tee] of type [file]
BuildDeviceList: Ignoring ALSA plugin device [file] of type [file]
BuildDeviceList: Ignoring ALSA plugin device [null] of type [null]
BuildDeviceList: Found plugin [default] of type [hw]
BuildDeviceList: Filling device info for 47 devices
BuildDeviceList: VVDN numDeviceNames: 1 
FillInDevInfo: Filling device info for: msm8953-snd-card-mtp: - (hw:0,0)
GropeDevice: collecting info ..
GropeDevice: collecting info ..
Default input device: msm8953-snd-card-mtp: - (hw:0,0)
Default output device: msm8953-snd-card-mtp: - (hw:0,0)
FillInDevInfo: Adding device msm8953-snd-card-mtp: - (hw:0,0): 0
BuildDeviceList: Building device list took 0.027210 seconds
after paHostApiInitializers[0].
PortAudio version: 0x00130600
Version text: 'PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 1
--------------------------------------- device #0
[ Default Input, Default Output ]
Name                        = msm8953-snd-card-mtp: - (hw:0,0)
Host API                    = ALSA
Max inputs = 8, Max outputs = 8
Default low input latency   =   0.0058
Default low output latency  =   0.0058
Default high input latency  =   0.0348
Default high output latency =   0.0348
Default sample rate         = 44100.00
Supported standard sample rates
 for half-duplex 16 bit 8 channel input = 
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
None
Supported standard sample rates
 for half-duplex 16 bit 8 channel output = 
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
	 8000.00, 11025.00, 12000.00, 16000.00,
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
	22050.00, 24000.00, 32000.00, 44100.00,
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
	48000.00, 88200.00, 96000.00, 192000.00
Supported standard sample rates
 for full-duplex 16 bit 8 channel input, 8 channel output = 
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
AlsaOpen: Opening device hw:0,0
None
TerminateHostApis in 
TerminateHostApis out
----------------------------------------------


/data/alexa/portaudio # ./patest_sine8
PortAudio Test: output signed 8 bit sine wave.
before paHostApiInitializers[0].
ALSA version (build): 1.1.0
ALSA version (runtime): 1.1.0
BuildDeviceList: Ignoring ALSA plugin device [cards] of type [unknown]
BuildDeviceList: Found plugin [sysdefault] of type [unknown]
BuildDeviceList: Found plugin [front] of type [unknown]
BuildDeviceList: Found plugin [rear] of type [unknown]
BuildDeviceList: Found plugin [center_lfe] of type [unknown]
BuildDeviceList: Found plugin [side] of type [unknown]
BuildDeviceList: Found plugin [surround21] of type [unknown]
BuildDeviceList: Found plugin [surround40] of type [unknown]
BuildDeviceList: Found plugin [surround41] of type [unknown]
BuildDeviceList: Found plugin [surround50] of type [unknown]
BuildDeviceList: Found plugin [surround51] of type [unknown]
BuildDeviceList: Found plugin [surround71] of type [unknown]
BuildDeviceList: Found plugin [iec958] of type [unknown]
BuildDeviceList: Found plugin [spdif] of type [unknown]
BuildDeviceList: Found plugin [hdmi] of type [unknown]
BuildDeviceList: Found plugin [dmix] of type [unknown]
BuildDeviceList: Ignoring ALSA plugin device [dsnoop] of type [unknown]
BuildDeviceList: Found plugin [modem] of type [unknown]
BuildDeviceList: Found plugin [phoneline] of type [unknown]
BuildDeviceList: Ignoring ALSA plugin device [hw] of type [hw]
BuildDeviceList: Ignoring ALSA plugin device [plughw] of type [plug]
BuildDeviceList: Ignoring ALSA plugin device [plug] of type [plug]
BuildDeviceList: Ignoring ALSA plugin device [shm] of type [shm]
BuildDeviceList: Ignoring ALSA plugin device [tee] of type [file]
BuildDeviceList: Ignoring ALSA plugin device [file] of type [file]
BuildDeviceList: Ignoring ALSA plugin device [null] of type [null]
BuildDeviceList: Found plugin [default] of type [hw]
BuildDeviceList: Filling device info for 47 devices
BuildDeviceList: VVDN numDeviceNames: 1 
FillInDevInfo: Filling device info for: msm8953-snd-card-mtp: - (hw:0,0)
GropeDevice: collecting info ..
GropeDevice: collecting info ..
Default input device: msm8953-snd-card-mtp: - (hw:0,0)
Default output device: msm8953-snd-card-mtp: - (hw:0,0)
FillInDevInfo: Adding device msm8953-snd-card-mtp: - (hw:0,0): 0
BuildDeviceList: Building device list took 0.022784 seconds
after paHostApiInitializers[0].
PaAlsaStreamComponent_Initialize: Host Chans P 2
AlsaOpen: Opening device hw:0,0
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_INTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP SND_PCM_ACCESS_MMAP_NONINTERLEAVED: NO
PaAlsaStreamComponent_InitialConfigure: device can MMAP: YES
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (frames)           = 256
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (sec)              = 0.005805
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested latency (sec)        = 0.005805
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (frames) = 512
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (sec)    = 0.011610
PaAlsaStreamComponent_DetermineFramesPerBuffer: periods min = 2, max = 8, req = 4 
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer period   = 256 
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum          = 32
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period maximum          = 15360
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period             = 256
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period latency     = 0.005805
PaAlsaStream_Configure: Playback period size: 256, latency: 0.005805
OpenStream: Stream: framesPerBuffer = 256, maxFramesPerHostBuffer = 256, latency i=0.000000, o=0.005805
PaUnixThread_New: Waited for 0.00500131 seconds for stream to start
Stopping Stream.
Stopping callback
PaUnixThread_Terminate: Joining thread -1956150832
Setting callbackResult to paComplete
OnExit: Stopping ALSA handles
AlsaStop: Dropped frames
OnExit: Stoppage
CallbackThreadFunc: Thread -1956150832 exiting
 Aborted (core dumped)


More information about the Portaudio mailing list