Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [ICL] SOF codec#0 probe fails on Acer Switch SF314-57G #1807

Closed
perexg opened this issue Nov 22, 2019 · 90 comments
Closed

[BUG] [ICL] SOF codec#0 probe fails on Acer Switch SF314-57G #1807

perexg opened this issue Nov 22, 2019 · 90 comments
Assignees
Labels
bug Something isn't working HDA Applies to HD-Audio bus for codec connection ICL Applies to Icelake platform

Comments

@perexg
Copy link

perexg commented Nov 22, 2019

Describe the bug
The user cannot load signed firmware v1.3 on Acer Swift SF314-57G:

Manufacturer:      Acer
Product Name:      Swift SF314-57G
Product Version:   V1.07
Firmware Version:  V1.07
Board Vendor:      IL
Board Name:        Floris_IL

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

Discussion:

What is the expected behaviour, if the DSP has own (vendor) authentication key? Basically, how we can determine the right firmware for the given DSP in the generic Linux distribution? We need detect this automatically somehow. Can DSP give any hints to the driver before the fw upload?

@plbossart
Copy link
Member

@perexg thanks for bringing our attention on this

The executive summary is:

All platforms use the firmware signed with the production Intel key.
The exceptions are: Up2 and GLK+ chromebooks which are signed with the community key.
I am not aware of OEMs signing the base firmware, only extensions which are currently not supported by SOF.

we cannot query the key used, that's unfortunate but that's the reality. When the firmware is provided through linux-firmware, I'll add a quirk for these exceptions to point to the firmware signed with the community key.

I have been able to use the signed firmware on Acer devices since 1.3

In this case, I would think it's a kernel issue (either a missing patch or a bad commit from Intel).

can you share the git tree used?

@perexg
Copy link
Author

perexg commented Nov 22, 2019

Yep, its 5.4-rc8 with extra backports from 5.5: https://github.com/perexg/linux/tree/perex/fedora-test

@plbossart
Copy link
Member

plbossart commented Nov 22, 2019

Could you try removing all S0ix patches, e.g. starting with c13c962

That series seems to introduce problems and there is on-going work to fix it.

Edit: actually trying plain vanilla 5.4-rc8 would be even better, just to make sure there's a reference to bisect from.

@perexg
Copy link
Author

perexg commented Nov 22, 2019

Per this kernel log, I don't think that fw is active, it appears like that the upload fails. The PM is not active (I think) in this case.

[    5.793409] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    5.793702] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[    5.793718] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[    5.794122] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[    5.794148] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    5.794416] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[    5.794775] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    5.799105] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[    5.799109] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[    6.804322] sof-audio-pci 0000:00:1f.3: error: codec thesofproject/sof#2 probe error, ret: -5
[    6.808731] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[    6.808735] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[    9.877648] sof-audio-pci 0000:00:1f.3: error: cl_copy_fw: timeout HDA_DSP_SRAM_REG_ROM_STATUS read
[    9.878144] sof-audio-pci 0000:00:1f.3: error: load fw failed ret: -110
[    9.878161] sof-audio-pci 0000:00:1f.3: error: status = 0x0000002c panic = 0x00000000
[    9.878166] sof-audio-pci 0000:00:1f.3: error: failed to reset DSP
[    9.878167] sof-audio-pci 0000:00:1f.3: error: failed to boot DSP firmware -110
[    9.878167] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -110

@plbossart
Copy link
Member

plbossart commented Nov 22, 2019

The first error appears related to the HDaudio codec (or hdmi), can you check what happens if you select the FORCE_NOCODEC mode and use a nocodec topology? That would remove dependencies on the codecs and check if the firmware load works or not.
sof-cnl-nocodec.tplg.gz

@plbossart
Copy link
Member

@perexg another point to verify is the PCI ID of the device. We recently split CFL, CNL and CML firmwares instead of using sof-cnl.ri across the board due to additional firmware manifest/signature differences. If you are using the CNL file on CML, it's likely not going to work.

IIRC correctly CFL and CNL are still identical, but CML has a different manifest. @jajanusz please correct me if I am wrong.

@perexg
Copy link
Author

