[Sound-open-firmware] SOF in a laptop Whiskey Lake ALC215

josep lladonosa capell jlladonosa at gmail.com
Sun Apr 19 13:29:03 CEST 2020


Hello, Pierre,

finally internal microphones are working in the 830 G6! Headphones and
speakers work, too.
In alsamixer card appears as "sof-hda-dsp" and chip: Realtek ALC215.

As a summary, this is what I did:

- Included the sof firmware (stable) from
https://github.com/thesofproject/sof-bin. That installed firmware and
topology files in /lib/firmware/intel/.

- Set up sof and relatives (make menuconfig) in the kernel (5.6.5) and
installed it:

 Device Drivers  --->
  <M>   Advanced Linux Sound Architecture  --->
  <M> Sound card support  --->
  <M>   ALSA for SoC audio support  --->
   [*]   Sound Open Firmware Support (CONFIG_SND_SOC_SOF_TOPLEVEL=y)
   [*]       SOF support for Cannonlake (SND_SOC_SOF_CANNONLAKE_SUPPORT=y)
   Intel Machine drivers  ---> (CONFIG_SND_SOC_INTEL_MACH=y)
     <M>   SKL/KBL/BXT/APL with HDA Codecs
(CONFIG_SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH=m)
(detected this because I missed including it!)
   [ ]     HDAudio codec support (#
CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC is not set)

- Additionally, I updated libasound2,libatopology2 deb packages
(compiled from source alsa-lib to get version 1.2.2-2.1 as Debian 10.3
now only has 1.1.8-1) and alsa-utils (from 1.1.8-2 to 1.2.2-1).

>From my guess, all lines (HDMI included) are handed now by sof driver.

Now, the only missing thing is that intenal microphone appears
unplugged. Cannot check now headphone's mic.


Regards, Josep

