Skip to content

HP x360 spectre 13-aw2619nz No sound in internal speaker #3300

Closed

Description

@MyrkoF

Hello,
I would like to debug a sound problem in the computer.

Hardware:
HP x360 spectre 13-aw2619nz (intel 11th generation tiger Lake)

Software:
Ubuntu studio
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 21.10"
NAME="Ubuntu"
VERSION_ID="21.10"
VERSION="21.10 (Impish Indri)"
VERSION_CODENAME=impish
Kernel 5.13.0-23-lowlatency

My ALSA config: http://alsa-project.org/db/?f=e5348dd573e2feb8c6263ef9c5013ebdd7e8caeb

Problem with audio output:
all the audio peripheral work well (jack, bt audio..) but the internal speaker is unavailable).

I'm new on linux platform, I don't know what i need to do.
I have see some post about this :
https://bugzilla.kernel.org/show_bug.cgi?id=212465
#3195
solution appear as a pin configuration .
Can you help me with a procedure for dumies how can i fix this ?
no i need a 5.15 kernel?, a 1.2.5 alsa driver or just change in a config file?

I don't know how to build a kernel or how to build a package , I have tried some mods but at the end i reinstall completely my Os because i broke it with different test.......

Thanks

Activity

  1. plbossart commented on Nov 29, 2021

    @plbossart
    Member

    I checked that kernel 5.13 does contain the support for HP x360 devices, but there's a mistake: the following diff should be applied

    diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
    index ecd3f90f4bbe..c684441618e8 100644
    --- a/sound/soc/intel/boards/sof_sdw.c
    +++ b/sound/soc/intel/boards/sof_sdw.c
    @@ -173,7 +173,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
                    },
                    .driver_data = (void *)(SOF_SDW_TGL_HDMI |
                                            SOF_SDW_PCH_DMIC |
    -                                       SOF_RT711_JD_SRC_JD2),
    +                                       SOF_RT711_JD_SRC_JD1),
            },
            /* TigerLake-SDCA devices */
            {

    from the code, I see this:

    SOF_RT711_JD_SRC_JD1 = 1, -> BIT(0)
    #define SOF_SDW_TGL_HDMI		BIT(3)
    #define SOF_SDW_PCH_DMIC		BIT(4)
    

    In binary that's 11001 or 0x19.

    If you are not familiar with compilation of the kernel, you should be able to set the following quirk in /etc/modprobe.d/alsa-base.conf. You should also see a log in the 'dmesg' log, you should see something like:
    quirk realtek,jack-detect-source 1

    options snd_soc_sof_sdw quirk=0x19
    options snd_soc_sof_sdw dyndbg=+p
    

    (edit: use 0x19, I confused existing solution and desired fix)

  2. MyrkoF commented on Nov 29, 2021

    @MyrkoF
    Author

    Thanks: I have edit as root the alsa.base.conf, and reboot the laptop.
    Now the speaker is by default active on alsamixer but still no still no sond come out.

    here is my file modified:

    # autoloader aliases
    install sound-slot-0 /sbin/modprobe snd-card-0
    install sound-slot-1 /sbin/modprobe snd-card-1
    install sound-slot-2 /sbin/modprobe snd-card-2
    install sound-slot-3 /sbin/modprobe snd-card-3
    install sound-slot-4 /sbin/modprobe snd-card-4
    install sound-slot-5 /sbin/modprobe snd-card-5
    install sound-slot-6 /sbin/modprobe snd-card-6
    install sound-slot-7 /sbin/modprobe snd-card-7
    
    # Cause optional modules to be loaded above generic modules
    install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
    #
    # Workaround at bug #499695 (reverted in Ubuntu see LP #319505)
    install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
    install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
    install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }
    #
    install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
    # Cause optional modules to be loaded above sound card driver modules
    install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
    install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }
    
    # Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
    install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }
    # Prevent abnormal drivers from grabbing index 0
    options bt87x index=-2
    options cx88_alsa index=-2
    options saa7134-alsa index=-2
    options snd-atiixp-modem index=-2
    options snd-intel8x0m index=-2
    options snd-via82xx-modem index=-2
    options snd-usb-audio index=-2
    options snd-usb-caiaq index=-2
    options snd-usb-ua101 index=-2
    options snd-usb-us122l index=-2
    options snd-usb-usx2y index=-2
    # Ubuntu #62691, enable MPU for snd-cmipci
    options snd-cmipci mpu_port=0x330 fm_port=0x388
    # Keep snd-pcsp from being loaded as first soundcard
    options snd-pcsp index=-2
    # Keep snd-usb-audio from beeing loaded as first soundcard
    options snd-usb-audio index=-2
    #add on 29.11.21 by MF for jack detect (issue.github.3300)
    options snd_soc_sof_sdw quirk=0x19
    options snd_soc_sof_sdw dyndbg=+p
    
  3. plbossart commented on Nov 29, 2021

    @plbossart
    Member

    @MyrkoF can you open a terminal and type

    speaker-test -Dhw:0,2 -c2 -r48000
    

    also provide the updated results of 'alsa-info' and 'dmesg' log. Thanks!

  4. MyrkoF commented on Nov 29, 2021

    @MyrkoF
    Author

    the speakeer-test command work and send sound but nothing on the speaker.

    here is the alsa-info

    http://alsa-project.org/db/?f=76c6b4b40db8b5b36c64dabafb258828ef5c812b

  5. plbossart commented on Nov 29, 2021

    @plbossart
    Member

    likely missing mixers or bad UCM, can you try this with this file
    hp360x.state.txt

    alsactl --file ~/hp360x.state.txt restore
    
  6. plbossart commented on Nov 29, 2021

    @plbossart
    Member

    note that for 5.15+ the quirk format was changed, the following value is needed:

    options snd_soc_sof_sdw quirk=0x61
    
  7. added
    Communityend-user or distro-reported issues
    UCMRestriction of UCM configuration files
    on Nov 29, 2021
  8. MyrkoF commented on Nov 29, 2021

    @MyrkoF
    Author

    likely missing mixers or bad UCM, can you try this with this file hp360x.state.txt

    alsactl --file ~/hp360x.state.txt restore
    

    the destination file is not existing on /usr/share/alsa/ucm2/sof-soundwire/
    here is the command executed

    myrko@x360-studio:~/Bureau$ alsactl --file hp360x.state.txt restore
    alsa-lib utils.c:335:(uc_mgr_config_load) could not open configuration file /usr/share/alsa/ucm2//sof-soundwire/dmic.conf
    alsa-lib parser.c:95:(uc_mgr_config_load_file) error: failed to open file /usr/share/alsa/ucm2//sof-soundwire/dmic.conf : -2
    alsa-lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
    Found hardware: "sof-soundwire" "Intel Tigerlake HDMI" "HDA:80862812,80860101,00100000 cfg-spk:2 cfg-amp:1 mic:dmic cfg-mics:2 hs:rt711 spk:rt1308" "" ""
    Hardware is initialized using a generic method
    alsactl: set_control:1325: failed to obtain info for control #48 (No such file or directory)
    alsactl: set_control:1325: failed to obtain info for control #49 (No such file or directory)
    alsactl: set_control:1325: failed to obtain info for control #51 (No such file or directory)

    PS thanks to help me i really apreciate, (même si je comprend pas ce que je fais hehe)

  9. MyrkoF commented on Nov 29, 2021

    @MyrkoF
    Author

    PS alsa-lib utils.c:335:(uc_mgr_config_load) could not open configuration file /usr/share/alsa/ucm2//sof-soundwire/dmic.conf

    why the they is double // in ucm2//sof-sound ?

  10. plbossart commented on Nov 29, 2021

    @plbossart
    Member

    Can you try this command instead? if this fails you have a bad alsa-ucm-conf installed.

    alsaucm -c sof-soundwire set _verb HiFi set _enadev Speaker
    
  11. MyrkoF commented on Nov 29, 2021

    @MyrkoF
    Author

    sorry the file is present:

    myrko@x360-studio:/usr/share/alsa/ucm2/sof-soundwire$ ls
    Hdmi.conf rt1308-2.conf rt5682.conf rt711-sdca.conf sof-soundwire.conf
    HiFi.conf rt1316-1.conf rt700.conf rt715.conf
    rt1308-1.conf rt1316-2.conf rt711.conf rt715-sdca.conf

  12. MyrkoF commented on Nov 29, 2021

    @MyrkoF
    Author

    maybe the broblem come from the double // in the path ??

    myrko@x360-studio:/usr/share/alsa/ucm2/sof-soundwire$ alsaucm -c sof-soundwire set _verb HiFi set _enadev Speaker
    ALSA lib utils.c:335:(uc_mgr_config_load) could not open configuration file /usr/share/alsa/ucm2//sof-soundwire/dmic.conf
    ALSA lib parser.c:95:(uc_mgr_config_load_file) error: failed to open file /usr/share/alsa/ucm2//sof-soundwire/dmic.conf : -2
    ALSA lib main.c:1014:(snd_use_case_mgr_open) error: failed to import sof-soundwire use case configuration -2
    alsaucm: error failed to open sound card sof-soundwire: No such file or directory

    PS: this is the soft-soundwire.conf centent of the present file in the system:

    Syntax 3

    SectionUseCase."HiFi" {
    File "HiFi.conf"
    Comment "Play HiFi quality Music"
    }

    Define {
    SpeakerCodec1 ""
    SpeakerChannels1 "2"
    SpeakerAmps1 "0"
    HeadsetCodec1 ""
    MicCodec1 ""
    }

    DefineRegex {
    SpeakerCodec {
    Regex " spk:([a-z0-9]+(-sdca)?)"
    String "${CardComponents}"
    }
    SpeakerChannels {
    Regex " cfg-spk:([0-9]+)"
    String "${CardComponents}"
    }
    SpeakerAmps {
    Regex " cfg-amp:([0-9]+)"
    String "${CardComponents}"
    }
    HeadsetCodec {
    Regex " hs:([a-z0-9]+(-sdca)?)"
    String "${CardComponents}"
    }
    MicCodec {
    Regex " mic:([a-z0-9]+(-sdca)?)"
    String "${CardComponents}"
    }
    }

    If.hs_init {
    Condition {
    Type RegexMatch
    Regex "(rt5682|rt700|rt711(-sdca)?)"
    String "${var:HeadsetCodec1}"
    }
    True.Include.hs_init.File "/codecs/${var:HeadsetCodec1}/init.conf"
    }

    If.mic_init {
    Condition {
    Type RegexMatch
    Regex "(rt715(-sdca)?)"
    String "${var:MicCodec1}"
    }
    True.Include.mic_init.File "/codecs/${var:MicCodec1}/init.conf"

  13. MyrkoF commented on Nov 29, 2021

    @MyrkoF
    Author

    i can maybe remplace the file soft-soundwire.conf on my computer with this one :
    https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/sof-soundwire/sof-soundwire.conf ?

  14. plbossart commented on Nov 29, 2021

    @plbossart
    Member

    it's probably better to archive your /usr/share/alsa/ucm and ucm2, and replace it with the git master. You can get a zip file here: https://github.com/alsa-project/alsa-ucm-conf (green 'code' button, pull down and use 'Download Zip'

  15. MyrkoF commented on Nov 29, 2021

    @MyrkoF
    Author

    I have backuped the ucm and ucm2 folders and remplaced with the https://github.com/alsa-project/alsa-ucm-conf folders.
    I have rebooted the computer no change
    I have launch the previous command here: the output

    myrko@x360-studio:~/Bureau$ alsaucm -c sof-soundwire set _verb HiFi set _enadev Speaker
    ALSA lib parser.c:2137:(parse_toplevel_config) Incompatible syntax 4 in /usr/share/alsa/ucm2/ucm.conf
    ALSA lib main.c:1014:(snd_use_case_mgr_open) error: failed to import sof-soundwire use case configuration -22
    alsaucm: error failed to open sound card sof-soundwire: Invalid argument

    and

    myrko@x360-studio:~/Bureau$ sudo alsactl --file hp360x.state.txt restore
    [sudo] password for myrko:
    alsa-lib parser.c:2137:(parse_toplevel_config) Incompatible syntax 4 in /usr/share/alsa/ucm2/ucm.conf
    alsa-lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -22
    Found hardware: "sof-soundwire" "Intel Tigerlake HDMI" "HDA:80862812,80860101,00100000 cfg-spk:2 cfg-amp:1 mic:dmic cfg-mics:2 hs:rt711 spk:rt1308" "" ""
    Hardware is initialized using a generic method
    alsactl: set_control:1325: failed to obtain info for control #48 (No such file or directory)
    alsactl: set_control:1325: failed to obtain info for control #49 (No such file or directory)
    alsactl: set_control:1325: failed to obtain info for control #51 (No such file or directory)

    still no diference ( sound work with bt and 3.5 jack headset but nothing with the internal speaker

    (edit; just to say it is a fresh install of ubuntu studio with last updates, juste somes program addes (virtualbox, filezilla, mixx nqq, wine, nextcloud) i have done any changes on the config files . )

  16. plbossart commented on Nov 29, 2021

    @plbossart
    Member

    @MyrkoF Likely a problem with Ubuntu not updating their packages. I just tried on Fedora 34 and things work fine on the same type of devices (HP x360)

  17. MyrkoF commented on Nov 29, 2021

    @MyrkoF
    Author

    what kind of package do i need to upgrade?
    you suggest to swich on fedora distribution ?
    on ubuntu studio the only problems i have is ;
    the sound
    auto rotation of the screen in tablet mode
    latency on the keyboard at startup (solved with i8042 various parameters tested on kernel startup)
    I'm at 99% working with this config

    (edit; the think is the Dell XPS13 developper edition come with ubuntu 20 and all work out of the box, and the machine has the same architecture i7 11th gen, etc..)

  18. plbossart commented on Nov 29, 2021

    @plbossart
    Member

    I am not in a position to recommend a distribution, I need to be friends with everyone.

    you typically need an update of alsa-lib, alsa-utils and alsa-ucm-conf. The package names may vary.

    For Ubuntu the go-to contact is @jason77-wang.

  19. MyrkoF commented on Nov 30, 2021

    @MyrkoF
    Author

    @plbossart
    i have try the live CD of fedora 35 with plasma the sound come out of the box , (just to swich the headset to speaker in the mixer.

    So I have did many test:

    1. ./configure , make and make install the alsa-lib 1.2.5.1, alsa-plugins alsa-utils alsa-firmware found on the alsa project directories. Not sucess, error on the make process and after unable to lauche alsamixer.

    after sucess to install alsa-lib 1.2.5.1 without error I have backuped the alsa.conf, ucm.conf and sof-soundwire.conf from the fedora live cd and past into my ubuntu system
    still nothing work and unable to lauche alsamixer.

    I did a backup of my system before with timeshift ans revert my install with timeshift

    @jason77-wang

    Hello, if you see the feed of this issue 3300, can i ask you how to make the speaker work in a ubuntu studio ?

    thanks

  20. MyrkoF commented on Dec 13, 2021

    @MyrkoF
    Author

    @plbossart
    @jason77-wang

    Solved by workaround
    Hello, SO I decide to install Fedora 35 with plasma desktop, because i was unable to understand what to do on ubuntu to solve the problem. (i'm not able today to compile a kernek with the last alsa drivers for my computer..)
    For informations: everything work out of the box.
    on the last updates on day 10. dec. 2021 everything is ok with alsa 1.2.5.1-4.fc36

    !! do not make a full dnf upgrade because the new version of alsa 1.2.6.x create the same problem i had on ubuntu (speaker not available)

    so use sudo dnf upgrade --exclude=alsa*

  21. plbossart commented on Dec 17, 2021

    @plbossart
    Member

    I'll close since it's not an SOF bug but a dowstream issue with alsa/UCM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Communityend-user or distro-reported issuesUCMRestriction of UCM configuration files

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions