-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Alsatplg produces incorrect NHLT DMIC blob when second DAI rate is higher than first #8670
Comments
Decoding the NHLT DMIC blob from nhlt-sof-hda-generic-4ch.bin shows that both DMIC FIFOs are programmed to 96 kHz that is incorrect. The bug is in alsa-utils that provides the NHLT pre-processor for alsatplg. |
A fix attempt:
|
I have another fixing proposal, where I simply enclose the contents of configure_registers() in side:
This version reconfigures also dmic->dmic_blob.ts_group[0] and dmic->dmic_blob.chan_ctrl_cfg[0] on the second DAI configuration round. |
Now after going through the function in detail it looks to me that configuring the second DAI does not affect the mic->dmic_blob.ts_group[0] and dmic->dmic_blob.chan_ctrl_cfg[0]. Just reconfiguring the fir is enough, as @singalsu suggested. So I made a draft PR about the fix: alsa-project/alsa-utils#250 @singalsu and @RanderWang , please check the above PR and if its Ok by you, I'll mark it ready for wider review. |
Thanks @jsarha , your patch works perfectly in my tests! |
Let's add the PR here if it would help in getting it more attention: alsa-project/alsa-utils#250 |
The PR is now merged to alsa-utils:
|
Describe the bug
Changing DMIC1 rate can corrupt NHLT blob for DMIC0.
To Reproduce
Do this simple change to DMIC object. It's not used by topology so it should not impact the used DMIC DAI. Build the topology and copy it to the DUT, reboot. Use a device that uses NHLT blob from topolopgy (options snd_sof_intel_hda_common sof_use_tplg_nhlt=1) . Capture audio from the supported dai_index 0 DMIC. Rebot
Reproduction Rate
100%
Expected behavior
Working capture.
Impact
What impact does this issue have on your progress (e.g., annoyance, showstopper)
Environment
$ alsatplg --version
alsatplg version 1.2.10
libasound version 1.2.8
libatopology version 1.2.8
Screenshots or console output
dmesg
mtrace shows that the blob is configuring now also the 48 kHz DMIC DAI to 96 kHz.
The text was updated successfully, but these errors were encountered: