You are not logged in.

#1 2020-10-18 09:18:35

Andr0med4
Member
From: Germany
Registered: 2015-11-02
Posts: 5

Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

I have just done a fresh install on a Huawei Matebook 14 AMD 2020 with the following configuration:

  • Kernel: 5.8.14-arch1-1

  • CPU: AMD Ryzen 7 4800H

  • GPU:Integrated RX Vega 7

The laptop is running fine using Windows including all audio input/outputs. However, when I plug in any headphone into the combo jack under Linux, I hear significant coil whine-like static while the microphone on the headset is not detected at all. I tried various combinations of

options snd_hda_intel model=[MODEL]

including "auto", "headset-mic" and "dell-headset-multi" as well as any options mentioning the ALC256 codec as was suggested by the wiki and here on this forum. However, none of them showed any improvement. I noticed this possible related thread on a Huawei Matebook D 2020, AMD Ryzen 5 3500U which is another CPU generation but the owner did not report any static and the thread got no updates. I tried on linux-mainline-5.9-1 and noticed that the "acp" listings for card 2 are gone, but with the same results regarding static and headphone mic detection.

$ arecord -l                        
**** List of CAPTURE Hardware Devices ****
card 1: Generic_1 [HD-Audio Generic], device 0: ALC256 Analog [ALC256 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: acp [acp], device 0: DMIC capture dmic-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
$ aplay -l  
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC256 Analog [ALC256 Analog]

  Subdevices: 1/1
  Subdevice #0: subdevice #0
$ pacmd list-cards
3 card(s) available.
    index: 0
        name: <alsa_card.pci-0000_04_00.1>
        driver: <module-alsa-card.c>
        owner module: 6
        properties:
                alsa.card = "0"
                alsa.card_name = "HD-Audio Generic"
                alsa.long_card_name = "HD-Audio Generic at 0xd03c8000 irq 73"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:04:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:04:00.1/sound/card0"
                device.bus = "pci"
                device.vendor.id = "1002"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
                device.product.id = "1637"
                device.string = "0"
                device.description = "HD-Audio Generic"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: unknown)
                off: Off (priority 0, available: unknown)
        active profile: <output:hdmi-stereo>
        sinks:
                alsa_output.pci-0000_04_00.1.hdmi-stereo/#0: HD-Audio Generic Digital Stereo (HDMI)
        sources:
                alsa_output.pci-0000_04_00.1.hdmi-stereo.monitor/#0: Monitor of HD-Audio Generic Digital Stereo (HDMI)
        ports:
                hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "video-display"
                                device.product.name = "DELL U2721DE"
    index: 1
        name: <alsa_card.pci-0000_04_00.5-platform-acp_pdm_mach.0>
        driver: <module-alsa-card.c>
        owner module: 7
        properties:
                alsa.card = "2"
                alsa.card_name = "acp"
                alsa.long_card_name = "HUAWEI-KLVL_WXX9-M1040-KLVL_WXX9_PCB"
                alsa.driver_name = "snd_acp3x_rn"
                device.bus_path = "pci-0000:04:00.5-platform-acp_pdm_mach.0"
                sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:04:00.5/acp_pdm_mach.0/sound/card2"
                device.bus = "pci"
                device.vendor.id = "1022"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
                device.product.id = "15e2"
                device.product.name = "Raven/Raven2/FireFlight/Renoir Audio Processor"
                device.string = "2"
                device.description = "Raven/Raven2/FireFlight/Renoir Audio Processor"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                input:stereo-fallback: Stereo Input (priority 51, available: unknown)
                input:multichannel-input: Multichannel Input (priority 1, available: unknown)
                off: Off (priority 0, available: unknown)
        active profile: <input:stereo-fallback>
        sources:
                alsa_input.pci-0000_04_00.5-platform-acp_pdm_mach.0.stereo-fallback/#1: Raven/Raven2/FireFlight/Renoir Audio Processor Stereo
        ports:
                analog-input: Analog Input (priority 10000, latency offset 0 usec, available: unknown)
                        properties:

                multichannel-input: Multichannel Input (priority 0, latency offset 0 usec, available: unknown)
                        properties:

    index: 2
        name: <alsa_card.pci-0000_04_00.6>
        driver: <module-alsa-card.c>
        owner module: 8
        properties:
                alsa.card = "1"
                alsa.card_name = "HD-Audio Generic"
                alsa.long_card_name = "HD-Audio Generic at 0xd03c0000 irq 74"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:04:00.6"
                sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:04:00.6/sound/card1"
                device.bus = "pci"
                device.vendor.id = "1022"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
                device.product.id = "15e3"
                device.product.name = "Family 17h (Models 10h-1fh) HD Audio Controller"
                device.string = "1"
                device.description = "Family 17h (Models 10h-1fh) HD Audio Controller"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                input:analog-stereo: Analog Stereo Input (priority 65, available: unknown)
                output:analog-stereo: Analog Stereo Output (priority 6500, available: unknown)
                output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6565, available: unknown)
                off: Off (priority 0, available: unknown)
        active profile: <output:analog-stereo+input:analog-stereo>
        sinks:
                alsa_output.pci-0000_04_00.6.analog-stereo/#1: Family 17h (Models 10h-1fh) HD Audio Controller Analog Stereo
        sources:
                alsa_output.pci-0000_04_00.6.analog-stereo.monitor/#2: Monitor of Family 17h (Models 10h-1fh) HD Audio Controller Analog Stereo
                alsa_input.pci-0000_04_00.6.analog-stereo/#3: Family 17h (Models 10h-1fh) HD Audio Controller Analog Stereo
        ports:
                analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-speakers"
                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-headphones"
$ pacmd list-sources
4 source(s) available.
    index: 0
        name: <alsa_output.pci-0000_04_00.1.hdmi-stereo.monitor>
        driver: <module-alsa-card.c>
        flags: DECIBEL_VOLUME 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 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        fixed latency: 100.14 ms
        monitor_of: 0
        card: 0 <alsa_card.pci-0000_04_00.1>
        module: 6
        properties:
                device.description = "Monitor of HD-Audio Generic Digital Stereo (HDMI)"
                device.class = "monitor"
                alsa.card = "0"
                alsa.card_name = "HD-Audio Generic"
                alsa.long_card_name = "HD-Audio Generic at 0xd03c8000 irq 73"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:04:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:04:00.1/sound/card0"
                device.bus = "pci"
                device.vendor.id = "1002"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
                device.product.id = "1637"
                device.string = "0"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
    index: 1
        name: <alsa_input.pci-0000_04_00.5-platform-acp_pdm_mach.0.stereo-fallback>
        driver: <module-alsa-card.c>
        flags: HARDWARE DECIBEL_VOLUME LATENCY 
        state: SUSPENDED
        suspend cause: IDLE
        priority: 9030
        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: s32le 2ch 48000Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        fixed latency: 85.33 ms
        card: 1 <alsa_card.pci-0000_04_00.5-platform-acp_pdm_mach.0>
        module: 7
        properties:
                alsa.resolution_bits = "32"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = ""
                alsa.id = "DMIC capture dmic-hifi-0"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "2"
                alsa.card_name = "acp"
                alsa.long_card_name = "HUAWEI-KLVL_WXX9-M1040-KLVL_WXX9_PCB"
                alsa.driver_name = "snd_acp3x_rn"
                device.bus_path = "pci-0000:04:00.5-platform-acp_pdm_mach.0"
                sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:04:00.5/acp_pdm_mach.0/sound/card2"
                device.bus = "pci"
                device.vendor.id = "1022"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
                device.product.id = "15e2"
                device.product.name = "Raven/Raven2/FireFlight/Renoir Audio Processor"
                device.string = "hw:2"
                device.buffering.buffer_size = "32768"
                device.buffering.fragment_size = "8192"
                device.access_mode = "mmap"
                device.profile.name = "stereo-fallback"
                device.profile.description = "Stereo"
                device.description = "Raven/Raven2/FireFlight/Renoir Audio Processor Stereo"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-input: Analog Input (priority 10000, latency offset 0 usec, available: unknown)
                        properties:

        active port: <analog-input>
    index: 2
        name: <alsa_output.pci-0000_04_00.6.analog-stereo.monitor>
        driver: <module-alsa-card.c>
        flags: DECIBEL_VOLUME 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 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        fixed latency: 100.14 ms
        monitor_of: 1
        card: 2 <alsa_card.pci-0000_04_00.6>
        module: 8
        properties:
                device.description = "Monitor of Family 17h (Models 10h-1fh) HD Audio Controller Analog Stereo"
                device.class = "monitor"
                alsa.card = "1"
                alsa.card_name = "HD-Audio Generic"
                alsa.long_card_name = "HD-Audio Generic at 0xd03c0000 irq 74"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:04:00.6"
                sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:04:00.6/sound/card1"
                device.bus = "pci"
                device.vendor.id = "1022"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
                device.product.id = "15e3"
                device.product.name = "Family 17h (Models 10h-1fh) HD Audio Controller"
                device.string = "1"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
  * index: 3
        name: <alsa_input.pci-0000_04_00.6.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
        state: SUSPENDED
        suspend cause: IDLE
        priority: 9039
        volume: front-left: 10387 /  16% / -48.00 dB,   front-right: 10387 /  16% / -48.00 dB
                balance 0.00
        base volume: 6554 /  10% / -60.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max rewind: 0 KiB
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        fixed latency: 100.14 ms
        card: 2 <alsa_card.pci-0000_04_00.6>
        module: 8
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC256 Analog"
                alsa.id = "ALC256 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "1"
                alsa.card_name = "HD-Audio Generic"
                alsa.long_card_name = "HD-Audio Generic at 0xd03c0000 irq 74"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:04:00.6"
                sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:04:00.6/sound/card1"
                device.bus = "pci"
                device.vendor.id = "1022"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
                device.product.id = "15e3"
                device.product.name = "Family 17h (Models 10h-1fh) HD Audio Controller"
                device.string = "front:1"
                device.buffering.buffer_size = "17664"
                device.buffering.fragment_size = "2944"
                device.access_mode = "mmap"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Family 17h (Models 10h-1fh) HD Audio Controller Analog Stereo"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-input-microphone"
        active port: <analog-input-mic>
$ pacmd list-source-outputs
0 source output(s) available.
$ lsmod | grep snd
snd_soc_dmic           16384  1
snd_acp3x_rn           16384  1
snd_acp3x_pdm_dma      16384  1
snd_soc_core          323584  3 snd_acp3x_rn,snd_soc_dmic,snd_acp3x_pdm_dma
snd_compress           32768  1 snd_soc_core
ac97_bus               16384  1 snd_soc_core
snd_hda_codec_realtek   143360  1
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_hda_codec_generic    98304  1 snd_hda_codec_realtek
ledtrig_audio          16384  3 snd_hda_codec_generic,huawei_wmi,snd_hda_codec_realtek
snd_hda_codec_hdmi     73728  1
snd_hda_intel          57344  5
snd_intel_dspcfg       24576  1 snd_hda_intel
snd_hda_codec         167936  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core          106496  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               147456  8 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_compress,snd_soc_core,snd_hda_core,snd_acp3x_pdm_dma,snd_pcm_dmaengine
snd_timer              45056  1 snd_pcm
snd_rn_pci_acp3x       20480  0
snd                   114688  22 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm
snd_pci_acp3x          20480  0
soundcore              16384  1 snd

I would appreciate any help on this topic. Thank you!

Offline

#2 2020-10-18 10:53:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,667

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

With which adjustments regarding modules was the above output produced?

Can you post

amixer -c1

Offline

#3 2020-10-18 11:12:12

Andr0med4
Member
From: Germany
Registered: 2015-11-02
Posts: 5

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

Thank you for the swift reply. The above was with

options snd-hda-intel model=dell-headset-multi

set in /etc/modprobe.d/alsa.conf as the only adjustment regarding modules. I can post again without the line if that helps. See below for the output of amixer -c1.

Headphones unplugged:

$ amixer -c1
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 75 [86%] [-9.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 39 [62%] [12.00dB] [on]
  Front Right: Capture 39 [62%] [12.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'

Headphones plugged in:

$ amixer -c1                   
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 64 [74%] [-17.25dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 39 [62%] [12.00dB] [on]
  Front Right: Capture 39 [62%] [12.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'

Last edited by Andr0med4 (2020-10-18 11:12:42)

Offline

#4 2020-11-14 14:25:14

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

Got a brand new Matebook AMD 2020 (the small one, with a AMD Ryzen 5 4600H) which has the same issue.

I've still kept my Windows partition until this issue is fixed or at least has a workaround.

On my Windows partition, I've dug into the registry and found that maybe the pins are wrongly announced by the BIOS.

Based on https://www.reaper-x.com/2012/02/13/how … cks-ports/

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}\0001\Settings\Drv8981_DevType_0256_SS1e833e33]
"Pin12"=hex:01,00,00,00
"Pin13"=hex:01,00,00,00
"Pin21"=hex:22,00,00,00
"Pin19"=hex:30,00,00,00

With the following meaning for the values:

"00 00 00 00" = Line-in
"01 00 00 00" = Mic-in
"02 00 00 00" = Headphones
“03 00 00 00″ = Front speakers 2nd Output
"04 00 00 00" = Front speakers
"05 00 00 00" = Rear speakers
"06 00 00 00" = Center / sub-woofer
"07 00 00 00" = Side speakers

Whereas on Linux :

cat /sys/class/sound/hwC1D0/init_pin_configs 
0x12 0x90a60130 => Internal Mic
0x13 0x40000000 => Unused
0x14 0x90170110 => Internal Speaker
0x18 0x411111f0 => Unused
0x19 0x411111f0 => Unused
0x1a 0x411111f0 => Unused
0x1b 0x411111f0 => Unused
0x1d 0x40759a05 => Unused
0x1e 0x411111f0 => Unused
0x21 0x04211020 => Jack Headphone

So I guess pin 13 could be connected to the jack mic.


I'm playing around with several model values for hda-snd-intel module and try tweaking /lib/firmware/hda-jack-retask.fw to patch the pin routing but no success so far.

If someone knows how to drill this down I'd appreciate.

Offline

#5 2020-12-16 21:47:47

a1d4r
Member
Registered: 2020-12-16
Posts: 6

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

I have exactly the same issue on my Huawei Matebook 13 AMD Ryzen 5 3500u

Offline

#6 2020-12-16 21:54:10

Andr0med4
Member
From: Germany
Registered: 2015-11-02
Posts: 5

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

This issue seems to affect all Huawei AMD laptops, this bug report on the Huawei WMI driver is for the Matebook D15 AMD 2020. So far it seems that no one has found a solution. I tried with hda-jack-retask on my Matebook 14 AMD 2020 as well but no luck so far. Regarding the issue reported upstream, I am not sure if the WMI driver is the correct place to report though as it affects ALSA rather than WMI.

Offline

#7 2020-12-16 22:37:07

a1d4r
Member
Registered: 2020-12-16
Posts: 6

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

That's very sad. I tried to use the internal mic but the sound is unacceptable. It catches too much noise while using the laptop (fan noise, touchpad pressing, keyboard typing). Also the static noise in headphones is too annoying, so I have to take off the headphones whenever I'm not listening to music.

Offline

#8 2020-12-17 07:28:35

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

I agree this looks more alsa-related than huawei-wmi-related.

I've seen some Huawei-specific code in

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/sound/pci/hda/patch_realtek.c

Nothing worked for now.

For now I cheat by using an external USB to jack adapter (https://aliexpress.com/item/1005001350091638.html).

Offline

#9 2020-12-20 17:00:22

a1d4r
Member
Registered: 2020-12-16
Posts: 6

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

arno wrote:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}\0001\Settings\Drv8981_DevType_0256_SS1e833e33]
"Pin12"=hex:01,00,00,00
"Pin13"=hex:01,00,00,00
"Pin21"=hex:22,00,00,00
"Pin19"=hex:30,00,00,00

On Huawei Matebook 13 I have:

"Pin12"=hex:01,00,00,00
"Pin21"=hex:22,00,00,00
"Pin19"=hex:30,00,00,00

and the headset mic is working fine (on Windows 10). So, I guess it might be a wrong pin for mic.

Offline

#10 2021-01-15 19:29:16

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

Same here: no headset mic working

Offline

#11 2021-03-21 15:41:38

ksb
Member
From: Germany
Registered: 2021-03-21
Posts: 3

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

arno wrote:

So I guess pin 13 could be connected to the jack mic.

I guess you are right!
I recently bought a Matebook 14 2020 (4600H) a spent the last few hours trying to fix this issue.

At least under Ubuntu (20.04, I haven't tried it yet with Arch) I managed to get the headphone-mic working on pin 13.
I've tried a few diffenent settings in HDAJackRetask (alsa-tools-gui), this one finally worked:

Connectivity:       Jack
Location:           Right (I guess same as for headphones at pin 21)
Device:             Headphone
Jack:               3.5mm
Color:              Black (just chose same as pin 21)
Jack detection:     Present
Channel group:      15
Channel (in group): Front

I hope that this might help some of you and thank you arno for the pin-definitions!

Offline

#12 2021-03-21 16:13:13

adiletelf
Member
Registered: 2020-12-27
Posts: 3

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

Similar problem on Matebook 13 AMD 2020 (3500U)

My headset is recognized and works but there is always some static noise when playing music and a few seconds afterwards. I do not know why my headset is works but if someone has questions or wants me to display my PC settings, please be free to write me a commands.

Offline

#13 2021-03-21 17:13:34

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

@adiletelf: yes the headset does work, the headset-mic doesn't (at least, in my case).

@ksb: amazing, I've been playing again around, using your settings that seem to work under Ubuntu 20.04, but no luck so far.

From what you shared, I can't understand how it's supposed to ever work.

Could you share the whole bunch of configuration that actually works?
  - kernel version (can be helpful to have a look at potential patches that hav been included)
  - full content of /etc/modprobe.d/hda-jack-retask.conf
  - full content of cat /lib/firmware/hda-jack-retask.fw

Thanks.

Offline

#14 2021-03-21 17:35:27

ksb
Member
From: Germany
Registered: 2021-03-21
Posts: 3

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

Sure, @arno, here you go:

- im currently on 5.8.0-45-generic (plain Ubuntu 20.04.2 LTS).

- hda-jack-retask.conf:

# This file was added by the program 'hda-jack-retask'.
# If you want to revert the changes made by this program, you can simply erase this file and reboot your computer.
options snd-hda-intel patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw

- hda-jack-retask.fw

[codec]
0x10ec0256 0x1e83323c 0

[pincfg]
0x12 0x90a60130
0x13 0x042110f0
0x14 0x90170110
0x18 0x411111f0
0x19 0x01a1913c
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x40759a05
0x1e 0x411111f0
0x21 0x04211020

To be honest, I'm also not exactly sure what I did, but these settings seem to work somehow.
If I missed any information in my post above, here is a screenshot of my settings in HDAJackRetask.

I hope that this can help you figuring out whats the problem!

Last edited by ksb (2021-03-21 17:39:00)

Offline

#15 2021-03-22 07:50:00

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

I didn't succeed to make this configuration work. Too bad.

@ksb: if you cound also send the kernel log about snd_hda with `sudo dmesg | grep snd`, I'd appreciate very much.

Arnaud

Offline

#16 2021-03-23 12:14:54

ksb
Member
From: Germany
Registered: 2021-03-21
Posts: 3

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

That's sad, I hoped that this maybe would solve the issue

@arno: sudo dmesg | grep snd doesn't return anything. But here you have the output of grep "snd" /var/log/dmesg:

[    2.583246] kernel: snd_rn_pci_acp3x 0000:04:00.5: enabling device (0000 -> 0002)
[    2.583549] kernel: snd_rn_pci_acp3x: probe of 0000:04:00.5 failed with error -22
[    2.701848] kernel: snd_hda_intel 0000:04:00.1: enabling device (0000 -> 0002)
[    2.702040] kernel: snd_hda_intel 0000:04:00.1: Handle vga_switcheroo audio client
[    2.702048] kernel: snd_hda_intel 0000:04:00.1: Applying patch firmware 'hda-jack-retask.fw'
[    2.702195] kernel: snd_hda_intel 0000:04:00.6: enabling device (0000 -> 0002)
[    2.702391] kernel: snd_hda_intel 0000:04:00.6: Applying patch firmware 'hda-jack-retask.fw'
[    2.752200] kernel: snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC256: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[    2.752204] kernel: snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    2.752206] kernel: snd_hda_codec_realtek hdaudioC1D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    2.752208] kernel: snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0
[    2.752209] kernel: snd_hda_codec_realtek hdaudioC1D0:    inputs:
[    2.752211] kernel: snd_hda_codec_realtek hdaudioC1D0:      Headset Mic=0x19
[    2.752213] kernel: snd_hda_codec_realtek hdaudioC1D0:      Internal Mic=0x12
[    3.735079] kernel: snd_hda_intel 0000:04:00.1: bound 0000:04:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
[    3.953864] kernel: Modules linked in: amd64_edac_mod(-) fjes(-) nls_iso8859_1 cdc_ether usbnet joydev r8152 edac_mce_amd mii amdgpu snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_intel_dspcfg uvcvideo snd_hda_codec snd_hda_core kvm_amd snd_hwdep kvm snd_pcm crct10dif_pclmul videobuf2_vmalloc iommu_v2 gpu_sched videobuf2_memops rtw88_8822ce ttm snd_seq_midi ghash_clmulni_intel rtw88_8822c snd_seq_midi_event rtw88_pci videobuf2_v4l2 aesni_intel rtw88_core videobuf2_common snd_rawmidi drm_kms_helper crypto_simd videodev btusb cec btrtl cryptd glue_helper btbcm rc_core mc snd_seq btintel i2c_algo_bit mac80211 rapl snd_seq_device bluetooth snd_timer wmi_bmof huawei_wmi input_leds ledtrig_audio sparse_keymap efi_pstore serio_raw ecdh_generic cfg80211 hid_multitouch ecc fb_sys_fops syscopyarea sysfillrect sysimgblt snd ccp k10temp snd_rn_pci_acp3x snd_pci_acp3x libarc4 soundcore mac_hid sch_fq_codel parport_pc ppdev drm lp parport ip_tables x_tables autofs4 hid_generic

I also experimented a little bit more and recognized the following :

I was probably missleading you with pin 13. After seeing the kernel messages I've removed the overwrite from it so that only the "Not connected" overwrite on 0x1a remained. This seems to do it for me.
Interestingly (as you can also see in the dmesg-dump above) some Headphone-mic is detected on 0x19. And, although it is listed as unconnected, in HDAJackRetask at Pin 19 there is als an outgreyed mic visible.

But now it gets really weird: A friend of mine owns exactly the same notebook. Same hardware configuration, bought from the same supplier in the same week. Also running Ubuntu 20.04.2 with the same kernel version.
We didn't spent much time yet, but on his system we didn't managed to get the headphone-mic working with any of the above settings.

I'm pretty confused at this point, for me everything is working flawless.

Last edited by ksb (2021-03-23 13:56:20)

Offline

#17 2021-03-23 15:08:28

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

I'm pretty confused too!

Played again for a couple of hours, retasking 0x13, 0x19, 0x1a in lots of ways, nothing worked yet.

If anyone (else) got it right, let us know.

Offline

#18 2021-03-26 21:50:28

a1d4r
Member
Registered: 2020-12-16
Posts: 6

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

I managed to get rid of static noise from headphones (mic still doesn't work though). I put

options snd-hda-intel model=alc255-acer,dell-headset-multi

into

/etc/modprobe.d/alsa-base.conf

file. After reboot the noise disappeared and everything sounds clear in headphones.

My system info:
Huawei Matebook 13 with AMD Ryzen 5 3500U
Kernel: 5.4.105-1-MANJARO

Please let me know if it works on Arch Linux.

Offline

#19 2021-03-26 23:05:36

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

Actually it seems to work for me, even the headset mic!!
I simply put

options snd-hda-intel model=alc255-acer,dell-headset-multi

into a file named

/etc/modprobe.d/snd-hda-intel.conf

Offline

#20 2021-03-26 23:28:13

Andr0med4
Member
From: Germany
Registered: 2015-11-02
Posts: 5

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

a1d4r wrote:

I managed to get rid of static noise from headphones (mic still doesn't work though). I put

options snd-hda-intel model=alc255-acer,dell-headset-multi

into

/etc/modprobe.d/alsa-base.conf

Thank you so much, this options indeed allows usage of both the headset output and the headset mic. Unfortunately, I still have (very faint) background noise for a few seconds after playing audio until power saving kicks in or I mute the output. Might be the SNR from the chipset itself? It's hardly noticeable on my cheap in-ears but quite disturbing when using my Bose headphones in wired mode.

Also, using pipewire 1:0.3.24-1, I actually get two additional input devices when plugging in headsets, named "Microphone" and "Headset Microphone". While the latter one works as expected, the former one seems to disable the audio chip as both input/output as well as the background noise are gone when switching to it. Anyone experiencing a similar behavior?

Offline

#21 2021-03-27 06:36:31

a1d4r
Member
Registered: 2020-12-16
Posts: 6

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

arno wrote:

Actually it seems to work for me, even the headset mic!!
I simply put

options snd-hda-intel model=alc255-acer,dell-headset-multi

into a file named

/etc/modprobe.d/snd-hda-intel.conf

Is your headset mic working as expected? If I select pin 0x19 as mic, there there will be 2 microphones available (internal and headset). But when I switch from internal mic to headset, all the sound is gone, and mic is very noisy with my voice very distorted.

Last edited by a1d4r (2021-03-27 06:36:59)

Offline

#22 2021-03-27 11:03:16

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

That's true, there are now 3 mics (Internal Mic, headset Mic and Simply Mic). The third one does absolutly nothing, as @And0mer4 mentionned. But switching from internal to headset mics seems to work ok.

Under Gnome, I get a popup to specify the kind of device that got plugged in (headset, headset + mic, mic).
If I choose headset only, I get background little noise (when I move the mouse, when I Type some key).
If I choose headet + mic, I can't hear any background noise, but maybe it's un-noticable due to the headset itself or the volume I set.

However the headset mic recording seems to have some background noise, whose level and frequency depend on the fact that I touch the laptop or not. This should be SNR and / or power grounding related.

Offline

#23 2021-03-27 16:55:23

a1d4r
Member
Registered: 2020-12-16
Posts: 6

Re: Huawei Matebook 14 AMD 2020 - Static and headset mic not recognized

arno wrote:

That's true, there are now 3 mics (Internal Mic, headset Mic and Simply Mic). The third one does absolutly nothing, as @And0mer4 mentionned. But switching from internal to headset mics seems to work ok.

Under Gnome, I get a popup to specify the kind of device that got plugged in (headset, headset + mic, mic).
If I choose headset only, I get background little noise (when I move the mouse, when I Type some key).
If I choose headet + mic, I can't hear any background noise, but maybe it's un-noticable due to the headset itself or the volume I set.

However the headset mic recording seems to have some background noise, whose level and frequency depend on the fact that I touch the laptop or not. This should be SNR and / or power grounding related.

Oh, indeed now there is a headset mic available. My voice sounds clear but there is also some noise recorded by mic. By the way, that noise sounds the same as it was before in audio output (headphones).

Here is the output of sudo dmesg | grep snd :

[    1.681747] snd_pci_acp3x 0000:03:00.5: Invalid ACP audio mode : 1
[    1.864131] snd_hda_intel 0000:03:00.1: Handle vga_switcheroo audio client
[    2.020252] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC256: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[    2.020255] snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    2.020257] snd_hda_codec_realtek hdaudioC1D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    2.020258] snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0
[    2.020259] snd_hda_codec_realtek hdaudioC1D0:    inputs:
[    2.020261] snd_hda_codec_realtek hdaudioC1D0:      Headset Mic=0x19
[    2.020262] snd_hda_codec_realtek hdaudioC1D0:      Headphone Mic=0x1a
[    2.020263] snd_hda_codec_realtek hdaudioC1D0:      Internal Mic=0x12
[    2.453792] snd_hda_intel 0000:03:00.1: bound 0000:03:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])

Last edited by a1d4r (2021-03-27 16:57:48)

Offline

Board footer

Powered by FluxBB