Skip to content
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

es8336: Problems with internal mic detection on Matebook 14 #4757

Open
mchehab opened this issue Dec 31, 2023 · 1 comment
Open

es8336: Problems with internal mic detection on Matebook 14 #4757

mchehab opened this issue Dec 31, 2023 · 1 comment
Labels
codec ES8336 codec Codec HW or driver restriction

Comments

@mchehab
Copy link

mchehab commented Dec 31, 2023

Huawei Matebook 14 BIOS reports that it has only analog mics:

[    4.093207] es8316 i2c-ESSX8336:00: PLATFORM_MAINMIC_TYPE_ARG=0xbb
[    4.093222] es8316 i2c-ESSX8336:00: PLATFORM_HPMIC_TYPE_ARG=0xbb

However, currently, mach->mach_params.dmic_num is not zero when sof_es8336_probe() is called, making the driver to try initializing it. The net result is that the internal microphone is not shown as it is not connected.

I tried to change the logic inside boards/sof_es8336.c to not rely on dmic_num, but this is not enough, as not initializing dmic causes another error:

[    4.302502] es8316 i2c-ESSX8336:00: speaker gpio 0 active high, headphone gpio 1 active low
[    4.303999] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
[    4.304028] sof-audio-pci-intel-tgl 0000:00:1f.3: error: can't connect DAI DMIC0.IN stream dmic01
[    4.304029] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to add widget id 0 type 28 name : DMIC0.IN stream dmic01
[    4.304032] sof-essx8336 sof-essx8336: ASoC: failed to load widget DMIC0.IN
[    4.304033] sof-essx8336 sof-essx8336: ASoC: topology: could not load header: -22
[    4.304037] sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg component load failed -22
[    4.304039] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -22
[    4.304040] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
[    4.304046] sof-essx8336 sof-essx8336: ASoC: failed to instantiate card -22
[    4.304072] sof-essx8336 sof-essx8336: snd_soc_register_card failed: -22
[    4.304078] sof-essx8336: probe of sof-essx8336 failed with error -22
@mchehab
Copy link
Author

mchehab commented Dec 31, 2023

PR #4756 partially solved the issue by letting unused DMIC to be registered. This is not a proper solution though, as there won't be anything connected as DMIC. It also seems to be causing troubles with HDMI, as routing to HDMI is currently not working for Huawei Matebook 14.

Not sure what should be changed at the driver level to make it work properly. Surely changes at userspace (UCM) are also needed for this device.

@plbossart plbossart added codec Codec HW or driver restriction codec ES8336 labels Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codec ES8336 codec Codec HW or driver restriction
Projects
None yet
Development

No branches or pull requests

2 participants