Missatge de josep lladonosa capell <jlladonosa at gmail.com> del dia ds.,
18 d’abr. 2020 a les 16:24:
>
> Hello,
>
> That was the clue. For the moment, firmware is loaded.
>
> Firmware info: version 1:4:2-66a5a
> Firmware: ABI 3:11:0 Kernel ABI 3:12:0
>
> By the way, is ABI message about topology?
> In other bugs I have seen, messages were explicitly showing the word
> "Topology"...
>
> Now, in this step, I do not have soundcard.
> How does the snd-hda-intel link work?
>
> I use xfce with pavucontrol (or alsamixer) and no sound card is present.
>
> I am using 5.6.5 kernel with its stock sof driver.
> Attached you will find dynamic_debug/control capture (only sound related lines).
>
>  dmesg | grep "hda\|sof-audio-pci"
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> [    3.657290] snd_hda_intel 0000:00:1f.3: DSP detected with PCI
> class/subclass/prog-if info 0x040100
> [    3.657451] snd_hda_intel 0000:00:1f.3: Digital mics found on
> Skylake+ platform, using SOF driver
> [    3.679868] sof-audio-pci 0000:00:1f.3: DSP detected with PCI
> class/subclass/prog-if info 0x040100
> [    3.680004] sof-audio-pci 0000:00:1f.3: Digital mics found on
> Skylake+ platform, using SOF driver
> [    3.680005] sof-audio-pci 0000:00:1f.3: PCI DSP detected
> [    3.680092] sof-audio-pci 0000:00:1f.3: DSP detected with PCI
> class/subclass/prog-if 0x040100
> [    3.680135] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops
> i915_globals_exit [i915])
> [    3.684330] sof-audio-pci 0000:00:1f.3: checking for capabilities
> at offset 0xc00
> [    3.684331] sof-audio-pci 0000:00:1f.3: found ML capability at 0xc00
> [    3.684342] sof-audio-pci 0000:00:1f.3: checking for capabilities
> at offset 0x800
> [    3.684343] sof-audio-pci 0000:00:1f.3: found DSP capability at 0x800
> [    3.684345] sof-audio-pci 0000:00:1f.3: checking for capabilities
> at offset 0x500
> [    3.684346] sof-audio-pci 0000:00:1f.3: found GTS capability at 0x500
> [    3.684349] sof-audio-pci 0000:00:1f.3: checking for capabilities
> at offset 0x1f00
> [    3.684349] sof-audio-pci 0000:00:1f.3: found DRSM capability at 0x1f00
> [    3.684352] sof-audio-pci 0000:00:1f.3: checking for capabilities
> at offset 0x700
> [    3.684352] sof-audio-pci 0000:00:1f.3: found SPIB capability at 0x700
> [    3.684359] sof-audio-pci 0000:00:1f.3: DMA mask is 64 bit
> [    3.684374] sof-audio-pci 0000:00:1f.3: hda global caps = 0x1009701
> [    3.684374] sof-audio-pci 0000:00:1f.3: detected 9 playback and 7
> capture streams
> [    3.684430] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
> [    3.684430] sof-audio-pci 0000:00:1f.3: using IPC IRQ 168
> [    3.684592] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000000 at  00000044
> [    3.684593] sof-audio-pci 0000:00:1f.3: PP capability, will probe DSP later.
> [    3.684595] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000040 at  00000048
> [    3.684598] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000000 at  00000048
> [    3.688924] sof-audio-pci 0000:00:1f.3: codec_mask = 0x5
> [    3.688933] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000000 at  00000048
> [    3.688934] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000040 at  00000048
> [    3.689051] sof-audio-pci 0000:00:1f.3: HDA codec #0 probed OK:
> response: 10ec0215
> [    3.689864] hdaudio ehdaudio0D0: loading codec module:
> hdaudio:v10EC0215r00100002a01
> [    3.751303] sof-audio-pci 0000:00:1f.3: HDA codec #2 probed OK:
> response: 8086280b
> [    3.751904] hdaudio ehdaudio0D2: loading codec module:
> hdaudio:v8086280Br00100000a01
> [    3.757729] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
> [    3.757733] sof-audio-pci 0000:00:1f.3: using HDA machine driver
> skl_hda_dsp_generic now
> [    3.758143] sof-audio-pci 0000:00:1f.3: loading firmware
> [    3.760363] sof-audio-pci 0000:00:1f.3: request_firmware
> intel/sof/sof-cnl.ri successful
> [    3.760380] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000002 at  00000048
> [    3.760385] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000000 at  00000048
> [    3.760392] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000000 at  00000044
> [    3.760397] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000004 at  00000044
> [    3.760398] sof-audio-pci 0000:00:1f.3: booting DSP firmware
> [    3.760460] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x40000
> successful
> [    3.760484] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x40000
> successful
> [    3.760489] sof-audio-pci 0000:00:1f.3: period_bytes:0x0
> [    3.760491] sof-audio-pci 0000:00:1f.3: periods:1
> [    3.760559] sof-audio-pci 0000:00:1f.3: FW Poll Status:
> reg=0xf0f0f0f successful
> [    3.760568] sof-audio-pci 0000:00:1f.3: FW Poll Status:
> reg=0xf0f0f0e successful
> [    3.760570] sof-audio-pci 0000:00:1f.3: unstall/run core: core_mask = 1
> [    3.760574] sof-audio-pci 0000:00:1f.3: DSP core(s) enabled? 1 : core_mask 1
> [    3.761121] sof-audio-pci 0000:00:1f.3: FW Poll Status:
> reg=0x80000000 successful
> [    3.761125] sof-audio-pci 0000:00:1f.3: FW Poll Status:
> reg=0x1010e0e successful
> [    3.761179] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
> [    3.761184] sof-audio-pci 0000:00:1f.3: error: no reply expected,
> received 0x0
> [    3.829875] sof-audio-pci 0000:00:1f.3: FW Poll Status:
> reg=0x5000001 successful
> [    3.843309] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x5 successful
> [    3.843857] sof-audio-pci 0000:00:1f.3: FW Poll Status:
> reg=0x140000 successful
> [    3.843860] sof-audio-pci 0000:00:1f.3: Firmware download
> successful, booting...
> [    3.849974] sof-audio-pci 0000:00:1f.3: ipc rx: 0x70000000
> [    3.849978] sof-audio-pci 0000:00:1f.3: ipc: DSP is ready
> 0x70000000 offset 0x81000
> [    3.850075] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:4:2-66a5a
> [    3.850078] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel
> ABI 3:12:0
> [    3.850282] sof-audio-pci 0000:00:1f.3: found ext header type 1 size 0xb8
> [    3.850306] sof-audio-pci 0000:00:1f.3:  mailbox upstream 0x81000 -
> size 0x1000
> [    3.850308] sof-audio-pci 0000:00:1f.3:  mailbox downstream 0xa0000
> - size 0x2000
> [    3.850310] sof-audio-pci 0000:00:1f.3:  stream region 0xc1000 - size 0x1000
> [    3.850313] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x70000000
> [    3.850317] sof-audio-pci 0000:00:1f.3: firmware boot complete
> [    3.850339] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000000 at  00000048
> [    3.850344] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000002 at  00000048
> [    3.850348] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000004 at  00000044
> [    3.850351] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000000 at  00000044
> [    3.850353] sof-audio-pci 0000:00:1f.3: SOF firmware trace disabled
> [    3.850407] sof-audio-pci 0000:00:1f.3: created machine skl_hda_dsp_generic
> [    3.850408] sof-audio-pci 0000:00:1f.3: Completing SOF PCI probe
>
> Missatge de Pierre-Louis Bossart
> <pierre-louis.bossart at linux.intel.com> del dia dv., 17 d’abr. 2020 a
> les 21:35:
> >
> > Hi Josep,
> >
> > > I missed a step when following
> > > https://thesofproject.github.io/latest/getting_started/build-guide/build-from-scratch.html
> > > in "Topology and tools build results".
> > > It says: "The topology files are located in the
> > > tools/build_tools/topology folder. Copy them to the target machine’s
> > > /lib/firmware/intel/sof-tplg folder."
> > > So I copied all *.conf and *.tplg files to the specified folder. It is
> > > not clear there which files are (are the *.tplg only?).
> >
> > Ah, there's a misunderstanding here, sorry about that.
> >
> > That guide to build the firmware only applies to open platforms
> > (Chromebooks and Up boards). For devices designed for Windows, the
> > firmware needs to be signed with an Intel production key - which is not
> > released to the general public. So you *have* to use the binary
> > firmwares available at
> > https://github.com/thesofproject/sof-bin/tree/stable-v1.4.2
> >
> > the go.sh script will install everything and add the links as needed.
> >
> > If you compile yourself, you will use the community key and the boot
> > will fail - guaranteed.
> >
> > > I tried adding as many options as I could to the kernel config by menuconfig.
> > > Coud not find these:
> > > CONFIG_SND_SOC_SOF_OF=m
> > > CONFIG_SND_SOC_SOF_CLIENT_SUPPORT=y
> > >
> > > CONFIG_SND_SOC_SOF_IMX_TOPLEVEL=y
> > > CONFIG_SND_SOC_SOF_IMX8_SUPPORT=y
> >
> > That's fine, they are not needed on all platforms (dependencies on ARM
> > stuff and code that's not yet merged).
> >
> > >
> > > But anyway, even after adding the options you gave to kernel, there
> > > are still some errors:
> > >
> > > dmesg |grep "hda\|sof-audio-pci\|error"
> > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > > [    7.708129] sof-audio-pci 0000:00:1f.3: error: cl_copy_fw: timeout
> > > HDA_DSP_SRAM_REG_ROM_STATUS read
> > > [    7.708141] sof-audio-pci 0000:00:1f.3: error: load fw failed ret: -110
> > > [    7.708168] sof-audio-pci 0000:00:1f.3: error: status = 0x0000002c
> > > panic = 0x00000000
> > > [    7.708177] sof-audio-pci 0000:00:1f.3: error: failed to reset DSP
> > > [    7.708180] sof-audio-pci 0000:00:1f.3: error: failed to boot DSP
> > > firmware -110
> > > [    7.758514] sof-audio-pci 0000:00:1f.3: error:
> > > hda_dsp_core_reset_enter: timeout on HDA_DSP_REG_ADSPCS read
> > > [    7.758518] sof-audio-pci 0000:00:1f.3: error: dsp core reset
> > > failed: core_mask f
> > > [    7.758759] sof-audio-pci 0000:00:1f.3: error: failed to probe DSP hardware!
> > > [    7.759015] sof-audio-pci: probe of 0000:00:1f.3 failed with error -110
> > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >
> > Yes, that's a clear sign of what I mentioned above. Your firmware is not
> > authenticated so the boot fails. Please use the signed binaries and retry.
> >
> > We probably have to document this better...
> >
> > Regards
> > -Pierre
> >
> >


More information about the Sound-open-firmware mailing list