Bug 212465 - Internal Speakers Bang & Olufsen on HP Spectre X360 Convertible model 13-aw2025na don't work at all - no matching ASoC machine driver found
Summary: Internal Speakers Bang & Olufsen on HP Spectre X360 Convertible model 13-aw20...
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-28 14:44 UTC by Marian Klein
Modified: 2023-04-24 21:47 UTC (History)
3 users (show)

See Also:
Kernel Version: 5.12.0-051200rc4-generic
Subsystem:
Regression: No
Bisected commit-id:


Attachments
hwinfo (555.79 KB, text/plain)
2021-03-28 14:44 UTC, Marian Klein
Details
dmesg (149.51 KB, text/plain)
2021-03-28 14:46 UTC, Marian Klein
Details
lsmod (8.55 KB, text/plain)
2021-03-28 14:46 UTC, Marian Klein
Details
inxi (2.13 KB, text/plain)
2021-03-28 14:47 UTC, Marian Klein
Details
alsa info --no-upload (24.98 KB, text/plain)
2021-03-28 21:41 UTC, Marian Klein
Details
lspci -kv (14.22 KB, text/plain)
2021-03-28 21:58 UTC, Marian Klein
Details
hdajackretask (577.28 KB, image/png)
2021-03-28 22:20 UTC, Marian Klein
Details
Recovery mode kernel followed by root shell (4.47 MB, image/jpeg)
2021-03-28 22:53 UTC, Marian Klein
Details
5.13rc1 alsa-info sound devices not found (8.43 KB, text/plain)
2021-05-11 22:12 UTC, Marian Klein
Details
dmesg with dyn debug for sof enabled (118.67 KB, text/plain)
2021-05-12 19:56 UTC, Marian Klein
Details
dmesg of 13t-aw200 (70.35 KB, text/plain)
2021-11-18 06:42 UTC, Oleg Mikheev
Details
lshw of 13t-aw200 (28.03 KB, text/plain)
2021-11-18 06:42 UTC, Oleg Mikheev
Details
pactl of 13t-aw200 (1.36 KB, text/plain)
2021-11-18 06:42 UTC, Oleg Mikheev
Details
Alsa info for kernel 6.3.0-rc3+ from https://github.com/thesofproject/linux.git (28.68 KB, text/plain)
2023-04-23 16:38 UTC, Marian Klein
Details
KDE audio volume seems to show something , I can hear nothing though (1.06 MB, image/png)
2023-04-23 17:01 UTC, Marian Klein
Details
missing some fields in bios settings when using HP BCU (2.01 KB, text/plain)
2023-04-24 01:31 UTC, Marian Klein
Details

Description Marian Klein 2021-03-28 14:44:39 UTC
Created attachment 296113 [details]
hwinfo

Internal speakers Bang & Olufsen on 11th gen processor  (Tiger Lake)
HP Spectre X360 Convertible model 13-aw2025na  don't work at all.
Where are the Linux kernel drivers for Bang & Olufsen speakers?
I can see    /dev/snd/hwC0D2
and
/dev/snd/by-path/pci-0000\:00\:1f.3-platform-skl_hda_dsp_generic

marian@HPSpectre:~$ inxi -A
Audio:     Device-1: Intel Tiger Lake-LP Smart Sound Audio driver:
sof-audio-pci-intel-tgl
          Sound Server: ALSA v: k5.12.0-051200rc4-generic

marian@HPSpectre:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 1: HDMI1 (*) []
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 2: HDMI2 (*) []
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI3 (*) []
 Subdevices: 1/1
 Subdevice #0: subdevice #0

I reported to HP , Bang & Olufsen.
I will report to kernel bugzilla and ubuntu bugzilla.
Comment 1 Marian Klein 2021-03-28 14:46:18 UTC
Created attachment 296115 [details]
dmesg
Comment 2 Marian Klein 2021-03-28 14:46:40 UTC
Created attachment 296117 [details]
lsmod
Comment 3 Marian Klein 2021-03-28 14:47:00 UTC
Created attachment 296119 [details]
inxi
Comment 4 Marian Klein 2021-03-28 14:50:02 UTC
System is kubuntu 21.04 (hirsute)

marian@HPSpectre:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.04
DISTRIB_CODENAME=hirsute
DISTRIB_DESCRIPTION="Ubuntu Hirsute Hippo (development branch)"

I tested kubuntu 20.10. The same problem there.
Comment 5 Marian Klein 2021-03-28 14:55:45 UTC
marian@HPSpectre:~$ uname -a
Linux HPSpectre 5.12.0-051200rc4-generic #202103212230 SMP Sun Mar 21 22:33:27 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Comment 6 Marian Klein 2021-03-28 15:54:12 UTC
This upstream kernel (without ubuntu patches) tested https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12-rc4/
Comment 7 Jaroslav Kysela 2021-03-28 18:28:50 UTC
I think that Intel is working to add support for this hw (adding to Cc:): 

  [    7.014624] sof-audio-pci-intel-tgl 0000:00:1f.3: No SoundWire machine driver found
  [    7.014627] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4
  [    7.014629] sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
  [    7.014632] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 2

Please, attach also output from 'alsa-info.sh --no-upload'.
Comment 8 Marian Klein 2021-03-28 21:41:00 UTC
Created attachment 296129 [details]
alsa info --no-upload
Comment 9 Marian Klein 2021-03-28 21:45:24 UTC
Regarding "I think that Intel is working to add support for this hw" I believe more likely the situation is the wrong default fallback driver in the absence of the right one was automatically picked up for the job.
Comment 10 Marian Klein 2021-03-28 21:53:07 UTC
I have read
https://askubuntu.com/questions/873881/how-to-install-bang-and-olufsen-audio-drivers-for-hp-laptop
I noticed 
hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x67
hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x3000

Jaroslav, can you suggest any magic hack or workaround with hda-verb for me, please?
Comment 11 Marian Klein 2021-03-28 21:58:25 UTC
Created attachment 296131 [details]
lspci -kv
Comment 12 Marian Klein 2021-03-28 22:13:41 UTC
See also
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1921632
Comment 13 Marian Klein 2021-03-28 22:18:59 UTC
HDAJackRetask could be a workaround?

https://askubuntu.com/questions/899021/how-to-fix-bang-and-olufsen-audio-for-hp-laptops/1120269#1120269

Can you advise?
Comment 14 Marian Klein 2021-03-28 22:20:42 UTC
Created attachment 296133 [details]
hdajackretask
Comment 15 Marian Klein 2021-03-28 22:33:34 UTC
I reported the problem to HP too, I have a low expectation from them though.

"Your case Number 5063719540 has been created with the following details:

HP Case Number: 5063719540
Serial Number: 5CD0452VRQ
Product Number: 2G2D8EA
Product Description: HP Spectre x360 Convertible Laptop PC 13-aw2000 (8UY97AV) 
CRM:0000498703759
"
Comment 16 Marian Klein 2021-03-28 22:53:53 UTC
Created attachment 296135 [details]
Recovery mode kernel followed by root shell
Comment 17 Marian Klein 2021-03-28 23:11:31 UTC
Do I need to copy a firmware manually from 
https://github.com/thesofproject/sof

to /lib/firmware/intel/sof/
Comment 18 Marian Klein 2021-03-29 00:08:08 UTC
This is suspicious:
[    7.360051] soundwire sdw-master-1: Slave Entry not found
[    7.382409] soundwire sdw-master-0: Slave Entry not found

[    9.378541] soundwire sdw:1:25d:1308:0:0: Probe not complete, timed out
[    9.378546] soundwire sdw:1:25d:1308:0:0: Update Slave status failed:-110
[    9.410601] soundwire sdw:0:25d:711:0:0: Probe not complete, timed out
[    9.410604] soundwire sdw:0:25d:711:0:0: Update Slave status failed:-110

in the output from
marian@HPSpectre:~/kernel$ sudo dmesg | grep 'audio\|sound'
[    7.226385] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    7.226399] sof-audio-pci-intel-tgl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[    7.226412] sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002)
[    7.226552] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    7.226606] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    7.236681] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[    7.270725] sof-audio-pci-intel-tgl 0000:00:1f.3: No SoundWire machine driver found
[    7.270727] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4
[    7.270728] sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[    7.270731] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[    7.357369] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 1:6:0-18fab
[    7.357373] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:17:0 Kernel ABI 3:18:0
[    7.360051] soundwire sdw-master-1: Slave Entry not found
[    7.364918] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:17:0 Kernel ABI 3:18:0
[    7.372458] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[    7.382409] soundwire sdw-master-0: Slave Entry not found
[    7.403474] input: sof-hda-dsp HDMI/DP,pcm=1 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input29
[    7.403508] input: sof-hda-dsp HDMI/DP,pcm=2 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input30
[    7.403534] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input31
[    9.378541] soundwire sdw:1:25d:1308:0:0: Probe not complete, timed out
[    9.378546] soundwire sdw:1:25d:1308:0:0: Update Slave status failed:-110
[    9.410601] soundwire sdw:0:25d:711:0:0: Probe not complete, timed out
[    9.410604] soundwire sdw:0:25d:711:0:0: Update Slave status failed:-110
Comment 19 Marian Klein 2021-03-29 01:31:46 UTC
linux/drivers/soundwire/bus.c:774
  dev_err(bus->dev, "Slave Entry not found\n");



linux/drivers/soundwire/bus.c:1659
dev_err(&slave->dev, "Probe not complete, timed out\n");


linux/drivers/soundwire/bus.h:8
#define DEFAULT_PROBE_TIMEOUT       2000
//This is in jiffies or msecs?
//I would like kernel with this to be hardcoded 10 times bigger for a test or // configurable in kernel config.


linux/sound/soc/sof/sof-audio.c:456
 dev_err(sdev->dev, "error: no matching ASoC machine driver found - aborting probe\n");
Comment 20 Marian Klein 2021-03-29 01:40:16 UTC
Is this a problem, kernel and firmware ABI versions not matching?

[    7.357373] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:17:0 Kernel ABI 3:18:0
Comment 21 Pierre Bossart 2021-03-29 13:34:31 UTC
Solved upstream, see https://github.com/thesofproject/linux/issues/2700#issuecomment-805954898

You will need to add a couple of patches to v5.12-rc4 that will only be in 5.13 due to review delays.
Comment 22 Marian Klein 2021-03-29 16:58:12 UTC
Hi Pierre. 

6558b66
f6594cd
bb85d7e
925c612
717a8fd

Did you apply the patches for any of the stable branches?
https://git.kernel.org/pub/scm/linux/kernel/git/bwh/linux-stable.git
https://git.kernel.org/pub/scm/linux/kernel/git/bwh/linux-stable-queue.git
https://git.kernel.org/pub/scm/linux/kernel/git/bwh/linux-stable-rc.git

Where did you apply them?

Maybe I can convince ubuntu kernel maintainers to include patches for ubuntu 21.04 kernel release.
Comment 23 Marian Klein 2021-03-29 17:30:33 UTC
Even before a patch review, can you please provide an experimental build, a binary (dpkg for kernel and modules) so I can test it and validate it on my model? They had slightly different HP models in the upstream report.
Comment 24 Pierre Bossart 2021-03-29 18:14:21 UTC
the patches are in the SoundWire maintainer tree
git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git

I don't have the bandwidth to provide and support a build, sorry. If you want the latest code you should try our development branch (v5.12-rc4 + audio/SoundWire next + SOF next next)

https://github.com/thesofproject/linux
Comment 25 Marian Klein 2021-03-29 19:36:55 UTC
I am not sure if I understand what to do. I have never done exactly this.
What is 'next' and 'next next'.
Is soundwire a branch or separate project?

Can you outline or confirm steps?

1)
git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
2)
git checkout v5.12-rc4
3)
git merge git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git
Comment 26 Pierre Bossart 2021-03-30 00:25:10 UTC
yes, or you can also cherry-pick patches, no need to make things more complicated than they need to be.

git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
git remote add soundwire git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git
git fetch soundwire
git cherry-pick 6558b66
git cherry-pick f6594cd
Comment 27 Marian Klein 2021-03-30 05:14:06 UTC
I merged soundwire patches git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git with 5.12rc5 and built kernel:
https://drive.google.com/drive/folders/1WnotWnHgHe5EM7x49JmmZhNzxJiBW8AV/
I still don't have audio. 
Do I need this too ? https://github.com/alsa-project/alsa-ucm-conf
Comment 28 Marian Klein 2021-03-31 02:21:01 UTC
Ok. I got it working.
I built from here.
git clone https://github.com/thesofproject/linux.git
with
CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH=m

I uploaded my kernel debian/ubuntu packages to 
https://drive.google.com/drive/folders/1L9DpjMamc37tZ19s5u_4RfmV221F4222?usp=sharing

Affected Spectre X360 laptop users can install this kernel directly in the meantime before patches make it to the mainline kernel and distros.

Also this needs to be installed:
user1@HPSpectre:~/dev$ git clone https://github.com/alsa-project/alsa-ucm-conf.git
sudo apt remove alsa-ucm-conf
cd /usr/share/alsa/
sudo ln -s "$HOME/dev/alsa-ucm-conf/ucm2" ucm2
reboot
Comment 29 Marian Klein 2021-05-04 20:19:31 UTC
(In reply to Pierre Bossart from comment #21)
> Solved upstream, see
> https://github.com/thesofproject/linux/issues/2700#issuecomment-805954898
> 
> You will need to add a couple of patches to v5.12-rc4 that will only be in
> 5.13 due to review delays.
Hi Pierre
5.12 is released. Is 5.13 two weeks merge window now for this to go upstream?
Comment 30 Pierre Bossart 2021-05-04 20:25:16 UTC
v5.1(In reply to Marian Klein from comment #29)
> (In reply to Pierre Bossart from comment #21)
> > Solved upstream, see
> > https://github.com/thesofproject/linux/issues/2700#issuecomment-805954898
> > 
> > You will need to add a couple of patches to v5.12-rc4 that will only be in
> > 5.13 due to review delays.
> Hi Pierre
> 5.12 is released. Is 5.13 two weeks merge window now for this to go upstream?

I see the patches in Linus' tree already
tag: soundwire-5.13-rc1
SHA1: f6594cdfec4cde57484812271696fb9f40d125b7

5.13-rc1 is likely to be tagged next Sunday
Comment 31 Marian Klein 2021-05-11 22:12:23 UTC
Created attachment 296721 [details]
5.13rc1 alsa-info sound devices not found
Comment 32 Marian Klein 2021-05-11 22:13:20 UTC
It does NOT work. I tried.
https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.13-rc1/
(upstream linux kernel, no ubuntu patches)
Comment 33 Pierre Bossart 2021-05-11 22:50:07 UTC
(In reply to Marian Klein from comment #32)
> It does NOT work. I tried.
> https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.13-rc1/
> (upstream linux kernel, no ubuntu patches)

please attach dmesg with dynamic debug enabled for SOF and SoundWire.
Comment 34 Marian Klein 2021-05-12 19:56:38 UTC
Created attachment 296735 [details]
dmesg with dyn debug for sof enabled

As specified in https://github.com/thesofproject/linux/issues/2700
I copied
https://github.com/thesofproject/linux/files/5837691/ddebug.txt
to /etc/modprobe.d/sof-dyndbg.conf  and rebooted
Comment 35 Pierre Bossart 2021-05-12 20:28:49 UTC
I see nothing really wrong, so I suspect the usual silent fails that come from not having enabled the machine driver. Can you make sure this is enabled?

CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH=m
Comment 36 Marian Klein 2021-05-12 21:30:58 UTC
Looks like you are right, I can see nothing in
marian@HPSpectre:/boot$ cat config-5.13.0-051300rc1-generic | grep CONFIG_SND_SOC_INTEL_SOUNDWIRE_

This is not a kernel under my control. I did not build it. The whole point of this exercise is that ubuntu builds something (either with or without their patches) that works out of the box.

Any idea how to communicate to ubuntu they should enable the module for the rc2
https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.13-rc2  and for their proper ubuntu kernels?

CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH=m
Comment 37 Pierre Bossart 2021-05-13 13:43:20 UTC
Ubuntu support SoundWire in their OEM kernels, it's likely an oversight on their side
Hui Wang <hui.wang@canonical.com> might be able to help.
Comment 38 Oleg Mikheev 2021-11-18 06:38:12 UTC
Is this supposed to work on Spectre 360 13t-aw200 as of kernel 5.15.2? Or is 13t-aw200 a different machine?
I'm asking b/c it doesn't.
The soundcard is detected but Pulse says speakers are not available, while headphones are -- with no headphones plugged in. When they are plugged in there's no sound in them either.
Please see dmesg/pactl/lshw attached
Comment 39 Oleg Mikheev 2021-11-18 06:42:06 UTC
Created attachment 299619 [details]
dmesg of 13t-aw200
Comment 40 Oleg Mikheev 2021-11-18 06:42:28 UTC
Created attachment 299621 [details]
lshw of 13t-aw200
Comment 41 Oleg Mikheev 2021-11-18 06:42:49 UTC
Created attachment 299623 [details]
pactl of 13t-aw200
Comment 42 Oleg Mikheev 2021-11-18 06:43:57 UTC
I used the latest ucm2
Comment 43 Pierre Bossart 2021-11-18 17:01:28 UTC
(In reply to Oleg Mikheev from comment #38)
> Is this supposed to work on Spectre 360 13t-aw200 as of kernel 5.15.2? Or is
> 13t-aw200 a different machine?
> I'm asking b/c it doesn't.
> The soundcard is detected but Pulse says speakers are not available, while
> headphones are -- with no headphones plugged in. When they are plugged in
> there's no sound in them either.
> Please see dmesg/pactl/lshw attached

I have one of these HP platforms and did find a mistake for jack detection.

I fixed it here:
https://github.com/thesofproject/linux/pull/3195

and this is in Mark Brown's for-next branch, see commit
0527b19fa4f390a6054612e1fa1dd4f8efc96739

This patch is not in 5.15, but my expectation is that this fix will land in linux-stable at some point. In the mean time it wouldn't hurt if you could give it a try to see if this fixes the problem for you.
Comment 44 Pierre Bossart 2021-11-18 17:15:15 UTC
> This patch is not in 5.15, but my expectation is that this fix will land in
> linux-stable at some point. In the mean time it wouldn't hurt if you could
> give it a try to see if this fixes the problem for you.

Forgot to mention that you can use a kernel module parameter to modify the jack detection - no need to apply the patch. What you need to do is find out the existing value and replace JD1 by JD2.

options snd_soc_sof_sdw quirk=0x<insert value here?
Comment 45 Oleg Mikheev 2021-11-21 07:33:46 UTC
(In reply to Pierre Bossart from comment #43)
> I have one of these HP platforms and did find a mistake for jack detection.
> 
> I fixed it here:
> https://github.com/thesofproject/linux/pull/3195

I patched my sof_sdw and it indeed fixes jack detection. Thanks!!!

It doesn't give me sound though, but it's a step in the right direction
Comment 46 Pierre Bossart 2021-11-22 16:30:37 UTC
Usually I try a manual test without PulseAudio to check that the UCM settings are correct, e.g. (off the top of my head, check actual settings for card name and endpoint name)

alsaucm -c sof-soundwire set _verb HiFi set _enadev Speaker
speaker-test -Dhw:0,2 -c2 -r48000
alsaucm -c sof-soundwire set _verb HiFi set _enadev Headphone
speaker-test -Dhw:0,0 -c2 -r48000
Comment 47 Michael Shantzis 2022-01-16 21:42:53 UTC
I think this bug was fixed with Alsa 1.2.5. I have an HP Spectre x360 13t-aw200 that had been demonstrating the issue with Ubuntu (all versions from bionic to jammy use alsa-base 1.0.25). I decided to try Fedora (alsa-lib 1.2.6) and my speakers and microphone worked right out of the box.
Comment 48 Pierre Bossart 2022-01-17 17:25:12 UTC
Yes, with 5.15 and fedora this platform is well supported. Other distros might still need patches.
Comment 49 Oleg Mikheev 2022-01-23 03:04:22 UTC
(In reply to Pierre Bossart from comment #43)
> (In reply to Oleg Mikheev from comment #38)
> I fixed it here:
> https://github.com/thesofproject/linux/pull/3195

Not in 5.16 :(
Comment 50 Oleg Mikheev 2022-01-23 03:16:41 UTC
also after upgrading alsa-lib from 1.2.4 to 1.2.5 I get Dummy Output instead of Tiger Lake-LP Smart Sound Technology Audio Controller Stereo
Comment 51 Oleg Mikheev 2022-01-23 03:45:23 UTC
(In reply to Pierre Bossart from comment #46)
> Usually I try a manual test without PulseAudio to check that the UCM
> settings are correct, e.g. (off the top of my head, check actual settings
> for card name and endpoint name)
> 
> alsaucm -c sof-soundwire set _verb HiFi set _enadev Speaker
> speaker-test -Dhw:0,2 -c2 -r48000
> alsaucm -c sof-soundwire set _verb HiFi set _enadev Headphone
> speaker-test -Dhw:0,0 -c2 -r48000

This does generate noise properly.
I guess it's Pulse issue then?
Comment 52 Oleg Mikheev 2022-01-23 05:14:49 UTC
(   2.463|   0.000) D: [pulseaudio] alsa-util.c: Trying _ucm0006.hw:sofsoundwire,3 with SND_PCM_NO_AUTO_FORMAT ...
(   2.463|   0.000) D: [pulseaudio] alsa-util.c: Managed to open _ucm0006.hw:sofsoundwire,3
(   2.463|   0.000) D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_channels(2) failed: Invalid argument
(   2.463|   0.000) D: [pulseaudio] alsa-util.c: Trying _ucm0006.hw:sofsoundwire,3 without SND_PCM_NO_AUTO_FORMAT ...
(   2.463|   0.000) D: [pulseaudio] alsa-util.c: Managed to open _ucm0006.hw:sofsoundwire,3
(   2.463|   0.000) D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_channels(2) failed: Invalid argument
(   2.463|   0.000) D: [pulseaudio] alsa-util.c: Trying plug:SLAVE='_ucm0006.hw:sofsoundwire,3' with SND_PCM_NO_AUTO_FORMAT ...
(   2.463|   0.000) I: [pulseaudio] pcm.c: Unknown PCM _ucm0006.hw:sofsoundwire,3
(   2.464|   0.000) I: [pulseaudio] alsa-util.c: Error opening PCM device plug:SLAVE='_ucm0006.hw:sofsoundwire,3': No such file or directory
(   2.673|   0.209) D: [pulseaudio] alsa-mixer.c: Profile set 0x55ce07761310, auto_profiles=no, probed=yes, n_mappings=0, n_profiles=0, n_decibel_fixes=0
(   2.673|   0.000) E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
(   2.674|   0.000) E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_1f.3-platform-sof_sdw" card_name="alsa_card.pci-0000_00_1f.3-platform-sof_sdw" 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.
(   2.674|   0.000) I: [pulseaudio] module-udev-detect.c: Card /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card0 (alsa_card.pci-0000_00_1f.3-platform-sof_sdw) failed to load module.
(   2.674|   0.000) D: [pulseaudio] module-udev-detect.c: /dev/snd/controlC0 is accessible: yes
(   2.675|   0.000) D: [pulseaudio] module-udev-detect.c: /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card0 is busy: no
(   2.675|   0.000) W: [pulseaudio] module-udev-detect.c: Tried to configure /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card0 (alsa_card.pci-0000_00_1f.3-platform-sof_sdw) more often than 5 times in 10s
Comment 53 Pierre Bossart 2022-01-24 23:33:57 UTC
(In reply to Oleg Mikheev from comment #49)
> (In reply to Pierre Bossart from comment #43)
> > (In reply to Oleg Mikheev from comment #38)
> > I fixed it here:
> > https://github.com/thesofproject/linux/pull/3195
> 
> Not in 5.16 :(

jack detection was added in linux stable today, 

[PATCH 5.16 0444/1039] ASoC: Intel: sof_sdw: fix jack detection on HP Spectre x360 convertible
Comment 54 Oleg Mikheev 2022-01-25 04:31:30 UTC
(In reply to Oleg Mikheev from comment #50)
> also after upgrading alsa-lib from 1.2.4 to 1.2.5 I get Dummy Output instead
> of Tiger Lake-LP Smart Sound Technology Audio Controller Stereo

this got resolved by upgrading sof-bin to 1.9.1
Comment 55 Marian Klein 2023-04-23 16:36:02 UTC
So I reported the problem 2 years ago and the laptop worked well for me since then until the laptop broke 2 weeks ago and I had to send it for repair. It came back with ´backslash and pipe´ key and keyboard not working in linux and windows (I tested it is now a right ctrl and I use remap in windows and another UK layout in KDE as workaroudn) and built-in audio not working on linux only (it works in windows).
I can only use bluetooth samsung earbuds with laptop.
I believed in repair shop they updated bios and did something with board. The original kernel which worked for audio does not work when it came back. I moved to kubuntu 13.04 due to be released next week and stock kernel 6.2 does not work. 
I can see 3 options in audio volume (KDE) and I can see 
For playback
Tiger Lake-LP Smart Sound Technology Audio Controller Pro 
                                                      Pro 2
                                                      Pro 3
And for microphone I have two
Tiger Lake-LP Smart Sound Technology Audio Controller Pro 6
Tiger Lake-LP Smart Sound Technology Audio Controller Pro 7

and  I can see moving the volume indicator when I play something on youtube, but I cannot hear anything. I can see moving volume indicator for microphone when I talk.


I tried to redo instructions in comment 28: 

git clone https://github.com/thesofproject/linux.git  
and I got kernel 
marian@HPSpectre:~$ uname -a
Linux HPSpectre 6.3.0-rc3+ #3 SMP PREEMPT_DYNAMIC Sun Apr 23 16:01:00 BST 2023 x86_64 x86_64 x86_64 GNU/Linux

I still get no sound.
Jaroslav or Pierre, can you help , please?
Comment 56 Marian Klein 2023-04-23 16:38:43 UTC
Created attachment 304178 [details]
Alsa info for kernel 6.3.0-rc3+ from https://github.com/thesofproject/linux.git
Comment 57 Marian Klein 2023-04-23 17:01:29 UTC
Created attachment 304179 [details]
KDE audio volume seems to show something , I can hear nothing though
Comment 58 Marian Klein 2023-04-23 17:05:50 UTC
I also got topology file from
https://github.com/thesofproject/linux/files/5912926/sof-tgl-rt711-rt1308-2ch.tplg.gz
I unpacked it and copied to /lib/firmware/intel/sof-tplg/ overwriting a previous file there.
It is still no effect. 
Can you advise how to get a new topology file, please? Also how to diagnose situation, please? Shall I look into windows how it is configured, please?
Comment 59 Marian Klein 2023-04-23 17:36:44 UTC
Also version of firmware:

marian@HPSpectre:/lib/firmware/intel/sof-tplg$ apt show firmware-sof-signed
Package: firmware-sof-signed
Version: 2.2.4-1
Priority: optional
Section: kernel
Source: firmware-sof
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Mark Pearson <mpearson-lenovo@squebb.ca>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 18.0 MB
Homepage: https://github.com/thesofproject/sof-bin

I am looking into 
https://github.com/thesofproject/linux/issues/2985
but cannot see what should I do
Comment 60 Marian Klein 2023-04-23 17:41:45 UTC
https://github.com/thesofproject/linux/issues/3300
Comment 61 Marian Klein 2023-04-23 22:41:23 UTC
When I disable my bluetooth ear buds. then I record something
arecord  -f cd > my.wav
then I enable my bluetooth ear buds and set it in audio speaker then
aplay my.wav
I can hear the recording.
I can conclude the laptop built-in microphone with alsa works.
Comment 62 Marian Klein 2023-04-24 00:00:43 UTC
when  I kill /usr/bin/pipewire-pulse
and run
marian@HPSpectre:/usr/bin$ pulseaudio 
W: [pulseaudio] pid.c: Stale PID file, overwriting.
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.
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.
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.
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.
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.
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.
W: [pulseaudio] module-udev-detect.c: Tried to configure /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0 (alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic) more often than 5 times in 10s
Comment 63 Marian Klein 2023-04-24 01:31:03 UTC
Created attachment 304180 [details]
missing some fields in bios settings when using HP BCU

when using the tools from https://ftp.ext.hp.com/pub/caps-softpaq/cmit/HP_BCU.html
and then
BiosConfigUtility64.exe /get:"mybios.txt"
I get the file attached 

Mote empty fields for
Build ID,Serial Number,Product Name,System Board CT Number

Can the missing bios field make the kernel (SOF) 
to pick the wrong topology file that cause not to hear anything?

Unfortunately I don't know the settings before my laptop was in repair.
Comment 64 Pierre Bossart 2023-04-24 15:28:05 UTC
From the alsa-info log, I can see that the machine driver selection goes sideways. The auto detection fails to find a SoundWire board, so I am not sure what would work.

Clearly the BIOS was changed since there's nothing that looks like the original DMI that was used to configure the SoundWire machine driver for jack detection.

Please re-open a new SOF issue, this will be easier to track for us. Thanks!
Comment 65 Marian Klein 2023-04-24 21:47:54 UTC
I already made an entry at your home SOF bug tracker.
https://github.com/thesofproject/linux/issues/4323
It is easier to add attachments here.

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