Skip to content

Up2: 2 concurrent streams: xrun on one stream cause xrun on the other and DSP panic #890

Closed

Description

@plbossart

To check the independence of concurrent streams, I start two terminals.
On Terminal 1, I run a basic aplay on the Hifiberry output.
On Terminal 2, I run the sof_xrun.sh script, which plays for one second on HDMI then artificially suspends for 1s. This creates an underrun by construction.

What is interesting is that the xrun on Terminal2 create xrun for Terminal 1, and eventually a DSP panic.

Terminal 1:

root@ubilinux4:~# aplay -Dhw:0,0 chirpl.wav 
Playing WAVE 'chirpl.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
underrun!!! (at least 0.070 ms long)
underrun!!! (at least 0.056 ms long)
underrun!!! (at least 0.057 ms long)
underrun!!! (at least 0.043 ms long)
underrun!!! (at least 0.049 ms long)
aplay: pcm_write:2011: write error: Input/output error

Terminal 2:


bash sof_xrun.sh 
[sof_xrun.sh.txt](https://github.com/thesofproject/sof/files/2794361/sof_xrun.sh.txt)


test 34
Write error: -5,Input/output error
xrun_recovery failed: -5,Input/output error
Transfer failed: Input/output error
test 35
test 36 << stops before end

dmesg_xrun.log
logger.txt

kernel: topic/sof-dev
firmware: 8051fe3
topology: sof-apl-pcm512x.tplg

filing as a firmware issue since no matter how bad the kernel is the DSP panic should not happen.

Activity

  1. keyonjie commented on Jan 25, 2019

    @keyonjie
    Contributor

    good try, can you help try if my PRs #833 and #851 help?

  2. wenqingfu commented on May 13, 2019

    @wenqingfu
  3. ClarexZhou commented on May 24, 2019

    @ClarexZhou
  4. added
    CFLApplies to Coffee Lake platform
    HDAApplies to HD-Audio bus for codec connection
    on May 24, 2019
  5. lgirdwood commented on May 27, 2019

    @lgirdwood
    Member

    @ClarexZhou your comment is not related to this issue. Please assign your comment to correct issue or create a new one.

  6. added
    reverifyIssue to be reverified
    and removed on Jun 6, 2019
  7. tlauda commented on Jun 6, 2019

    @tlauda
    Contributor

    @plbossart Please reverify if the issue still exists.

  8. jajanusz commented on Jun 17, 2019

    @jajanusz
    Contributor

    @plbossart @stevyan @mengdonglin Do you still see this issue?

  9. Jiangxinx commented on Jul 22, 2019

    @Jiangxinx
    Contributor

    This issue can not be reproduced on daily test.
    Environment
    Firmware: a513ac7 Master
    Kernel: 44c31df on topic/sof-dev
    Topology: file: sof-apl-pcm512x.tplg
    platform: apl-up2

    Step
    Terminal 1:

    ubuntu@cd-apl-up2-pcm512x-07:~$ aplay -Dhw:0,0 -r48000 -c2 -fs16_le ~/audio-files/raw/test-c2-r48000-fs16_le-d60.raw -vv -i
    Playing raw data '/home/ubuntu/audio-files/raw/test-c2-r48000-fs16_le-d60.raw' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
    Hardware PCM card 0 'sof-bxt-pcm512x' device 0 subdevice 0
    Its setup is:
      stream       : PLAYBACK
      access       : RW_INTERLEAVED
      format       : S16_LE
      subformat    : STD
      channels     : 2
      rate         : 48000
      exact rate   : 48000 (48000/1)
      msbits       : 16
      buffer_size  : 16368
      period_size  : 4080
      period_time  : 85000
      tstamp_mode  : NONE
      tstamp_type  : MONOTONIC
      period_step  : 1
      avail_min    : 4080
      period_event : 0
      start_threshold  : 16368
      stop_threshold   : 16368
      silence_threshold: 0
      silence_size : 0
      boundary     : 9214364837600034816
      appl_ptr     : 0
      hw_ptr       : 0
    ########                                +          | 79%
    

    Terminal 2:

    ubuntu@cd-apl-up2-pcm512x-07:~/scripts$ sudo ./sof_xrun.sh 
    numid=28,iface=MIXER,name='Pin5-Port1 Mux'
      ; type=ENUMERATED,access=rw------,values=1,items=4
      ; Item #0 'NONE'
      ; Item #1 'cvt 2'
      ; Item #2 'cvt 3'
      ; Item #3 'cvt 4'
      : values=1
    test 0
    
    speaker-test 1.1.3
    
    Playback device is hw:0,1
    Stream parameters are 48000Hz, S16_LE, 2 channels
    Sine wave rate is 440.0000Hz
    Home directory not accessible: Permission denied
    Rate set to 48000Hz (requested 48000Hz)
    Buffer size range from 96 to 16368
    Period size range from 48 to 4080
    Using max buffer size 16368
    Periods = 4
    was set period_size = 3312
    was set buffer_size = 16368
     0 - Unknown
    test 1
    Write error: -32,Broken pipe
    test 2
    Write error: -32,Broken pipe
     1 - Unknown
    test 3
    Write error: -32,Broken pipe
    test 4
    Write error: -32,Broken pipe
    Time per period = 8.545586
     0 - Unknown
    test 5
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

APLApplies to Apollolake platformCFLApplies to Coffee Lake platformHDAApplies to HD-Audio bus for codec connectionbugSomething isn't working as expectedreverifyIssue to be reverified

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions