[Portaudio] Portaudio Test fails on ARM

Tuukka Pasanen pasanen.tuukka at gmail.com
Sun Nov 4 12:09:16 EST 2018


Hello,

Can you check if it crashes with aplay (if you play something that is 
longer)? Which kernel do you use?

Tuukka

On 3.11.2018 13.44, Arjav Parikh wrote:
> 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 
> <mailto: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 <mailto: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 <mailto: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
>>             <mailto: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
>>>                 <mailto: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
>>>>                     <mailto: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
>>>>>                         <mailto: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
>>>>>                             <mailto:Portaudio at lists.columbia.edu>
>>>>>                             https://lists.columbia.edu/mailman/listinfo/portaudio
>>>>>
>>>>>
>>>>>
>>>>>                         -- 
>>>>>                         Thanks & Regards,
>>>>>                         Arjav Parikh
>>>>>
>>>>>                         _______________________________________________
>>>>>                         Portaudio mailing list
>>>>>                         Portaudio at lists.columbia.edu  <mailto:Portaudio at lists.columbia.edu>
>>>>>                         https://lists.columbia.edu/mailman/listinfo/portaudio
>>>>                         _______________________________________________
>>>>                         Portaudio mailing list
>>>>                         Portaudio at lists.columbia.edu
>>>>                         <mailto:Portaudio at lists.columbia.edu>
>>>>                         https://lists.columbia.edu/mailman/listinfo/portaudio
>>>>
>>>>
>>>>
>>>>                     -- 
>>>>                     Thanks & Regards,
>>>>                     Arjav Parikh
>>>>
>>>>                     _______________________________________________
>>>>                     Portaudio mailing list
>>>>                     Portaudio at lists.columbia.edu  <mailto:Portaudio at lists.columbia.edu>
>>>>                     https://lists.columbia.edu/mailman/listinfo/portaudio
>>>                     _______________________________________________
>>>                     Portaudio mailing list
>>>                     Portaudio at lists.columbia.edu
>>>                     <mailto:Portaudio at lists.columbia.edu>
>>>                     https://lists.columbia.edu/mailman/listinfo/portaudio
>>>
>>>
>>>
>>>                 -- 
>>>                 Thanks & Regards,
>>>                 Arjav Parikh
>>>
>>>                 _______________________________________________
>>>                 Portaudio mailing list
>>>                 Portaudio at lists.columbia.edu  <mailto:Portaudio at lists.columbia.edu>
>>>                 https://lists.columbia.edu/mailman/listinfo/portaudio
>>                 _______________________________________________
>>                 Portaudio mailing list
>>                 Portaudio at lists.columbia.edu
>>                 <mailto:Portaudio at lists.columbia.edu>
>>                 https://lists.columbia.edu/mailman/listinfo/portaudio
>>
>>
>>
>>             -- 
>>             Thanks & Regards,
>>             Arjav Parikh
>>
>>             _______________________________________________
>>             Portaudio mailing list
>>             Portaudio at lists.columbia.edu  <mailto:Portaudio at lists.columbia.edu>
>>             https://lists.columbia.edu/mailman/listinfo/portaudio
>             _______________________________________________
>             Portaudio mailing list
>             Portaudio at lists.columbia.edu
>             <mailto:Portaudio at lists.columbia.edu>
>             https://lists.columbia.edu/mailman/listinfo/portaudio
>
>
>
>         -- 
>         Thanks & Regards,
>         Arjav Parikh
>
>
>
>     -- 
>     Thanks & Regards,
>     Arjav Parikh
>
>
>
> -- 
> Thanks & Regards,
> Arjav Parikh
>
> _______________________________________________
> Portaudio mailing list
> Portaudio at lists.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/portaudio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.columbia.edu/pipermail/portaudio/attachments/20181104/96f6211d/attachment-0001.html>


More information about the Portaudio mailing list