[Android 10] Problem loading snd_hda_intel driver at boot

631 views
Skip to first unread message

Michael Goffioul

unread,
Oct 2, 2019, 7:40:29 PM10/2/19
to android-...@googlegroups.com, andro...@googlegroups.com
Hi all,

I'm having a problem loading the sound driver at boot in my Android 10 port, and I'm hoping somebody could shed some light.

I've rewritten the patch that add module loading to init/ueventd for Android 10, see attached. As there is now a uevent handler in init, I figured we could just piggy back onto it, instead of adding our own. It does not implement module blacklisting and deferred-loading, but this shouldn't have any impact in my current scenario.

The problem is that when my Intel-based device boots, even though the module snd_hda_intel is loaded through ueventd, there is no device created in /dev/snd/ and audio is not working. I've also attached my dmesg output, which contains debug statement from ueventd/modalias_handler (look for "modalias"). The only relevant things I can spot in the logs are the following:

    [    7.235638] hdaudio hdaudioC0D0: Unable to bind the codec
    [    7.236386] hdaudio hdaudioC0D2: Unable to bind the codec

After boot, if I reload the module manually with the following commands:
    rmmod snd_hda_intel
    modprobe snd_had_intel
then module is loaded correctly, I can see the expected output (see attached) in dmesg and audio is working in Android

This audio problem is the last bit I need to fix to have a initial functional build of Android 10 from android-x86. Any help to chase down this issue would be greatly welcomed.

Thanks,
Michael.


ueventd.patch.bz2
dmesg.log.bz2
dmesg-reload.log.bz2

youling 257

unread,
Nov 20, 2019, 7:31:02 AM11/20/19
to Android-x86
Bliss os Android 10 used your uevent patch, https://github.com/BlissRoms-x86/platform_system_core/commit/3ca28ba1f39b449155b973b9b939e6d0fc4155e6
some modules load failed.
modalias: Cannot load module: Module 'snd-intel-sst-acpi' not in dependency file
modalias: Cannot load module: Module 'snd-soc-rt5640' not in dependency file


[ 6.843488] ueventd: Parsing file /ueventd.rc...
[ 6.844000] ueventd: Parsing file /vendor/ueventd.rc...
[ 6.844036] ueventd: Unable to read config file '/vendor/ueventd.rc': open() failed: No such file or directory
[ 6.844064] ueventd: Parsing file /odm/ueventd.rc...
[ 6.844097] ueventd: Unable to read config file '/odm/ueventd.rc': open() failed: No such file or directory
[ 6.844121] ueventd: Parsing file /ueventd.android_x86_64.rc...
[ 6.846560] ueventd: Parsing file /system/lib/modules/5.4.0-rc8-android-x86_64+/modules.alias...
[ 6.852316] ueventd: Parsing file /system/lib/modules/modules.alias...
[ 6.896452] apexd: Bootstrap subcommand detected
[ 6.920051] apexd: Scanning /system/apex for embedded keys
[ 6.922598] apexd: Scanning /product/apex for embedded keys
[ 6.922975] apexd: ... does not exist. Skipping
[ 6.923291] apexd: Scanning /system/apex looking for APEX packages.
[ 6.923738] apexd: Found /system/apex/com.android.conscrypt
[ 6.924386] apexd: Skipped when bootstrapping
[ 6.924699] apexd: Found /system/apex/com.android.media
[ 6.925358] apexd: Skipped when bootstrapping
[ 6.925666] apexd: Found /system/apex/com.android.tzdata
[ 6.931120] printk: apexd: 9 output lines suppressed due to ratelimiting
[ 6.986158] modalias: Loading kernel module '8723bs' for alias 'sdio:c07v024CdB723'
[ 6.987481] modalias: Loading kernel module 'snd-intel-sst-acpi' for alias 'acpi:80860F28:80860F28:'
[ 6.987586] modalias: Cannot load module: Module 'snd-intel-sst-acpi' not in dependency file
[ 6.987993] modalias: Loading kernel module 'snd-intel-sst-acpi' for alias 'acpi:80860F28:80860F28:'
[ 6.988010] modalias: Cannot load module: Module 'snd-intel-sst-acpi' not in dependency file
[ 6.988018] modalias: Loading kernel module 'snd-soc-rt5651' for alias 'acpi:10EC5640:10EC5640:'
[ 6.988042] modalias: Cannot load module: Module 'snd-soc-rt5651' not in dependency file
[ 6.988057] modalias: Loading kernel module 'snd-soc-rt5640' for alias 'acpi:10EC5640:10EC5640:'
[ 6.988072] modalias: Cannot load module: Module 'snd-soc-rt5640' not in dependency file
[ 6.988442] modalias: Loading kernel module 'snd-soc-rt5651' for alias 'acpi:10EC5640:10EC5640:'
[ 6.988457] modalias: Cannot load module: Module 'snd-soc-rt5651' not in dependency file
[ 6.988471] modalias: Loading kernel module 'snd-soc-rt5640' for alias 'acpi:10EC5640:10EC5640:'
[ 6.988484] modalias: Cannot load module: Module 'snd-soc-rt5640' not in dependency file
[ 6.990463] modalias: Loading kernel module 'soc_button_array' for alias 'acpi:INTCFD9:PNP0C40:'
[ 6.994115] modalias: Loading kernel module 'dwc3-pci' for alias 'pci:v00008086d00000F37sv00008086sd00007270bc0Csc03i80'
[ 6.994137] modalias: Cannot load module: Module 'dwc3-pci' not in dependency file
[ 6.994142] modalias: Loading kernel module '8250_dw' for alias 'acpi:80860F0A:80860F0A:'
[ 6.994741] modalias: Loading kernel module 'dwc3-pci' for alias 'pci:v00008086d00000F37sv00008086sd00007270bc0Csc03i80'
[ 6.994755] modalias: Cannot load module: Module 'dwc3-pci' not in dependency file
[ 6.995822] modalias: Loading kernel module 'i915' for alias 'pci:v00008086d00000F31sv00008086sd00007270bc03sc00i00'
[ 7.020061] modalias: Loaded kernel module kernel/drivers/i2c/algos/i2c-algo-bit.ko
[ 7.020960] byt_gpio INT33FC:02: [Firmware Bug]: pin 21 forcibly re-configured as GPIO
[ 7.021734] modalias: Loaded kernel module kernel/drivers/input/misc/soc_button_array.ko
[ 7.032229] 80860F0A:00: ttyS1 at MMIO 0x90b19000 (irq = 16, base_baud = 2764800) is a 16550A
[ 7.032427] serial serial0: tty port ttyS1 registered
[ 7.044061] 80860F0A:01: ttyS2 at MMIO 0x90b1b000 (irq = 17, base_baud = 2764800) is a 16550A
[ 7.048166] modalias: Loaded kernel module kernel/drivers/tty/serial/8250/8250_dw.ko
[ 7.048276] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 7.048410] modalias: Loaded kernel module kernel/drivers/gpu/drm/drm.ko
[ 7.048826] modalias: Loading kernel module '8250_dw' for alias 'acpi:80860F0A:80860F0A:'
[ 7.050247] modalias: Loaded kernel module kernel/drivers/video/fbdev/core/sysimgblt.ko
[ 7.051907] modalias: Loading kernel module 'processor_thermal_device' for alias 'acpi:INT3401:'
[ 7.054918] modalias: Loaded kernel module kernel/drivers/video/fbdev/core/sysfillrect.ko
[ 7.055956] modalias: Loaded kernel module kernel/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.ko
[ 7.056355] modalias: Loaded kernel module kernel/drivers/video/fbdev/core/syscopyarea.ko
[ 7.062866] int3401 thermal INT3401:00: Creating sysfs group for PROC_THERMAL_PLATFORM_DEV
[ 7.063069] modalias: Loaded kernel module kernel/drivers/thermal/intel/int340x_thermal/processor_thermal_device.ko

alias platform:bytcht_es8316 snd-soc-sst-byt-cht-es8316
alias platform:bytcr_rt5651 snd-soc-sst-bytcr-rt5651
alias platform:bytcr_rt5640 snd-soc-sst-bytcr-rt5640
alias platform:sst-atom-hifi2-platform snd-soc-sst-atom-hifi2-platform
alias platform:sst-mfld-platform snd-soc-sst-atom-hifi2-platform
alias sst snd-intel-sst-pci
alias acpi*:80860F28:* snd-intel-sst-acpi
alias acpi*:808622A8:* snd-intel-sst-acpi
alias sst snd-intel-sst-acpi
alias acpi*:10EC5651:* snd-soc-rt5651
alias acpi*:10EC5640:* snd-soc-rt5651
alias i2c:rt5651 snd-soc-rt5651
alias i2c:rt5640 snd-soc-rt5640
alias i2c:rt5639 snd-soc-rt5640
alias i2c:rt5642 snd-soc-rt5640
alias acpi*:INT33CA:* snd-soc-rt5640
alias acpi*:10EC3276:* snd-soc-rt5640
alias acpi*:10EC5640:* snd-soc-rt5640
alias acpi*:10EC5642:* snd-soc-rt5640
alias acpi*:INTCCFFD:* snd-soc-rt5640
alias i2c:es8316 snd-soc-es8316
alias of:N*T*Ceverest,es8316 snd-soc-es8316
alias of:N*T*Ceverest,es8316C* snd-soc-es8316
alias acpi*:ESSX8316:* snd-soc-es8316

Michael Goffioul

unread,
Nov 20, 2019, 12:52:40 PM11/20/19
to Android-x86
Sounds like a underscore vs. dash problem in module filename and module alias name. My 4.19.50 kernel uses snd_intel_sst_acpi in modules.alias, but snd-intel-sst-acpi.ko in modules.dep. The Android code that parses modules.dep will convert any dash in the filename to an underscore, to match it against the alias name: https://android.googlesource.com/platform/system/core/+/refs/tags/android-10.0.0_r2/init/modalias_handler.cpp#58

It seems that this convention doesn't stand anymore in your 5.4.0 kernel, the alias name also uses dashes.

Michael.


--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/633feab5-3cbf-4081-a9d2-589b766a4dcc%40googlegroups.com.

youling 257

unread,
Feb 6, 2020, 6:00:35 PM2/6/20
to Android-x86
How to fix this problem?
Bliss os 12 build include the "libcutils: add probe_module" patch, but no help for me load modules on 5.5 kernel Bliss os 12.
https://forum.xda-developers.com/showpost.php?p=81698039&postcount=239

在 2019年11月21日星期四 UTC+8上午1:52:40,Michael Goffioul写道:
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.

Michael Goffioul

unread,
Feb 7, 2020, 8:11:25 AM2/7/20
to Android-x86
You may try to comment the code line I highlighted.

To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/166ef626-3443-484a-8b75-004070687967%40googlegroups.com.

Mauro Rossi

unread,
May 8, 2020, 1:27:47 AM5/8/20
to Android-x86
Hi Michael,
if the modalias with new kernels 5.4 and later already uses underscore instead of dash,
the line you mentioned would not do any replace, so commenting it does not solve,
correct?

Michael Goffioul

unread,
May 8, 2020, 8:03:49 AM5/8/20
to Android-x86
If modalias uses underscores, then you need the mapping from dash to underscore when parsing the dep file.

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.

Mauro Rossi

unread,
May 10, 2020, 6:30:46 PM5/10/20
to Android-x86
Hi Michael, 
I have tested commenting that line and it caused the following regression with kernel 5.4 and later

The dmesg lines with "not in dependency file" are printed by InsmodWithDeps()

[   21.522847] modalias: Loading kernel module 'intel_hid' for alias 'acpi:INT33D5:'
[   21.522877] modalias: Cannot load module: Module 'intel_hid' not in dependency file
[   21.527153] modalias: Loading kernel module 'intel_hid' for alias 'acpi:INT33D5:'
[   21.528079] modalias: Cannot load module: Module 'intel_hid' not in dependency file
[   21.530964] modalias: Loading kernel module 'int3403_thermal' for alias 'acpi:INT3403:'
[   21.531978] modalias: Loading kernel module 'pinctrl_geminilake' for alias 'acpi:INT3453:INT3453:'
[   21.534550] modalias: Cannot load module: Module 'pinctrl_geminilake' not in dependency file
[   21.538467] modalias: Loaded kernel module kernel/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.ko
[   21.539461] modalias: Loading kernel module 'pinctrl_geminilake' for alias 'acpi:INT3453:INT3453:'
[   21.543777] modalias: Loaded kernel module kernel/drivers/thermal/intel/int340x_thermal/int3403_thermal.ko
[   21.545754] modalias: Cannot load module: Module 'pinctrl_geminilake' not in dependency file
[   21.546557] modalias: Loading kernel module 'int3403_thermal' for alias 'acpi:INT3403:'
[   21.548630] modalias: Loading kernel module 'pinctrl_geminilake' for alias 'acpi:INT3453:INT3453:'
[   21.551533] modalias: Cannot load module: Module 'pinctrl_geminilake' not in dependency file
[   21.551539] modalias: Loading kernel module 'efivars' for alias 'platform:efivars'
[   21.554397] modalias: Loading kernel module 'pinctrl_geminilake' for alias 'acpi:INT3453:INT3453:'
[   21.555528] modalias: Cannot load module: Module 'pinctrl_geminilake' not in dependency file 


On Friday, May 8, 2020 at 2:03:49 PM UTC+2, Michael Goffioul wrote:
If modalias uses underscores, then you need the mapping from dash to underscore when parsing the dep file.

On Fri, May 8, 2020 at 1:27 AM Mauro Rossi <issor...@gmail.com> wrote:
Hi Michael,
if the modalias with new kernels 5.4 and later already uses underscore instead of dash,
the line you mentioned would not do any replace, so commenting it does not solve,
correct?

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.

Michael Goffioul

unread,
May 10, 2020, 7:41:10 PM5/10/20
to Android-x86
Check your alias and dep file. If the alias file uses underscores, then you shouldn't comment that line. To be honest, I don't know where that alias snippet reported with dashes is coming from. My linux kernel 5.5 uses underscores in the alias file.

To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/d943a1f9-1876-4e6f-a81b-703293e77fe3%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages