eoan: alsa/sof: Enable SOF_HDA link and codec

Bug #1848490 reported by Hui Wang on 2019-10-17
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Critical
Hui Wang
Eoan
Undecided
Unassigned

Bug Description

[Impact]
We tested the EOAN kernel on the LENOVO or Dell machines which have
dmic directly connnected to PCH, the dmic didn't work.

[Fix]
We need to enable SOF_HDA link and codec, then the sof driver
and Legacy HDA driver work together to make the dmic work.

[Test Case]
Install the latest 19.10 image, build a new kernel with this
patch and replace the existing kernel, After installing the blacklist
package (blacklist snd_hda_intel and snd_soc_skl) and ucm package,
the dmic and all output devices (speaker/hdmi) work.

[Regression Risk]
Low, these configs are already enabled in the oem-b-osp1 kernel
for a long time, and we tested it on many lenovo/dell machines witch
have or have no dmic, all worked well.

Hui Wang (hui.wang) on 2019-10-17
Changed in linux (Ubuntu):
importance: Undecided → Critical
Hui Wang (hui.wang) on 2019-10-17
description: updated

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1848490

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: eoan

I can confirm this is currently an issue on the Lenovo X1 Carbon 7th gen. I did some testing with the current 19.10 kernel (5.3.0-18-generic), and posted my results to this github issue for the SOF project [1].

They confirmed this is most likely an issue with the kernel config for Ubuntu. And also posted some suggestions for the required kernel configs to fix this [2].

I also did manual changes to the alsa ucm package, blacklist the snd_hda_intel and snd_soc_skl module and install the topology provided by Lenovo.

[1] https://github.com/thesofproject/sof/issues/1885#issuecomment-544252992
[2] https://github.com/thesofproject/sof/issues/1885#issuecomment-544498765

Well noted, thanks,

And Intel sent  an email about this issue to us yesterday, we will fix
this issue according to you and Intel's suggestion.

On 2019/10/22 上午3:03, Paul van Schayck wrote:
> I can confirm this is currently an issue on the Lenovo X1 Carbon 7th
> gen. I did some testing with the current 19.10 kernel
> (5.3.0-18-generic), and posted my results to this github issue for the
> SOF project [1].
>
> They confirmed this is most likely an issue with the kernel config for
> Ubuntu. And also posted some suggestions for the required kernel configs
> to fix this [2].
>
> I also did manual changes to the alsa ucm package, blacklist the
> snd_hda_intel and snd_soc_skl module and install the topology provided
> by Lenovo.
>
> [1] https://github.com/thesofproject/sof/issues/1885#issuecomment-544252992
> [2] https://github.com/thesofproject/sof/issues/1885#issuecomment-544498765
>
> ** Bug watch added: github.com/thesofproject/sof/issues #1885
> https://github.com/thesofproject/sof/issues/1885
>

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Seth Forshee (sforshee) on 2019-10-22
Changed in linux (Ubuntu):
status: Confirmed → Fix Committed
Changed in linux (Ubuntu Eoan):
status: New → Fix Committed

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-eoan' to 'verification-done-eoan'. If the problem still exists, change the tag 'verification-needed-eoan' to 'verification-failed-eoan'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-eoan
Joel Eidsath (jeidsath) wrote :

Using a Lenovo x1 7th generation, I've installed 5.3.0-20 and verified that I see

"# CONFIG_SND_SOC_SOF_NOCODEC_SUPPORT is not set"

(I don't see any of the SKYLAKE changes on the other thread.)

I've added the following blacklist lines to modprobe.d:

blacklist snd_hda_intel
blacklist snd_soc_skl

I see Input Device as "Multichannel Input - Cannon Point-LP High Definition Audio Controller" in sound preferences, and card sof-skl_hda_card in alsamixer. The speakers work, but the mic does not pick anything up.

Download full text (13.1 KiB)

Also using a Lenovo X1 7th generation. I can confirm that everything works using 5.3.0-20. I suspect that I've compared to Joel above me, taken a few extra steps:

* Added snd_hda_intel and snd_soc_skl to /etc/modprobe/blacklist.conf

* Added the alsa-ucm files from [1] to /usr/share/alsa/ucm/sof-skl_hda_card

* Added this sof topology file [2] from a Lenovo employee to /usr/lib/firmware/intel/sof-tplg

I have the following devices displayed using `arecord -l`

card 0: sofsklhdacard [sof-skl_hda_card], device 0: HDA Analog (*) []
  Subdevices: 1/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

In pulseaudio I have the following sources

    index: 4
 name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_0_5__sink.monitor>
 driver: <module-alsa-card.c>
 flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
 state: SUSPENDED
 suspend cause: IDLE
 priority: 1030
 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
 volume steps: 65537
 muted: no
 current latency: 0,00 ms
 max rewind: 0 KiB
 sample spec: s16le 2ch 48000Hz
 channel map: front-left,front-right
              Stereo
 used by: 0
 linked by: 0
 configured latency: 0,00 ms; range is 0,50 .. 341,00 ms
 monitor_of: 2
 card: 2 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
 module: 9
 properties:
  device.description = "Monitor of Cannon Point-LP High Definition Audio Controller HDMI3/DP3 Output"
  device.class = "monitor"
  alsa.card = "0"
  alsa.card_name = "sof-skl_hda_card"
  alsa.long_card_name = "LENOVO-20QDS0A600-ThinkPadX1Carbon7th-20QDS0A600"
  alsa.driver_name = "snd_soc_skl_hda_dsp"
  device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
  sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
  device.bus = "pci"
  device.vendor.id = "8086"
  device.vendor.name = "Intel Corporation"
  device.product.id = "9dc8"
  device.product.name = "Cannon Point-LP High Definition Audio Controller"
  device.string = "0"
  module-udev-detect.discovered = "1"
  device.icon_name = "audio-card-pci"
    index: 5
 name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_0_4__sink.monitor>
 driver: <module-alsa-card.c>
 flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
 state: SUSPENDED
 suspend cause: IDLE
 priority: 1030
 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
 volume steps: 65537
 muted: no
 current latency: 0,00 ms
 max rewind: 0 KiB
 sample spec: s16le 2ch 48000Hz
 channel map: front-left,front-right
              Stereo
 used by: 0
 linked by: 0
 configured latency: 0,00 ms; range is 0,50 .. 341,00 ms
 monitor_of: 3
 card: 2 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
 module: 9
 properties:
  devic...

Joel Eidsath (jeidsath) wrote :

Thanks Paul. Adding the alsa-ucm files and boosting alsa settings has enabled the audio. Are you hearing substantial static? I'm going to install the topology file if that will take care of it.

Khaled El Mously (kmously) wrote :

@Hui: Could you please mark this bug as verified if the eoan kernel in -proposed fixes the problem? Thanks

Hui Wang (hui.wang) wrote :

I tested 5.3.0-21-generic kernel on lenovo x1 carbon 7th, with the help of ucm and blacklist of snd_hda_intel and snd_soc_skl, all audio worked well.

verification done.

tags: added: verification-done-eoan
removed: verification-needed-eoan

All autopkgtests for the newly accepted linux-gcp-5.3 (5.3.0-1008.9~18.04.1) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

linux-gcp-5.3/unknown (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#linux-gcp-5.3

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Launchpad Janitor (janitor) wrote :
Download full text (53.1 KiB)

This bug was fixed in the package linux - 5.3.0-22.24

---------------
linux (5.3.0-22.24) eoan; urgency=medium

  * [REGRESSION] md/raid0: cannot assemble multi-zone RAID0 with default_layout
    setting (LP: #1849682)
    - Revert "md/raid0: avoid RAID0 data corruption due to layout confusion."

  * refcount underflow and type confusion in shiftfs (LP: #1850867) // CVE-2019-15793
    - SAUCE: shiftfs: Correct id translation for lower fs operations
    - SAUCE: shiftfs: prevent type confusion
    - SAUCE: shiftfs: Fix refcount underflow in btrfs ioctl handling

  * CVE-2018-12207
    - kvm: x86, powerpc: do not allow clearing largepages debugfs entry
    - SAUCE: KVM: vmx, svm: always run with EFER.NXE=1 when shadow paging is
      active
    - SAUCE: x86: Add ITLB_MULTIHIT bug infrastructure
    - SAUCE: kvm: mmu: ITLB_MULTIHIT mitigation
    - SAUCE: kvm: Add helper function for creating VM worker threads
    - SAUCE: kvm: x86: mmu: Recovery of shattered NX large pages
    - SAUCE: cpu/speculation: Uninline and export CPU mitigations helpers
    - SAUCE: kvm: x86: mmu: Apply global mitigations knob to ITLB_MULTIHIT

  * CVE-2019-11135
    - x86/msr: Add the IA32_TSX_CTRL MSR
    - x86/cpu: Add a helper function x86_read_arch_cap_msr()
    - x86/cpu: Add a "tsx=" cmdline option with TSX disabled by default
    - x86/speculation/taa: Add mitigation for TSX Async Abort
    - x86/speculation/taa: Add sysfs reporting for TSX Async Abort
    - kvm/x86: Export MDS_NO=0 to guests when TSX is enabled
    - x86/tsx: Add "auto" option to the tsx= cmdline parameter
    - x86/speculation/taa: Add documentation for TSX Async Abort
    - x86/tsx: Add config options to set tsx=on|off|auto
    - [Config] Disable TSX by default when possible

  * CVE-2019-0154
    - SAUCE: drm/i915: Lower RM timeout to avoid DSI hard hangs
    - SAUCE: drm/i915/gen8+: Add RC6 CTX corruption WA

  * CVE-2019-0155
    - SAUCE: drm/i915: Rename gen7 cmdparser tables
    - SAUCE: drm/i915: Disable Secure Batches for gen6+
    - SAUCE: drm/i915: Remove Master tables from cmdparser
    - SAUCE: drm/i915: Add support for mandatory cmdparsing
    - SAUCE: drm/i915: Support ro ppgtt mapped cmdparser shadow buffers
    - SAUCE: drm/i915: Allow parsing of unsized batches
    - SAUCE: drm/i915: Add gen9 BCS cmdparsing
    - SAUCE: drm/i915/cmdparser: Use explicit goto for error paths
    - SAUCE: drm/i915/cmdparser: Add support for backward jumps
    - SAUCE: drm/i915/cmdparser: Ignore Length operands during command matching

linux (5.3.0-21.22) eoan; urgency=medium

  * eoan/linux: 5.3.0-21.22 -proposed tracker (LP: #1850486)

  * Fix signing of staging modules in eoan (LP: #1850234)
    - [Packaging] Leave unsigned modules unsigned after adding .gnu_debuglink

linux (5.3.0-20.21) eoan; urgency=medium

  * eoan/linux: 5.3.0-20.21 -proposed tracker (LP: #1849064)

  * eoan: alsa/sof: Enable SOF_HDA link and codec (LP: #1848490)
    - [Config] Enable SOF_HDA link and codec

  * Eoan update: 5.3.7 upstream stable release (LP: #1848750)
    - panic: ensure preemption is disabled during panic()
    - [Config] updateconfigs for USB_RIO500
    - USB: rio500: Remove Rio 500 kernel driver
   ...

Changed in linux (Ubuntu Eoan):
status: Fix Committed → Fix Released
Hui Wang (hui.wang) on 2019-11-25
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.