Bug 201251 - Enable the digital microphone (DMIC) of Intel audio controller [8086:9dc8]
Summary: Enable the digital microphone (DMIC) of Intel audio controller [8086:9dc8]
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: 2018-09-27 05:58 UTC by jian-hong
Modified: 2020-05-27 21:09 UTC (History)
54 users (show)

See Also:
Kernel Version: 4.19
Tree: Mainline
Regression: No


Attachments
alsa info (34.49 KB, text/plain)
2018-09-27 06:04 UTC, jian-hong
Details
Intenal MIC on Windows (67.88 KB, image/jpeg)
2018-09-27 06:11 UTC, jian-hong
Details
Internal speaker uses Realtek driver on Windows (52.05 KB, image/jpeg)
2018-09-27 06:12 UTC, jian-hong
Details
Other MICs use Realtek driver on Windows (66.67 KB, image/jpeg)
2018-09-27 06:14 UTC, jian-hong
Details
dmesg with snd_hda_intel (64.92 KB, text/plain)
2018-09-27 06:28 UTC, jian-hong
Details
dmesg without snd_hda_intel (65.51 KB, text/plain)
2018-09-27 06:41 UTC, jian-hong
Details
Intel SST driver's Device instance path on Windows (56.94 KB, image/jpeg)
2018-09-27 06:54 UTC, jian-hong
Details
acpidump (1.70 MB, text/plain)
2018-09-27 07:43 UTC, jian-hong
Details
dmesg with Skylake driver w/ latest ASoC code (62.19 KB, text/plain)
2018-10-26 22:54 UTC, Pierre Bossart
Details
topology file (22.59 KB, application/octet-stream)
2018-10-26 23:02 UTC, Pierre Bossart
Details
Acer Z24-890 acpidump output (1.62 MB, text/plain)
2018-11-23 05:55 UTC, Chris Chiu
Details
Acer Z24-890 lspci output (6.64 KB, text/plain)
2018-11-23 05:56 UTC, Chris Chiu
Details
Acer Z24-890 dmesg of for-next branch (57.56 KB, text/plain)
2018-11-23 05:58 UTC, Chris Chiu
Details
dmesg with sound/soc DEBUG enabled (58.44 KB, text/plain)
2018-11-27 13:59 UTC, Chris Chiu
Details
DSDT table of Z24-890 (2.02 MB, text/x-csrc)
2018-11-27 14:00 UTC, Chris Chiu
Details
Acer Z24-890 dmesg w/ initcall_debug (166.21 KB, text/plain)
2018-11-28 14:22 UTC, Chris Chiu
Details
Acer Z24-890 dmesg for intel-sst hdaudio (60.14 KB, text/plain)
2018-11-29 07:14 UTC, Chris Chiu
Details
Acer Z24-890 dsp_fw_cnl.bin (570.17 KB, application/macbinary)
2018-11-30 06:48 UTC, Chris Chiu
Details
Acer Z24-890 dmesg for cnl_v1858 dw (60.51 KB, text/plain)
2018-12-04 14:05 UTC, Chris Chiu
Details
Acer Z24-890 dmesg for windows fw (63.73 KB, text/plain)
2018-12-04 14:06 UTC, Chris Chiu
Details
dmesg of Acer Crux (55.02 KB, text/plain)
2019-01-23 08:44 UTC, jian-hong
Details
alsa-info with Mark Brown's for-next kernel (HDA quirk) (39.02 KB, text/plain)
2019-01-24 05:10 UTC, jian-hong
Details
alsa-info with Mark Brown's for-next kernel with snd_soc_skl for Comment 52 (5.09 KB, text/plain)
2019-01-24 05:31 UTC, jian-hong
Details
dmesg with Mark Brown's for-next kernel with snd_soc_skl for Comment 53 (52.79 KB, text/plain)
2019-01-24 05:33 UTC, jian-hong
Details
alsa-info with Mark Brown's for-next kernel with snd_soc_skl and v1858.bin (30.47 KB, text/plain)
2019-01-25 05:10 UTC, jian-hong
Details
dmesg with Mark Brown's for-next kernel with snd_soc_skl and v1858.bin for Comment 56 (55.14 KB, text/plain)
2019-01-25 05:13 UTC, jian-hong
Details
dmesg with Mark Brown's for-next kernel with snd_soc_skl and v1858.bin - no backend DAIs (55.14 KB, text/plain)
2019-01-28 09:56 UTC, jian-hong
Details
dmesg of (61.05 KB, text/plain)
2019-07-26 08:11 UTC, jian-hong
Details
topology file for HDaudio platforms with 2 DMICs (41.85 KB, application/octet-stream)
2019-07-26 16:11 UTC, Pierre Bossart
Details
topology file for HDaudio platforms with 4 DMICs (41.99 KB, application/octet-stream)
2019-07-26 16:12 UTC, Pierre Bossart
Details
config to test SOF w/ DMIC support (138.38 KB, text/plain)
2019-07-26 20:00 UTC, Pierre Bossart
Details
dmesg SOF 5.3-rc1 z24-890 (64.01 KB, text/plain)
2019-07-29 06:45 UTC, jian-hong
Details
alsa-info SOF 5.3-rc1 z24-890 of comment #76 (34.64 KB, text/plain)
2019-07-29 06:47 UTC, jian-hong
Details
Screenshot of Audacity for internal DMIC on z24-890 (66.68 KB, image/png)
2019-07-30 06:16 UTC, jian-hong
Details
dmesg recording from SOF 5.3-rc1 z24-890 (63.53 KB, text/plain)
2019-07-30 06:42 UTC, jian-hong
Details
alsa-info spectre x360 (36.36 KB, text/plain)
2019-08-14 00:41 UTC, Tristan Mahe
Details
patch to compile for-next branch as of commit da84c03c03cfadffe00f72f83ea9f556b903f565 (1.02 KB, patch)
2019-08-14 03:54 UTC, Tristan Mahe
Details | Diff
alsa-info for working speakers / still no dmic working though (34.84 KB, text/plain)
2019-08-14 04:17 UTC, Tristan Mahe
Details
dmesg with sof ddebug activated (98.16 KB, text/plain)
2019-08-14 17:19 UTC, Tristan Mahe
Details
latest HDaudio topology files (7.58 KB, application/gzip)
2019-08-14 17:32 UTC, Pierre Bossart
Details
dmesg while speaker-test -c 4 (14.97 KB, application/gzip)
2019-08-14 19:02 UTC, Tristan Mahe
Details
dmesg without all the traces (99.22 KB, text/plain)
2019-08-14 21:18 UTC, Tristan Mahe
Details
kernel config 5.4.0-rc7 Arch not working (236.71 KB, text/plain)
2019-11-14 14:04 UTC, Robert
Details
nhlt.dsl (30.48 KB, text/x-csrc)
2020-04-15 08:07 UTC, Josep Lladonosa Capell
Details
Attachment of all dynamic_debug/control lines for kernel 5.6.4 in HP Elitebook 830 G6 (370.99 KB, text/plain)
2020-04-16 03:26 UTC, Josep Lladonosa Capell
Details
Attachment of sound related dynamic_debug/control lines for kernel 5.6.5 in HP Elitebook 830 G6 and sof DSP detections (51.46 KB, text/plain)
2020-04-19 06:14 UTC, Josep Lladonosa Capell
Details
ALSA info output for Acer Swift SF314-55G Ubuntu 18.04.4 (87.99 KB, text/plain)
2020-04-19 23:41 UTC, Siddharth Pant
Details
pulseaudio logs for Acer Swift SF314-55G (189.74 KB, text/plain)
2020-04-20 20:52 UTC, Siddharth Pant
Details
dmesg output as per comment 168 (77.88 KB, text/plain)
2020-05-06 09:39 UTC, glenn.mccarthy
Details
Data as per comment #177 (4.06 KB, text/plain)
2020-05-07 06:52 UTC, glenn.mccarthy
Details

Description jian-hong 2018-09-27 05:58:02 UTC
We have an Acer SWIFT laptop equipped with Intel Whiskey Lake CPU and Intel audio controller [8086:9dc8].

00:1f.3 Multimedia audio controller [0401]: Intel Corporation Device [8086:9dc8] (rev 30)
	Subsystem: Acer Incorporated [ALI] Device [1025:129c]
	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: 32, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 133
	Region 0: Memory at a1110000 (64-bit, non-prefetchable) [size=16K]
	Region 4: Memory at a1000000 (64-bit, non-prefetchable) [size=1M]
	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: [80] Vendor Specific Information: Len=14 <?>
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee10004  Data: 4023
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel, snd_soc_skl

We get information from installed Windows that the internal MIC is a Microphone Array - Front Panel Digital Jack using the Intel Smart Sound Technology (Intel SST) driver.  So, we tried to reconfigure the Pin Node ID 0x12's default value as
Comment 1 jian-hong 2018-09-27 06:04:03 UTC
Created attachment 278783 [details]
alsa info

So, we tried to reconfigure the Pin Node ID 0x12's default value as 0x90a60120 (also tried NID 0x13) of ALC256.  But the internal microphone still cannot be used.  It only records white noise.
Comment 2 jian-hong 2018-09-27 06:11:32 UTC
Created attachment 278785 [details]
Intenal MIC on Windows

Microphone Array - Front Panel Digital Jack uses Intel Smart Sound Technology (Intel SST) driver.
Comment 3 jian-hong 2018-09-27 06:12:44 UTC
Created attachment 278787 [details]
Internal speaker uses Realtek driver on Windows
Comment 4 jian-hong 2018-09-27 06:14:42 UTC
Created attachment 278789 [details]
Other MICs use Realtek driver on Windows

All of the audio things use Realtek driver, except internal microphone on Windows.
Comment 5 jian-hong 2018-09-27 06:28:08 UTC
Created attachment 278791 [details]
dmesg with snd_hda_intel

I also notice the PCI ID [8086:9dc8] is listed in sound/soc/intel/skylake/skl.c which is related to Intel SST on Linux.

Therefore, I add some debug messages to trace the code path intel sound skylake which is based on 4.19-rc5

diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 1d17be0f78a0..aac57b69459b 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -503,6 +503,7 @@ static int skl_machine_device_register(struct skl *skl)
        struct platform_device *pdev;
        int ret;
 
+       dev_warn(bus->dev, "%s\n", __func__);
        pdev = platform_device_alloc(mach->drv_name, -1);
        if (pdev == NULL) {
                dev_err(bus->dev, "platform device alloc failed\n");
@@ -536,6 +537,7 @@ static int skl_dmic_device_register(struct skl *skl)
        struct platform_device *pdev;
        int ret;
 
+       dev_warn(bus->dev, "%s\n", __func__);
        /* SKL has one dmic port, so allocate dmic device for this */
        pdev = platform_device_alloc("dmic-codec", -1);
        if (!pdev) {
@@ -639,6 +641,7 @@ static int probe_codec(struct hdac_bus *bus, int addr)
        struct skl *skl = bus_to_skl(bus);
        struct hdac_device *hdev;
 
+       dev_warn(bus->dev, "%s\n", __func__);
        mutex_lock(&bus->cmd_mutex);
        snd_hdac_bus_send_cmd(bus, cmd);
        snd_hdac_bus_get_response(bus, addr, &res);
@@ -659,6 +662,7 @@ static void skl_codec_create(struct hdac_bus *bus)
 {
        int c, max_slots;
 
+       dev_warn(bus->dev, "%s\n", __func__);
        max_slots = HDA_MAX_CODECS;
 
        /* First try to probe all given codec slots */
@@ -718,6 +722,7 @@ static void skl_probe_work(struct work_struct *work)
        struct hdac_ext_link *hlink = NULL;
        int err;
 
+       dev_warn(bus->dev, "%s\n", __func__);
        if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) {
                err = skl_i915_init(bus);
                if (err < 0)
@@ -804,6 +809,7 @@ static int skl_create(struct pci_dev *pci,
        }
 
        bus = skl_to_bus(skl);
+       dev_warn(bus->dev, "%s\n", __func__);
        snd_hdac_ext_bus_init(bus, &pci->dev, &bus_core_ops, io_ops, NULL);
        bus->use_posbuf = 1;
        skl->pci = pci;
@@ -823,6 +829,7 @@ static int skl_first_init(struct hdac_bus *bus)
        unsigned short gcap;
        int cp_streams, pb_streams, start_idx;
 
+       dev_warn(bus->dev, "%s\n", __func__);
        err = pci_request_regions(pci, "Skylake HD audio");
        if (err < 0)
                return err;
@@ -888,6 +895,7 @@ static int skl_probe(struct pci_dev *pci,
        struct hdac_bus *bus = NULL;
        int err;
 
+       pr_warn("snd_soc_skl: %s\n", __func__);
        /* we use ext core ops, so provide NULL for ops here */
        err = skl_create(pci, NULL, &skl);
        if (err < 0)
@@ -898,7 +906,7 @@ static int skl_probe(struct pci_dev *pci,
        err = skl_first_init(bus);
        if (err < 0)
                goto out_free;
-
+       dev_warn(bus->dev, "%s\n", __func__);
        skl->pci_id = pci->device;
 
        device_disable_async_suspend(bus->dev);

However, there is no related message shown in dmesg.  The snd_soc_skl is loaded, but skl_probe() is not called.
Comment 6 jian-hong 2018-09-27 06:41:25 UTC
Created attachment 278793 [details]
dmesg without snd_hda_intel

According to comment 5, I add "modprobe.blacklist=snd_hda_intel" to boot command to disable snd_hda_intel module.

skl_probe() function is called now, but it cannot find a driver.

[    8.612356] snd_soc_skl: skl_probe
[    8.612371] snd_soc_skl 0000:00:1f.3: enabling device (0000 -> 0002)
[    8.612550] (NULL device *): skl_create
[    8.612552] snd_soc_skl 0000:00:1f.3: skl_first_init
[    8.621218] snd_soc_skl 0000:00:1f.3: skl_probe
[    8.622230] snd_soc_skl 0000:00:1f.3: No matching machine driver found
Comment 7 jian-hong 2018-09-27 06:54:29 UTC
Created attachment 278795 [details]
Intel SST driver's Device instance path on Windows

According to comment 4, we also notice the Device instance path on Windows is: 
INTELAUDIO\CTLR_DEV_9DC8&LINKTYPE_02&DEVTYPE_01&VEN_8086&DEV_AE20&SUBSYS_1025129C&REV_10EC\5&394DE642&0&0100
Comment 8 jian-hong 2018-09-27 07:43:23 UTC
Created attachment 278799 [details]
acpidump

After disassemble the ACPI dump, the subsystem PCI ID [1025:129C], also listed in comment 7, is in NHLT part.  However, it is only Raw Table Data now.

/*
 * Intel ACPI Component Architecture
 * AML/ASL+ Disassembler version 20160831-64
 * Copyright (c) 2000 - 2016 Intel Corporation
 * 
 * Disassembly of nhlt.dat, Wed Sep 26 16:31:06 2018
 *
 * ACPI Data Table [NHLT]
 *
 * Format: [HexOffset DecimalOffset ByteLength]  FieldName : FieldValue
 */

[000h 0000   4]                    Signature : "NHLT"    
[004h 0004   4]                 Table Length : 0000185C
[008h 0008   1]                     Revision : 00
[009h 0009   1]                     Checksum : 46
[00Ah 0010   6]                       Oem ID : "ACRSYS"
[010h 0016   8]                 Oem Table ID : "ACRPRDCT"
[018h 0024   4]                 Oem Revision : 00000002
[01Ch 0028   4]              Asl Compiler ID : "    "
[020h 0032   4]        Asl Compiler Revision : 01000013


**** Unknown ACPI table signature [NHLT]


Raw Table Data: Length 6236 (0x185C)

  0000: 4E 48 4C 54 5C 18 00 00 00 46 41 43 52 53 59 53  // NHLT\....FACRSYS
  0010: 41 43 52 50 52 44 43 54 02 00 00 00 20 20 20 20  // ACRPRDCT....    
  0020: 13 00 00 01 01 2F 18 00 00 02 00 86 80 20 AE EC  // ...../....... ..
  0030: 10 9C 12 25 10 01 01 00 5C 00 00 00 00 01 0F 04  // ...%....\.......
  0040: 01 04 00 00 DE FF 64 00 04 28 00 00 00 00 C4 FF  // ......d..(......
  0050: 3C 00 C4 FF 3C 00 01 04 00 00 1A 00 64 00 04 28  // <...<.......d..(
...
Comment 9 Daniel Drake 2018-10-02 08:04:29 UTC
https://www.pcworld.com/article/3300798/intel/intels-whiskey-lake-notebook-chip-launches-emphasizing-connectivity.html

> Intel also added a new quad-core audio DSP, designed to be used in
> conjunction 
> with far-field mics on laptops. Though Windows 10 has included the Cortana
> digital assistant since its inception, Amazon and Microsoft have finalized
> their partnership to put Alexa on to Windows PCs, as well. 

We believe that's why this config has appeared in this product, the first one we've seen that has the mic device not as part of HDA.

But it sounds like it won't be the only product that appears in this way. In addition to figuring out how to make the existing SST driver detect and work with this mic array, it seems like we will need to find a way to allow both HDA and SST drivers to bind to the same PCI device.
Comment 10 Pierre Bossart 2018-10-22 17:54:48 UTC
Thanks for the information.
The only way to enable DMIC support with HDA is to enable the DSP support. If you use the legacy HDaudio driver you will not be able to access the DSP.

So far, the only users of the DMIC were also using I2S, so there was a clear distinction between the HDaudio world and the DMIC/I2S world. With new products based on HDAudio + DMIC this is no longer the case.

However things are not that bad. Intel worked on enabling HDAudio + DSP and the patches were merged by Mark Brown so should be queued for 4.20 or 5.0. We have not however tested the DMIC path. 

Would you mind providing the references of the ACER device, I'll try to get one purchased to solve this.
Comment 11 Daniel Drake 2018-10-23 00:54:41 UTC
It's Acer Swift SF314-55. Let me know if you have trouble getting hold of it.
Comment 12 Pierre Bossart 2018-10-23 02:48:25 UTC
Humm, yes it looks difficult to find, AnandTech tells me this model will be for sale in November. Even on the Acer site it's SF314-51..54 that's for sale at the moment, the 55 is not even listed.
Comment 13 Pierre Bossart 2018-10-26 19:28:58 UTC
just to confirm, the probe does happen with skl_hda_probe:

[    8.612356] snd_soc_skl: skl_probe
[    8.612371] snd_soc_skl 0000:00:1f.3: enabling device (0000 -> 0002)
[    8.612550] (NULL device *): skl_create
[    8.612552] snd_soc_skl 0000:00:1f.3: skl_first_init
[    8.621218] snd_soc_skl 0000:00:1f.3: skl_probe
[    8.622230] snd_soc_skl 0000:00:1f.3: No matching machine driver found

but it since you are missing the HDaudio card support w/ the SKL driver the probe stops. I'll give it a try with the updated code
Comment 14 Pierre Bossart 2018-10-26 22:54:47 UTC
Created attachment 279181 [details]
dmesg with Skylake driver w/ latest ASoC code

The log show the probe progresses but stops due to a firmware download issue and there is also an error message during the DMIC NHLT parsing. Both issues will have to involve people smarter than me.
Comment 15 Pierre Bossart 2018-10-26 23:01:07 UTC
My latest code is at https://github.com/plbossart/sound/tree/debug/skl

a dedicated topology file is required (will attach)

kernel config for SST: https://github.com/thesofproject/kconfig/blob/master/sst-defconfig
Comment 16 Pierre Bossart 2018-10-26 23:02:54 UTC
Created attachment 279183 [details]
topology file

needs to be copied as /lib/firmware/dfw_sst.bin
Comment 17 Pierre Bossart 2018-11-02 18:39:30 UTC
I am able to play audio on the speakers by 
a) using Mark Brown's for-next branch
b) using the topology file described in Comment 16
c) install and boot, then set amixer -Dhw:0 cset numid=1 on

What needs to be fixed is the firmware file, apparently the one in /lib/firmware/intel/dsp_fw_cnl_v1191.bin will not boot while the one extracted from the Windows driver does (need to copy it to the lib/firmware/intel directory and update the dsp_fw_cnl.bin link), likely due to the wrong key being used.

This does not solve the DMIC issue just yet but at least it shows the HDaudio work done over the Summer works fine on this platform.

I'll share more info when I progress further. In the mean time can the EndlessM folks try and reproduce my setup? Thanks!
Comment 18 Daniel Drake 2018-11-05 05:12:09 UTC
Thanks for the update! Are you saying you are now playing audio through the speakers using the SST driver?

That's a little surprising as (I think) we had speaker output working fine through HDA audio.

You have our only sample of this unit, but I will see if we can get hold of another.
Comment 19 Pierre Bossart 2018-11-05 15:40:20 UTC
To play on the speaker, you can either use the hardware in legacy mode (as you tested with the snd_hda driver, or you can use the enhancement mode with the DSP enabled (with the Skylake/SST driver). When you use the DMIC you have to rely on the DSP.
So basically we are now at feature parity with the HDaudio legacy stuff (speaker playback works for both cases) and only need to add DMIC support.
Comment 20 Chris Chiu 2018-11-23 05:55:25 UTC
Created attachment 279619 [details]
Acer Z24-890 acpidump output
Comment 21 Chris Chiu 2018-11-23 05:56:30 UTC
Created attachment 279621 [details]
Acer Z24-890 lspci output
Comment 22 Chris Chiu 2018-11-23 05:58:00 UTC
Created attachment 279623 [details]
Acer Z24-890 dmesg of for-next branch
Comment 23 Chris Chiu 2018-11-23 06:14:33 UTC
We got another Acer machine (AIO Z24-890) which has the same issue as Swift SF314-55. The internal microphone also connects to the SST instead of the built-in Realtek audio codec. Please ref attachment 279619 [details] for NHLT definition. The difference is that the PCI id of the device (attachment 279621 [details])  is 8086:a348 which can not been found in skl.c and skl-message.c. So I made the following modification to allow it to be probed at boot.

--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -247,6 +247,14 @@ static const struct skl_dsp_ops dsp_ops[] = {
                .init_fw = cnl_sst_init_fw,
                .cleanup = cnl_sst_dsp_cleanup
        },
+       {
+               .id = 0xa348,
+               .num_cores = 4,
+               .loader_ops = bxt_get_loader_ops,
+               .init = cnl_sst_dsp_init,
+               .init_fw = cnl_sst_init_fw,
+               .cleanup = cnl_sst_dsp_cleanup
+       },
 };
 
 const struct skl_dsp_ops *skl_get_dsp_ops(int pci_id)
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -1121,6 +1121,8 @@ static const struct pci_device_id skl_ids[] = {
        /* CNL */
        { PCI_DEVICE(0x8086, 0x9dc8),
                .driver_data = (unsigned long)&snd_soc_acpi_intel_cnl_machines},
+       { PCI_DEVICE(0x8086, 0xa348),
+               .driver_data = (unsigned long)&snd_soc_acpi_intel_cnl_machines},
        { 0, }
 };
 MODULE_DEVICE_TABLE(pci, skl_ids);

I follow your instructions, 
a). build kernel from Mark Brown's for-next branch (https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/)
b) using the topology file described in Comment 16 and copy to /lib/firmware/dfw_sst.bin
c) install and reboot
The dmesg in attachment 279623 [details] shows the result. Seems it has trouble on the dsp. I don't know whether if it's due to the modification I made in skl-messages.c. Can you suggest what I should do next? Thanks
Comment 24 Pierre Bossart 2018-11-24 03:35:10 UTC
Ah, that looks like a CFL machine, see http://mailman.alsa-project.org/pipermail/alsa-devel/2018-November/142017.html, your changes look legit

[   22.996968] snd_soc_skl 0000:00:1f.3: undefined DMIC array_type 0xf

This means "vendor defined", not sure what to do with it

[   22.997164] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   23.205954] skl_hda_dsp_generic skl_hda_dsp_generic: Unsupported HDAudio/iDisp configuration found
[   23.205958] skl_hda_dsp_generic: probe of skl_hda_dsp_generic failed with error -22

Ah not good. can you try to get more details, this is unusual.
Comment 25 Chris Chiu 2018-11-26 13:28:33 UTC
The message "Unsupported HDAudio/iDisp configuration found" is due to the fail of snd_hda_fill_card_info(). This function mainly checks the codec count and codec mask, and the codec mask seems to be unexpected. I then add the following code to print the codec mask.
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -538,6 +538,7 @@ static int skl_machine_device_register(struct skl *skl)

        mach->mach_params.platform = dev_name(bus->dev);
        mach->mach_params.codec_mask = bus->codec_mask;
+pr_warn("%s: platform %s codec_mask 0x%x\n", __func__, dev_name(bus->dev), bus->codec_mask);

        ret = platform_device_add_data(pdev, (const void *)mach, sizeof(*mach));
        if (ret) {

The dmesg shows 
[   23.706679] snd_soc_skl 0000:00:1f.3: enabling device (0000 -> 0002)
[   23.715998] snd_soc_skl 0000:00:1f.3: undefined DMIC array_type 0xf
[   23.716065] snd_soc_skl 0000:00:1f.3: dsp registration status=0
[   23.716161] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   23.804479] skl_machine_device_register: platform 0000:00:1f.3 codec_mask 0x1

But snd_hda_fill_card_info() expect the (codec_mask & IDISP_CODEC_MASK) to be true. IDISP_CODEC_MASK is defined 0x4 though I don't know what it means. The codec_mask should directly comes from the snd_hdac_chip_readw(bus, STATESTS) in snd_hdac_bus_reset_link(). Anything could go wrong here?
Comment 26 Pierre Bossart 2018-11-26 15:29:04 UTC
you need to enable more logs w/ dynamic debug and share them. I'd need all the info from sound/soc/intel/skylake, sound/soc/codecs and sound/soc/intel/boards.

Just add this in all the Makefile for the directories I listed:
ccflags-y += -DDEBUG
Comment 27 Chris Chiu 2018-11-27 13:59:39 UTC
Created attachment 279667 [details]
dmesg with sound/soc DEBUG enabled
Comment 28 Chris Chiu 2018-11-27 14:00:27 UTC
Created attachment 279669 [details]
DSDT table of Z24-890
Comment 29 Chris Chiu 2018-11-27 14:12:28 UTC
attachment 279667 [details] is the dmesg log per your suggestion. And per this log, the problem is "snd_soc_skl 0000:00:1f.3: No matching I2S machine driver found". It indicats that the INT34C2 we expect for snd_soc_apci_intel_cnl_machines not exists.

Then I dump the dsdt in attachment 279669 [details]. 

Device (HDAC)
{
    Name (_HID, "INT0000")  // _HID: Hardware ID
    Name (_CID, "INT0000")  // _CID: Compatible ID
    Name (_DDN, "Intel(R) Smart Sound Technology Audio Codec")  // _DDN: DOS Device Name
    Name (_UID, One)  // _UID: Unique ID
    Name (CDIS, Zero)
    Method (_INI, 0, NotSerialized)  // _INI: Initialize
    {
        If (I2SC == One)
        {
            _HID = "INT34C2"
            _CID = "INT34C2"
            Return (Zero)
        }
    }
}

And I only find INT0000 instead of INT34C2 in /sys/bus/acpi/devices. I can't see where I2SC been initialized/assigned. Should I just modify the DSDT and load the customized DSDT for the kernel or any better idea?
Comment 30 Chris Chiu 2018-11-27 15:10:50 UTC
There're HDAC definitions under each _SB.PCI0.I2Cx. I override them with INT34C2 and there's now INT34C2 entry under /sys/bus/acpi/devices. However, the dmesg still shows the same "snd_soc_skl 0000:00:1f.3: No matching I2S machine driver found". No idea so far, please advise if any. Thanks.
Comment 31 Pierre Bossart 2018-11-27 18:47:29 UTC
No, please don't define *any* ACPI IDs, that will interfere with the HDaudio selection.

The problem you have is that the hdac_hdmi does not seem to work, the iDISP codec is not detected and hence everything falls apart since HDMI is expected to work in the skl_generic machine driver.

it's very surprising that there is no message, can you please compile sound/soc/codecs with the DEBUG stuff I listed?
Comment 32 Chris Chiu 2018-11-28 14:22:14 UTC
Created attachment 279709 [details]
Acer Z24-890 dmesg w/ initcall_debug
Comment 33 Chris Chiu 2018-11-28 14:28:56 UTC
I did add ccflags-y += DEBUG in the Makefile of sound/soc/codecs. There's no message. I look into the hdac_hdmi.c, the hdac_hdmi_dev_probe not even invoked but the hdmi id(8086:280b) does exist. attachment 279709 [details] dumps the dmesg with kernel parameter initcall_debug. Nothing seems really helpful. Or which part of code you want me to look into?
Comment 34 Pierre Bossart 2018-11-28 18:00:48 UTC
Not sure what goes on. I am tempted to err on the side of a configuration issue.
all my tests are based on make defconfig + the -defconfigs found on https://github.com/thesofproject/kconfig

scripts/kconfig/merge_config.sh .config <PATH>/kconfig/base-defconfig <PATH>/kconfig/sst-defconfig <PATH>/kconfig/hdaudio-codecs-defconfig
Comment 35 Chris Chiu 2018-11-29 07:14:10 UTC
Created attachment 279733 [details]
Acer Z24-890 dmesg for intel-sst hdaudio
Comment 36 Chris Chiu 2018-11-29 07:16:52 UTC
My bad, it's the configuration issue. I've reconfigure the kernel and run it again. dmesg attachment 279733 [details] here. It's about the "transfer firmware fail" so no sound card/pcm available for amixer. Could you help on that?
Comment 37 Chris Chiu 2018-11-29 07:30:28 UTC
(In reply to Chris Chiu from comment #36)
> My bad, it's the configuration issue. I've reconfigure the kernel and run it
> again. dmesg attachment 279733 [details] here. It's about the "transfer
> firmware fail" so no sound card/pcm available for amixer. Could you help on
> that?

Forgot to mention, I've already used the topology file described in Comment 16 and follow steps in Comment 17. So maybe it's not the firmware for this?
Comment 38 Pierre Bossart 2018-11-29 17:09:30 UTC
Just to be clear, you used the topology file provided in Comment 16 and the firmware extracted from the Windows driver, not the default in /lib/firmware/intel/dfw_cnl.bin which is know to have an incompatibility with recent BIOS?

If the firmware from Windows fails that's a new dimension...
Comment 39 Chris Chiu 2018-11-30 06:48:59 UTC
Created attachment 279749 [details]
Acer Z24-890 dsp_fw_cnl.bin
Comment 40 Chris Chiu 2018-11-30 06:59:57 UTC
Sorry, we lost the audio driver file for the Acer Swift laptop so we request the driver again for this Z24-890. Replace the fw bin as you mentioned in Comment 17. Not I can successfully "set amixer -Dhw:0 cset numid=1 on". And could you suggest what's next? Thanks
Comment 41 Pierre Bossart 2018-12-03 19:48:32 UTC
> Sorry, we lost the audio driver file for the Acer Swift laptop so we request
> the driver again for this Z24-890. Replace the fw bin as you mentioned in
> Comment 17. Not I can successfully "set amixer -Dhw:0 cset numid=1 on". And
> could you suggest what's next? Thanks

Can you please check things with the latest firmware that was just 
released by Intel this morning:

http://mailman.alsa-project.org/pipermail/alsa-devel/2018-December/142476.html

https://github.com/crojewsk/linux-firmware.git for-upstream

The next step would be to define a topology file for dmics. Most likely 
it'll require some help from other folks at Intel.
Comment 42 Chris Chiu 2018-12-04 14:05:56 UTC
Created attachment 279839 [details]
Acer Z24-890 dmesg for cnl_v1858 dw
Comment 43 Chris Chiu 2018-12-04 14:06:52 UTC
Created attachment 279841 [details]
Acer Z24-890 dmesg for windows fw
Comment 44 Chris Chiu 2018-12-04 14:11:50 UTC
Unfortunately, I tried the upstream firmware but it fails at
[   17.305886] snd_soc_skl 0000:00:1f.3: DSP core(s) enabled? 1: core_mask 0x1
[   20.379198] snd_soc_skl 0000:00:1f.3: transfer firmware failed: -62
[   20.379213] snd_soc_skl 0000:00:1f.3: DSP core(s) enabled? 0: core_mask 0x1
[   20.379243] snd_soc_skl 0000:00:1f.3: load base fw failed: -62
[   20.379266] snd_soc_skl 0000:00:1f.3: Failed to boot first fw: -62
[   20.379270] snd_soc_skl 0000:00:1f.3: ASoC: failed to probe component -62
[   20.379327] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: failed to instantiate card -62


I logged by dmesg for different firmwares on the same kernel and topology file. Hope they can do some help. Let me know if there's any update need me to help verify. Thanks.
Comment 45 Pierre Bossart 2018-12-31 10:48:28 UTC
(In reply to Chris Chiu from comment #44)
> Unfortunately, I tried the upstream firmware but it fails at
> [   17.305886] snd_soc_skl 0000:00:1f.3: DSP core(s) enabled? 1: core_mask
> 0x1
> [   20.379198] snd_soc_skl 0000:00:1f.3: transfer firmware failed: -62
> [   20.379213] snd_soc_skl 0000:00:1f.3: DSP core(s) enabled? 0: core_mask
> 0x1
> [   20.379243] snd_soc_skl 0000:00:1f.3: load base fw failed: -62
> [   20.379266] snd_soc_skl 0000:00:1f.3: Failed to boot first fw: -62
> [   20.379270] snd_soc_skl 0000:00:1f.3: ASoC: failed to probe component -62
> [   20.379327] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: failed to
> instantiate card -62
> 
> 
> I logged by dmesg for different firmwares on the same kernel and topology
> file. Hope they can do some help. Let me know if there's any update need me
> to help verify. Thanks.

Can you please retry with the latest firmware? I am not sure which version you took and I don't see a reason why this fails. Thanks!
Comment 46 Chris Chiu 2019-01-04 06:33:53 UTC
The firmware I tried is /lib/firmware/intel/dsp_fw_cnl_v1858.bin. Is there any newer version?
Comment 47 Chris Chiu 2019-01-04 12:45:42 UTC
(In reply to Chris Chiu from comment #46)
> The firmware I tried is /lib/firmware/intel/dsp_fw_cnl_v1858.bin. Is there
> any newer version?

I tried the latest Mark Brown's for-next branch, which also includes the recently upstream commits from you and 8086:a348 already supported, but still no luck. I verified the fw file is still dsp_fw_cnl_v1858.bin. The error message is the same as attachment 279839 [details].
Comment 48 Pierre Bossart 2019-01-04 17:51:58 UTC
> The firmware I tried is /lib/firmware/intel/dsp_fw_cnl_v1858.bin. Is there
> any
> newer version?
No, that's the latest. It works fine for me on WHL. What I don't get is 
what the Windows firmware is. Is this the same your Endless colleagues 
used for the previous program on WHL, or  is this a CFL-specific one? 
There is a mismatch somewhere. Could you also try with the previous 
version dsp_fw_cnl_v1191.bin?
Comment 49 Chris Chiu 2019-01-07 12:53:41 UTC
The dsp_fw_cnl_v1191.bin also fails just like dsp_fw_cnl_v1858.bin. The error messages are the same. So the only working firmware is attachment 279749 [details]. We can try to find out the Windows firmware which used to work on WHL (Acer Swift SF314-55) because I'm not really sure the driver is the same. Maybe binary diff between these 2 woudld do some helpful.
Comment 50 jian-hong 2019-01-23 08:44:21 UTC
Created attachment 280693 [details]
dmesg of Acer Crux

I get another Acer Crux laptop which also uses DMIC as the internal MIC and the PCI ID is 8086:9dc8.

00:1f.3 Multimedia audio controller [0401]: Intel Corporation Device [8086:9dc8] (rev 30)
	Subsystem: Acer Incorporated [ALI] Device [1025:1330]
	Flags: bus master, fast devsel, latency 32, IRQ 16
	Memory at a121c000 (64-bit, non-prefetchable) [size=16K]
	Memory at a1000000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: <access denied>
	Kernel driver in use: snd_soc_skl
	Kernel modules: snd_hda_intel, snd_soc_skl

I follow steps in Comment 17 and blacklist snd_hda_intel module.  System loads the firmware but the audio does not work.

[    8.182241] snd_soc_skl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    8.191390] snd_soc_skl 0000:00:1f.3: undefined DMIC array_type 0xf
[    8.191997] snd_soc_skl 0000:00:1f.3: Linked as a consumer to 0000:00:02.0
[    8.192009] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops 0xffffffffaf89be20)
[    8.273977] HDMI HDA Codec ehdaudio0D2: Max dais supported: 3
[    8.303663] snd_soc_skl 0000:00:1f.3: Direct firmware load for 9dc8-ACRSYS-ACRPRDCT-2-tplg.bin failed with error -2
[    8.303667] snd_soc_skl 0000:00:1f.3: tplg fw 9dc8-ACRSYS-ACRPRDCT-2-tplg.bin load failed with -2, falling back to dfw_sst.bin
[    8.318544] snd_soc_skl 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[    8.452454] HDMI HDA Codec ehdaudio0D2: hdac_hdmi_present_sense: disconnect for pin:port 5:0
[    8.452827] HDMI HDA Codec ehdaudio0D2: hdac_hdmi_present_sense: disconnect for pin:port 6:0
[    8.453144] HDMI HDA Codec ehdaudio0D2: hdac_hdmi_present_sense: disconnect for pin:port 7:0
[    8.495726] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC255: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[    8.495735] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    8.495739] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    8.495742] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[    8.495745] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[    8.495748] snd_hda_codec_realtek ehdaudio0D0:      Headphone Mic=0x1a
[    8.495752] snd_hda_codec_realtek ehdaudio0D0:      Headset Mic=0x19
[    8.553107] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi1 <-> iDisp1 Pin mapping ok
[    8.553120] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi2 <-> iDisp2 Pin mapping ok
[    8.553128] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi3 <-> iDisp3 Pin mapping ok
[    8.553137] skl_hda_dsp_generic skl_hda_dsp_generic: Analog Codec DAI <-> Analog CPU DAI mapping ok
[    8.553146] skl_hda_dsp_generic skl_hda_dsp_generic: Digital Codec DAI <-> Digital CPU DAI mapping ok
[    8.553210] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> cnl-audio-dai mapping ok
[    8.553233] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> hdmi1 mapping ok
[    8.553255] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> hdmi2 mapping ok
[    8.553276] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> hdmi3 mapping ok
[    8.553357] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: no source widget found for codec1_out
[    8.553359] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Failed to add route codec1_out -> direct -> Digital CPU Playback
[    8.553364] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: no source widget found for codec2_out
[    8.553366] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Failed to add route codec2_out -> direct -> Alt Analog CPU Playback
[    8.553374] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: no sink widget found for codec1_in
[    8.553375] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Failed to add route Digital CPU Capture -> direct -> codec1_in
[    8.553381] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: no sink widget found for codec2_in
[    8.553383] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Failed to add route Alt Analog CPU Capture -> direct -> codec2_in
[    8.555467] input: skl_hda_card Headphone Mic as /devices/platform/skl_hda_dsp_generic/sound/card0/input8
[    8.555540] input: skl_hda_card Headset Mic as /devices/platform/skl_hda_dsp_generic/sound/card0/input9
[    8.555607] input: skl_hda_card HDMI/DP, pcm=6 Jack as /devices/platform/skl_hda_dsp_generic/sound/card0/input10
[    8.555670] input: skl_hda_card HDMI/DP, pcm=7 Jack as /devices/platform/skl_hda_dsp_generic/sound/card0/input11
[    8.555740] input: skl_hda_card HDMI/DP, pcm=8 Jack as /devices/platform/skl_hda_dsp_generic/sound/card0/input12
Comment 51 Pierre Bossart 2019-01-23 15:26:38 UTC
On 1/23/19 2:44 AM, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=201251
>
> --- Comment #50 from jian-hong@endlessm.com ---
> Created attachment 280693 [details]
>    --> https://bugzilla.kernel.org/attachment.cgi?id=280693&action=edit
> dmesg of Acer Crux
>
> I get another Acer Crux laptop which also uses DMIC as the internal MIC and
> the
> PCI ID is 8086:9dc8.
>
> 00:1f.3 Multimedia audio controller [0401]: Intel Corporation Device
> [8086:9dc8] (rev 30)
>          Subsystem: Acer Incorporated [ALI] Device [1025:1330]
>          Flags: bus master, fast devsel, latency 32, IRQ 16
>          Memory at a121c000 (64-bit, non-prefetchable) [size=16K]
>          Memory at a1000000 (64-bit, non-prefetchable) [size=1M]
>          Capabilities: <access denied>
>          Kernel driver in use: snd_soc_skl
>          Kernel modules: snd_hda_intel, snd_soc_skl
>
> I follow steps in Comment 17 and blacklist snd_hda_intel module.  System
> loads
> the firmware but the audio does not work.
>
> [    8.182241] snd_soc_skl 0000:00:1f.3: DSP detected with PCI
> class/subclass/prog-if info 0x040100
> [    8.191390] snd_soc_skl 0000:00:1f.3: undefined DMIC array_type 0xf
> [    8.191997] snd_soc_skl 0000:00:1f.3: Linked as a consumer to 0000:00:02.0
> [    8.192009] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops
> 0xffffffffaf89be20)
> [    8.273977] HDMI HDA Codec ehdaudio0D2: Max dais supported: 3
> [    8.303663] snd_soc_skl 0000:00:1f.3: Direct firmware load for
> 9dc8-ACRSYS-ACRPRDCT-2-tplg.bin failed with error -2
> [    8.303667] snd_soc_skl 0000:00:1f.3: tplg fw
> 9dc8-ACRSYS-ACRPRDCT-2-tplg.bin load failed with -2, falling back to
> dfw_sst.bin
> [    8.318544] snd_soc_skl 0000:00:1f.3: ASoC: Parent card not yet available,
> widget card binding deferred
> [    8.452454] HDMI HDA Codec ehdaudio0D2: hdac_hdmi_present_sense:
> disconnect
> for pin:port 5:0
> [    8.452827] HDMI HDA Codec ehdaudio0D2: hdac_hdmi_present_sense:
> disconnect
> for pin:port 6:0
> [    8.453144] HDMI HDA Codec ehdaudio0D2: hdac_hdmi_present_sense:
> disconnect
> for pin:port 7:0
> [    8.495726] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC255:
> line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
> [    8.495735] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0
> (0x0/0x0/0x0/0x0/0x0)
> [    8.495739] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1
> (0x21/0x0/0x0/0x0/0x0)
> [    8.495742] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
> [    8.495745] snd_hda_codec_realtek ehdaudio0D0:    inputs:
> [    8.495748] snd_hda_codec_realtek ehdaudio0D0:      Headphone Mic=0x1a
> [    8.495752] snd_hda_codec_realtek ehdaudio0D0:      Headset Mic=0x19
> [    8.553107] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi1 <->
> iDisp1 Pin mapping ok
> [    8.553120] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi2 <->
> iDisp2 Pin mapping ok
> [    8.553128] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi3 <->
> iDisp3 Pin mapping ok
> [    8.553137] skl_hda_dsp_generic skl_hda_dsp_generic: Analog Codec DAI <->
> Analog CPU DAI mapping ok
> [    8.553146] skl_hda_dsp_generic skl_hda_dsp_generic: Digital Codec DAI <->
> Digital CPU DAI mapping ok
> [    8.553210] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <->
> cnl-audio-dai mapping ok
> [    8.553233] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <->
> hdmi1 mapping ok
> [    8.553255] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <->
> hdmi2 mapping ok
> [    8.553276] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <->
> hdmi3 mapping ok
> [    8.553357] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: no source
> widget
> found for codec1_out
> [    8.553359] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Failed to add
> route codec1_out -> direct -> Digital CPU Playback
> [    8.553364] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: no source
> widget
> found for codec2_out
> [    8.553366] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Failed to add
> route codec2_out -> direct -> Alt Analog CPU Playback
> [    8.553374] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: no sink widget
> found for codec1_in
> [    8.553375] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Failed to add
> route Digital CPU Capture -> direct -> codec1_in
> [    8.553381] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: no sink widget
> found for codec2_in
> [    8.553383] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Failed to add
> route Alt Analog CPU Capture -> direct -> codec2_in
> [    8.555467] input: skl_hda_card Headphone Mic as
> /devices/platform/skl_hda_dsp_generic/sound/card0/input8
> [    8.555540] input: skl_hda_card Headset Mic as
> /devices/platform/skl_hda_dsp_generic/sound/card0/input9
> [    8.555607] input: skl_hda_card HDMI/DP, pcm=6 Jack as
> /devices/platform/skl_hda_dsp_generic/sound/card0/input10
> [    8.555670] input: skl_hda_card HDMI/DP, pcm=7 Jack as
> /devices/platform/skl_hda_dsp_generic/sound/card0/input11
> [    8.555740] input: skl_hda_card HDMI/DP, pcm=8 Jack as
> /devices/platform/skl_hda_dsp_generic/sound/card0/input12

The warnings above are just noise, did you try to see if the card is 
created?

Also what does "audio does not work" mean? card not created, capture not 
happening, etc? it helps if you attach the full dmesg and alsa-info.sh


>
Comment 52 jian-hong 2019-01-24 05:10:10 UTC
Created attachment 280703 [details]
alsa-info with Mark Brown's for-next kernel (HDA quirk)

I have tried Mark Brown's for-next branch on Acer Crux (TravelMate X514-51T) laptop.  And quirked the audio pin nodes as the alsa-info as this attachment.  The internal speaker, headphone and headset MIC work correctly.  But the internal MIC cannot record any sound.  Then, I checked Windows on Acer Crux and found the internal MIC is a DMIC which uses Intel SST as the driver.

So, I copy the topology file in Comment 16 to /lib/firmware/dfw_sst.bin
Then, cold reboot again.  I made system boot with blacklist snd_hda_intel commad for using snd_soc_skl.  The alsa-info and dmesg will be uploaded.
Comment 53 jian-hong 2019-01-24 05:31:14 UTC
Created attachment 280705 [details]
alsa-info with Mark Brown's for-next kernel with snd_soc_skl for Comment 52

I blacklist the snd_hda_intel for using snd_soc_skl.
According to this alsa-info, sound card is not found!?  Should snd_hda_intel not be in blacklist?

!!Soundcards recognised by ALSA
!!-----------------------------

--- no soundcards ---

Any config or parameter can make snd_hda_intel and snd_soc_skl work together?  Thanks
Comment 54 jian-hong 2019-01-24 05:33:16 UTC
Created attachment 280707 [details]
dmesg with Mark Brown's for-next kernel with snd_soc_skl for Comment 53
Comment 55 Pierre Bossart 2019-01-24 15:11:06 UTC
On 1/23/19 11:33 PM, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=201251
>
> --- Comment #54 from jian-hong@endlessm.com ---
> Created attachment 280707 [details]
>    --> https://bugzilla.kernel.org/attachment.cgi?id=280707&action=edit
> dmesg with Mark Brown's for-next kernel with snd_soc_skl for Comment 53

You need to update your firmware, the errors below are a telltale sign 
of authentication issues that are solved.

Make sure you use dsp_fw_cnl.bin -> dsp_fw_cnl_v1858.bin

[   11.895374] snd_soc_skl 0000:00:1f.3: transfer firmware failed: -62
[   11.895429] snd_soc_skl 0000:00:1f.3: load base fw failed: -62
[   11.895455] snd_soc_skl 0000:00:1f.3: Failed to boot first fw: -62
[   11.895458] snd_soc_skl 0000:00:1f.3: ASoC: failed to probe component -62
Comment 56 jian-hong 2019-01-25 05:10:29 UTC
Created attachment 280757 [details]
alsa-info with Mark Brown's for-next kernel with snd_soc_skl and v1858.bin

I changed the symbolic link of dsp_fw_cnl.bin to dsp_fw_cnl_v1858.bin

ls -l /lib/firmware/intel/dsp_fw_cnl*
lrwxrwxrwx 1 root root     20 Jan 25 10:36 /lib/firmware/intel/dsp_fw_cnl.bin -> dsp_fw_cnl_v1858.bin
-rw-r--r-- 3 root root 583852 Jan 24 11:09 /lib/firmware/intel/dsp_fw_cnl_v1191.bin
-rw-r--r-- 1 root root 583852 Jan 23 14:19 /lib/firmware/intel/dsp_fw_cnl_v1858.bin

Also "amixer -Dhw:0 cset numid=1 on"

However, "pactl list cards" shows nothing.

The new alsa-info is as this attachment.  The new dmesg will be uploaded.
Comment 57 jian-hong 2019-01-25 05:13:48 UTC
Created attachment 280759 [details]
dmesg with Mark Brown's for-next kernel with snd_soc_skl and v1858.bin for Comment 56
Comment 58 Pierre Bossart 2019-01-25 14:17:35 UTC
The card creation happened now, so the move to the new firmware was successful

0 [sklhdacard     ]: skl_hda_card - skl_hda_card
                      WL-TravelMateX514_51T-V1.02-Crux_WL

You probably miss a UCM profile for PulseAudio to work, but that's a different issue. For now you should be able to play on the speakers and HDMI.
Comment 59 jian-hong 2019-01-28 09:56:45 UTC
Created attachment 280823 [details]
dmesg with Mark Brown's for-next kernel with snd_soc_skl and v1858.bin - no backend DAIs

(In reply to Pierre Bossart from comment #58)
> The card creation happened now, so the move to the new firmware was
> successful
> 
> 0 [sklhdacard     ]: skl_hda_card - skl_hda_card
>                       WL-TravelMateX514_51T-V1.02-Crux_WL

Thanks for your help!

> You probably miss a UCM profile for PulseAudio to work, but that's a
> different issue. For now you should be able to play on the speakers and HDMI.

However, I got no sound output when I play with the command: 

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sklhdacard [skl_hda_card], device 5: CNL Audio (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sklhdacard [skl_hda_card], device 6: CNL HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sklhdacard [skl_hda_card], device 7: CNL HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sklhdacard [skl_hda_card], device 8: CNL HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0


aplay -D plughw:0,5 ~/Downloads/Yamaha-V50-Rock-Beat-120bpm.wav -v
Playing WAVE '/home/dev/Downloads/Yamaha-V50-Rock-Beat-120bpm.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1363: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (85333 85334)
PERIOD_SIZE: [3763 3763]
PERIOD_BYTES: (15052 15056)
PERIODS: (3 4)
BUFFER_TIME: (341315 341316)
BUFFER_SIZE: 15052
BUFFER_BYTES: 60208
TICK_TIME: 0

And I notice there is the error message:

[   54.099485]  CNL Audio: ASoC: no backend DAIs enabled for CNL Audio
Comment 60 Pierre Bossart 2019-01-28 18:47:25 UTC
You need to set 'amixer -Dhw:0 cset numid=1'
Comment 61 Pierre Bossart 2019-01-28 18:47:59 UTC
I meant 'amixer -Dhw:0 cset numid=1 on'
Comment 62 jian-hong 2019-01-29 03:30:35 UTC
(In reply to Pierre Bossart from comment #61)
> I meant 'amixer -Dhw:0 cset numid=1 on'

I can play and get sound output from internal speaker and headphone with snd_soc_skl now.  Thanks for your guide.
Comment 63 Robert 2019-07-22 13:03:41 UTC
May I ask what's the state of this bug?
It's listed as: Status: NEW and Kernel Version: 4.19 

I'm currently on kernel 5.2.1 with very similar audio hardware. However, my internal mic is not recognized. 

arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: Generic Analog [Generic Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

The snd_soc_skl module is loaded. Internal speakers and external headset with mic is working.

The firmware seems to be up to date: /usr/lib/firmware/intel/dsp_fw_cnl.bin -> dsp_fw_cnl_v1858.bin

My system is an HP Elitebook 1040 G5 with Arch Linux.
Comment 64 Pierre Bossart 2019-07-22 15:24:58 UTC
the(In reply to Robert from comment #63)
> May I ask what's the state of this bug?
> It's listed as: Status: NEW and Kernel Version: 4.19 
> 
> I'm currently on kernel 5.2.1 with very similar audio hardware. However, my
> internal mic is not recognized. 
> 
> arecord -l
> **** List of CAPTURE Hardware Devices ****
> card 0: PCH [HDA Intel PCH], device 0: Generic Analog [Generic Analog]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> 
> The snd_soc_skl module is loaded. Internal speakers and external headset
> with mic is working.
> 
> The firmware seems to be up to date: /usr/lib/firmware/intel/dsp_fw_cnl.bin
> -> dsp_fw_cnl_v1858.bin
> 
> My system is an HP Elitebook 1040 G5 with Arch Linux.

the solution will be to use the SOF driver, which does support HDaudio+dmic configurations. there's a bit of a delay to make the signed firmware sof-cnl.ri available (mostly due to vacation season).
Comment 65 Pierre Bossart 2019-07-23 15:16:07 UTC
> the solution will be to use the SOF driver, which does support HDaudio+dmic
> configurations. there's a bit of a delay to make the signed firmware
> sof-cnl.ri available (mostly due to vacation season).

Signed binaries for SOF are now available here;
https://github.com/thesofproject/sof/releases
Comment 66 Stefan Rinke 2019-07-23 18:41:01 UTC
May I ask a stupid question: how can I install these signed binaries on my acerswift 3 ubuntu 19.04 kernel 5.0.20?

Thx Steve
Comment 67 Pierre Bossart 2019-07-23 18:53:07 UTC
you will need to install kernel v5.2 and copy this file to /lib/firmware/intel/sof
You will also need a topology file to copy into /lib/firmware/intel/sof-tplg.
Comment 68 jian-hong 2019-07-26 08:11:58 UTC
Created attachment 283981 [details]
dmesg of

I have tried 5.2 kernel with the SOF files from https://github.com/thesofproject/sof/releases on Acer Z24-890

Howerver, the audio does not work with the errors:

[   24.252621] snd_soc_skl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   24.252631] snd_soc_skl 0000:00:1f.3: enabling device (0000 -> 0002)
[   24.434174] snd_soc_skl 0000:00:1f.3: undefined DMIC array_type 0xf
[   24.434648] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   24.615591] skl_hda_dsp_generic skl_hda_dsp_generic: Unsupported HDAudio/iDisp configuration found
[   24.615594] skl_hda_dsp_generic: probe of skl_hda_dsp_generic failed with error -22

The SOF binaries are installed in /lib/firmware/intel/sof/

/lib/firmware/intel/sof/sof-apl-gcc.ri
/lib/firmware/intel/sof/sof-apl-signed-intel.ri
/lib/firmware/intel/sof/sof-apl-unsigned.ri
/lib/firmware/intel/sof/sof-bdw-gcc.ri
/lib/firmware/intel/sof/sof-byt-gcc.ri
/lib/firmware/intel/sof/sof-cht-gcc.ri
/lib/firmware/intel/sof/sof-cnl-gcc.ri
/lib/firmware/intel/sof/sof-cnl-signed-intel.ri
/lib/firmware/intel/sof/sof-cnl-unsigned.ri
/lib/firmware/intel/sof/sof-hsw-gcc.ri
/lib/firmware/intel/sof/sof-icl-gcc.ri
/lib/firmware/intel/sof/sof-icl-signed-intel.ri
/lib/firmware/intel/sof/sof-icl-unsigned.ri
/lib/firmware/intel/sof/sof-imx8-gcc.ri
/lib/firmware/intel/sof/sof-kbl-gcc.ri
/lib/firmware/intel/sof/sof-skl-gcc.ri
/lib/firmware/intel/sof/sof-sue-gcc.ri

I think I also need the topology file to be installed into /lib/firmware/intel/sof-tplg

Where can I have the topology file or how to produce it?
Thank you
Comment 69 Pierre Bossart 2019-07-26 16:06:18 UTC
(In reply to jian-hong from comment #68)
> Created attachment 283981 [details]
> dmesg of
> 
> I have tried 5.2 kernel with the SOF files from
> https://github.com/thesofproject/sof/releases on Acer Z24-890
> 
> Howerver, the audio does not work with the errors:
> 
> [   24.252621] snd_soc_skl 0000:00:1f.3: DSP detected with PCI
> class/subclass/prog-if info 0x040100
> [   24.252631] snd_soc_skl 0000:00:1f.3: enabling device (0000 -> 0002)
> [   24.434174] snd_soc_skl 0000:00:1f.3: undefined DMIC array_type 0xf
> [   24.434648] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops
> i915_audio_component_bind_ops [i915])
> [   24.615591] skl_hda_dsp_generic skl_hda_dsp_generic: Unsupported
> HDAudio/iDisp configuration found
> [   24.615594] skl_hda_dsp_generic: probe of skl_hda_dsp_generic failed with
> error -22

You need to blacklist snd-soc-skl, you are probing the wrong driver here.

> 
> The SOF binaries are installed in /lib/firmware/intel/sof/
> 
> /lib/firmware/intel/sof/sof-apl-gcc.ri
> /lib/firmware/intel/sof/sof-apl-signed-intel.ri
> /lib/firmware/intel/sof/sof-apl-unsigned.ri
> /lib/firmware/intel/sof/sof-bdw-gcc.ri
> /lib/firmware/intel/sof/sof-byt-gcc.ri
> /lib/firmware/intel/sof/sof-cht-gcc.ri
> /lib/firmware/intel/sof/sof-cnl-gcc.ri
> /lib/firmware/intel/sof/sof-cnl-signed-intel.ri
> /lib/firmware/intel/sof/sof-cnl-unsigned.ri
> /lib/firmware/intel/sof/sof-hsw-gcc.ri
> /lib/firmware/intel/sof/sof-icl-gcc.ri
> /lib/firmware/intel/sof/sof-icl-signed-intel.ri
> /lib/firmware/intel/sof/sof-icl-unsigned.ri
> /lib/firmware/intel/sof/sof-imx8-gcc.ri
> /lib/firmware/intel/sof/sof-kbl-gcc.ri
> /lib/firmware/intel/sof/sof-skl-gcc.ri
> /lib/firmware/intel/sof/sof-sue-gcc.ri

Gah, this will not work. You need to symlink sof-cnl.ri to sof-cnl-sign-intel.ri

> 
> I think I also need the topology file to be installed into
> /lib/firmware/intel/sof-tplg
> 
> Where can I have the topology file or how to produce it?
> Thank you

I will add examples as attachments.
Comment 70 Pierre Bossart 2019-07-26 16:11:17 UTC
Created attachment 283987 [details]
topology file for HDaudio platforms with 2 DMICs

copy to /lib/firmware/intel/sof-tplg/sof-hda-generic.tplg
Comment 71 Pierre Bossart 2019-07-26 16:12:01 UTC
Created attachment 283989 [details]
topology file for HDaudio platforms with 4 DMICs
Comment 72 Pierre Bossart 2019-07-26 16:13:20 UTC
you can also clone the sof project, and in a terminal type
scripts/build_tools.sh
all the topology files will be in tools/build_tools/topology/*.tplg
Comment 73 Pierre Bossart 2019-07-26 19:57:49 UTC
I just gave it a try and I can see the mic input:

scp sof-cnl-signed-intel.ri root@192.168.1.185:/lib/firmware/intel/sof/
ssh root@192.168.1.185 'cd /lib/firmware/intel/sof; ln -s sof-cnl-signed-intel.ri sof-cnl.ri'
scp sof-hda-generic-4ch.tplg root@192.168.1.185:/lib/firmware/intel/sof-tplg/
ssh root@192.168.1.185 'cd /lib/firmware/intel/sof-tplg; ln -s sof-hda-generic-4ch.tplg sof-hda-generic.tplg'

use Mark Brown's tree with all SOF patches and config that I'll attach shortly.

There is however an issue with the sound level, I'll need to look into this, it worked a couple of weeks ago.
Comment 74 Pierre Bossart 2019-07-26 20:00:22 UTC
Created attachment 283995 [details]
config to test SOF w/ DMIC support

minimal config only, e.g. pad doesn't work, etc. This is for audio tests only with basic network and display support.
Comment 75 Pierre Bossart 2019-07-26 20:16:35 UTC
sound level issue tracked at https://github.com/thesofproject/sof/issues/1675
Comment 76 jian-hong 2019-07-29 06:45:49 UTC
Created attachment 284011 [details]
dmesg SOF 5.3-rc1 z24-890

I have followed the steps mentioned in comment #73

Used for-next branch of Mark Brown's tree and the config attachment 283995 [details].  Also blacklisted snd_hda_intel and snd_soc_skl modules.

The firmware
/lib/firmware/intel/sof/sof-cnl.ri -> sof-cnl-signed-intel.ri

The topology
/lib/firmware/intel/sof-tplg/sof-hda-generic.tplg -> sof-hda-generic-4ch.tplg

The SOF is loaded and speakers work.  Howerver, the internal DMIC does not work.

Got the audio related messages in dmesg:

[   20.335493] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:9:0 Kernel ABI 3:9:0
[   20.335506] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp3 Tx not handled
[   20.336901] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec0_in not handled
[   20.336907] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp2 Tx not handled
[   20.337923] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec1_in not handled
[   20.337929] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp1 Tx not handled
[   20.338844] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec0_out not handled
[   20.338849] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Analog CPU Playback not handled
[   20.339774] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec1_out not handled
[   20.339778] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Digital CPU Playback not handled
[   20.339782] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec2_in not handled
[   20.339786] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Alt Analog CPU Playback not handled
[   20.339790] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec2_out not handled
[   20.339794] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Analog CPU Capture not handled
[   20.340921] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp1_out not handled
[   20.340922] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Digital CPU Capture not handled
[   20.341628] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp2_out not handled
[   20.341629] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Alt Analog CPU Capture not handled
[   20.342353] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp3_out not handled
[   20.348221] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
...
[   29.292642] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[   29.374209] sof-audio-pci 0000:00:1f.3: firmware boot complete
[   30.124883] debugfs: File 'Analog Playback and Capture' in directory 'HDA Analog' already present!
[   30.128036] debugfs: File 'Analog Playback and Capture' in directory 'HDA Analog' already present!
[   30.180118] debugfs: File 'Analog Playback and Capture' in directory 'HDA Analog' already present!
[   30.184197] debugfs: File 'Analog Playback and Capture' in directory 'HDA Analog' already present!
[   30.325943] debugfs: File 'Analog Playback and Capture' in directory 'HDA Analog' already present!

The alsa-info follows this comment.
Comment 77 jian-hong 2019-07-29 06:47:05 UTC
Created attachment 284013 [details]
alsa-info SOF 5.3-rc1 z24-890 of comment #76
Comment 78 Pierre Bossart 2019-07-29 13:46:36 UTC
ok, we'll have to look at the debugfs, but that's not preventing anything from working. we ignore all errors on debugfs calls.

Please provide more information when you say the 'internal DMIC does not work'. You should be able to capture and see non-zero data recorded, however there is a known issue with the volume that we are looking into.

What exactly does not work? The card creation, data transfers or volume level?
Comment 79 jian-hong 2019-07-30 06:16:17 UTC
Created attachment 284041 [details]
Screenshot of Audacity for internal DMIC on z24-890

(In reply to Pierre Bossart from comment #78)

> What exactly does not work? The card creation, data transfers or volume
> level?

I can see the card's DMIC

arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sofsklhdacard [sof-skl_hda_card], device 0: HDA Analog (*) []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: sofsklhdacard [sof-skl_hda_card], device 1: HDA Digital (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsklhdacard [sof-skl_hda_card], device 6: DMIC32 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsklhdacard [sof-skl_hda_card], device 7: DMIC16 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

However, the recording volume level is always zero in Audacity.  Is this the bug mentioned in https://github.com/thesofproject/sof/issues/1675 ?
Comment 80 jian-hong 2019-07-30 06:42:04 UTC
Created attachment 284043 [details]
dmesg recording from SOF 5.3-rc1 z24-890

Following comment #79

I also notice whenever I try to record from DMIC, system shows this error in dmesg:

[  187.246188] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[  187.331288] sof-audio-pci 0000:00:1f.3: firmware boot complete
Comment 81 Pierre Bossart 2019-07-30 13:19:00 UTC
> I also notice whenever I try to record from DMIC, system shows this error in
> dmesg:
> 
> [  187.246188] sof-audio-pci 0000:00:1f.3: error: no reply expected,
> received 0x0
> [  187.331288] sof-audio-pci 0000:00:1f.3: firmware boot complete

yes, it's an annoying log we need to remove but it's not a problem. please ignore this.
Comment 82 Pierre Bossart 2019-07-30 13:20:08 UTC
(In reply to jian-hong from comment #79)
> Created attachment 284041 [details]
> Screenshot of Audacity for internal DMIC on z24-890
> 
> (In reply to Pierre Bossart from comment #78)
> 
> > What exactly does not work? The card creation, data transfers or volume
> > level?
> 
> I can see the card's DMIC
> 
> arecord -l
> **** List of CAPTURE Hardware Devices ****
> card 0: sofsklhdacard [sof-skl_hda_card], device 0: HDA Analog (*) []
>   Subdevices: 0/1
>   Subdevice #0: subdevice #0
> card 0: sofsklhdacard [sof-skl_hda_card], device 1: HDA Digital (*) []
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> card 0: sofsklhdacard [sof-skl_hda_card], device 6: DMIC32 (*) []
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> card 0: sofsklhdacard [sof-skl_hda_card], device 7: DMIC16 (*) []
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> 
> However, the recording volume level is always zero in Audacity.  Is this the
> bug mentioned in https://github.com/thesofproject/sof/issues/1675 ?

I guess. Try zooming in Audacity and you show see the same issue of very very low level.
Comment 83 Pierre Bossart 2019-08-09 17:51:50 UTC
Turns out the low volume is a result of ALSA mixers not being set properly. Adding +20dB on all capture paths gives me a decent volume on DMIC.

There is one catch is that is you use the 4ch topology they you have to record with 4 channels. Somehow it's permitted to record in stereo but that's an invalid configuration we need to fix in the topology.
Comment 84 Tristan Mahe 2019-08-14 00:40:18 UTC
Hi, 

The HP spectre x360 from 2019 also has the same Intel SST mic array with the realtek alc285.

I tried using the latest sof files as explained above, blacklisting old modules.
and seems like card is detected.

I do not get any sound output though and errors are throwing in the logs.

alsa-info and dmesg are following.
Comment 85 Tristan Mahe 2019-08-14 00:41:03 UTC
Created attachment 284373 [details]
alsa-info spectre x360

alsa info and the errors in dmesg when trying to play something.
Comment 86 Tristan Mahe 2019-08-14 03:54:44 UTC
Created attachment 284375 [details]
patch to compile for-next branch as of commit da84c03c03cfadffe00f72f83ea9f556b903f565

trying to compile for-next branch to test further, I had to patch two places as attached.

Forgive me if I made an error, I am not familiar with that code.
Comment 87 Tristan Mahe 2019-08-14 04:17:35 UTC
Created attachment 284377 [details]
alsa-info for working speakers / still no dmic working though

reporting that speakers work using the for-next branch on the 2019 hp spectre x360.

I just have a doubt on the back speakers, ( using speaker-test -c4 seems to produce an output on each speaker, but the two 'back' have very low volume ). It is an improvement over the legacy driver since there was only two speakers working. Volume is also louder than legacy driver ( snd-hda-intel ).

Dmic still no luck for now though, I will do further tests. if you have any pointers from the attached alsa-info, happy to test !
Comment 88 Pierre Bossart 2019-08-14 14:16:26 UTC
(In reply to Tristan Mahe from comment #87)
> Created attachment 284377 [details]
> alsa-info for working speakers / still no dmic working though
> 
> reporting that speakers work using the for-next branch on the 2019 hp
> spectre x360.
> 
> I just have a doubt on the back speakers, ( using speaker-test -c4 seems to
> produce an output on each speaker, but the two 'back' have very low volume
> ). It is an improvement over the legacy driver since there was only two
> speakers working. Volume is also louder than legacy driver ( snd-hda-intel ).
> 
> Dmic still no luck for now though, I will do further tests. if you have any
> pointers from the attached alsa-info, happy to test !

There is a known debugfs error in there, discard it, we are trying to figure out where it comes from (likely not from SOF).
The dmesg is cut so can't interpret it and figure out your setup.
please provide the full log with dynamic debug for the SOF parts
Also please list which firmware and topology files you are using, I don't know how you play on 4 speakers since we typically enable stereo only.
Comment 89 Tristan Mahe 2019-08-14 17:19:02 UTC
Created attachment 284393 [details]
dmesg with sof ddebug activated

Please find attached the dmesg with dynamic debug on boot for sof module. Tell me if you want other logs or different ddebug options. There does not seem to be more messages than before though.

I use the topology for 2 DMICs as provided on comment 70.

The firmware is sof-cnl-signed-intel.ri v1.3 directly from GitHub release ( and renamed as specified above ).

Upon further testing, I  think the issue was a wrong symlink on my part with the 4 dmic topology instead of the two, since now I get some very low volume recording with arecord on the DMIC16 card ( expected as the patch +20dB is not in the firmware I am using at the moment, and adding +20dB in Audacity makes the file audible ). I can't record yet using Audacity but it is probably user error or misconfig of pulseaudio, as arecord works.

I guess the only wonder now left is why the 4 speakers since it is the first time speaker-test -c 4 has an output for me on the back speakers ( although very faint ).
Comment 90 Pierre Bossart 2019-08-14 17:31:04 UTC
Tristan, do you mind testing with the latest SOF kernel https://github.com/thesofproject/linux/commits/topic/sof-dev and the topologies I'll add in attachment? That should provide you with a better sound level and no DC issues

You don't need to change anything in the firmware itself, it does not contain any gain values.
Comment 91 Pierre Bossart 2019-08-14 17:32:31 UTC
Created attachment 284395 [details]
latest HDaudio topology files

copy these files in /lib/firmware/intel/sof-tplg
(no symlinks required with the latest SOF kernel)
Comment 92 Tristan Mahe 2019-08-14 19:02:27 UTC
Created attachment 284409 [details]
dmesg while speaker-test -c 4

Thank you Pierre, just finished compiling the latest SOF kernel and testing.

Please find attached a dmesg while playing sound with speaker-test -c 4 and one while recording with arecord. I could not be fast enough to catch boot logs though, there is a lot of debug messages.

Tell me if you need to restrict a bit the dynamic debug with other options than all logs for sof module.

Still playing on the 4 speakers as the previous test, with the same low volume for the back speakers.

I can confirm the recording volume is also way better as you were expecting.

Gonna try now to get the mic exposed to pulseaudio to be able to use it in other GUIs apps.

Do not hesitate if you need other tests !
Comment 93 Tristan Mahe 2019-08-14 19:52:04 UTC
just reporting that the mic is not autodetected by udev but specifying it in /etc/pulse/default.pa ( load-module module-alsa-source device=hw:0,7 ) works perfectly.

Amazing !

Gonna now try to figure out what is happening with the 4 speakers...
Comment 94 Pierre Bossart 2019-08-14 20:59:23 UTC
looks like you have too many traces now...Anyways looks like you are in good shape.

We didn't use 'conventional' names for the DMIC capture so it's likely that PulseAudio don't know what to do. Same on the playback side, the stream names come from the DSP topology and are likely not aligned with the usual conventions.

I was thinking a UCM file is likely required for this, so that you get the correct devices and don't have to do any guess work. We haven't started the work on this yet but it's on the radar.

for the 4 speakers, it could be a bug on the topology side. I don't this we support this but will check.
Comment 95 Tristan Mahe 2019-08-14 21:18:36 UTC
Created attachment 284417 [details]
dmesg without all the traces

Yes, too many traces :)

I have recompiled removing the -DDEBUG in the Makefile in sound/soc/sof and got up with this one, it is a bit truncated from the beginning since it's been running a bit more, but it was the same as previous dmesg...

Few errors show up.

let me know if you need me to test anything !
Comment 96 Nils Hondong 2019-10-11 09:58:07 UTC
I even have the same Problem with a HP envy x360 dr0220ng. 

Audio Hardware is the same:

00:1f.3 Multimedia audio controller: Intel Corporation Device 9dc8 (rev 30)
	Subsystem: Hewlett-Packard Company Device 85e7

Sound is working with kernel 4.15 and 5.3, but it does not recognize the microphone.
Comment 97 Thomas 2019-11-03 06:13:41 UTC
I followed Pierre's comment #73 with blacklisting snd_hda_intel and snd_soc_skl and copying firmware and topology files from the SOF project.

Still something goes wrong:

[   84.441301] sof-audio-pci 0000:00:1f.3: No ASoC machine driver found - using nocodec

All SOF-related messages from dmesg attached below (how do I insert attachments?)

This is on a Thinkpad X1 Yoga, 4th gen, Intel Whiskey Lake CPU and Intel audio 8086:9dc8, running Kernel 5.3.0-19.

00:1f.3 Audio device [0403]: Intel Corporation Cannon Point-LP High Definition Audio Controller [8086:9dc8] (rev 11) (prog-if 80)

                       -------------

[   84.433656] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[   84.433658] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[   84.434109] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[   84.441301] sof-audio-pci 0000:00:1f.3: No ASoC machine driver found - using nocodec
[   84.444139] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[   84.444141] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[   84.529692] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:1:0-5dd9a
[   84.529693] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:7:0 Kernel ABI 3:8:0
[   84.529904] sof-audio-pci 0000:00:1f.3: firmware boot complete
[   84.530777] sof-nocodec sof-nocodec: info: override FE DAI link NoCodec-0
[   84.530778] sof-nocodec sof-nocodec: info: override FE DAI link NoCodec-1
[   84.530779] sof-nocodec sof-nocodec: info: override FE DAI link NoCodec-2
[   84.530780] sof-nocodec sof-nocodec: info: override FE DAI link NoCodec-3
[   84.530781] sof-nocodec sof-nocodec: info: override FE DAI link NoCodec-4
[   84.530781] sof-nocodec sof-nocodec: info: override FE DAI link NoCodec-5
[   84.530782] sof-nocodec sof-nocodec: info: override FE DAI link NoCodec-6
[   84.530783] sof-nocodec sof-nocodec: info: override FE DAI link NoCodec-7
[   84.530999] sof-audio-pci 0000:00:1f.3: Direct firmware load for intel/sof-tplg/sof-cnl-nocodec.tplg failed with error -2
[   84.531001] sof-audio-pci 0000:00:1f.3: error: tplg request firmware intel/sof-tplg/sof-cnl-nocodec.tplg failed err: -2
[   84.531003] sof-audio-pci 0000:00:1f.3: error: failed to load DSP topology -2
[   84.531005] sof-audio-pci 0000:00:1f.3: ASoC: failed to probe component -2
[   84.531364] sof-nocodec sof-nocodec: ASoC: failed to instantiate card -2
[   84.531378] sof-nocodec: probe of sof-nocodec failed with error -2
[   84.572888] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[   84.656175] sof-audio-pci 0000:00:1f.3: firmware boot complete

[   91.953802] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[   92.058349] sof-audio-pci 0000:00:1f.3: firmware boot complete
Comment 98 Jaroslav Kysela 2019-11-03 08:07:56 UTC
You have to compile the kernel driver without CONFIG_SND_SOC_SOF_NOCODEC_SUPPORT:

  # CONFIG_SND_SOC_SOF_NOCODEC_SUPPORT is not set
Comment 99 Thomas 2019-11-03 19:28:51 UTC
(In reply to Jaroslav Kysela from comment #98)
> You have to compile the kernel driver without
> CONFIG_SND_SOC_SOF_NOCODEC_SUPPORT:
> 
>   # CONFIG_SND_SOC_SOF_NOCODEC_SUPPORT is not set

This worked, thank you so much!
Comment 100 Pierre Bossart 2019-11-04 15:32:31 UTC
yes, it's a known problem, I sent a couple of corrections upstream to clarify what distros should enable, hopefully things should "just work" now.
Comment 101 David Ward 2019-11-13 15:10:06 UTC
(In reply to Pierre Bossart from comment #64)
> the solution will be to use the SOF driver, which does support HDaudio+dmic
> configurations. there's a bit of a delay to make the signed firmware
> sof-cnl.ri available (mostly due to vacation season).

Question: can this not be made to work using the SST driver as well (like it works under Windows, as I understand)? It appeared that this was heading that way before SOF was introduced as an alternative driver/firmware option. Is there a reason this is no longer considered viable:

(In reply to Pierre Bossart from comment #19)
> To play on the speaker, you can either use the hardware in legacy mode (as
> you tested with the snd_hda driver, or you can use the enhancement mode with
> the DSP enabled (with the Skylake/SST driver). When you use the DMIC you
> have to rely on the DSP.
> So basically we are now at feature parity with the HDaudio legacy stuff
> (speaker playback works for both cases) and only need to add DMIC support.

Having this work in both drivers wouldn't be a bad thing...

This bug seems to be what is pushing distributions to enable the SOF driver, without understanding the implications of it (additional firmware files need to be packaged or sound no longer works out-of-the-box; interaction occurs when the SST driver is also enabled (see bug 204237); etc.)
Comment 102 Pierre Bossart 2019-11-13 16:50:15 UTC
> Question: can this not be made to work using the SST driver as well (like it
> works under Windows, as I understand)? It appeared that this was heading
> that way before SOF was introduced as an alternative driver/firmware option.
> Is there a reason this is no longer considered viable:

The end-goal is really to have ONE driver that deals with all Intel platforms. This transition took more time than expected, it's unfortunate indeed.

There is no plan to provide further updates to the SST/Skylake driver.
HDaudio codecs, DMIC and SoundWire needs the SOF driver.
Comment 103 Robert 2019-11-14 14:03:18 UTC
Could you point me to the documentation for distros on what to enable?

I have now the following kernel config, derived from the previous config + kconfig-sof-default.sh from https://github.com/thesofproject/kconfig

/lib/firmware/intel/sof/sof-cnl-signed-intel.ri (sha1 28ad2a9afedfc0cf62b05ba8192dfa948ce5597e) + other files

/lib/firmware/intel/sof-tplg/sof-hda-generic.tplg (sha1 6fe2c4d64a9aca7ad259c396a85747ec11a1bd74) + other files

Kernel from https://github.com/thesofproject/linux#topic/sof-dev
and modprobe.blacklist=snd_hda_intel modprobe.blacklist=snd_soc_skl in Kernel command line.


The device is a HP EliteBook x360 1040 G5 with i7-8550U



% aplay -l
aplay: device_list:272: no soundcards found...

% arecord -l
arecord: device_list:272: no soundcards found...

And dmesg doesn't contain anything with "sof-" or "audio".
Comment 104 Robert 2019-11-14 14:04:31 UTC
Created attachment 285909 [details]
kernel config 5.4.0-rc7 Arch not working
Comment 105 David Ward 2019-11-14 15:04:56 UTC
(In reply to Robert from comment #103)
> Could you point me to the documentation for distros on what to enable?

SOF has been intentionally disabled in Arch Linux for now:

https://git.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?h=packages/linux&id=5eea0711df9dee2f91da7fd12aa07d8e8fd136d6
Comment 106 Pierre Bossart 2019-11-14 15:27:07 UTC
(In reply to Robert from comment #103)
> Could you point me to the documentation for distros on what to enable?
> 
> I have now the following kernel config, derived from the previous config +
> kconfig-sof-default.sh from https://github.com/thesofproject/kconfig

Can you start from make defconfig?
I have no idea what the 'previous config' might be.

Also you don't want any of the SOF developer options. We should probably move this out of the default or create a distro-safe kconfig

> 
> /lib/firmware/intel/sof/sof-cnl-signed-intel.ri (sha1
> 28ad2a9afedfc0cf62b05ba8192dfa948ce5597e) + other files
> 
> /lib/firmware/intel/sof-tplg/sof-hda-generic.tplg (sha1
> 6fe2c4d64a9aca7ad259c396a85747ec11a1bd74) + other files

There is a known issue if you take the latest HDAudio topology and use it with the signed firmware.

> Kernel from https://github.com/thesofproject/linux#topic/sof-dev
> and modprobe.blacklist=snd_hda_intel modprobe.blacklist=snd_soc_skl in
> Kernel command line.
> 
> 
> The device is a HP EliteBook x360 1040 G5 with i7-8550U
> 
> 
> 
> % aplay -l
> aplay: device_list:272: no soundcards found...
> 
> % arecord -l
> arecord: device_list:272: no soundcards found...
> 
> And dmesg doesn't contain anything with "sof-" or "audio".

wondering if you can share the pci ID for that device. I hope it's not KBL...

cd /sys/bus/pci/devices/0000\:00\:1f.3/
more device
more class
Comment 107 Robert 2019-11-15 17:59:09 UTC
(In reply to David Ward from comment #105) 
> SOF has been intentionally disabled in Arch Linux for now:
> 
> https://git.archlinux.org/svntogit/packages.git/commit/trunk/
> PKGBUILD?h=packages/linux&id=5eea0711df9dee2f91da7fd12aa07d8e8fd136d6

Thanks, that's interesting. 
I had CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=y and CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL=y which apparently leads to an issue. However, with CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=n there's still no soundcard detected.

(In reply to Pierre Bossart from comment #106)
> (In reply to Robert from comment #103)
> > Could you point me to the documentation for distros on what to enable?
> > 
> > I have now the following kernel config, derived from the previous config +
> > kconfig-sof-default.sh from https://github.com/thesofproject/kconfig
> 
> Can you start from make defconfig?

I started from defconfig (and added necessary config for dm_crypt cryptroot). Still no luck


> Also you don't want any of the SOF developer options. We should probably
> move this out of the default or create a distro-safe kconfig

A distro-safe kconfig would be highly appreaciated.
 
> There is a known issue if you take the latest HDAudio topology and use it
> with the signed firmware.

Are there firmware and topology files available, which don't have this issue?


> wondering if you can share the pci ID for that device. I hope it's not KBL...

more /sys/bus/pci/devices/0000:00:1f.3/device
0x9d71

more /sys/bus/pci/devices/0000:00:1f.3/class
0x040100
Comment 108 Jaroslav Kysela 2019-11-15 18:05:45 UTC
> Are there firmware and topology files available, which don't have this issue?

You may try this tar ball with the firmware and topology files:

ftp://ftp.alsa-project.org/pub/misc/sof/sof-firmware-1.3.1.tar.bz2
Comment 109 Pierre Bossart 2019-11-15 18:07:49 UTC
> more /sys/bus/pci/devices/0000:00:1f.3/device
> 0x9d71

That's a KabyLake device.

#if IS_ENABLED(CONFIG_SND_SOC_INTEL_KBL)
	/* KBL */
	{ PCI_DEVICE(0x8086, 0x9D71),
		.driver_data = (unsigned long)&snd_soc_acpi_intel_kbl_machines},
#endif

Unfortunately this device is not supported by SOF at the moment, and 
DMICs are not supported by the SST driver in combination with HDaudio.

At some point SOF will support KabyLake but that's just not there today.
I can only apologize and ask you to be patient.
Comment 110 Robert 2019-11-18 14:28:11 UTC
(In reply to Pierre Bossart from comment #109)
> Unfortunately this device is not supported by SOF at the moment, and 
> DMICs are not supported by the SST driver in combination with HDaudio.
> 
> At some point SOF will support KabyLake but that's just not there today.
> I can only apologize and ask you to be patient.

Thanks, is there another bug to track the progress for KabyLake or will the updates follow here?
Comment 111 Pierre Bossart 2019-11-18 17:04:55 UTC
I would engage people that have issues with DMIC enablement to report their case here.

When SOF became the new direction, we made the assumption that we could start with the firmware boot flow used for ApolloLake and newer platforms. It turned out to be a partly flawed assumption since OEMs shipped products based on Kabylake which uses a different boot process. We really need to fork-lift this boot support but as usual it's a matter of competing priorities and milestones.
Comment 112 Peter F. Patel-Schneider 2019-11-24 13:55:42 UTC
By here do you mean in this bug report or to this bugzilla?


I have a new Lenovo Yoga C940, which has an i7-1065G7 CPU.

The microphone array is not working with snd_hda_intel, nor are three of the five speakers.  I've tried to connect them by using hdajackretask but nothing I'm trying is working so I'm making the assumption that they are connected via the Intel audio controller
00:1f.3 Multimedia audio controller: Intel Corporation Device 34c8 (rev 30)

I'm running Fedora 31 and blacklisting snd_hda_intel doesn't help.  

Is there a possibility that SOF will handle the microphones?  If so, how do I set things up so that SOF has a chance of working?
Comment 113 Jaroslav Kysela 2019-11-24 14:11:49 UTC
(In reply to Peter F. Patel-Schneider from comment #112)
> By here do you mean in this bug report or to this bugzilla?
> 
> 
> I have a new Lenovo Yoga C940, which has an i7-1065G7 CPU.

...

> Is there a possibility that SOF will handle the microphones?  If so, how do
> I set things up so that SOF has a chance of working?

You need most likely the SOF kernel, Fedora bug with a test kernel is here:

https://bugzilla.redhat.com/show_bug.cgi?id=1772498

It's the WiP, not all issues are resolved (problems with the old firmware and topology, some other litle UCM issues). Just read the comments.
Comment 114 Peter F. Patel-Schneider 2019-11-24 18:07:41 UTC
OK, I'm working with that kernel.  I've encountered some problems but I'll work them out at https://bugzilla.redhat.com/show_bug.cgi?id=1772498
Comment 115 arthur 2020-01-01 15:54:37 UTC
Just to add to the list of affected devices:

Machine:   Device: laptop System: LENOVO product: 20HR0068GE v: ThinkPad X1 Carbon 5th serial: <filter>
           Mobo: LENOVO model: 20HR0068GE v: SDK0J40697 WIN serial: <filter>
           UEFI [Legacy]: LENOVO v: N1MET37W (1.22 ) date: 07/04/2017
CPU:       Dual core Intel Core i7-7500U (-MT-MCP-)
           arch: Kaby Lake rev.9 cache: 4096 KB
Audio:     Card Intel Sunrise Point-LP HD Audio
           driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k5.0.0-37-generic

# lspci -nn|grep Audio
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)
Comment 116 Nathaniel Evan 2020-01-05 05:05:06 UTC
My machine is also affected by this bug. Any updates?

Machine:
  Type: Laptop System: Acer product: Swift SF314-54G v: V1.16 
  serial: <root required> 
  Mobo: KBL model: Strongbow_KL v: V1.16 serial: <root required> 
  UEFI: Insyde v: 1.16 date: 05/30/2019 

CPU:
  Topology: Quad Core model: Intel Core i5-8250U bits: 64 type: MT MCP 
  arch: Kaby Lake rev: A L2 cache: 6144 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 28808 
  Speed: 800 MHz min/max: 400/3400 MHz Core speeds (MHz): 1: 801 2: 800 
  3: 775 4: 800 5: 787 6: 800 7: 800 8: 802 

Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Acer Incorporated ALI 
  driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
  Sound Server: ALSA v: k5.4.7-arch1-1 

# lspci -nn | grep Audio
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)
Comment 117 Vasyl 2020-01-24 15:55:56 UTC
acer sf315-52 is affected too

00:1f.3 Multimedia audio controller [0401]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)
Comment 118 Vasyl 2020-01-24 23:27:45 UTC
The difference between this and previous message is like 7 hours, but I got it worked. 
But only with external microphone via jack 
Here's what I did:
1) run
>pavucontrol
and pick "analog stereo duplex" in the "configuration" tab.(for some reason only "analog stereo output" was there by default)
2) and close the app (it cannot run together with next app same time) 
2) run
> hdajackretask
from "alsa-tools-gui" package
3) select codec "Realtek ALC256" in the bottom
4) click "show unconnected pins" on menu on right panel 
5)By trying one by one I found that override pin ID 0x19 to the "Microphone" did the trick.

All the time the headset was in the jack.
Also nice to have onboard mic also worked, but seems other configuration or pins there(haven't found).

Can I help in development somehow by providing some info from my PC?
Comment 119 Perry.Yuan 2020-01-25 00:57:15 UTC
Hey there,
Thanks for reaching out. I am on Chinese New Year holiday.
I’m out of the office with no access to email. I’ll be responding to the emails I missed when I return on  2/2 .

[Image]

Happy New Year!
Best Regards!
Comment 120 Kristiyan 2020-02-25 13:38:11 UTC
Hi, is there an update on the issue? A lot of laptops are affected, including the new inspiron 7590 from Dell.
Comment 121 Pierre Bossart 2020-02-25 15:26:17 UTC
(In reply to Kristiyan from comment #120)
> Hi, is there an update on the issue? A lot of laptops are affected,
> including the new inspiron 7590 from Dell.

Just to double-check this is the same issue, can you post the results of the following command on his Inspiron 7590?
lspci -nn | grep Audio
Comment 122 Kristiyan 2020-02-25 18:56:21 UTC
Hi, the output was empty, so I give you only lspci -nn:

00:00.0 Host bridge [0600]: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers [8086:3ec4] (rev 07)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07)
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:3e9b]
00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:1903] (rev 07)
00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model [8086:1911]
00:12.0 Signal processing controller [1180]: Intel Corporation Cannon Lake PCH Thermal Controller [8086:a379] (rev 10)
00:13.0 Serial controller [0700]: Intel Corporation Device [8086:a37c] (rev 10)
00:14.0 USB controller [0c03]: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller [8086:a36d] (rev 10)
00:14.2 RAM memory [0500]: Intel Corporation Cannon Lake PCH Shared SRAM [8086:a36f] (rev 10)
00:14.3 Network controller [0280]: Intel Corporation Wireless-AC 9560 [Jefferson Peak] [8086:a370] (rev 10)
00:15.0 Serial bus controller [0c80]: Intel Corporation Device [8086:a368] (rev 10)
00:15.1 Serial bus controller [0c80]: Intel Corporation Device [8086:a369] (rev 10)
00:16.0 Communication controller [0780]: Intel Corporation Cannon Lake PCH HECI Controller [8086:a360] (rev 10)
00:17.0 SATA controller [0106]: Intel Corporation Device [8086:a353] (rev 10)
00:1b.0 PCI bridge [0604]: Intel Corporation Device [8086:a340] (rev f0)
00:1d.0 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port 9 [8086:a330] (rev f0)
00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:a30d] (rev 10)
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Cannon Lake PCH cAVS [8086:a348] (rev 10)
00:1f.4 SMBus [0c05]: Intel Corporation Cannon Lake PCH SMBus Controller [8086:a323] (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller [8086:a324] (rev 10)
01:00.0 3D controller [0302]: NVIDIA Corporation Device [10de:1f91] (rev a1)
3b:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd Device [144d:a809]
Comment 123 Pierre Bossart 2020-02-25 19:11:38 UTC
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Cannon Lake PCH
cAVS [8086:a348] (rev 10)

That's a supported platform, you should get the DMIC functionality with the SOF driver. The issue is only with platforms using the PCI ID [8086:9d71]
Comment 124 Kristiyan 2020-02-25 21:02:59 UTC
SOF comes shipped with kernel 5.2, I have 5.3.0 and still no support, but thanks!
Comment 125 rb 2020-02-25 21:34:54 UTC
I'm on the same boat here, Lenovo X1 Carbon Gen7 :
$ dmesg | grep audio
[   24.711915] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   24.774599] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC285: line_outs=2 (0x14/0x17/0x0/0x0/0x0) type:speaker
[   24.774601] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   24.774603] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   24.774604] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[   24.774605] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[   24.774607] snd_hda_codec_realtek hdaudioC0D0:      Mic=0x19

Kernel: 5.4.20-200.fc31.x86_64 

On kernel 5.5.5, there's no audio at all.
Comment 126 Jaroslav Kysela 2020-02-25 22:14:50 UTC
Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=1772498

Please, don't report the specific distribution issues here.
Comment 127 Ruben 2020-02-26 06:57:22 UTC
Me too, HP EliteBook x360. I've lived with this for months now, booting with the snd_hda_intel.dsp_driver=0 flag, and keeping myself on the latest kernel until now. 

I confirm no audio at all with 5.5.5 :

$ dmesg | grep audio
[   16.286925] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   16.287674] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[   16.287695] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[   16.288298] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[   16.288322] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[   16.288674] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[   16.289358] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   16.298199] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[   16.298206] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[   16.372919] sof-audio-pci 0000:00:1f.3: Direct firmware load for intel/sof/sof-cnl.ri failed with error -2
[   16.372927] sof-audio-pci 0000:00:1f.3: error: request firmware intel/sof/sof-cnl.ri failed err: -2
[   16.372932] sof-audio-pci 0000:00:1f.3: error: failed to load DSP firmware -2
[   16.372936] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -2
Comment 128 Pierre Bossart 2020-02-26 15:30:05 UTC
> [   16.372919] sof-audio-pci 0000:00:1f.3: Direct firmware load for
> intel/sof/sof-cnl.ri failed with error -2
> [   16.372927] sof-audio-pci 0000:00:1f.3: error: request firmware
> intel/sof/sof-cnl.ri failed err: -2
> [   16.372932] sof-audio-pci 0000:00:1f.3: error: failed to load DSP
> firmware -2
> [   16.372936] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err:
> -2

You're missing the firmware file... Updating your kernel is nice but unless you have the firmware file in /lib/firmware/intel/sof you'll keep getting the same error. You also need a topology file in /lib/firmware/intel/sof-tplg
Comment 129 Nathaniel Evan 2020-03-06 22:28:33 UTC
I saw on this bug page https://bugzilla.redhat.com/show_bug.cgi?id=1772498 that this issue has been fixed with several new packages on Fedora; have these made their way upstream?
Comment 130 rb 2020-03-09 19:20:34 UTC
(In reply to Ruben from comment #127)
> Me too, HP EliteBook x360. I've lived with this for months now, booting with
> the snd_hda_intel.dsp_driver=0 flag, and keeping myself on the latest kernel
> until now. 
> 
> I confirm no audio at all with 5.5.5 :
> 
> $ dmesg | grep audio
> [   16.286925] sof-audio-pci 0000:00:1f.3: DSP detected with PCI
> class/subclass/prog-if info 0x040100
> [   16.287674] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+
> platform, using SOF driver
> [   16.287695] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
> [   16.288298] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine
> driver found
> [   16.288322] sof-audio-pci 0000:00:1f.3: DSP detected with PCI
> class/subclass/prog-if 0x040100
> [   16.288674] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
> [   16.289358] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops
> i915_audio_component_bind_ops [i915])
> [   16.298199] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
> [   16.298206] sof-audio-pci 0000:00:1f.3: using HDA machine driver
> skl_hda_dsp_generic now
> [   16.372919] sof-audio-pci 0000:00:1f.3: Direct firmware load for
> intel/sof/sof-cnl.ri failed with error -2
> [   16.372927] sof-audio-pci 0000:00:1f.3: error: request firmware
> intel/sof/sof-cnl.ri failed err: -2
> [   16.372932] sof-audio-pci 0000:00:1f.3: error: failed to load DSP
> firmware -2
> [   16.372936] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err:
> -2

I had this exact issue until I did : dnf install alsa-firmware

running 5.5.7-200

Mic still doesn't work but at least i have audio output.
Comment 131 Ruben 2020-03-10 06:41:54 UTC
(In reply to rb from comment #130)
> (In reply to Ruben from comment #127)
> > Me too, HP EliteBook x360. I've lived with this for months now, booting
> with
> > the snd_hda_intel.dsp_driver=0 flag, and keeping myself on the latest
> kernel
> > until now. 
> > 
> > I confirm no audio at all with 5.5.5 :
> > 
> > $ dmesg | grep audio
> > [   16.286925] sof-audio-pci 0000:00:1f.3: DSP detected with PCI
> > class/subclass/prog-if info 0x040100
> > [   16.287674] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+
> > platform, using SOF driver
> > [   16.287695] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
> > [   16.288298] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC
> machine
> > driver found
> > [   16.288322] sof-audio-pci 0000:00:1f.3: DSP detected with PCI
> > class/subclass/prog-if 0x040100
> > [   16.288674] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
> > [   16.289358] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops
> > i915_audio_component_bind_ops [i915])
> > [   16.298199] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
> > [   16.298206] sof-audio-pci 0000:00:1f.3: using HDA machine driver
> > skl_hda_dsp_generic now
> > [   16.372919] sof-audio-pci 0000:00:1f.3: Direct firmware load for
> > intel/sof/sof-cnl.ri failed with error -2
> > [   16.372927] sof-audio-pci 0000:00:1f.3: error: request firmware
> > intel/sof/sof-cnl.ri failed err: -2
> > [   16.372932] sof-audio-pci 0000:00:1f.3: error: failed to load DSP
> > firmware -2
> > [   16.372936] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed
> err:
> > -2
> 
> I had this exact issue until I did : dnf install alsa-firmware
> 
> running 5.5.7-200
> 
> Mic still doesn't work but at least i have audio output.

I did that when someone pointed me out that I was missing some firmware, but I still have no audio at all with 5.5.7-200. I can suspend my machine again though.

That is a feature I took for granted, and I will take more seriously from now on :D. I can live without audio (any bluetooth headphones or any USB comm dongle allows me to have flawless video calls). But before 5.5.7, the audio problem had the side effect of preventing my machine from suspending. Then I learned to appreciate suspension as a big feature, not only as a nice-to-have.

Cheers.
Comment 132 Tobias Grosser 2020-03-20 05:34:08 UTC
Hi,

I would like to ask if you guys could guide me through the setup of the sound card of my Thinkpad Yoga X1 Gen 4 on Ubuntu 20.04 with Linux 5.5.0.

After disabling dmic, I managed to get audio output using the hda driver. Now I would like to get both audio output and microphone input.

This is my card:

00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11) (prog-if 80)
        Subsystem: Lenovo Cannon Point-LP High Definition Audio Controller
        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
        Interrupt: pin A routed to IRQ 154
        Region 0: Memory at ea33c000 (64-bit, non-prefetchable) [size=16K]
        Region 4: Memory at ea000000 (64-bit, non-prefetchable) [size=1M]
        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: [80] Vendor Specific Information: Len=14 <?>
        Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee00578  Data: 0000
        Kernel driver in use: sof-audio-pci

This is my grub line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash modprobe.blacklist=snd_hda_intel,snd-soc-skl"

And setup the sof firmware directories as follows:

/lib/firmware/intel/sof:
total 272
lrwxrwxrwx 1 root    root        47 Mär 19 22:05 sof-cnl.ri -> /lib/firmware/intel/sof/sof-cnl-signed-intel.ri
-rw-r--r-- 1 grosser grosser 278528 Jul 23  2019 sof-cnl-signed-intel.ri

/lib/firmware/intel/sof-tplg:
total 44
-rw-r--r-- 1 grosser grosser 42995 Mär 19 22:11 sof-hda-generic.tplg

The sof-hda-generic.tplg file is the one from Comment 17

My dmesg is showing:

[   32.948551] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[   32.948777] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[   32.948986] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[   32.948993] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[   32.949150] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[   32.949505] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   32.963344] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[   32.963346] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[   33.038132] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[   33.038134] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[   33.119627] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:1:0-5dd9a
[   33.119629] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:7:0 Kernel ABI 3:11:0
[   33.119839] sof-audio-pci 0000:00:1f.3: firmware boot complete
[   33.312378] sof-audio-pci 0000:00:1f.3: Direct firmware load for intel/sof-tplg/sof-hda-generic-4ch.tplg failed with error -2
[   33.312381] sof-audio-pci 0000:00:1f.3: error: tplg request firmware intel/sof-tplg/sof-hda-generic-4ch.tplg failed err: -2
[   33.312383] sof-audio-pci 0000:00:1f.3: error: failed to load DSP topology -2
[   33.312385] sof-audio-pci 0000:00:1f.3: ASoC: failed to probe component -2

Unfortunately, I do not get any audio devices at this point. I think I successfully managed to get the right driver, get a signed firmware booted, ut somehow fail to get a tplg loaded. My suspicion is that I just loaded the wrong topology file, but I have no idea which one I would need and where to obtain it.

I tried to build all topology files in the sof repository by running ./scripts/build-tools.sh but run into this error:

ALSA lib dapm.c:547:(tplg_parse_dapm_widget) widget 'ASRC1.0': Unsupported widget type asrc
ALSA lib parser.c:213:(tplg_load_config) failed to parse topology
Unable to load configuration: Invalid argument
make[2]: *** [topology/CMakeFiles/topology_sof-apl-asrc-pcm512x.dir/build.make:61: topology/sof-apl-asrc-pcm512x.tplg] Error 1
make[1]: *** [CMakeFiles/Makefile2:679: topology/CMakeFiles/topology_sof-apl-asrc-pcm512x.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

using the following revision of the repo:

commit c639886ddcae5ad8cc758e36521e7d645301a700 (HEAD -> master, origin/master, origin/HEAD)
Author: Paul Olaru <paul.olaru@nxp.com>
Date:   Wed Mar 18 15:06:09 2020 +0200

I was wondering if anyone here could give me a some directions on how to get this thing working?
Comment 133 Pierre Bossart 2020-03-20 12:24:31 UTC
> [   33.312378] sof-audio-pci 0000:00:1f.3: Direct firmware load for
> intel/sof-tplg/sof-hda-generic-4ch.tplg failed with error -2
> [   33.312381] sof-audio-pci 0000:00:1f.3: error: tplg request firmware
> intel/sof-tplg/sof-hda-generic-4ch.tplg failed err: -2
> [   33.312383] sof-audio-pci 0000:00:1f.3: error: failed to load DSP
> topology -2

You don't have the right topology, or it was renamed to handle 2 and 4 channels.

> ALSA lib dapm.c:547:(tplg_parse_dapm_widget) widget 'ASRC1.0': Unsupported
> widget type asrc
> ALSA lib parser.c:213:(tplg_load_config) failed to parse topology
> Unable to load configuration: Invalid argument
> make[2]: ***
> [topology/CMakeFiles/topology_sof-apl-asrc-pcm512x.dir/build.make:61:
> topology/sof-apl-asrc-pcm512x.tplg] Error 1
> make[1]: *** [CMakeFiles/Makefile2:679:
> topology/CMakeFiles/topology_sof-apl-asrc-pcm512x.dir/all] Error 2
> make: *** [Makefile:130: all] Error 2

Known issue now fixed in alsa-lib.

Just take all the firmware and topology from 
https://github.com/thesofproject/sof-bin/tree/stable-v1.4.2

the go.sh script will install everything. Just save /lib/firmware/intel/sof and /lib/firmware/intel/sof-tplg beforehand should you want to restore your system.

we'll probably change to a Makefile and add more capabilities for the install but that should do for now.
Comment 134 Tobias Grosser 2020-03-20 13:07:43 UTC
Wow, I am impressed. This was super fast. Installing the new firmware worked very smoothly. It now seems to me that the kernel side works as expected. Unfortunately, pavucontrol does not yet show any of these inputs/outputs.

I will try to debug this a little, but if something obvious in my outputs below is visible, I would be glad to get a pointer of where to look.

> dmesg | egrep 'audio|dsp'
[   19.891619] systemd[1]: Mounting Mount unit for pulseaudio, revision 9...
[   20.315820] usbcore: registered new interface driver snd-usb-audio
[   20.341950] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[   20.342133] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[   20.342305] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[   20.342311] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[   20.342439] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[   20.342564] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   20.352766] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[   20.352768] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[   20.400590] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[   20.400592] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[   20.500327] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:4:2-66a5a
[   20.500329] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel ABI 3:11:0
[   20.500575] sof-audio-pci 0000:00:1f.3: firmware boot complete
[   20.675060] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link iDisp1
[   20.675062] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link iDisp2
[   20.675062] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link iDisp3
[   20.675063] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link Analog Playback and Capture
[   20.675064] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link Digital Playback and Capture
[   20.675064] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link dmic01
[   20.675065] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link dmic16k
[   20.675532] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:11:0 Kernel ABI 3:11:0
[   20.675536] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp3 Tx not handled
[   20.676867] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec0_in not handled
[   20.676869] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp2 Tx not handled
[   20.678190] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec1_in not handled
[   20.678202] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp1 Tx not handled
[   20.681039] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec0_out not handled
[   20.681040] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Analog CPU Playback not handled
[   20.682522] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec1_out not handled
[   20.682524] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Digital CPU Playback not handled
[   20.682525] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec2_in not handled
[   20.682526] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Alt Analog CPU Playback not handled
[   20.682527] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec2_out not handled
[   20.682527] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Analog CPU Capture not handled
[   20.683875] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp1_out not handled
[   20.683876] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Digital CPU Capture not handled
[   20.684594] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp2_out not handled
[   20.684595] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Alt Analog CPU Capture not handled
[   20.685500] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp3_out not handled
[   20.692557] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[   20.716635] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=2 (0x14/0x17/0x0/0x0/0x0) type:speaker
[   20.716636] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   20.716637] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   20.716637] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[   20.716638] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[   20.716638] snd_hda_codec_realtek ehdaudio0D0:      Mic=0x19
[   20.770500] snd_hda_codec_realtek ehdaudio0D0: ASoC: sink widget AIF1TX overwritten
[   20.770509] snd_hda_codec_realtek ehdaudio0D0: ASoC: source widget AIF1RX overwritten
[   20.770536] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi1 <-> iDisp1 Pin mapping ok
[   20.770539] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi2 <-> iDisp2 Pin mapping ok
[   20.770541] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi3 <-> iDisp3 Pin mapping ok
[   20.770543] skl_hda_dsp_generic skl_hda_dsp_generic: Analog Codec DAI <-> Analog CPU DAI mapping ok
[   20.770545] skl_hda_dsp_generic skl_hda_dsp_generic: Digital Codec DAI <-> Digital CPU DAI mapping ok
[   20.770547] skl_hda_dsp_generic skl_hda_dsp_generic: dmic-hifi <-> DMIC01 Pin mapping ok
[   20.770550] skl_hda_dsp_generic skl_hda_dsp_generic: dmic-hifi <-> DMIC16k Pin mapping ok
[   20.770567] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> DMIC48kHz 6 mapping ok
[   20.770582] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> DMIC16kHz 7 mapping ok
[   20.770603] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDA Analog 0 mapping ok
[   20.770630] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDA Digital 1 mapping ok
[   20.770641] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI1 3 mapping ok
[   20.770652] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI2 4 mapping ok
[   20.770662] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI3 5 mapping ok
[   20.770716] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi3 overwritten
[   20.770719] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi2 overwritten
[   20.770723] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi1 overwritten
[   20.770726] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Codec Output Pin1 overwritten
[   20.770729] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Codec Input Pin1 overwritten
[   20.770733] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Analog Codec Playback overwritten
[   20.770738] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Digital Codec Playback overwritten
[   20.770742] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Alt Analog Codec Playback overwritten
[   20.770748] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Analog Codec Capture overwritten
[   20.770752] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Digital Codec Capture overwritten
[   20.770756] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Alt Analog Codec Capture overwritten
[   20.787069] input: sof-hda-dsp Mic as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input30
[   20.798812] input: sof-hda-dsp Headphone as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input31
[   20.798963] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input32
[   20.799014] input: sof-hda-dsp HDMI/DP,pcm=4 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input33
[   20.799123] input: sof-hda-dsp HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input34
[  585.450960] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[  585.545209] sof-audio-pci 0000:00:1f.3: firmware boot complete

grosser@grosser-ThinkPad-X1-Yoga-4th:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 1: HDA Digital (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: USB [ThinkPad Thunderbolt 3 Dock USB], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
grosser@grosser-ThinkPad-X1-Yoga-4th:~$ aplay -L
default
    Playback/recording through the PulseAudio sound server
null
    Discard all samples (playback) or generate zero samples (capture)
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pulse
    PulseAudio Sound Server
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
sysdefault:CARD=sofhdadsp
    sof-hda-dsp, 
    Default Audio Device
dmix:CARD=sofhdadsp,DEV=0
    sof-hda-dsp, 
    Direct sample mixing device
dmix:CARD=sofhdadsp,DEV=1
    sof-hda-dsp, 
    Direct sample mixing device
dmix:CARD=sofhdadsp,DEV=3
    sof-hda-dsp, 
    Direct sample mixing device
dmix:CARD=sofhdadsp,DEV=4
    sof-hda-dsp, 
    Direct sample mixing device
dmix:CARD=sofhdadsp,DEV=5
    sof-hda-dsp, 
    Direct sample mixing device
dsnoop:CARD=sofhdadsp,DEV=0
    sof-hda-dsp, 
    Direct sample snooping device
dsnoop:CARD=sofhdadsp,DEV=1
    sof-hda-dsp, 
    Direct sample snooping device
dsnoop:CARD=sofhdadsp,DEV=3
    sof-hda-dsp, 
    Direct sample snooping device
dsnoop:CARD=sofhdadsp,DEV=4
    sof-hda-dsp, 
    Direct sample snooping device
dsnoop:CARD=sofhdadsp,DEV=5
    sof-hda-dsp, 
    Direct sample snooping device
hw:CARD=sofhdadsp,DEV=0
    sof-hda-dsp, 
    Direct hardware device without any conversions
hw:CARD=sofhdadsp,DEV=1
    sof-hda-dsp, 
    Direct hardware device without any conversions
hw:CARD=sofhdadsp,DEV=3
    sof-hda-dsp, 
    Direct hardware device without any conversions
hw:CARD=sofhdadsp,DEV=4
    sof-hda-dsp, 
    Direct hardware device without any conversions
hw:CARD=sofhdadsp,DEV=5
    sof-hda-dsp, 
    Direct hardware device without any conversions
plughw:CARD=sofhdadsp,DEV=0
    sof-hda-dsp, 
    Hardware device with all software conversions
plughw:CARD=sofhdadsp,DEV=1
    sof-hda-dsp, 
    Hardware device with all software conversions
plughw:CARD=sofhdadsp,DEV=3
    sof-hda-dsp, 
    Hardware device with all software conversions
plughw:CARD=sofhdadsp,DEV=4
    sof-hda-dsp, 
    Hardware device with all software conversions
plughw:CARD=sofhdadsp,DEV=5
    sof-hda-dsp, 
    Hardware device with all software conversions
usbstream:CARD=sofhdadsp
    sof-hda-dsp
    USB Stream Output
sysdefault:CARD=USB
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    Default Audio Device
front:CARD=USB,DEV=0
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    Front speakers
surround21:CARD=USB,DEV=0
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=USB,DEV=0
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=USB,DEV=0
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=USB,DEV=0
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=USB,DEV=0
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=USB,DEV=0
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=USB,DEV=0
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=USB,DEV=0
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    Direct sample mixing device
dsnoop:CARD=USB,DEV=0
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    Direct sample snooping device
hw:CARD=USB,DEV=0
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    Direct hardware device without any conversions
plughw:CARD=USB,DEV=0
    ThinkPad Thunderbolt 3 Dock USB, USB Audio
    Hardware device with all software conversions
usbstream:CARD=USB
    ThinkPad Thunderbolt 3 Dock USB
    USB Stream Output



pactl list

Sink #1
        State: IDLE
        Name: alsa_output.usb-Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000-00.analog-stereo
        Description: ThinkPad Thunderbolt 3 Dock USB Audio Analog Stereo
        Driver: module-alsa-card.c
        Sample Specification: s16le 2ch 44100Hz
        Channel Map: front-left,front-right
        Owner Module: 27
        Mute: no
        Volume: front-left: 61604 /  94% / -1.61 dB,   front-right: 61604 /  94% / -1.61 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor Source: alsa_output.usb-Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000-00.analog-stereo.monitor
        Latency: 42400 usec, configured 40000 usec
        Flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME LATENCY 
        Properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "USB Audio"
                alsa.id = "USB Audio"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "1"
                alsa.card_name = "ThinkPad Thunderbolt 3 Dock USB"
                alsa.long_card_name = "Lenovo ThinkPad Thunderbolt 3 Dock USB at usb-0000:0a:00.0-1, full speed"
                alsa.driver_name = "snd_usb_audio"
                device.bus_path = "pci-0000:0a:00.0-usb-0:1:1.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:00.0/0000:0a:00.0/usb3/3-1/3-1:1.0/sound/card1"
                udev.id = "usb-Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000-00"
                device.bus = "usb"
                device.vendor.id = "17ef"
                device.vendor.name = "Lenovo"
                device.product.id = "306a"
                device.product.name = "ThinkPad Thunderbolt 3 Dock USB Audio"
                device.serial = "Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000"
                device.string = "front:1"
                device.buffering.buffer_size = "352800"
                device.buffering.fragment_size = "176400"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "ThinkPad Thunderbolt 3 Dock USB Audio Analog Stereo"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-usb"
        Ports:
                analog-output: Analog Output (priority: 9900)
        Active Port: analog-output
        Formats:
                pcm

Source #1
        State: RUNNING
        Name: alsa_output.usb-Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000-00.analog-stereo.monitor
        Description: Monitor of ThinkPad Thunderbolt 3 Dock USB Audio Analog Stereo
        Driver: module-alsa-card.c
        Sample Specification: s16le 2ch 44100Hz
        Channel Map: front-left,front-right
        Owner Module: 27
        Mute: no
        Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor of Sink: alsa_output.usb-Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000-00.analog-stereo
        Latency: 0 usec, configured 40000 usec
        Flags: DECIBEL_VOLUME LATENCY 
        Properties:
                device.description = "Monitor of ThinkPad Thunderbolt 3 Dock USB Audio Analog Stereo"
                device.class = "monitor"
                alsa.card = "1"
                alsa.card_name = "ThinkPad Thunderbolt 3 Dock USB"
                alsa.long_card_name = "Lenovo ThinkPad Thunderbolt 3 Dock USB at usb-0000:0a:00.0-1, full speed"
                alsa.driver_name = "snd_usb_audio"
                device.bus_path = "pci-0000:0a:00.0-usb-0:1:1.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:00.0/0000:0a:00.0/usb3/3-1/3-1:1.0/sound/card1"
                udev.id = "usb-Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000-00"
                device.bus = "usb"
                device.vendor.id = "17ef"
                device.vendor.name = "Lenovo"
                device.product.id = "306a"
                device.product.name = "ThinkPad Thunderbolt 3 Dock USB Audio"
                device.serial = "Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000"
                device.string = "1"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-usb"
        Formats:
                pcm

Source #2
        State: RUNNING
        Name: alsa_input.usb-Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000-00.multichannel-input
        Description: ThinkPad Thunderbolt 3 Dock USB Audio Multichannel
        Driver: module-alsa-card.c
        Sample Specification: s16le 1ch 44100Hz
        Channel Map: mono
        Owner Module: 27
        Mute: no
        Volume: mono: 65536 / 100% / 0.00 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor of Sink: n/a
        Latency: 0 usec, configured 40000 usec
        Flags: HARDWARE DECIBEL_VOLUME LATENCY 
        Properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "USB Audio"
                alsa.id = "USB Audio"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "1"
                alsa.card_name = "ThinkPad Thunderbolt 3 Dock USB"
                alsa.long_card_name = "Lenovo ThinkPad Thunderbolt 3 Dock USB at usb-0000:0a:00.0-1, full speed"
                alsa.driver_name = "snd_usb_audio"
                device.bus_path = "pci-0000:0a:00.0-usb-0:1:1.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:00.0/0000:0a:00.0/usb3/3-1/3-1:1.0/sound/card1"
                udev.id = "usb-Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000-00"
                device.bus = "usb"
                device.vendor.id = "17ef"
                device.vendor.name = "Lenovo"
                device.product.id = "306a"
                device.product.name = "ThinkPad Thunderbolt 3 Dock USB Audio"
                device.serial = "Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000"
                device.string = "hw:1"
                device.buffering.buffer_size = "176400"
                device.buffering.fragment_size = "88200"
                device.access_mode = "mmap+timer"
                device.profile.name = "multichannel-input"
                device.profile.description = "Multichannel"
                device.description = "ThinkPad Thunderbolt 3 Dock USB Audio Multichannel"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-usb"
        Ports:
                multichannel-input: Multichannel Input (priority: 0)
        Active Port: multichannel-input
        Formats:
                pcm
Source #2
        State: RUNNING
        Name: alsa_input.usb-Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000-00.multichannel-input
        Description: ThinkPad Thunderbolt 3 Dock USB Audio Multichannel
        Driver: module-alsa-card.c
        Sample Specification: s16le 1ch 44100Hz
        Channel Map: mono
        Owner Module: 27
        Mute: no
        Volume: mono: 65536 / 100% / 0.00 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor of Sink: n/a
        Latency: 0 usec, configured 40000 usec
        Flags: HARDWARE DECIBEL_VOLUME LATENCY 
        Properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "USB Audio"
                alsa.id = "USB Audio"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "1"
                alsa.card_name = "ThinkPad Thunderbolt 3 Dock USB"
                alsa.long_card_name = "Lenovo ThinkPad Thunderbolt 3 Dock USB at usb-0000:0a:00.0-1, full speed"
                alsa.driver_name = "snd_usb_audio"
                device.bus_path = "pci-0000:0a:00.0-usb-0:1:1.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:00.0/0000:0a:00.0/usb3/3-1/3-1:1.0/sound/card1"
                udev.id = "usb-Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000-00"
                device.bus = "usb"
                device.vendor.id = "17ef"
                device.vendor.name = "Lenovo"
                device.product.id = "306a"
                device.product.name = "ThinkPad Thunderbolt 3 Dock USB Audio"
                device.serial = "Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000"
                device.string = "hw:1"
                device.buffering.buffer_size = "176400"
                device.buffering.fragment_size = "88200"
                device.access_mode = "mmap+timer"
                device.profile.name = "multichannel-input"
                device.profile.description = "Multichannel"
                device.description = "ThinkPad Thunderbolt 3 Dock USB Audio Multichannel"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-usb"
        Ports:
                multichannel-input: Multichannel Input (priority: 0)
        Active Port: multichannel-input
        Formats:
                pcm
Comment 135 Tobias Grosser 2020-03-20 14:30:55 UTC
It seems pulseaudio is failing to initialize my sound card giving the following error:

```
I: [pulseaudio] alsa-util.c: Device hw:sofhdadsp,5 doesn't support 44100 Hz, changed to 48000 Hz.
I: [pulseaudio] alsa-util.c: Device hw:sofhdadsp,4 doesn't support 44100 Hz, changed to 48000 Hz.
I: [pulseaudio] alsa-util.c: Device hw:sofhdadsp,3 doesn't support 44100 Hz, changed to 48000 Hz.
I: [pulseaudio] alsa-util.c: Device hw:sofhdadsp doesn't support 44100 Hz, changed to 48000 Hz.
I: [pulseaudio] alsa-util.c: Device hw:sofhdadsp doesn't support 44100 Hz, changed to 48000 Hz.
I: [pulseaudio] (alsa-lib)conf.c: Unknown parameter 1
I: [pulseaudio] (alsa-lib)conf.c: Parse arguments error: No such file or directory
I: [pulseaudio] (alsa-lib)pcm.c: Unknown PCM plug:hw:sofhdadsp,6
I: [pulseaudio] alsa-util.c: Error opening PCM device plug:hw:sofhdadsp,6: No such file or directory
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_1f.3-platform-skl_hda_dsp_generic" card_name="alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
```

I found a related bug report and provided details there: https://github.com/thesofproject/linux/issues/1879#issuecomment-601729153
Comment 136 glenn.mccarthy 2020-04-01 02:16:08 UTC
There are a number of Chromebooks using KabyLake processors with digital mic arrays, for example my Laptop is affected with this issue (HP Elitebook x360 1040), but there is an almost identical Chromebook model (HP Chromebook x360 14) with I presume a working mic on Linux kernel based ChromeOS.

Is there any possibility of extracting the firmware/kernel drivers from ChromeOS to have linux support for the meantime until the fix for this makes it into the kernel?
Comment 137 Josep Lladonosa Capell 2020-04-01 06:54:41 UTC
Linux kernel 5.5.11 reports HP Elitebook 830 G6 with an ALC215 soundcard,
listed by lspci as:
00:1f.3 Multimedia audio controller: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11) [8086:9dc8] Subsystem: [103c:854a]

Laptop has internal microphone/s (?) close to screen camera and a 4 pin connector for earphones with microphone in its right side.

Sound works (speakers and earphones) but microphone is reported as unplugged.

The fact is that, with sound booted as laptop-dmic (and several others),
microphone input appears but mixer pavucontrol shows it unplugged and its sound bar input keeps moving with autogenerated noise. In order to see the mic controls, "Analog Stereo Duplex" has to be choosen in pavucontrol.

This laptop has also a mic key with led which is not detected by XFCE.

Note about BIOS:
Previous BIOS versions were not detecting brightness keys but my last upgrade does: DMI: HP HP EliteBook 830 G6/854A, BIOS R70 Ver. 01.04.05 02/18/2020.
I think that this added an ACPI method to the BIOS for brightness:
ACPI: Added _OSI(intel_backlight)
I do not know if this is the way for the mic key to work, ie. adding HP an ACPI method in next BIOS upgrade.

All info collected by /usr/sbin/alsa-info
(I add full path because if run as root it tells not to do it -so why is it in that path? ;) 

