Skip to content

[BUG][mtl-002] alsa_conformance_test: test_rates failed for both accuracy and stability on I2S interfaces #6756

Closed

Description

@yongzhi1

Describe the bug
Run alsa_conformance_test --test-suites test_rates to check whether all estimated rates are the same as what it set.
When --rate-criteria-diff-pct set to 0.05 (default is 0.01), tests pass consistently with CAVS_FW_ACE_RELEASE but failed for cSOF.

More details about the test:
https://chromium.googlesource.com/chromiumos/platform/audiotest/+/refs/heads/master/alsa_conformance_test.md#Stability-of-rate

To Reproduce

alsa_conformance_test.py -P hw:0,0  --test-suites  test_rates  --rate-criteria-diff-pct 0.05 --merge-thld-size 48

Reproduction Rate
100%

Expected behavior
alsa_conformance_test.py is a "standard" test that run on all previous platforms.

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
  2. Name of the topology file
    • Topology: sof-mtl-max98357a-rt5682, sof-mtl-nocodec.tplg,
  3. Name of the platform(s) on which the bug is observed.
    • Platform: MTL-RVP

Screenshots or console output

localhost ~ # alsa_conformance_test.py -P hw:0,0  --test-suites  test_rates  --rate-criteria-diff-pct 0.05 --merge-thld-size 48 
0 passed, 1 failed
Device Information
	Name: hw:0,0
	Card: sofrt5682 [sof-rt5682]
	Device: Headset (*) []
	Stream: PLAYBACK
	Format: ['S16_LE', 'S24_LE', 'S32_LE']
	Channels: [2]
	Rate: [48000]
	Period_size range: [24, 4096]
	Buffer_size range: [48, 16384]
Test Rates
	Set rate 48000: fail - Expected rate is 48000, measure 43024.080435000003, difference 4975.9195649999965 > threshold 24.0

Note:

With --rate-criteria-diff-pct 0.05 , threshold = 48000 * 0.05/100, expected rate is 48K, measured 43K, off by 5K.

Activity

  1. added
    bugSomething isn't working as expected
    on Dec 8, 2022
  2. lgirdwood commented on Dec 9, 2022

    @lgirdwood
    Member

    @mwasko @marcinszkudlinski @kv2019i fyi - could we be using the wrong clock frequency for the timer here ?

  3. yongzhi1 commented on Dec 11, 2022

    @yongzhi1
    ContributorAuthor

    Attached test outputs with debug option, we can see there is more irregularity shown in the DIFF column for cSOF:
    ssp-rate-output-cSOF.txt
    ssp0-rate-output-ACE.txt

  4. added
    MTLApplies to Meteor Lake platform
    on Dec 12, 2022
  5. mwasko commented on Dec 12, 2022

    @mwasko
    Contributor

    @yongzhi1 can you provide information on what MTL-RVP SOC revision it was reproduced (A0, A3, other) and whether it is correlated with any specific format (S16_LE, S24_LE, S32_LE)?

  6. yongzhi1 commented on Dec 12, 2022

    @yongzhi1
    ContributorAuthor

    Hi, @mwasko Thanks for your attention, this was observed on A3 with 'S16_LE', 'S24_LE', 'S32_LE', and seems the i2s master link clock selection fix for #6727 also worked wonder here, now the test results are on-a par with ACE FW.

  7. juimonen commented on Dec 13, 2022

    @juimonen

    @yongzhi1 I've had this in my stash for a while: https://github.com/juimonen/sof/tree/ssp_aux_data , so is this what is needed?
    If someone can elaborate on the "link clock selection", we can probably try it out (the proper way).

  8. yongzhi1 commented on Dec 14, 2022

    @yongzhi1
    ContributorAuthor

    Hi, @juimonen , probably "link_config" in your ssp_aux_data could be used to pass the clock source selection:
    thesofproject/zephyr#66

  9. juimonen commented on Dec 14, 2022

    @juimonen

    @yongzhi1 ok thanks, I'll make some test/demo about this

  10. yongzhi1 commented on Jan 13, 2023

    @yongzhi1
    ContributorAuthor

    #6860 was merged, so close this issue.

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

    MTLApplies to Meteor Lake platformbugSomething isn't working as expectedmtl-002Issues observed with mtl-002 release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions