mt8186_mt6366 rt1015p/speaker-codec issue
mailinglists at kuhnchris.eu
mailinglists at kuhnchris.eu
Mon Sep 23 12:14:51 PDT 2024
Dear linux-mediatek community!
First of all, if this is the wrong channel or way to ask question(s) like this, please let me know where to go/redirect me as required, this was the closest to a mediatek-arm based community I could find after a cursory google search - thanks in advance!
To the issue on hand: this is an audio related issue with the mt8186-audio / mt8186_mt6366 via the rt1015p driver.
In kernel 5.15 the sound card driver load via rt1015p as rt1019p seems to succeed just fine:
[ 0.202316] mt6358-sound mt6358-sound: mt6358_platform_driver_probe(), dev name mt6358-sound
[ 0.202486] rt1015p rt1019p: GPIO lookup for consumer sdb
[ 0.202489] rt1015p rt1019p: using device tree for GPIO lookup
[ 0.202497] of_get_named_gpiod_flags: parsed 'sdb-gpios' property of node '/rt1019p[0]' - status (0)
...
[ 5.503843] mt8186_mt6366_rt1019_rt5682s sound: there is not valid maps for state aud_gpio_tdm_off
[ 5.503876] mt8186_mt6366_rt1019_rt5682s sound: there is not valid maps for state aud_gpio_tdm_on
[ 5.505701] mt8186_mt6366_rt1019_rt5682s sound: GPIO lookup for consumer dmic
[ 5.505710] mt8186_mt6366_rt1019_rt5682s sound: using device tree for GPIO lookup
[ 5.505716] of_get_named_gpiod_flags: can't parse 'dmic-gpios' property of node '/sound[0]'
[ 5.505725] of_get_named_gpiod_flags: can't parse 'dmic-gpio' property of node '/sound[0]'
[ 5.505730] mt8186_mt6366_rt1019_rt5682s sound: using lookup tables for GPIO lookup
[ 5.505732] mt8186_mt6366_rt1019_rt5682s sound: No GPIO consumer dmic found
[ 5.612768] mt8186_mt6366_rt1019_rt5682s sound: there is not valid maps for state aud_gpio_tdm_off
[ 5.612783] mt8186_mt6366_rt1019_rt5682s sound: there is not valid maps for state aud_gpio_tdm_on
[ 5.614221] mt8186_mt6366_rt1019_rt5682s sound: GPIO lookup for consumer dmic
[ 5.614239] mt8186_mt6366_rt1019_rt5682s sound: using device tree for GPIO lookup
[ 5.614251] of_get_named_gpiod_flags: can't parse 'dmic-gpios' property of node '/sound[0]'
[ 5.614268] of_get_named_gpiod_flags: can't parse 'dmic-gpio' property of node '/sound[0]'
[ 5.614277] mt8186_mt6366_rt1019_rt5682s sound: using lookup tables for GPIO lookup
[ 5.614281] mt8186_mt6366_rt1019_rt5682s sound: No GPIO consumer dmic found
[ 5.614565] mt8186_mt6366_rt1019_rt5682s sound: there is not valid maps for state aud_gpio_tdm_off
[ 5.614589] mt8186_mt6366_rt1019_rt5682s sound: there is not valid maps for state aud_gpio_tdm_on
[ 5.721382] mt8186-audio 11210000.audio-controller: ASoC: error at soc_component_read_no_lock on 11210000.audio-controller for register: [0x00000e40] -16
[ 5.726771] dmic-codec dmic-codec: GPIO lookup for consumer dmicen
[ 5.726788] dmic-codec dmic-codec: using device tree for GPIO lookup
[ 5.726799] of_get_named_gpiod_flags: can't parse 'dmicen-gpios' property of node '/dmic-codec[0]'
[ 5.726815] of_get_named_gpiod_flags: can't parse 'dmicen-gpio' property of node '/dmic-codec[0]'
[ 5.726824] dmic-codec dmic-codec: using lookup tables for GPIO lookup
[ 5.726828] dmic-codec dmic-codec: No GPIO consumer dmicen found
[ 5.727188] rt1015p rt1019p: ASoC: sink widget SDB overwritten
[ 5.773576] debugfs: File 'Mt8186 bt Playback' in directory 'dapm' already present!
[ 5.773605] debugfs: File 'Mt8186 bt Capture' in directory 'dapm' already present!
[ 5.778985] cros-ec-dev cros-ec-dev.14.auto: CrOS System Control Processor MCU detected
[ 5.797209] input: sof-mt8186_rt1019_rt5682s HDMI Jack as /devices/platform/sound/sound/card0/input5
[ 5.797563] input: sof-mt8186_rt1019_rt5682s Headset Jack as /devices/platform/sound/sound/card0/input6
But with kernel 6.11-rc7, the sof loads properly like in 5.15, but the I2S3 which links to speaker-codecs, which links to the rt1015p seems to... not work? I sadly have no idea how I could help cooperate trying to get this fixed, I tried disabling the I2S3, but that made the driver very upset that it's missing - trying to re-alias the headphone codec (the rt5682s one) failed due to not getting a lock (makes sense since it's using the same i2s i assume). Also I do not really know if there is any difference between rt1015p and rt1019p, both seem to use the same driver and have a alias/compatible with, so I assume those should be fine... (the rt1019p in the output of the 5.15 kernel is due to the node in the DT being called 'rt1019p', so maybe this is just a fluke)
(Just one thing i noticed, right before sending: comparing the rt1015p output it looks like the 5.15 kernel parses the sdb-gpio but the 6.11 doesn't provide any additional output for rt1015p in the logs... )
[ 13.424741] rt1015p speaker-codec: no init pinctrl state
[ 13.424760] rt1015p speaker-codec: no sleep pinctrl state
[ 13.424765] rt1015p speaker-codec: no idle pinctrl state
[ 13.424835] rt1015p speaker-codec: driver: 'rt1015p': driver_bound: bound to device
[ 13.424901] rt1015p speaker-codec: bus: 'platform': really_probe: bound device to driver rt1015p
[ 13.815913] mt8186-audio 11210000.audio-controller: no pinctrl handle
[ 13.816975] mt8186-audio 11210000.audio-controller: mtk_afe_combine_sub_dai(), num of dai 41
[ 13.825542] mt8186-audio 11210000.audio-controller: No cache defaults, reading back from HW
[ 13.834376] mt8186-audio 11210000.audio-controller: driver: 'mt8186-audio': driver_bound: bound to device
[ 13.834417] mt8186-audio 11210000.audio-controller: bus: 'platform': really_probe: bound device to driver mt8186-audio
[ 14.545104] mt8186_mt6366 sound: no default pinctrl state
[ 14.545186] mt8186_mt6366 sound: error -ENOENT: I2S3: codec dai not found
[ 14.551998] mt8186_mt6366 sound: probe with driver mt8186_mt6366 failed with error -2
The device in question is a Asus Chromebook CM1402CM2a/CL1402CM2A - a Mediatek Kompanio 520 (MT8186) using the mt8186-corosla-tentacruel-sku262144 device tree from the kernel - everything is working just fine (after patching out the DP-USBC port mux thing via [PATCH] arm64: dts: mediatek: mt8186-corsola: Disable DPI display interface ) - just the audio refusing to work is bothering me - I would even ignore the on-board speaker and just use headphones, but apparently both run via the same driver? Not really sure what the function of the rt5682s would be then (maybe HDMI audio?) - but sadly I cannot debug this any further as I am pretty much with the back to the wall - the rt1015p seems to load, so I am not even sure if this is a mediatek or a realtek (assuming the rt in rt1015p stands for realtek of course...) issue to begin with.
If there are any more infos I should provide (full dmesg logs, some other commands?) please let me know.
Sorry for all the rant and thanks for reading!
Chris
More information about the Linux-mediatek
mailing list