Skip to content

hw_params() fails with pulseaudio at 48kHz, 16bit stereo. #432

Closed

Description

@ZhendanYang

Summary:
On BYT, when enabled pulseaudio, playback and capture can't work. There are a lot of ipc error in dmesg log.

[ 129.111820] sof-audio sof-audio: error: ipc error for 0x60010000 size 0x14
[ 129.111836] sof-audio sof-audio: ASoC: sof-audio hw params failed: -22
[ 129.111844] sof-audio sof-audio: pcm: free stream 0 dir 0
[ 129.111858] sof-audio sof-audio: ipc tx: 0x60030000
[ 129.111913] sof-audio sof-audio: ipc tx succeeded: 0x60030000
[ 129.111925] Passthrough: ASoC: hw_params FE failed -22

Reproduce step:
zql@zql-MB-T:~$ aplay -D hw:0,0 -c 2 -r 48000 -f s16_le Music/48California_Dreaming.wav -vv -i
Playing WAVE 'Music/48California_Dreaming.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
aplay: set_params:1363: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 84000
PERIOD_SIZE: 4032
PERIOD_BYTES: 16128
PERIODS: (4 5)
BUFFER_TIME: 340000
BUFFER_SIZE: 16320
BUFFER_BYTES: 65280
TICK_TIME: 0

Test env:
sof master: 299ccbc
sof tool: 60c3937
kernel: sof-dev 51ebd5d
tplg: test-ssp2-mclk-0-I2S-volume-s16le-s16le-48k-19200k-codec.tplg

Log:
dmesg.log
rmbox is empty and rmbox -t is filled with garbage.

Activity

  1. added
    bugSomething isn't working as expected
    BYTApplies to Baytrail platform
    P1Blocker bugs or important features
    on Sep 28, 2018
  2. self-assigned this
    on Sep 28, 2018
  3. added
    blockedprogress blocked by something else, applies to either feature or bug
    on Sep 28, 2018
  4. xiulipan commented on Sep 28, 2018

    @xiulipan
    Contributor

    blocked by trace issues thesofproject/soft#75
    No debug tools now

  5. mengdonglin commented on Sep 29, 2018

    @mengdonglin
    Collaborator

    @ZhendanYang Could you use the new logger with master branch from now on?
    If it's working, we can remove the blocker.

  6. removed
    blockedprogress blocked by something else, applies to either feature or bug
    on Sep 29, 2018
  7. xiulipan commented on Sep 29, 2018

    @xiulipan
    Contributor

    @ZhendanYang @mengdonglin
    Test on APL and have some optimization for logger.
    Will start debug ASAP and have some update.

  8. added
    blockedprogress blocked by something else, applies to either feature or bug
    on Sep 29, 2018
  9. changed the title [-]Playback and capture can't work when pulseaudio is enabled[/-] [+]hw_params() fails with pulseaudio at 48kHz, 16bit stereo.[/+] on Oct 1, 2018
  10. mengdonglin commented on Oct 19, 2018

    @mengdonglin
    Collaborator

    This issue is blocked by #443

  11. mengdonglin commented on Nov 22, 2018

    @mengdonglin
    Collaborator
  12. markyang commented on Nov 23, 2018

    @markyang

    Summary:
    This issue can be reproduced on BYT with ALC5651.

    Test env:
    sof master: e8ef1f2
    sof tool: ad3f3e4
    kernel sof-dev: 4a3aa5f
    tplg: test-ssp2-mclk-0-I2S-volume-s16le-s16le-48k-19200k-codec.tplg-ad3f3e4f

    Log:
    logger-byt.log
    logger-byt-t.log

  13. mengdonglin commented on Nov 23, 2018

    @mengdonglin
    Collaborator

    @markyang Is Pulseaudio (PA) enabled in your test? Could you help to disable PA and check if this issue can be reproduced?

  14. markyang commented on Nov 23, 2018

    @markyang

    Summary:
    If don't run /usr/bin/pulseaudio (rename or remove), it works fine on BYT with ALC5651.

    Test env:
    sof master: e8ef1f2
    sof tool: ad3f3e4
    kernel sof-dev: 4a3aa5f
    tplg: sof-byt-rt5651.tplg

  15. libinyang commented on Nov 26, 2018

    @libinyang
    Contributor

    The bug is caused that pulseaudio will open/close pcm so frequently and the channels are not released, which will cause the channel is not enough.

  16. libinyang commented on Nov 26, 2018

    @libinyang
    Contributor

    I have a patch for this bug. I will refine the patch and submit the patch in these 2 days.

  17. markyang commented on Nov 26, 2018

    @markyang

    Summary:
    This issue can be reproduced on BYT w/ ALC5651.

    Test env:
    sof master: 6e14892
    sof tool: ad3f3e4
    kernel sof-dev: aff80d7
    tplg: test-ssp2-mclk-0-I2S-volume-s16le-s16le-48k-19200k-codec.tplg-ad3f3e4 and
    test-ssp2-mclk-0-I2S-volume-s24le-s24le-48k-19200k-codec.tplg-ad3f3e4

  18. libinyang commented on Nov 27, 2018

    @libinyang
    Contributor

    patch is submitted:
    #633

  19. libinyang commented on Nov 28, 2018

    @libinyang
    Contributor

    @markyang
    The patch is merged.

  20. markyang commented on Nov 28, 2018

    @markyang

    Summary:
    This issue cannot be reproduced on BYT w/ ALC5651 anymore.
    fixed by PR #633

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

Metadata

Metadata

Assignees

Labels

BYTApplies to Baytrail platformP1Blocker bugs or important featuresblockedprogress blocked by something else, applies to either feature or bugbugSomething isn't working as expectedverifiedQA/Bug reporter verifies solution worked.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions