Menu

#2 Armbian: cw dont wait all characters plays and exit early

1.0
open
nobody
None
2020-07-14
2020-07-05
Mrkeuz
No

It working properly on x86 platform, but on mini computer (Orange PI Zero) it work strange

  1. It exit early than all symbols playing to soundcard
  2. It strange due start. Seem it skip som dash/dotes at start. Dont sure very well what is going bu cw sound different versus x86 platform.

Also it strange output during playing - it first fast output first ~4-5 symbols instead char by char output as on x86 platform (maybe it helps).

So it seems something wrong with timing calculation of message bounds.

Trying command: echo CK CK 73 BK | cw

Very happy provide some additional info!

Env:
cw version 3.5.1
Linux orangepizero 5.4.45-sunxi #20.05.3 SMP Wed Jun 10 12:09:20 CEST 2020 armv7l GNU/Linux

Related

Tickets: #2

Discussion

  • Mrkeuz

    Mrkeuz - 2020-07-05

    Here examples of mp3 files of output.
    From x86 i get:
    -.-. -.- -.-. -.- --... ...-- -... -.-
    From arm i get:
    -. -.- -.-. -.- --... .
    (so in this case here start and end of message was cutted)

     
    • acerion

      acerion - 2020-07-06

      Hi!

      Thank you for your bug report.
      Unfortunately I'm completely unfamiliar with this platform and I can't
      debug it. But let's try to find out where the problem may be.

      First we have to find out if PulseAudio can be used. Can you send me
      output of this command?
      ps -A | grep -i pulse

      If a pulseaudio server is running, can you please install this package
      and try to reproduce the problem again?
      libpulse-dev
      I had a bug report sent to me almost a year ago about running "cw"
      program through pipe, like in your example (but on desktop Linux).
      Installation of this package was a workaround for the problem.

      Please let me know the results and we will see where it gets us.

      Best regards,
      Kamil

      On 05.07.2020 11:51, Mrkeuz wrote:

      Here examples of mp3 files of output.

      From x86 i get:
      |-.-. -.- -.-. -.- --... ...-- -... -.-|
      From arm i get:
      |-. -.- -.-. -.- --... .|
      (so in this case here start and end of message was cutted)

      Attachments:


      *[tickets:#2] https://sourceforge.net/p/unixcw/tickets/2/ Armbian: cw
      dont wait all characters plays and exit early *

      Status: open
      Milestone: 1.0
      Created: Sun Jul 05, 2020 09:31 AM UTC by Mrkeuz
      Last Updated: Sun Jul 05, 2020 09:31 AM UTC
      Owner: nobody

      It working properly on x86 platform, but on mini computer (Orange PI
      Zero) it work strange

      1. It exit early than all symbols playing to soundcard
      2. It strange due start. Seem it skip som dash/dotes at start. Dont
        sure very well what is going bu cw sound different versus x86 platform.

      Also it strange output during playing - it first fast output first ~4-5
      symbols instead char by char output as on x86 platform (maybe it helps).

      So it seems something wrong with timing calculation of message bounds.

      Trying command: echo CK CK 73 BK | cw

      Very happy provide some additional info!

      Env:
      cw version 3.5.1
      Linux orangepizero 5.4.45-sunxi #20.05.3 SMP Wed Jun 10 12:09:20 CEST
      2020 armv7l GNU/Linux


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/unixcw/tickets/2/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Tickets: #2

      • acerion

        acerion - 2020-07-12

        I just discovered that on my laptop I experience a different behaviour
        with cw when entering text to play directly vs. entering it through
        pipe. Investigating.

        Best regards,
        Kamil

        On 06.07.2020 22:22, Kamil Ignacak wrote:

        Hi!

        Thank you for your bug report.
        Unfortunately I'm completely unfamiliar with this platform and I can't
        debug it. But let's try to find out where the problem may be.

        First we have to find out if PulseAudio can be used. Can you send me
        output of this command?
        ps -A | grep -i pulse

        If a pulseaudio server is running, can you please install this package
        and try to reproduce the problem again?
        libpulse-dev
        I had a bug report sent to me almost a year ago about running "cw"
        program through pipe, like in your example (but on desktop Linux).
        Installation of this package was a workaround for the problem.

        Please let me know the results and we will see where it gets us.

        Best regards,
        Kamil

         
  • Mrkeuz

    Mrkeuz - 2020-07-10

    Hi,

    1. "ps -A | grep -i pulse" showing nothing.

      I guess pulseaudio not installed at all. "dpkg -l | grep pulse" showing nothing. I do not much convenient skills for configuration of pulse server so it little hard to me. If I find a way to configure it correctly on my bare console linux, I will definitely report the results about pulse-server and with libpulse-dev. Currently, If I understand correctly, seems it working over alsa driver directly. Cw says next to me:

      $ cw
      cw: PulseAudio output not available (device: ( default ))
      cw: OSS output not available (device: /dev/audio)

    2. Also i have try to run cw and input text inside program - seems it working properly. Only issue with symbols synchronization with currently playing sound (as it doing on desktop machine with pulse-server. It same fast show several characters and put new-line (prompt for next line to play) early than sounds ends. I guess it have something issue with syncronize symbols and currently playing sound. I think in pipe version it just exit early than all chars will be played. In this version it not exited because it wait next line to input.

      Output next (worked):

      $ cw
      cw: PulseAudio output not available (device: ( default ))
      cw: OSS output not available (device: /dev/audio)
      CK CK 73 BK <- i input text here and press enter
      CK CK 73 BK

      I try read text from file on armbian and have same behaviour as via pipe - cutted edges:

      $ cw -f send.txt
      cw: PulseAudio output not available (device: ( default ))
      cw: OSS output not available (device: /dev/audio)
      CK CK 73 BK

    3. Finnaly I found that alsa output NOT working also on desktop machine (it play just one beep and exit). Command next, -d"default" option switch it to using alsa i guess:

      $ echo CK CK 73 BK bk bK | cw -d"default"
      cw: PulseAudio output not available (device: default)
      cw: OSS output not available (device: default)
      CK CK 73 BK bk bK

    Any ideas?

    Best regards,
    mrkeuz

     

    Last edit: Mrkeuz 2020-07-10
    • acerion

      acerion - 2020-07-12

      Hi!

      I did some experiments on my laptop where I had some issues with cw used with pipe. Modifying this ALSA parameter through proc seemed to help me on the laptop:

      cat /proc/asound/card0/pcm0p/sub0/prealloc
      shows that the default value of one of ALSA parameters related to buffering of data is 2048. After I changed it to 32 with this command, the behaviour of cw was improved:
      echo 32 > /proc/asound/card0/pcm0p/sub0/prealloc

      You may have a bit different path on your system, and may need to use different values (256/128/64/16, etc). Please give it a try and let me know if the situation has improved.

      Best regards,
      Kamil

       

      Last edit: acerion 2020-07-12
      • Mrkeuz

        Mrkeuz - 2020-07-13

        Hi,

        echo 32 > /proc/asound/card0/pcm0p/sub0/prealloc

        Yes it helps on builtin card. Thanks!

        (JFYI)
        But i also i have testet it on two my usb sound cards, and they both does not have this parameter in /proc and still have issue:

        $ tree /proc/asound/card1/pcm0p/sub0/
        /proc/asound/card1/pcm0p/sub0/
        ├── hw_params
        ├── info
        ├── status
        └── sw_params

        Best regard,
        mrkeuz

         
        • acerion

          acerion - 2020-07-14

          Thank you for confirmation.
          Unfortunately that's all I can do without changes to source code of cw library (libcw). The changes are being made in this development cycle: ALSA code will be selecting smaller buffer size to avoid this type of issues in the future. If you want you can get the latest version of unixcw package from git repo, but it's not tested well yet.

          The difference with USB cards is interesting, I would have to check this myself in the future and see how cw and libcw would behave with such cards. Can you share some details about the cards (manufacturer, model)? Maybe there are some other surprises with this type of cards that I should be prepared for.

          Best regards,
          Kamil

           
          • Mrkeuz

            Mrkeuz - 2020-07-14

            I use next two usb cards:

            • Sound Blaster Play!
              48: USB 00.2: 0401 Multimedia audio controller
              [Created at usb.122]
              Unique ID: GEsk.Hwga6jc5O2E
              Parent ID: k4bc.2DFUsyrieMD
              SysFS ID: /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.2
              SysFS BusID: 1-6:1.2
              Hardware Class: sound
              Model: "Creative Sound Blaster Play!"
              Hotplug: USB
              Vendor: usb 0x041e "Creative Technology, Ltd"
              Device: usb 0x30d3 "Sound Blaster Play!"
              Revision: "1.00"
              Serial ID: "1305060005D1"
              Driver: "snd-usb-audio"
              Driver Modules: "snd_usb_audio"
              Speed: 12 Mbps
              Module Alias: "usb:v041Ep30D3d0100dc00dsc00dp00ic01isc02ip00in02"
              Config Status: cfg=new, avail=yes, need=no, active=unknown
              Attached to: #59 (Hub)

            • Dexp (unnamed) usb card
              57: USB 00.1: 0401 Multimedia audio controller
              [Created at usb.122]
              Unique ID: j4vw.1FdCXKvDSi3
              Parent ID: cLrx.DFkaVl_rzX0
              SysFS ID: /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2/1-2.2:1.1
              SysFS BusID: 1-2.2:1.1
              Hardware Class: sound
              Model: "Intel USB PnP Sound Device"
              Hotplug: USB
              Vendor: usb 0x8086 "Intel Corp."
              Device: usb 0x0808 "USB PnP Sound Device"
              Revision: "1.00"
              Driver: "snd-usb-audio"
              Driver Modules: "snd_usb_audio"
              Speed: 12 Mbps
              Module Alias: "usb:v8086p0808d0100dc00dsc00dp00ic01isc02ip00in01"
              Config Status: cfg=new, avail=yes, need=no, active=unknown
              Attached to: #49 (Hub)

            After you fixes will be done i can build your project and test it locally as you need.
            Just let me know. Will be glad to help you with testing.

            Best regard,
            mrkeuz

             
            • acerion

              acerion - 2020-07-15

              On 15.07.2020 01:50, Mrkeuz wrote:

              I use next two usb cards:
              Thank you for the details.

              After you fixes will be done i can build your project and test it
              locally as you need.
              Just let me know. Will be glad to help you with testing.Thank you for the offer, but it will take me months to complete the
              development cycle. I will get myself one or more USB cards, and an
              Orange Pi to do some testing.

              Best regards,
              Kamil

               

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.