http://alsa-project.org/db/?f=bf524c791341844f2de88b4b8c439f9d0ab74866
Comment 138 Pierre Bossart 2020-04-01 15:06:06 UTC
(In reply to glenn.mccarthy from comment #136)
> There are a number of Chromebooks using KabyLake processors with digital mic
> arrays, for example my Laptop is affected with this issue (HP Elitebook x360
> 1040), but there is an almost identical Chromebook model (HP Chromebook x360
> 14) with I presume a working mic on Linux kernel based ChromeOS.
> 
> Is there any possibility of extracting the firmware/kernel drivers from
> ChromeOS to have linux support for the meantime until the fix for this makes
> it into the kernel?

Different problem that should be tracked in the separate bug report. Yes the DMICs used in Chromebooks, but the hardware does not use a HDAudio codec. All the relevant machine drivers are upstream, but the actual firmware and topologies are not. You may have some success in copying the files from the Chrome distributions, but there are known issues with kernels more recent than 4.19, e.g. I managed to make a SKL 'chell' device work but a KBL 'soraka' one refuses to probe due to topology issues that I wasn't able to root-cause. There are also known compatibility issues with recent ASoC core changes, and for some devices a flag needs to be added for the card so that ASoC topology route checks are bypassed.
Comment 139 Pierre Bossart 2020-04-01 15:09:50 UTC
(In reply to Josep Lladonosa Capell from comment #137)
> http://alsa-project.org/db/?f=bf524c791341844f2de88b4b8c439f9d0ab74866

This shows you don't seem to have Digital microphones attached to the PCH, so it's a different issue to the one discussed in this thread?
Comment 140 Josep Lladonosa Capell 2020-04-13 08:33:20 UTC
(In reply to Pierre Bossart from comment #139)
> (In reply to Josep Lladonosa Capell from comment #137)
> > http://alsa-project.org/db/?f=bf524c791341844f2de88b4b8c439f9d0ab74866
> 
> This shows you don't seem to have Digital microphones attached to the PCH,
> so it's a different issue to the one discussed in this thread?

Well, I have opened a different bug in snd-hda-intel (with no answers yet) as dmesg reports an ALC215.
HP Elitebook 830 G6 has Whiskey Lake architecture.

Intel specs say: Whiskey Lake CPUs come with a dedicated quad-core audio DSP.
830 G6 specs say: Integrated 3 Multi Array Microphone

Have found that under Windows this laptop uses Intel Smart Sound Technology (Intel SST) Audio Controller (included in Realtek HD Audio Driver installer).

Machine has 2 internal microphones and it is happening the same described in this bug.

lsmod shows, among others, these modules:

snd_soc_skl
snd_soc_sst_ipc
snd_soc_sst_dsp
snd_hda_ext_core
snd_soc_acpi_intel_match
snd_soc_acpi
snd_hda_codec_realtek
snd_soc_core
snd_hda_codec_generic
snd_hda_intel
snd_intel_dspcfg


So my guess is that, to make microphones work, intel DSPs need to be correctly configured (snd_intel_dspcfg?).
Comment 141 Pierre Bossart 2020-04-13 10:40:25 UTC
(In reply to Josep Lladonosa Capell from comment #140)
> (In reply to Pierre Bossart from comment #139)
> > (In reply to Josep Lladonosa Capell from comment #137)
> > > http://alsa-project.org/db/?f=bf524c791341844f2de88b4b8c439f9d0ab74866
> > 
> > This shows you don't seem to have Digital microphones attached to the PCH,
> > so it's a different issue to the one discussed in this thread?
> 
> Well, I have opened a different bug in snd-hda-intel (with no answers yet)
> as dmesg reports an ALC215.
> HP Elitebook 830 G6 has Whiskey Lake architecture.
> 
> Intel specs say: Whiskey Lake CPUs come with a dedicated quad-core audio DSP.
> 830 G6 specs say: Integrated 3 Multi Array Microphone
> 
> Have found that under Windows this laptop uses Intel Smart Sound Technology
> (Intel SST) Audio Controller (included in Realtek HD Audio Driver installer).
> 
> Machine has 2 internal microphones and it is happening the same described in
> this bug.
> 
> lsmod shows, among others, these modules:
> 
> snd_soc_skl
> snd_soc_sst_ipc
> snd_soc_sst_dsp
> snd_hda_ext_core
> snd_soc_acpi_intel_match
> snd_soc_acpi
> snd_hda_codec_realtek
> snd_soc_core
> snd_hda_codec_generic
> snd_hda_intel
> snd_intel_dspcfg
> 
> 
> So my guess is that, to make microphones work, intel DSPs need to be
> correctly configured (snd_intel_dspcfg?).

If there is no information detected in the NHLT tables, the microphones are most likely attached to the HDAudio codec, not directly to the PCH.
There are a number of cases where the DSP is used even when no microphones are connected to the DSP, e.g. for post-processing on playback.
Comment 142 Josep Lladonosa Capell 2020-04-13 13:50:19 UTC
(In reply to Pierre Bossart from comment #141)
> (In reply to Josep Lladonosa Capell from comment #140)
> > (In reply to Pierre Bossart from comment #139)
> > > (In reply to Josep Lladonosa Capell from comment #137)
> > > > http://alsa-project.org/db/?f=bf524c791341844f2de88b4b8c439f9d0ab74866
> > > 
> > > This shows you don't seem to have Digital microphones attached to the
> PCH,
> > > so it's a different issue to the one discussed in this thread?
> > 
> > Well, I have opened a different bug in snd-hda-intel (with no answers yet)
> > as dmesg reports an ALC215.
> > HP Elitebook 830 G6 has Whiskey Lake architecture.
> > 
> > Intel specs say: Whiskey Lake CPUs come with a dedicated quad-core audio
> DSP.
> > 830 G6 specs say: Integrated 3 Multi Array Microphone
> > 
> > Have found that under Windows this laptop uses Intel Smart Sound Technology
> > (Intel SST) Audio Controller (included in Realtek HD Audio Driver
> installer).
> > 
> > Machine has 2 internal microphones and it is happening the same described
> in
> > this bug.
> > 
> > lsmod shows, among others, these modules:
> > 
> > snd_soc_skl
> > snd_soc_sst_ipc
> > snd_soc_sst_dsp
> > snd_hda_ext_core
> > snd_soc_acpi_intel_match
> > snd_soc_acpi
> > snd_hda_codec_realtek
> > snd_soc_core
> > snd_hda_codec_generic
> > snd_hda_intel
> > snd_intel_dspcfg
> > 
> > 
> > So my guess is that, to make microphones work, intel DSPs need to be
> > correctly configured (snd_intel_dspcfg?).
> 
> If there is no information detected in the NHLT tables, the microphones are
> most likely attached to the HDAudio codec, not directly to the PCH.
> There are a number of cases where the DSP is used even when no microphones
> are connected to the DSP, e.g. for post-processing on playback.

I see. Thanks.
Perhaps NHLT information should be present but it is behind some BIOS Errors:

++++++++++++++
dmesg |grep "Error"
[    0.882785] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [CAP1] at bit offset/length 64/32 exceeds size of target Buffer (64 bits) (20200110/dsopcode-203)
[    0.882912] ACPI Error: Aborting method \_SB._OSC due to previous error (AE_AML_BUFFER_LIMIT) (20200110/psparse-531)
[    2.227691] ACPI BIOS Error (bug): AE_AML_PACKAGE_LIMIT, Index (0x000000005) is beyond end of object (length 0x5) (20200110/exoparg2-396)
[    2.227786] ACPI Error: Aborting method \_TZ.GETP due to previous error (AE_AML_PACKAGE_LIMIT) (20200110/psparse-531)
[    2.227876] ACPI Error: Aborting method \_TZ.CHGZ._CRT due to previous error (AE_AML_PACKAGE_LIMIT) (20200110/psparse-531)
[    2.229299] ACPI BIOS Error (bug): AE_AML_PACKAGE_LIMIT, Index (0x000000005) is beyond end of object (length 0x5) (20200110/exoparg2-396)
[    2.229392] ACPI Error: Aborting method \_TZ.GETP due to previous error (AE_AML_PACKAGE_LIMIT) (20200110/psparse-531)
[    2.229485] ACPI Error: Aborting method \_TZ.CHGZ._CRT due to previous error (AE_AML_PACKAGE_LIMIT) (20200110/psparse-531)
++++++++++++++++
Comment 143 Josep Lladonosa Capell 2020-04-13 16:08:53 UTC
(In reply to Josep Lladonosa Capell from comment #142)
> (In reply to Pierre Bossart from comment #141)
> > (In reply to Josep Lladonosa Capell from comment #140)
> > > (In reply to Pierre Bossart from comment #139)
> > > > (In reply to Josep Lladonosa Capell from comment #137)
> > > > >
> http://alsa-project.org/db/?f=bf524c791341844f2de88b4b8c439f9d0ab74866
> > > > 
> > > > This shows you don't seem to have Digital microphones attached to the
> > PCH,
> > > > so it's a different issue to the one discussed in this thread?
> > > 
> > > Well, I have opened a different bug in snd-hda-intel (with no answers
> yet)
> > > as dmesg reports an ALC215.
> > > HP Elitebook 830 G6 has Whiskey Lake architecture.
> > > 
> > > Intel specs say: Whiskey Lake CPUs come with a dedicated quad-core audio
> > DSP.
> > > 830 G6 specs say: Integrated 3 Multi Array Microphone
> > > 
> > > Have found that under Windows this laptop uses Intel Smart Sound
> Technology
> > > (Intel SST) Audio Controller (included in Realtek HD Audio Driver
> > installer).
> > > 
> > > Machine has 2 internal microphones and it is happening the same described
> > in
> > > this bug.
> > > 
> > > lsmod shows, among others, these modules:
> > > 
> > > snd_soc_skl
> > > snd_soc_sst_ipc
> > > snd_soc_sst_dsp
> > > snd_hda_ext_core
> > > snd_soc_acpi_intel_match
> > > snd_soc_acpi
> > > snd_hda_codec_realtek
> > > snd_soc_core
> > > snd_hda_codec_generic
> > > snd_hda_intel
> > > snd_intel_dspcfg
> > > 
> > > 
> > > So my guess is that, to make microphones work, intel DSPs need to be
> > > correctly configured (snd_intel_dspcfg?).
> > 
> > If there is no information detected in the NHLT tables, the microphones are
> > most likely attached to the HDAudio codec, not directly to the PCH.
> > There are a number of cases where the DSP is used even when no microphones
> > are connected to the DSP, e.g. for post-processing on playback.
> 
> I see. Thanks.
> Perhaps NHLT information should be present but it is behind some BIOS Errors:
> 
> ++++++++++++++
> dmesg |grep "Error"
> [    0.882785] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [CAP1] at
> bit offset/length 64/32 exceeds size of target Buffer (64 bits)
> (20200110/dsopcode-203)
> [    0.882912] ACPI Error: Aborting method \_SB._OSC due to previous error
> (AE_AML_BUFFER_LIMIT) (20200110/psparse-531)
> [    2.227691] ACPI BIOS Error (bug): AE_AML_PACKAGE_LIMIT, Index
> (0x000000005) is beyond end of object (length 0x5) (20200110/exoparg2-396)
> [    2.227786] ACPI Error: Aborting method \_TZ.GETP due to previous error
> (AE_AML_PACKAGE_LIMIT) (20200110/psparse-531)
> [    2.227876] ACPI Error: Aborting method \_TZ.CHGZ._CRT due to previous
> error (AE_AML_PACKAGE_LIMIT) (20200110/psparse-531)
> [    2.229299] ACPI BIOS Error (bug): AE_AML_PACKAGE_LIMIT, Index
> (0x000000005) is beyond end of object (length 0x5) (20200110/exoparg2-396)
> [    2.229392] ACPI Error: Aborting method \_TZ.GETP due to previous error
> (AE_AML_PACKAGE_LIMIT) (20200110/psparse-531)
> [    2.229485] ACPI Error: Aborting method \_TZ.CHGZ._CRT due to previous
> error (AE_AML_PACKAGE_LIMIT) (20200110/psparse-531)
> ++++++++++++++++

I have checked these errors and they seem related to time services.
Comment 144 Josep Lladonosa Capell 2020-04-15 08:07:59 UTC
Created attachment 288465 [details]
nhlt.dsl

Just to complete information, managed to obtain, at boot, NHLT data from ACPI for the laptop. Attached is nhlt.dsl file.

Info appearing in dmesg:
ACPI: NHLT 0x00000000B3BC3000 0017F1 (v00 INTEL  CFL-ULT  20170001 INTL 20160422)
Comment 145 Pierre Bossart 2020-04-15 15:35:55 UTC
(In reply to Josep Lladonosa Capell from comment #144)
> Created attachment 288465 [details]
> nhlt.dsl
> 
> Just to complete information, managed to obtain, at boot, NHLT data from
> ACPI for the laptop. Attached is nhlt.dsl file.
> 
> Info appearing in dmesg:
> ACPI: NHLT 0x00000000B3BC3000 0017F1 (v00 INTEL  CFL-ULT  20170001 INTL
> 20160422)

Unfortunately I don't think anyone has a stand-alone NHLT parser, I cobbled together the code in sound/hda/intel-nhlt but that's using ACPI utilities. 

it might be easier to enable dynamic debug for this, and/or instrument intel_nhlt_get_dmic_geo(), to figure out what the kernel detects.

you can do so by adding this in the /etc/modprobe.d/alsa-base.conf file

options snd-intel-dspcfg dyndbg=+p
Comment 146 Josep Lladonosa Capell 2020-04-16 03:23:54 UTC
(In reply to Pierre Bossart from comment #145)
> (In reply to Josep Lladonosa Capell from comment #144)
> > Created attachment 288465 [details]
> > nhlt.dsl
> > 
> > Just to complete information, managed to obtain, at boot, NHLT data from
> > ACPI for the laptop. Attached is nhlt.dsl file.
> > 
> > Info appearing in dmesg:
> > ACPI: NHLT 0x00000000B3BC3000 0017F1 (v00 INTEL  CFL-ULT  20170001 INTL
> > 20160422)
> 
> Unfortunately I don't think anyone has a stand-alone NHLT parser, I cobbled
> together the code in sound/hda/intel-nhlt but that's using ACPI utilities. 
> 
> it might be easier to enable dynamic debug for this, and/or instrument
> intel_nhlt_get_dmic_geo(), to figure out what the kernel detects.
> 
> you can do so by adding this in the /etc/modprobe.d/alsa-base.conf file
> 
> options snd-intel-dspcfg dyndbg=+p

Compiled kernel with debugging on and did enabled dynamic debug.

Line that appeared in /sys/kernel/debug/dynamic_debug/control:

sound/hda/intel-nhlt.c:33 [snd_intel_dspcfg]intel_nhlt_init =p "No NHLT table found\012"

Next, an attachment of all dynamic_debug/control lines
Comment 147 Josep Lladonosa Capell 2020-04-16 03:26:41 UTC
Created attachment 288511 [details]
Attachment of all dynamic_debug/control lines for kernel 5.6.4 in HP Elitebook 830 G6

Attachment of all /sys/kernel/debug/dynamic_debug/control lines for kernel 5.6.4 in HP Elitebook 830 G6.
Comment 148 Pierre Bossart 2020-04-16 15:27:43 UTC
> sound/hda/intel-nhlt.c:33 [snd_intel_dspcfg]intel_nhlt_init =p "No NHLT
> table found\012"

That's game over for the DSP enablement, there is no DMIC on this device. You will have to use the legacy snd-hda-intel driver and blacklist snd-soc-skl and snd-sof-pci.
Comment 149 Josep Lladonosa Capell 2020-04-19 06:09:48 UTC
(In reply to Pierre Bossart from comment #148)
> > sound/hda/intel-nhlt.c:33 [snd_intel_dspcfg]intel_nhlt_init =p "No NHLT
> > table found\012"
> 
> That's game over for the DSP enablement, there is no DMIC on this device.
> You will have to use the legacy snd-hda-intel driver and blacklist
> snd-soc-skl and snd-sof-pci.

Hello, Pierre,

perhaps for intel-nhlt, first sentence is true, as it seems it cannot find in that table.

As linux kernel is an "endless game" I resisted to believe that "there is no DMIC on this device"... so I went on by enabling snd-sof-pci in kernel and setting up firmware and topology files.

For now, I have in dmesg:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[    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.684593] sof-audio-pci 0000:00:1f.3: PP capability, will probe DSP later.
[    3.688924] sof-audio-pci 0000:00:1f.3: codec_mask = 0x5
[    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

++++++++++++++++++++++++++++++++++++++++++

I think that now I need to connect sof work with snd_hda_intel as in alsa-info run I get:

++++++++++++++++++++++++++++++++++
!!Soundcards recognised by ALSA
!!-----------------------------

--- no soundcards ---
++++++++++++++++++++++++++++++++++


I attach the dynamic_debug/control file in next message.
Comment 150 Josep Lladonosa Capell 2020-04-19 06:14:30 UTC
Created attachment 288609 [details]
Attachment of sound related dynamic_debug/control lines for kernel 5.6.5 in HP Elitebook 830 G6 and sof DSP detections

Attachment of sound related dynamic_debug/control lines for kernel 5.6.5 in HP Elitebook 830 G6 detecting intel DSPs in its Cannon Lake architecture.


- kernel 5.6.5 with SOF enabled
- sof firmware and topologies installed
Comment 151 Josep Lladonosa Capell 2020-04-19 11:22:11 UTC
Finally I got internal microphones 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 microhpone appears unplugged.
Cannot check now headphone's mic.

Regards, Josep
Comment 152 Siddharth Pant 2020-04-19 23:35:44 UTC
Hi guys I might be missing a step here but both my internal and external Mic are not working.

I have installed the binaries by executing go.sh from the repository mentioned in #Comment 133
https://github.com/thesofproject/sof-bin/tree/stable-v1.4.2

But no luck

I have an Acer Swift 315-55G running on Ubuntu 18.04.4 Kernel: 5.3.0-46-generic
Comment 153 Siddharth Pant 2020-04-19 23:38:12 UTC
My bad the model number is Swift SF314-55G
Comment 154 Siddharth Pant 2020-04-19 23:41:22 UTC
Created attachment 288625 [details]
ALSA info output for Acer Swift SF314-55G Ubuntu 18.04.4

ALSA info output for my laptop. It has an Intel 8th gen Core i5.
Comment 155 Pierre Bossart 2020-04-20 16:26:29 UTC
(In reply to Siddharth Pant from comment #152)
> Hi guys I might be missing a step here but both my internal and external Mic
> are not working.
> 
> I have installed the binaries by executing go.sh from the repository
> mentioned in #Comment 133
> https://github.com/thesofproject/sof-bin/tree/stable-v1.4.2
> 
> But no luck
> 
> I have an Acer Swift 315-55G running on Ubuntu 18.04.4 Kernel:
> 5.3.0-46-generic

If you are using the 'old' kernel with Ubuntu 18.04 LTS, you need to avoid using the 1.4.2 firmware and just follow the instructions here:
https://github.com/thesofproject/linux/issues/1877
Comment 156 Siddharth Pant 2020-04-20 19:05:41 UTC
(In reply to Pierre Bossart from comment #155)
> If you are using the 'old' kernel with Ubuntu 18.04 LTS, you need to avoid
> using the 1.4.2 firmware and just follow the instructions here:
> https://github.com/thesofproject/linux/issues/1877

Ok, thankfully I followed your advice and backed up the sof and sof-tplg dirs before. So I restored them to their original files now and basically undo the v1.4.2 installation through that.

Based on the shared Github link I also blacklisted snd-hda-intel and snd-soc-skl in /etc/modprobe.d/alsa-base.conf

and copy pasted directory from 
https://github.com/thesofproject/alsa-ucm-conf/tree/sof_ucm1/ucm/sof-skl_hda_card
to
/usr/share/alsa/ucm

Still there is no audio captured by both internal and external mics.

One thing though. This command:

arecord -Dhw:0,6 -c2 -r48000 -f S32_LE -d 10 mytest.wav

is able to record my voice and I can hear the created wav file clearly.

Based on your discussion on the github issue I assume I may require a better suited UCM file since overthere its a Dell inspiron while mine is Acer Swift 3 but I don't know better.
Comment 157 Pierre Bossart 2020-04-20 19:49:53 UTC
> Still there is no audio captured by both internal and external mics.
> 
> One thing though. This command:
> 
> arecord -Dhw:0,6 -c2 -r48000 -f S32_LE -d 10 mytest.wav
> 
> is able to record my voice and I can hear the created wav file clearly.

Well that's good progress!
 
> Based on your discussion on the github issue I assume I may require a better
> suited UCM file since overthere its a Dell inspiron while mine is Acer Swift
> 3 but I don't know better.

Yes, this clearly points to a PulseAudio configuration issue. It's a bit odd, the recipe on GitHub seemed to work for several people, not sure what happens for you. I would try and capture the pulseaudio -vvv log (first by setting autospawn=no in /etc/pulse) and/or try with the alsaucm command to see if the file has any issues.
Comment 158 Siddharth Pant 2020-04-20 20:52:46 UTC
Created attachment 288635 [details]
pulseaudio logs for Acer Swift SF314-55G

So I captured pulseaudio -vvv output and I did see an error which is sort of the same which "alsaucm -i" gives me on command "open sof-skl_hda_card"

D: [pulseaudio] module-udev-detect.c: Loading module-alsa-card with arguments 'device_id="0" name="pci-0000_00_1f.3-platform-skl_hda_dsp_generic" card_name="alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"'
D: [pulseaudio] dbus-util.c: Successfully connected to D-Bus session bus 050694e5fb4efe8dc28d2d7e5e9e03f1 as :1.87
D: [pulseaudio] reserve-wrap.c: Successfully acquired reservation lock on device 'Audio0'
I: [pulseaudio] (alsa-lib)utils.c: could not open configuration file /usr/share/alsa/ucm/WL-SwiftSF314_55G-V1.07-MILLER_WL/WL-SwiftSF314_55G-V1.07-MILLER_WL.conf
I: [pulseaudio] (alsa-lib)parser.c: error: could not parse configuration for card WL-SwiftSF314_55G-V1.07-MILLER_WL
I: [pulseaudio] (alsa-lib)main.c: unable to execute cset 'name='Capture Switch' on'
I: [pulseaudio] (alsa-lib)main.c: Unable to execute default sequence
I: [pulseaudio] (alsa-lib)main.c: error: failed to import sof-skl_hda_card use case configuration -2
I: [pulseaudio] alsa-ucm.c: UCM not available for card sof-skl_hda_card
D: [pulseaudio] conf-parser.c: Parsing configuration file '/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf'



Just to help you out here is my ls output as I suspect may be files are not named right:
ls /usr/share/alsa/ucm/sof-skl_hda_card
Hdmi1.conf  Hdmi2.conf  Hdmi3.conf  HdmiHdac.conf  HiFi.conf  Mics.conf  sof-skl_hda_card.conf
Comment 159 Pierre Bossart 2020-04-20 21:02:02 UTC
> I: [pulseaudio] (alsa-lib)utils.c: could not open configuration file
> /usr/share/alsa/ucm/WL-SwiftSF314_55G-V1.07-MILLER_WL/WL-SwiftSF314_55G-V1.
> 07-MILLER_WL.conf
> I: [pulseaudio] (alsa-lib)parser.c: error: could not parse configuration for
> card WL-SwiftSF314_55G-V1.07-MILLER_WL

You can ignore this, this is a misleading error. UCM first tries with the long card name, but then tries with the driver name fallback.

> I: [pulseaudio] (alsa-lib)main.c: unable to execute cset 'name='Capture
> Switch' on'
> I: [pulseaudio] (alsa-lib)main.c: Unable to execute default sequence
> I: [pulseaudio] (alsa-lib)main.c: error: failed to import sof-skl_hda_card
> use case configuration -2
> I: [pulseaudio] alsa-ucm.c: UCM not available for card sof-skl_hda_card
> D: [pulseaudio] conf-parser.c: Parsing configuration file
> '/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf'

That's odd, but maybe the files you used aren't right... Can you post these files so that we can check? I saw a similar error last week and couldn't figure out where this came from.

> Just to help you out here is my ls output as I suspect may be files are not
> named right:
> ls /usr/share/alsa/ucm/sof-skl_hda_card
> Hdmi1.conf  Hdmi2.conf  Hdmi3.conf  HdmiHdac.conf  HiFi.conf  Mics.conf 
> sof-skl_hda_card.conf

The name looks right, it's more likely the contents that's invalid.
Comment 160 Siddharth Pant 2020-04-20 21:10:33 UTC
I used files from this link:
https://github.com/thesofproject/alsa-ucm-conf/tree/sof_ucm1/ucm/sof-skl_hda_card

Its from the github comment you mentioned here:
https://github.com/thesofproject/linux/issues/1877#issuecomment-602628642
Comment 161 Alejandro Rodriguez 2020-04-27 15:22:22 UTC
Hi, All, just for report I have an Acer Swift3 SF314-54, Intel Core 8th gen, Kaby Lake, which I can't make its DMIC works.

00:1f.3 0401: 8086:9d71 (rev 21)
	Subsystem: 1025:1269
	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: 32, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 139
	Region 0: Memory at b1228000 (64-bit, non-prefetchable) [size=16K]
	Region 4: Memory at b1200000 (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: 00000000fee00478  Data: 0000
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel, snd_soc_skl

As I read on the comments, the kabylake systems are still not supported on sof driver. Any advance about that?, Thanks so much, Alejandro,
Comment 162 Rinat 2020-05-01 12:28:19 UTC
+1 here

Acer Swift3 SF314-54 

DMIC not working as well
Comment 163 Jaroslav Kysela 2020-05-01 15:35:31 UTC
It's much easier to create PA legacy path for old pulseaudio and linux kernel like in http://people.redhat.com/~jkysela/sof/carbon-x1-pulse.tar.gz . Just replace your PCI ID for the udev rule.

Or try another distribution like Fedora 32 which have working kernel / user space (UCM) environment for this hardware.
Comment 164 Mateusz Gorski 2020-05-05 15:28:14 UTC
This issue was addressed in Skylake SST driver. 
Listed below are the patches needed to enable DMIC capture on HDA DSP configuration:

KERNEL:
- [PATCH series] Add support for different DMIC configurations
        https://patchwork.kernel.org/project/alsa-devel/list/?series=278013

TOPOLOGY:
- topology: Add topology file for generic HDA DSP machine driver
        https://github.com/alsa-project/alsa-topology-conf/commit/6ff63897a8fc1484660e5ff44483b594e40ea561

UCM:
- hda-dsp: add basic ucm config
        https://github.com/alsa-project/alsa-ucm-conf/commit/76df616aa2fcae1cca1f948dac24c98a211c2593

In order to enable DMIC capture on given HDA DSP device one needs to:

1. Rebuild the kernel with listed patches (or, since these patches were merged, from top of "for-next" branch on git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git) 
2. Compile the topology .conf file using alsatplg tool:
               alsatplg -c skl_hda_dsp_generic-tplg.conf -o skl_hda_dsp_generic-tplg.bin
3. Copy the output binary file to your device /lib/firmware/ directory without changing its name
4. To make sure that the proper topology is loaded, delete any other topology files from your /lib/firmware/ directory (to check if there are any left type "ls /lib/firmware/*tplg.bin")

    After rebooting the device one should be able to successfully capture the sound with DMIC array, using arecord app. The command should look similiar to:
        arecord -Dhw:0,13 -c2 -fS16_LE -r48000 dmic_cap.wav

    The number or channels depends on information from NHLT, some devices may have 4-channel array, in which case the -c2 parameter should be changed to -c4. 

5. The additional configuration options are contained in UCM files, in order to use them copy the entire hda-dsp/ directory from alsa-ucm-conf project into your device /usr/share/alsa/ucm/ directory and follow default instructions to enable them.
Comment 165 Pierre Bossart 2020-05-05 15:58:15 UTC
(In reply to Mateusz Gorski from comment #164)
> This issue was addressed in Skylake SST driver. 

@Mateusz, this is good work but you are forgetting about the driver autodetection enabled by distributions. 

Currently the legacy driver is selected for SKL/KBL, you would need to add a quirk to use the SST driver when DMICs are detected. See sound/hda/intel-dsp-config.c

Alternatively, you need to provide the instructions to force the SST driver to be selected.
Comment 166 Cezary Rojewski 2020-05-05 17:52:28 UTC
Addition of 'SST-IF-DMIC' option for cAVS 1.5 is a good idea.

The instructions for forcing enumeration of SST driver withing the need of kernel rebuilding (requires root privileges of course):

Navigate to /etc/modprobe.d/ directory and edit existing or create new config file, e.g.:
    sudo vi /etc/modprobe.d/blacklist.conf

and append at the bottom:
    options snd_intel_dspcfg dsp_driver=2

This will force snd_intel_dspcfg module - which is required by any DSP audio driver to probe - to have its 'dsp_driver' parameter initialized with value of '2', what equals SST.
Comment 167 glenn.mccarthy 2020-05-06 04:59:02 UTC
(In reply to Mateusz Gorski from comment #164)
> This issue was addressed in Skylake SST driver. 
> Listed below are the patches needed to enable DMIC capture on HDA DSP
> configuration:


I have a HP EliteBook x360 with the 8086:9d71 SST Audio, these patches and topology files don't seem to work to enable the DMIC, and when I switch the dsp_driver parameter to 2 I get no audio card at all (i.e. speakers no longer work)

Is there something else I am missing to get this going (i.e. PCI id changes etc?)
Comment 168 Cezary Rojewski 2020-05-06 09:33:42 UTC
Hello Glenn,

Could you provide us with dmesg log from your failing case?
You dump logs from kdmesg buffer via:
    dmesg > my_log_file.txt

Then attach it here, thank you.
Comment 169 glenn.mccarthy 2020-05-06 09:39:46 UTC
Created attachment 288951 [details]
dmesg output as per comment 168
Comment 170 Cezary Rojewski 2020-05-06 09:56:49 UTC
Thank you. It looks like you have no audio driver probing at all. That's probably because Skylake driver is either blacklisted or simply not part of your kernel.

Please see if there are any kernel objects (.ko) found within:
    /lib/modules/$(uname -r)/kernel/sound/soc/intel/skylake

Checkout your kconfig in your root kernel-source directory (called .config) with:
    make menuconfig

nativate to:
    Device Drivers -> Sound card support -> Advanced Linux Sound Archtecture
    -> ALSA for SoC audio support

check:
    [*] Intel ASoC SST drivers
    <M> All Skylake/SST Platforms

As we are probably dealing with HDA-dsp + DMIC configuration, before you finish, make sure your HD-Audio options found in:
    Device Drivers -> Sound card support -> Advanced Linux Sound Archtecture
    -> HD-Audio

are also checked:
    <M> Build Realtek HD-audio codec support
    <M> Build HDMI/DisplayPort HD-audio codec support

Awaiting your response.
Comment 171 glenn.mccarthy 2020-05-06 10:06:20 UTC
(In reply to Cezary Rojewski from comment #170)
> Thank you. It looks like you have no audio driver probing at all. That's
> probably because Skylake driver is either blacklisted or simply not part of
> your kernel.
> 
> Please see if there are any kernel objects (.ko) found within:
>     /lib/modules/$(uname -r)/kernel/sound/soc/intel/skylake

-rw-r--r-- 1 root root  59K May  3 07:11 snd-soc-skl.ko.xz
-rw-r--r-- 1 root root 3.6K May  3 07:11 snd-soc-skl-ssp-clk.ko.xz

> Checkout your kconfig in your root kernel-source directory (called .config)
> with:
>     make menuconfig
> 
> nativate to:
>     Device Drivers -> Sound card support -> Advanced Linux Sound Archtecture
>     -> ALSA for SoC audio support
> 
> check:
>     [*] Intel ASoC SST drivers
>     <M> All Skylake/SST Platforms

zcat /proc/config.gz | grep SND_SOC_INTEL_SKYLAKE
CONFIG_SND_SOC_INTEL_SKYLAKE=m
CONFIG_SND_SOC_INTEL_SKYLAKE_FAMILY=m
CONFIG_SND_SOC_INTEL_SKYLAKE_SSP_CLK=m
# CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC is not set
CONFIG_SND_SOC_INTEL_SKYLAKE_COMMON=m

> As we are probably dealing with HDA-dsp + DMIC configuration, before you
> finish, make sure your HD-Audio options found in:
>     Device Drivers -> Sound card support -> Advanced Linux Sound Archtecture
>     -> HD-Audio
> 
> are also checked:
>     <M> Build Realtek HD-audio codec support
>     <M> Build HDMI/DisplayPort HD-audio codec support

CONFIG_SND_HDA_CODEC_REALTEK=m
CONFIG_SND_HDA_CODEC_HDMI=m

> 
> Awaiting your response.

lspci -nn | grep Audio
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)

Thank you for your help.
Comment 172 glenn.mccarthy 2020-05-06 10:10:10 UTC
Sorry, I think I've seen the issue.  Will recompile with SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC.
Comment 173 Cezary Rojewski 2020-05-06 10:13:56 UTC
Yeah. This kconfig changes are all or nought if we forget about machine drivers :)

Within '-> ALSA for SoC audio support':
    [*] HDAudio codec support
must also been checked.

Now, within the exact same directory enter:
    -*- Intel Machine drivers

directory and select:
    <M> SKL/KBL/BXT/APL/ with HDA Codecs
Comment 174 glenn.mccarthy 2020-05-06 19:21:53 UTC
(In reply to Cezary Rojewski from comment #173)
> Yeah. This kconfig changes are all or nought if we forget about machine
> drivers :)
> 
> Within '-> ALSA for SoC audio support':
>     [*] HDAudio codec support
> must also been checked.
> 
> Now, within the exact same directory enter:
>     -*- Intel Machine drivers
> 
> directory and select:
>     <M> SKL/KBL/BXT/APL/ with HDA Codecs

I have the KL/KBL/BXT/APL/ with HDA Codecs enabled.

The HDAudio codec support has this warning on it:

This option broke audio on Linus' Skylake laptop in December 2018 and the race conditions during the probe were not fixed since.
This option is DEPRECATED, all HDaudio codec support needs to be handled by the SOF driver.Distributions should not enable this option and there are no known users of this capability.

Unfortunately, the SOF driver does not support firmware loading on KabyLake at the moment.
https://github.com/thesofproject/sof/issues/1899
Comment 175 Cezary Rojewski 2020-05-06 19:28:52 UTC
This is no longer true. Race has already been fixed. Warning is misleading, will remove it, thanks.
Comment 176 glenn.mccarthy 2020-05-07 01:05:43 UTC
(In reply to Cezary Rojewski from comment #175)
> This is no longer true. Race has already been fixed. Warning is misleading,
> will remove it, thanks.

I have recompiled, and have this now:
zcat /proc/config.gz | grep SND_SOC_INTEL_SKYLAKE
CONFIG_SND_SOC_INTEL_SKYLAKE=m
CONFIG_SND_SOC_INTEL_SKYLAKE_FAMILY=m
CONFIG_SND_SOC_INTEL_SKYLAKE_SSP_CLK=m
CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=y
CONFIG_SND_SOC_INTEL_SKYLAKE_COMMON=m

Still no audio probing happening in the dmesg, and the sound is not initialised at all when using the SST driver (snd_intel_dspcfg dsp_driver=2)

Audio works but with no DMIC when using the legacy intel_hda driver (snd_intel_dspcfg dsp_driver=1)

Is this the appropriate forum for this type of help, I notice it is quite noisy here.
Comment 177 Cezary Rojewski 2020-05-07 06:42:01 UTC
Did you try modprobe-ing after reboot? Maybe your have it blacklisted within one of your config files in /etc/modprobe.d/.

Just to make sure:
    /sys/devices/pci0000:00/0000:00:1f.3$ cat device    
    /sys/devices/pci0000:00/0000:00:1f.3$ cat class

Please dump me your current:
    lsmod | grep snd

And the content of:
/lib/modules/$(uname -r)/kernel/sound/hda
/lib/modules/$(uname -r)/kernel/sound/hda/ext
/lib/modules/$(uname -r)/kernel/sound/soc/codecs | grep -iE "hda|dmic"
/lib/modules/$(uname -r)/kernel/sound/soc/intel/boards
/lib/modules/$(uname -r)/kernel/sound/soc/intel/skylake

Thank you.
Comment 178 glenn.mccarthy 2020-05-07 06:51:54 UTC
(In reply to Cezary Rojewski from comment #177)
> Did you try modprobe-ing after reboot? Maybe your have it blacklisted within
> one of your config files in /etc/modprobe.d/.
> 
> Just to make sure:
>     /sys/devices/pci0000:00/0000:00:1f.3$ cat device    
>     /sys/devices/pci0000:00/0000:00:1f.3$ cat class
> 
> Please dump me your current:
>     lsmod | grep snd
> 
> And the content of:
> /lib/modules/$(uname -r)/kernel/sound/hda
> /lib/modules/$(uname -r)/kernel/sound/hda/ext
> /lib/modules/$(uname -r)/kernel/sound/soc/codecs | grep -iE "hda|dmic"
> /lib/modules/$(uname -r)/kernel/sound/soc/intel/boards
> /lib/modules/$(uname -r)/kernel/sound/soc/intel/skylake
> 
> Thank you.
Yep, the module is loaded and not blacklisted.  I have attached all the data you requested.  Thanks.
Comment 179 glenn.mccarthy 2020-05-07 06:52:21 UTC
Created attachment 288975 [details]
Data as per comment #177
Comment 180 Cezary Rojewski 2020-05-07 18:30:18 UTC
Thanks you for providing the data requested.

First, I've forgotten about /sound/pci/hda content when asking about .ko(s) but lsmod and the limited dmesg you've provided shreds enough light:
- driver probes just fine, contrary to comment above
- looks like further pcm component probing gets deferred (soc-core yields -517 when probing link components)

To fully load snd_soc_skl_hda_dsp card, following components are required:
- snd_soc_dmic
- snd_soc_hdac_hdmi
- <hda codec patch e.g.: snd_hda_codec_realtek>

As you can see, _hdac_hdmi gets its refcnt incremented but the probe fails to find component for its analog connections (_realtek). Never gets to dmic so refcnt for snd_soc_dmic remains at 0.

Now, on with the codec_mask:
[    5.152306] snd_soc_skl 0000:00:1f.3: codec #0 probed OK: 14f120d0
[    5.153947] snd_soc_skl 0000:00:1f.3: codec #2 probed OK: 8086280b

The latter, 0x8086280b falls into Kabylake HDMI category and is supported just fine. The former is a surprise though. 0x14f1 denotes Conexant vendor, while 0x20d0 part-id seems completely unknown to kernel's standard codec-tables. Guess when you switch to snd_hda_intel _generic_codec gets loaded as kernel does not know any specifics about that chip.

Back to the problem though - I'd mentioned word 'surprise'. Requirements list only Realtek-descendants for support when DMIC is present. So, your case goes beyond the scope and is not accounted for within CI.

You can try enabling patch_conexant with sound/pci/hda kconfig.

(In reply to Cezary Rojewski from comment #170)
> As we are probably dealing with HDA-dsp + DMIC configuration, before you
> finish, make sure your HD-Audio options found in:
>     Device Drivers -> Sound card support -> Advanced Linux Sound Archtecture
>     -> HD-Audio
> 
> are also checked:
>     <M> Build Realtek HD-audio codec support
>     <M> Build HDMI/DisplayPort HD-audio codec support
> 

select below too:
    <M> Build Conexant HD-audio codec support

Let's see what we get.
Comment 181 glenn.mccarthy 2020-05-07 19:05:08 UTC
(In reply to Cezary Rojewski from comment #180)

> First, I've forgotten about /sound/pci/hda content when asking about .ko(s)

ls /lib/modules/(uname -r)/kernel/sound/pci/hda/
snd-hda-codec-analog.ko.xz  snd-hda-codec-cmedia.ko.xz    snd-hda-codec-idt.ko.xz      snd-hda-codec-via.ko.xz
snd-hda-codec-ca0110.ko.xz  snd-hda-codec-conexant.ko.xz  snd-hda-codec.ko.xz          snd-hda-intel.ko.xz
snd-hda-codec-ca0132.ko.xz  snd-hda-codec-generic.ko.xz   snd-hda-codec-realtek.ko.xz
snd-hda-codec-cirrus.ko.xz  snd-hda-codec-hdmi.ko.xz      snd-hda-codec-si3054.ko.xz

> The latter, 0x8086280b falls into Kabylake HDMI category and is supported
> just fine. The former is a surprise though. 0x14f1 denotes Conexant vendor,
> while 0x20d0 part-id seems completely unknown to kernel's standard
> codec-tables. Guess when you switch to snd_hda_intel _generic_codec gets
> loaded as kernel does not know any specifics about that chip.

Yes, loading snd_hd_intel uses the generic codec.  No microphone, and only two of the four speakers work.

> Back to the problem though - I'd mentioned word 'surprise'. Requirements
> list only Realtek-descendants for support when DMIC is present. So, your
> case goes beyond the scope and is not accounted for within CI.
> 
> You can try enabling patch_conexant with sound/pci/hda kconfig.
> 
> select below too:
>     <M> Build Conexant HD-audio codec support
> 
> Let's see what we get.

That was already enabled :
zcat /proc/config.gz | grep SND_HDA_CODEC_CONEXANT
CONFIG_SND_HDA_CODEC_CONEXANT=m

Thanks again for looking into this.
Comment 182 Cezary Rojewski 2020-05-07 19:31:34 UTC
So, it's one of those cases where OEMs decided to put some silicon on the board without notifying their SW/ FW teams.

As stated, DMIC with HDA configuration is supported officially only with Realtek chips. I'm gonna be honest here: with legacy stack failing to support your model too, my hands are tied and I won't be able to solve your case with desirable result.

What's left, is for me to speak with Takashi about addition of said codec to known-codecs table - more often than not, given codec belongs to entire family of chips and thus shares most - if not all - of the behavior routines. That won't help you with DMIC a bit unfortunately, as it requires link (DSP) capability to be up and running. I'll file shipping order for an exemplar of your laptop. No promises, prefer to stay honest.

I'd like to thank you for letting us know about misleading warning and configuration mismatches. Following two patches have been upstream to address that:
    ASoC: Intel: Skylake: Update description for HDaudio kconfig
    ALSA: hda: Allow SST driver on SKL and KBL platforms with DMIC

Thanks once again for being cooperative and responsive during this debug session.

Czarek
Comment 183 glenn.mccarthy 2020-05-07 20:49:12 UTC
(In reply to Cezary Rojewski from comment #182)
> So, it's one of those cases where OEMs decided to put some silicon on the
> board without notifying their SW/ FW teams.
Wow, it's not like it's a weird obscure laptop, it's a flagship HP - or is that normal for them?

> Thanks once again for being cooperative and responsive during this debug
> session.
> 
> Czarek
No worries, thanks for looking into it.
Comment 184 Cezary Rojewski 2020-05-07 20:51:41 UTC
Let's just say our requirements for Windows are different ^)^

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