perexg commented Nov 23, 2019

The complete alsa-info output is in the Fedora bugzilla (URL provided in the bug description):

00:1f.3 0401: 8086:34c8 (rev 30)
	Subsystem: 1025:1407

@lgirdwood
Copy link
Member

@perexg I've tagged v1.4.1, @lbetlej can you sign.

@plbossart
Copy link
Member

@perexg @lgirdwood PCI ID 34c8 is IceLake so that's a new one.

@plbossart plbossart changed the title [BUG] Cannot load firmware on Acer Switch SF314-57G [BUG] [ICL] Cannot load firmware on Acer Switch SF314-57G Nov 25, 2019
@plbossart
Copy link
Member

@perexg can you please with the file attached (to be copied as /lib/firmware/intel/sof/sof-icl.ri)
I'd like to verify this is solved with the upcoming release, and if not to figure out the issue.

sof-icl-signed.ri.gz

@perexg
Copy link
Author

perexg commented Nov 25, 2019

I am just a "proxy" for this from the Fedora's bugzilla. I redirected the user here, so hopefully, he will test this.

@lgirdwood
Copy link
Member

new signed binaries now on v1.4.1 release page.

@containmentbreach
Copy link

Original reporter here. Unfortunately new firmware makes no difference at all

@lbetlej
Copy link

lbetlej commented Dec 5, 2019

@omg The updated binaries (CNL and ICL) for SOF 1.4.1 release are available for download. Could you test them and report if issue can be closed ? Thank you.

@containmentbreach
Copy link

Unfortunately I've lost ability to boot into Linux after BIOS update. I'll try to do something about it

@lgirdwood
Copy link
Member

@omg any updateon your BIOS/Linux installation. Are you able to test ?

@paulmenzel
Copy link

There is the same issue in the Ubuntu bug tracker:
PCI/internal sound card not detected on a Swift SF314-57
. Release 1.4.1 did not solve the issue.

 sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
 sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
 sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
 sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
 sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
 sof-audio-pci 0000:00:1f.3: use msi interrupt mode
 sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915

@paulmenzel
Copy link

@paulmenzel
Copy link

The issue title should have Swift instead of Switch I believe.

@lgirdwood
Copy link
Member

@perexg @omg @paulmenzel fwiw v1.42 has been released and signed now.
https://github.com/thesofproject/sof/releases/tag/v1.4.2
Apologies, it's not packaged atm as discussions still ongoing on how to achive this.

@ltune
Copy link

ltune commented Jan 28, 2020

Have still the problem with v1.4.2:

[   11.316829] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   11.316981] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[   11.341573] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   11.341736] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[   11.341762] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[   11.341987] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[   11.341992] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[   11.342191] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[   11.342359] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   11.346610] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[   11.346611] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[   11.348580] sof-audio-pci 0000:00:1f.3: error: codec #0 probe error, ret: -2
[   11.352572] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[   11.352573] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[   11.408362] iwlwifi 0000:00:14.3: base HW address: 0c:dd:24:cc:70:cc
[   11.422048] thermal thermal_zone9: failed to read out thermal zone (-61)
[   11.423850] iwlwifi 0000:00:14.3 wlp0s20f3: renamed from wlan0
[   11.434988] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:4:2-66a5a
[   11.434990] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel ABI 3:11:0
[   11.435368] sof-audio-pci 0000:00:1f.3: firmware boot complete`

@lgirdwood
Copy link
Member

@ltune thanks, your log is showing that the firmware has booted. Is there any subsequent data in dmesg ?
The unexpected IRQ sometimes shows but is harmless. However the codec probe error usually is more serious and IIRC there have been some HDA updates in sof-dev recently to address similar issues. @kv2019i any comment on the codec probe ?

@kv2019i
Copy link
Collaborator

kv2019i commented Jan 28, 2020

@ltune wrote:

[ 11.346611] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 11.348580] sof-audio-pci 0000:00:1f.3: error: codec #0 probe error, ret: -2

Hmm, #0 is your external HDA codec (speaker/mics/headset) and -2/NOENT tells that matching codec driver was not found. Can you make sure your kernel is compiled with all the HDA codec drivers included, e.g:

CONFIG_SND_HDA_CODEC_REALTEK=m
CONFIG_SND_HDA_CODEC_ANALOG=m
CONFIG_SND_HDA_CODEC_SIGMATEL=m
CONFIG_SND_HDA_CODEC_VIA=m
CONFIG_SND_HDA_CODEC_HDMI=m
CONFIG_SND_HDA_CODEC_CIRRUS=m
CONFIG_SND_HDA_CODEC_CONEXANT=m
CONFIG_SND_HDA_CODEC_CA0110=m
CONFIG_SND_HDA_CODEC_CA0132=m
CONFIG_SND_HDA_CODEC_CMEDIA=m
CONFIG_SND_HDA_CODEC_SI3054=m

If not still working, can you share the .config file.

@slawblauciak
Copy link

The original error code visible in the dmesg is a result of CSME security error. As others have mentioned, a problem with the key signed binary.

@kv2019i
Copy link
Collaborator

kv2019i commented Feb 18, 2020

@slawblauciak wrote:

The original error code visible in the dmesg is a result of CSME security error. As others have mentioned, a problem with the key signed binary.

I went through the older comments and it seems @ltune confirmed 1.4.2 did boot on the Acer DUT in question (https://github.com/thesofproject/sof/issues/2126#issuecomment-579099179). I checked the linked distro bugs, and I see no conflicting reports on this, so I think we can conclude the remaining issue is not related to firmware loading anymore. So I'll remove the bios tag -- let's keep that for verified cases.

Ok for @ltune @perexg @lgirdwood ?

@perexg
Copy link
Author

perexg commented Feb 18, 2020

Yes, the 1.4.2 firmware boots fine.

@lgirdwood
Copy link
Member

@kv2019i ack, I guess this is kernel related now with HDA integration. @ltune have you had any success with the kernel config suggestion or have you tried a recent kernel (last update was 21 days ago) ?

@ltune
Copy link

ltune commented Feb 19, 2020

Hi guys, sorry for late response.

@ kv2019i wrote:

Can you make sure your kernel is compiled with all the HDA codec drivers included, e.g:

CONFIG_SND_HDA_CODEC_REALTEK=m
CONFIG_SND_HDA_CODEC_ANALOG=m
CONFIG_SND_HDA_CODEC_SIGMATEL=m
CONFIG_SND_HDA_CODEC_VIA=m
CONFIG_SND_HDA_CODEC_HDMI=m
CONFIG_SND_HDA_CODEC_CIRRUS=m
CONFIG_SND_HDA_CODEC_CONEXANT=m
CONFIG_SND_HDA_CODEC_CA0110=m
CONFIG_SND_HDA_CODEC_CA0132=m
CONFIG_SND_HDA_CODEC_CMEDIA=m
CONFIG_SND_HDA_CODEC_SI3054=m

I took the ubuntu mainline kernel, in the build log you see that those options are set:

  LD [M]  sound/pci/hda/snd-hda-codec-realtek.o
  LD [M]  sound/pci/hda/snd-hda-codec-cmedia.o
  LD [M]  sound/pci/hda/snd-hda-codec-analog.o
  LD [M]  sound/pci/hda/snd-hda-codec-idt.o
  LD [M]  sound/pci/hda/snd-hda-codec-si3054.o
  LD [M]  sound/pci/hda/snd-hda-codec-cirrus.o
  LD [M]  sound/pci/hda/snd-hda-codec-ca0110.o
  LD [M]  sound/pci/hda/snd-hda-codec-ca0132.o
  LD [M]  sound/pci/hda/snd-hda-codec-conexant.o
  LD [M]  sound/pci/hda/snd-hda-codec-via.o
  LD [M]  sound/pci/hda/snd-hda-codec-hdmi.o
  LD [M]  sound/pci/hda/snd-hda-intel.o

@lgirdwood wrote:

your log is showing that the firmware has booted. Is there any subsequent data in dmesg ?

I just booted without the snd_hda_intel.dmic_detect=0 and have the same output. I cannot see anything more, but here is the full dmesg
dmesg_20200219.log

@kv2019i wrote:

@ltune confirmed 1.4.2 did boot on the Acer DUT in question (#2126 (comment)). I checked the linked distro bugs, and I see no conflicting reports on this, so I think we can conclude the remaining issue is not related to firmware loading anymore.

Right I see also "firmware boot complete" in dmesg, but the result is I have no sound cards available. So for now I continue with the snd_hda_intel.dmic_detect=0 option.

@ltune
Copy link

ltune commented Feb 19, 2020

@paulmenzel wrote

The issue title should have Swift instead of Switch I believe.

right it is acer swift-314-57-77MU

kv2019i added a commit to kv2019i/linux that referenced this issue May 28, 2020
Add support for using generic codec driver with SOF. Generic driver
is used if:
 - snd_sof_intel_hda_common.hda_model="generic" is set, or
 - fallback if no other codec driver if found

BugLink: thesofproject#1807
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
kv2019i added a commit to kv2019i/linux that referenced this issue May 29, 2020
Add support for using generic codec driver with SOF. Generic driver
is used if:
 - snd_sof_intel_hda_common.hda_model="generic" is set, or
 - fallback if no other codec driver if found

The implementation is aligned with snd-hda-intel driver, and fixes audio
support for systems like Acer Swift 3 SF314-57G, on which this issue was
originally reported.

BugLink: thesofproject#1807
BugLink: https://bugs.launchpad.net/bugs/1877757
Cc: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
kv2019i added a commit to kv2019i/linux that referenced this issue May 29, 2020
Add support for using generic codec driver with SOF. Generic driver
is used if:
 - snd_sof_intel_hda_common.hda_model="generic" is set, or
 - fallback if no other codec driver is found

The implementation is aligned with snd-hda-intel driver, and fixes audio
support for systems like Acer Swift 3 SF314-57G, on which this issue was
originally reported.

BugLink: thesofproject#1807
BugLink: https://bugs.launchpad.net/bugs/1877757
Cc: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
kv2019i added a commit that referenced this issue May 29, 2020
Add support for using generic codec driver with SOF. Generic driver
is used if:
 - snd_sof_intel_hda_common.hda_model="generic" is set, or
 - fallback if no other codec driver is found

The implementation is aligned with snd-hda-intel driver, and fixes audio
support for systems like Acer Swift 3 SF314-57G, on which this issue was
originally reported.

BugLink: #1807
BugLink: https://bugs.launchpad.net/bugs/1877757
Cc: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
kv2019i added a commit that referenced this issue May 29, 2020
Add support for using generic codec driver with SOF. Generic driver
is used if:
 - snd_sof_intel_hda_common.hda_model="generic" is set, or
 - fallback if no other codec driver is found

The implementation is aligned with snd-hda-intel driver, and fixes audio
support for systems like Acer Swift 3 SF314-57G, on which this issue was
originally reported.

BugLink: #1807
BugLink: https://bugs.launchpad.net/bugs/1877757
Cc: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
fengguang pushed a commit to 0day-ci/linux that referenced this issue May 30, 2020
Add support for using generic codec driver with SOF. Generic driver
is used if:
 - snd_sof_intel_hda_common.hda_model="generic" is set, or
 - fallback if no other codec driver is found

The implementation is aligned with snd-hda-intel driver, and fixes audio
support for systems like Acer Swift 3 SF314-57G, on which this issue was
originally reported.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Hui Wang <hui.wang@canonical.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
BugLink: thesofproject#1807
BugLink: https://bugs.launchpad.net/bugs/1877757
Link: https://lore.kernel.org/r/20200529160358.12134-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
@samkline
Copy link

I just wanted to say thanks @kv2019i for putting this patch together. I just picked up an Acer Swift 5 (SF514-54T) and was having the same issue as @RiderALT. I found lots of dead-end discussions about this and ultimately only had success when I recompiled the kernel with the two patches above (and added the config options @plbossart linked) -- now it all appears to be working. I've tested both the built-in speakers and mic as well as headset audio and input.

I'm on Arch Linux with the 5.6.15-arch1 kernel. In addition to the kernel patches above, I also had to add options snd_sof_intel_hda_common hda_model="generic" to /etc/modprobe.d/sof.conf.

I still had some issues with PulseAudio. Even pulseaudio 13.99.1 (from git) didn't work out of the box. I ended up going back to the latest pulseaudio packaged by Arch (13.0-3) and added this to /etc/pulse/default.pa:

load-module module-alsa-sink device=hw:0,0
load-module module-alsa-source device=hw:0,7 channels=2

Without this, I get only dummy output and no input.

I also still get this logging at pulseaudio startup, though all functionality seems to work as expected.

W: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' or 'CaptureChannels'for device HDMI3, assuming stereo duplex.
W: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' or 'CaptureChannels'for device HDMI2, assuming stereo duplex.
W: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' or 'CaptureChannels'for device HDMI1, assuming stereo duplex.
W: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' or 'CaptureChannels'for device Headphones2, assuming stereo duplex.
W: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' or 'CaptureChannels'for device Mic, assuming stereo duplex.
W: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' or 'CaptureChannels'for device Speaker, assuming stereo duplex.
W: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' or 'CaptureChannels'for device Headphones1, assuming stereo duplex.
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.

If I can assist with any testing or debugging, let me know, I'd be happy to help. Looking forward to seeing this land in 5.8 so I can go back to Arch Linux's packaged kernel.

fengguang pushed a commit to 0day-ci/linux that referenced this issue May 31, 2020
Add support for using generic codec driver with SOF. Generic driver
is used if:
 - snd_sof_intel_hda_common.hda_model="generic" is set, or
 - fallback if no other codec driver is found

The implementation is aligned with snd-hda-intel driver, and fixes audio
support for systems like Acer Swift 3 SF314-57G, on which this issue was
originally reported.

BugLink: thesofproject#1807
BugLink: https://bugs.launchpad.net/bugs/1877757
Reviewed-by: Hui Wang <hui.wang@canonical.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
bardliao pushed a commit that referenced this issue Jun 1, 2020
Add support for using generic codec driver with SOF. Generic driver
is used if:
 - snd_sof_intel_hda_common.hda_model="generic" is set, or
 - fallback if no other codec driver is found

The implementation is aligned with snd-hda-intel driver, and fixes audio
support for systems like Acer Swift 3 SF314-57G, on which this issue was
originally reported.

BugLink: #1807
BugLink: https://bugs.launchpad.net/bugs/1877757
Cc: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
bardliao pushed a commit that referenced this issue Jun 1, 2020
Add support for using generic codec driver with SOF. Generic driver
is used if:
 - snd_sof_intel_hda_common.hda_model="generic" is set, or
 - fallback if no other codec driver is found

The implementation is aligned with snd-hda-intel driver, and fixes audio
support for systems like Acer Swift 3 SF314-57G, on which this issue was
originally reported.

BugLink: #1807
BugLink: https://bugs.launchpad.net/bugs/1877757
Cc: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@perexg
Copy link
Author

perexg commented Jun 1, 2020

@samkline : Could you gather the full pulseaudio debug log to check what's wrong? The easiest way is to rename /usr/bin/pulseaudio, kill it and run 'pulseaudio.renamed -vvvvvvvvvvvvvvvv' on the command line (as user).

@plbossart
Copy link
Member

@samkline could it be that you have an old version of alsa-lib and/or alsa-ucm-conf? we've seen this problem with having to add the number of mics by hand in a pulseaudio configuration,

@samkline
Copy link

samkline commented Jun 1, 2020

I believe I'm updated on both:

$ pacman -Q alsa-ucm-conf alsa-lib pulseaudio
alsa-ucm-conf 1.2.2-1
alsa-lib 1.2.2-1
pulseaudio 13.0-3

Here's the debug logging of pulseaudio broken (without my changes to /etc/pulse/default.pa): https://gist.github.com/samkline/45d7a05de20ca2c1b34f8ad8440379da

And here's the debug logging of pulseaudio working (with my changes to /etc/pulse/default.pa):
https://gist.github.com/samkline/5a39fa082d587409d5907eebceb91568

@perexg
Copy link
Author

perexg commented Jun 1, 2020

The dmic channels are not exported correctly:

D: [pulseaudio_] alsa-util.c: Trying hw:sofhdadsp,5 with SND_PCM_NO_AUTO_FORMAT ...
I: [pulseaudio_] alsa-util.c: Error opening PCM device hw:sofhdadsp,5: Invalid argument

What does 'amixer -c 0 info' say?

@samkline
Copy link

samkline commented Jun 1, 2020

$ amixer -c 0 info
Card hw:0 'sofhdadsp'/'IL-SwiftSF514_54T-V1.13-Yebisu_IL'
  Mixer name    : 'Conexant Generic'
  Components    : 'HDA:8086280f,80860101,00100000 HDA:14f120d0,1025136f,00100001 cfg-dmics:2'
  Controls      : 31
  Simple ctrls  : 16

@perexg
Copy link
Author

perexg commented Jun 1, 2020

Ohh, this was bad hit. The "hw:sofhdadsp,5" device is HDMI3. Please, replace /usr/share/alsa/ucm2/sof-hda-dsp/Hdmi.conf with https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/sof-hda-dsp/Hdmi.conf .

@kv2019i
Copy link
Collaborator

kv2019i commented Jun 1, 2020

@perexg wrote:

Ohh, this was bad hit. The "hw:sofhdadsp,5" device is HDMI3. Please, replace /usr/share/alsa/ucm2/sof-hda-dsp/Hdmi.conf with https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/sof-hda-dsp/Hdmi.conf .

Good catch! Indeed, @samkline you probably have a 514-54T variant with a non-Intel GPU, and you hit this other issue (but fixed in upstream alsa-ucm as Jaroslav points above).

@plbossart
Copy link
Member

@perexg wrote:

Ohh, this was bad hit. The "hw:sofhdadsp,5" device is HDMI3. Please, replace /usr/share/alsa/ucm2/sof-hda-dsp/Hdmi.conf with https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/sof-hda-dsp/Hdmi.conf .

Good catch! Indeed, @samkline you probably have a 514-54T variant with a non-Intel GPU, and you hit this other issue (but fixed in upstream alsa-ucm as Jaroslav points above).

@kv2019i don't we start the DMIC devices at a fixed offset?

@samkline
Copy link

samkline commented Jun 2, 2020

Sadly, no luck -- I tried the Hdmi.conf from upstream, reverted my default.pa change, removed my ~/.config/pulse, and rebooted to be safe, but I get dummy output and no input.

Pulseaudio debug logging is available here: https://gist.github.com/samkline/2aff0c71db990e09ad4bdf083666fc9b (lines 115-118 seem potentially relevant)

BTW, this machine does have an Intel GPU:

$ sudo lshw -C display
  *-display                 
       description: VGA compatible controller
       product: Iris Plus Graphics G7
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 07
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 mode=1920x1080 visual=truecolor xres=1920 yres=1080
       resources: iomemory:600-5ff iomemory:400-3ff irq:163 memory:601c000000-601cffffff memory:4000000000-400fffffff ioport:3000(size=64) memory:c0000-dffff

@samkline
Copy link

samkline commented Jun 2, 2020

Oh, good news: I just installed pulseaudio-git (13.99.1-31-g1fe37), and it now works with the upstream Hdmi.conf without any changes to default.pa.

@kv2019i
Copy link
Collaborator

kv2019i commented Jun 2, 2020

Patch to fix the original bug has been merged upstream now, so I will proceed and close the bug:
https://mailman.alsa-project.org/pipermail/alsa-devel/2020-May/168417.html

Thank you @ltune , @RiderALT , @perexg and @samkline for reporting and helping with the debug. If there are new issues, please open a new bug and let's track any new issues separately.

@kv2019i kv2019i closed this as completed Jun 2, 2020
@adam-fu
Copy link

adam-fu commented Jun 3, 2020

That's good news. It may be good to add here which kernel version will contain the patch, once it is released, so I can load the corresponding Ubuntu kernel and have the internal microphone working🙂

@kv2019i
Copy link
Collaborator

kv2019i commented Jun 3, 2020

@adam-fu wrote:

That's good news. It may be good to add here which kernel version will contain the patch, once it is released, so I can load the corresponding Ubuntu kernel and have the internal microphone working🙂

It's currently queued for 5.8, so will be in 5.8.0. It may get backported to older stable kernels, and/or Ubuntu kernel package, so you probably don't have to wait that long.

@RiderALT
Copy link

RiderALT commented Jun 3, 2020

I already apply this patch (commit 89d73cc) for my local build of the kernel 5.7.0 and it works great on my Acer SF314-57 without any additional setting (like kernel module options or pulseaudio settings).

The only problem I discovered with 5.7.0 on this machine is 3 HDMI audio outputs in pulseaudio but one HDMI and one thunderbolt output in hardware.i attached Alsa-info output to save a history.
alsa-info.txt.gz

@kv2019i
Copy link
Collaborator

kv2019i commented Jun 3, 2020

@RiderALT wrote:

I already apply this patch (commit 89d73cc) for my local build of the kernel 5.7.0 and it works great on my Acer SF314-57 without any additional setting (like kernel module options or pulseaudio

That's good to hear, thanks for testing!

The only problem I discovered with 5.7.0 on this machine is 3 HDMI audio outputs in pulseaudio but one HDMI and one thunderbolt output in hardware.i attached Alsa-info output to save a history.

This is to be expected. This hardware supports up to 3 concurrent HDMI/DP audio streams. On most systems like this, you can connect upto 3 monitors to the USB-C/thunderbolt port (using DP-MST), plus one to the HDMI connector. Pulseaudio should show which of the three ALSA HDMI PCMs has a connected monitor (in your alsa-info it shows no monitors w/ audio capability connected).

MilhouseVH pushed a commit to MilhouseVH/linux that referenced this issue Jun 24, 2020
[ Upstream commit 89d73cc ]

Add support for using generic codec driver with SOF. Generic driver
is used if:
 - snd_sof_intel_hda_common.hda_model="generic" is set, or
 - fallback if no other codec driver is found

The implementation is aligned with snd-hda-intel driver, and fixes audio
support for systems like Acer Swift 3 SF314-57G, on which this issue was
originally reported.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Hui Wang <hui.wang@canonical.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
BugLink: thesofproject/linux#1807
BugLink: https://bugs.launchpad.net/bugs/1877757
Link: https://lore.kernel.org/r/20200529160358.12134-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
taiten pushed a commit to taiten/ubuntu-kernel-focal that referenced this issue Aug 13, 2020
BugLink: https://bugs.launchpad.net/bugs/1877757

Add support for using generic codec driver with SOF. Generic driver
is used if:
 - snd_sof_intel_hda_common.hda_model="generic" is set, or
 - fallback if no other codec driver is found

The implementation is aligned with snd-hda-intel driver, and fixes audio
support for systems like Acer Swift 3 SF314-57G, on which this issue was
originally reported.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Hui Wang <hui.wang@canonical.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
BugLink: thesofproject/linux#1807
BugLink: https://bugs.launchpad.net/bugs/1877757
Link: https://lore.kernel.org/r/20200529160358.12134-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 89d73ccab20a684d8446cea4d8ac6a2608c8d390)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
kitakar5525 pushed a commit to kitakar5525/linux-kernel that referenced this issue Sep 16, 2020
Add support for using generic codec driver with SOF. Generic driver
is used if:
 - snd_sof_intel_hda_common.hda_model="generic" is set, or
 - fallback if no other codec driver is found

The implementation is aligned with snd-hda-intel driver, and fixes audio
support for systems like Acer Swift 3 SF314-57G, on which this issue was
originally reported.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Hui Wang <hui.wang@canonical.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
BugLink: thesofproject/linux#1807
BugLink: https://bugs.launchpad.net/bugs/1877757
Link: https://lore.kernel.org/r/20200529160358.12134-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 89d73cc)
Signed-off-by: Chintan Patel <chintan.m.patel@intel.com>

BUG=b:162008784
TEST=Test audio on volteer.

Signed-off-by: Mike Mason <michael.w.mason@intel.corp-partner.google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HDA Applies to HD-Audio bus for codec connection ICL Applies to Icelake platform
Projects
None yet
Development

No branches or pull requests