Bug 195593 - "no codecs initialized" and no sound on HP Chromebook 13 G1
Summary: "no codecs initialized" and no sound on HP Chromebook 13 G1
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-27 15:34 UTC by ojab
Modified: 2017-06-04 15:56 UTC (History)
8 users (show)

See Also:
Kernel Version: 4.11-rc7
Subsystem:
Regression: No
Bisected commit-id:


Attachments
full dmesg (49.65 KB, text/plain)
2017-04-27 15:34 UTC, ojab
Details
full dmesg with blacklisted snd_hda_intel (49.70 KB, text/plain)
2017-04-27 17:04 UTC, ojab
Details
topology bin (76.30 KB, application/octet-stream)
2017-04-28 05:08 UTC, Vinod Koul
Details
UCM file (1.56 KB, text/plain)
2017-04-28 05:09 UTC, Vinod Koul
Details
Topology bin from ChromeOS (166.57 KB, application/octet-stream)
2017-04-28 09:52 UTC, ojab
Details
HiFi.conf from ChromeOS (9.74 KB, text/plain)
2017-04-28 09:55 UTC, ojab
Details
dmesg with topology bin from ChromeOS (50.00 KB, text/plain)
2017-04-28 10:29 UTC, ojab
Details
dmesg with topology bin from bugzilla (49.95 KB, text/plain)
2017-04-28 10:32 UTC, ojab
Details
dmesg with /lib/firmware/dfw_sst.bin removed (50.15 KB, text/plain)
2017-04-28 10:35 UTC, ojab
Details
dmesg with topology bin from ChromeOS (50.57 KB, text/plain)
2017-04-28 11:08 UTC, ojab
Details
dmesg with topology bin from bugzilla (50.34 KB, text/plain)
2017-04-28 11:10 UTC, ojab
Details
dmesg from ChromeOS with working sound (53.30 KB, text/plain)
2017-05-04 05:52 UTC, ojab
Details
topology binary (76.30 KB, application/octet-stream)
2017-05-10 11:57 UTC, Subhransu
Details
UCM file (1.56 KB, text/plain)
2017-05-10 12:06 UTC, Subhransu
Details
Corresponding conf file (60.21 KB, text/plain)
2017-05-10 12:12 UTC, Subhransu
Details
working HiFi.conf (1.80 KB, text/plain)
2017-05-10 12:48 UTC, ojab
Details

Description ojab 2017-04-27 15:34:08 UTC
Created attachment 256097 [details]
full dmesg

I've installed Fedora Workstation 26 alpha on HP Chromebook 13 G1 and sound input/output doesn't work. Kernel is actually distro kernel 4.11.0-0.rc7.git0.1.fc26.x86_64, soundcard is:

[ojab@localhost ~]$ sudo lspci -s 00:1f.3 -vvv
00:1f.3 Multimedia audio controller: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 64, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 275
        Region 0: Memory at d112c000 (64-bit, non-prefetchable) [size=16K]
        Region 4: Memory at d1110000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [50] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee0f00c  Data: 4172
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel, snd_soc_skl

There is a warning is dmesg, I think it's relevant:
 snd_hda_intel 0000:00:1f.3: no codecs initialized

Sound is obviously works fine in ChromeOS.
Comment 1 Takashi Iwai 2017-04-27 15:46:42 UTC
Try to blacklist snd-hda-intel and try snd-soc-skl instead.
Any difference?
Comment 2 ojab 2017-04-27 17:04:28 UTC
Created attachment 256099 [details]
full dmesg with blacklisted snd_hda_intel

Still nothing, in dmesg:

[    5.028077] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    5.190002] snd_soc_skl 0000:00:1f.3: Direct firmware load for 9d70-CORE-COREBOOT-0-tplg.bin failed with error -2
[    5.190006] snd_soc_skl 0000:00:1f.3: tplg fw 9d70-CORE-COREBOOT-0-tplg.bin load failed with -2
[    5.193593] snd_soc_skl 0000:00:1f.3: Direct firmware load for dfw_sst.bin failed with error -2
[    5.193596] snd_soc_skl 0000:00:1f.3: Fallback tplg fw dfw_sst.bin load failed with -2
[    5.193650] snd_soc_skl 0000:00:1f.3: Failed to init topology!
[    5.193687] snd_soc_skl 0000:00:1f.3: ASoC: failed to probe component -2
[    5.193750] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: failed to instantiate card -2
[    5.193851] skl_n88l25_s4567: probe of skl_n88l25_s4567 failed with error -2
Comment 3 ojab 2017-04-27 17:07:33 UTC
hmm, I assume that -2 is ENOENT and snd_soc_skl tries to load some firmware that's shipped with CheomeOS?

If needed, I can try to reinstall ChromeOS, fetch firmware there and copy it into Fedora.
Comment 4 ojab 2017-04-27 17:54:57 UTC
...and there is no 9d70-CORE-COREBOOT-0-tplg.bin file in ChromeOS, only dfw_sst.bin. With it copied there still no audio and dmesg says:

[ 3107.406418] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 3107.421789] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: CPU DAI System Pin not registered
[ 3107.427870] HDMI HDA Codec ehdaudio1D2: Max dais supported: 3
[ 3107.428417] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: CODEC DAI intel-hdmi-hifi1 not registered
Comment 5 Joshua M. Clulow 2017-04-27 18:25:31 UTC
Note that, though it uses request_firmware(), it's not looking for a firmware file.  It's the Skylake audio "topology" file, and it seems to be model-specific.
Comment 6 Takashi Iwai 2017-04-27 18:29:26 UTC
Yes, it's a model-specific, but a kind of firmware file, after all.  It renders the audio topology matching with the hardware implementation.

Vinod, Liam, how is the upstreaming status of this stuff?
Comment 7 Vinod Koul 2017-04-28 02:26:08 UTC
(In reply to Takashi Iwai from comment #6)
> Yes, it's a model-specific, but a kind of firmware file, after all.  It
> renders the audio topology matching with the hardware implementation.
> 
> Vinod, Liam, how is the upstreaming status of this stuff?

the base skl tppology which we use on ref boards is already upstream.
I can ask and find the topology file and send for testing
Comment 8 Vinod Koul 2017-04-28 02:53:37 UTC
oja can you send outputs of below:

lsmod |grep snd

make sure SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH and SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH are enabled.

SKL chromebooks have these two variants, so we need to find the right one here :)

Also $ ls /sys/bus/acpi/devices/ would help too
Comment 9 Vinod Koul 2017-04-28 05:08:40 UTC
Created attachment 256101 [details]
topology bin
Comment 10 Vinod Koul 2017-04-28 05:09:21 UTC
Created attachment 256103 [details]
UCM file
Comment 11 Vinod Koul 2017-04-28 05:11:25 UTC
base don log provided (thanks) was able to figure out the machine is skl_n88l25_s4567. So uploaded the topology bin and ucm file, please install the bin to /lib/firmware/ and reboot.

Card should get created.

Let me know how it goes and we can upstream this file as well
Comment 12 ojab 2017-04-28 09:52:28 UTC
Created attachment 256121 [details]
Topology bin from ChromeOS

Still no luck with provided topology bin, no cards are created with snd_hda_intel blacklisted or not.

Attaching dfw_sst.bin from ChromeOS for the reference.

AFAIU UCM file should be placed somewhere into /usr/share/alsa/ucm, if it's missing (or has wrong name/etc) and topology bin is exist in /lib/firmware -- sound card w/ outputs still should be created or not?
Comment 13 ojab 2017-04-28 09:55:58 UTC
Created attachment 256123 [details]
HiFi.conf from ChromeOS
Comment 14 ojab 2017-04-28 10:04:12 UTC
UCM config from ChromeOS:

$ cat /mnt/chromeos/usr/share/alsa/ucm/sklnau8825adi/sklnau8825adi.conf
Comment "Glados internal card"

SectionUseCase."HiFi" {
        File "HiFi.conf"
        Comment "Default"
}


I'm not sure that it's proper file, since "Glados" is the codename of another chromebook, but cdev is the same as in your HiFi.conf, so I assume it's the same sound part of soc.


I've tested all combinations of dfw_sst.bin/HiFi.conf (from ChromeOS/from bugzilla) and it doesn't work.
Comment 15 Vinod Koul 2017-04-28 10:13:01 UTC
(In reply to ojab from comment #12)
> Created attachment 256121 [details]
> Topology bin from ChromeOS
> 
> Still no luck with provided topology bin, no cards are created with
> snd_hda_intel blacklisted or not.

Can you provide me with the log with this binary installed

> 
> Attaching dfw_sst.bin from ChromeOS for the reference.

Did you try using it, if so please do provide the log

> 
> AFAIU UCM file should be placed somewhere into /usr/share/alsa/ucm, if it's
> missing (or has wrong name/etc) and topology bin is exist in /lib/firmware
> -- sound card w/ outputs still should be created or not?
UCM is for configuration of playback patch for rendering audio, so that partwill come later after card is created
Comment 16 ojab 2017-04-28 10:26:46 UTC
After some more experiments ALSA now shows "HDA Intel PCH" card with "Intel Skylake HDMI" chip and 5 * S/PDIF outputs even with dfw_sst.bin removed, but still no sound in speakers/headphones.
Will attach dmesg with not blacklisted snd_hda_intel shortly.
Comment 17 ojab 2017-04-28 10:29:54 UTC
Created attachment 256125 [details]
dmesg with topology bin from ChromeOS
Comment 18 ojab 2017-04-28 10:32:10 UTC
Created attachment 256127 [details]
dmesg with topology bin from bugzilla
Comment 19 ojab 2017-04-28 10:35:17 UTC
Created attachment 256129 [details]
dmesg with /lib/firmware/dfw_sst.bin removed

Looks like topology bin is cached somewhere or something like that, I see no difference between all three cases :/
Comment 20 Vinod Koul 2017-04-28 10:40:28 UTC
hi looks like the blacklisting is not done properly as snd_hda_intel is getting loaded, can you check

[    5.219307] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input5
[    5.219387] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input6
[    5.219460] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input7
[    5.219523] input: HDA Intel PCH HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8
[    5.219596] input: HDA Intel PCH HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9

this is trace from snd_hda_intel
Comment 21 ojab 2017-04-28 11:02:52 UTC
oh, snd_hda_intel should still be blacklisted. Will provide proper dmesg in a minute.
Comment 22 ojab 2017-04-28 11:08:13 UTC
Created attachment 256131 [details]
dmesg with topology bin from ChromeOS
Comment 23 ojab 2017-04-28 11:10:29 UTC
Created attachment 256133 [details]
dmesg with topology bin from bugzilla
Comment 24 ojab 2017-04-28 11:18:15 UTC
If (with ChromeOS topology) I `modprobe snd-soc-skl_nau88l25_ssm4567` (which should provide missing "CODEC DAI ssm4567-hifi", I assume) and then `rmmod && modprobe snd_soc_skl`, I'm getting:

[   55.548596] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   55.562667] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: CPU DAI System Pin not registered
[   55.562837] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: CPU DAI System Pin not registered
[   55.568191] HDMI HDA Codec ehdaudio1D2: Max dais supported: 3
[   55.568222] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: CODEC DAI intel-hdmi-hifi1 not registered
[   55.568364] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: CODEC DAI intel-hdmi-hifi1 not registered
Comment 25 Vinod Koul 2017-04-28 17:11:29 UTC
(In reply to ojab from comment #24)
> If (with ChromeOS topology) I `modprobe snd-soc-skl_nau88l25_ssm4567` (which
> should provide missing "CODEC DAI ssm4567-hifi", I assume) and then `rmmod
> && modprobe snd_soc_skl`, I'm getting:
> 
> [   55.548596] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops
> i915_audio_component_bind_ops [i915])
> [   55.562667] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: CPU DAI System Pin
> not registered
> [   55.562837] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: CPU DAI System Pin
> not registered
> [   55.568191] HDMI HDA Codec ehdaudio1D2: Max dais supported: 3
> [   55.568222] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: CODEC DAI
> intel-hdmi-hifi1 not registered
> [   55.568364] skl_n88l25_s4567 skl_n88l25_s4567: ASoC: CODEC DAI
> intel-hdmi-hifi1 not registered

With both binaries it is loading ChromeOS binary, please make sure you remove that before trying the one I provided.
Comment 26 ojab 2017-04-28 19:33:18 UTC
Both files are named dfw_sst.bin, so it's impossible to have it both installed.
Also logs is different for different binaries.
Comment 27 ojab 2017-04-28 19:34:47 UTC
Meanwhile I've built/installed vanilla kernel 4.11-rc8, logs are the same.
Comment 28 ojab 2017-05-03 18:39:02 UTC
Freshly compiled ChromiumOS also has no sound, the error is the same as in comment#24 :/

Unfortunately I can't figure out how can I boot Fedora using kernel from ChromiumOS checkout so far and AFAIU I can't boot anything but ChromeOS using kernel from ChromeOS (due to signature verification), so I'm going to try to compile ChromiumOS with the same kernel commit as ChromeOS using,
Comment 29 ojab 2017-05-04 05:52:33 UTC
Created attachment 256187 [details]
dmesg from ChromeOS with working sound
Comment 30 ojab 2017-05-08 15:02:54 UTC
Vinod, could you provide me with topology.conf from which your topology bin was generated?
Comment 31 Subhransu 2017-05-10 11:57:25 UTC
Created attachment 256353 [details]
topology binary

topology binary
Comment 32 Subhransu 2017-05-10 12:06:26 UTC
Created attachment 256355 [details]
UCM file
Comment 33 ojab 2017-05-10 12:07:22 UTC
Still
>[   20.481573] snd_soc_skl 0000:00:1f.3: ASoC: invalid manifest size
with latest binary. I assume that loading of topology v4 is broken, so you'll have to use alsa-1.1.3 for generating topology v5 that can be loaded with current kernels.
Comment 34 Subhransu 2017-05-10 12:12:47 UTC
Created attachment 256357 [details]
Corresponding conf file
Comment 35 ojab 2017-05-10 12:13:47 UTC
(and I'm not sure that generated v5 topology bin will be correct, see http://mailman.alsa-project.org/pipermail/alsa-devel/2017-May/120422.html)
Comment 36 Subhransu 2017-05-10 12:25:56 UTC
(In reply to ojab from comment #35)
> (and I'm not sure that generated v5 topology bin will be correct, see
> http://mailman.alsa-project.org/pipermail/alsa-devel/2017-May/120422.html)

This command should work.

#alsatplg -c <attached-conf> -o tplg.bin

Copy the generated topology binary to /lib/firmware/dfw_sst.bin
Comment 37 ojab 2017-05-10 12:48:28 UTC
Created attachment 256359 [details]
working HiFi.conf

AH, missed conf file. Thanks!
With topology generated using alsa-{lib,util}-1.1.3 sound is working on vanill-4.11.0 yay!

UCM file a bit off (version that works is attached, sound is played using output with highest PlaybackPriority) and I can't get sound switching from Speakers to Headphones if headphones is attached so far, but overall it works!
Comment 38 Subhransu 2017-05-11 05:34:32 UTC
(In reply to ojab from comment #37)
> Created attachment 256359 [details]
> working HiFi.conf
> 
> AH, missed conf file. Thanks!
> With topology generated using alsa-{lib,util}-1.1.3 sound is working on
> vanill-4.11.0 yay!
> 
> UCM file a bit off (version that works is attached, sound is played using
> output with highest PlaybackPriority) and I can't get sound switching from
> Speakers to Headphones if headphones is attached so far, but overall it
> works!

Does the playback work on Headphone as well? If it works fine, I can send the topology conf upstream.
Comment 39 ojab 2017-05-11 19:05:14 UTC
Yeah, Headphone also works.
Comment 40 Kiko 2017-06-04 15:56:45 UTC
(In reply to ojab from comment #37)
> 
> AH, missed conf file. Thanks!
> With topology generated using alsa-{lib,util}-1.1.3 sound is working on
> vanill-4.11.0 yay!

Can you share the procedure how you get the sound working?
Other than generated topology binary (@Subhransu), what else has it to be done?

Note You need to log in before you can comment on or make changes to this bug.