Skip to content

PCM read/write error when buffer size < 768 on APL #116

Closed

Description

@keqiaozhang

Today I tried to test playback with specified buffer size and found that if the buffer size is less than 768, it will easy introduce I/O error and even with IPC timed out.
How to reproduce:

  1. aplay -D hw:0,0 -r 48000 -c 2 -f S16_LE /dev/zero --buffer-size=384
    It will stop with pcm read/write error.
    dmesg-bufsize.log
    rmbox-buffsize.log

Activity

  1. added
    bugSomething isn't working as expected
    APLApplies to Apollolake platform
    on Jul 17, 2018
  2. lgirdwood commented on Jul 17, 2018

    @lgirdwood
    Member

    This looks like another duplicate of the XRUN bug. @keqiaozhang can you check.

  3. added this to the 1.2 milestone on Jul 17, 2018
  4. plbossart commented on Jul 17, 2018

    @plbossart
    Member

    Don't we have by-design limitations on the buffer/period sizes? If the topology states that the host DMA can work with 48 samples, that's 192 bytes and already larger than the period in the firmware you are using in this case on the host side. I'd think the ALSA period needs to be >= the firmware period?

  5. keqiaozhang commented on Jul 18, 2018

    @keqiaozhang
    CollaboratorAuthor

    I will check this tomorrow.

  6. keqiaozhang commented on Jul 19, 2018

    @keqiaozhang
    CollaboratorAuthor

    I checked the buffer/period sizes in topology, the buffer size is fixed as 65536 and the range of period size is (192.16384), there're no issues when playback with buffer-size=65536. I also tried with xrun injection every 10ms and buffer-size < 576, still cannot reproduce this bug. This improvement may related to PR#125.

  7. lgirdwood commented on Jul 19, 2018

    @lgirdwood
    Member

    @keqiaozhang ok, please close once you are satisfied.

  8. keqiaozhang commented on Jul 20, 2018

    @keqiaozhang
    CollaboratorAuthor

    This issue is fixed by #125

  9. jocelyn-li commented on Jul 20, 2018

    @jocelyn-li

    This issue is fixed by #125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    APLApplies to Apollolake platformbugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions