Bug 210359 - Sounds from notebook (Asus Zephyrus G14) speakers - volume always has a high level
Summary: Sounds from notebook (Asus Zephyrus G14) speakers - volume always has a high ...
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-25 09:24 UTC by Dmitry Mamchyts
Modified: 2020-12-08 09:41 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.9.8-050908-generic
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Fix patch #1 (2.52 KB, patch)
2020-11-27 13:54 UTC, Takashi Iwai
Details | Diff
Fix patch #2 (2.84 KB, patch)
2020-11-27 13:54 UTC, Takashi Iwai
Details | Diff

Description Dmitry Mamchyts 2020-11-25 09:24:53 UTC
I got an Asus Zephyrus G14 GA401IH-HE003 with AMD Ryzen 7 4800HS and a NVIDIA GeForce GTX 1650.
I am use 5.9.8-050908-generic kernel from (kernel.ubuntu.com/~kernel-ppa/mainline/v5.9.8/)

    dmamchyts@ga401ih:~$ cat /etc/os-release
    NAME="Ubuntu"
    VERSION="20.10 (Groovy Gorilla)"

I have some problem with notebook speakers.
When I use headphones via 3.5 jack - all works fine.
I can control sound level (from low to high).
But when I try to listen to any sounds from notebook speakers - volume always has a high level (I think it's a max level of notebook speakers sound).
I am using KDE, and I hear a sound
level of 5% the same as 100%.


  dmamchyts@ga401ih:/sys/class/hwmon/hwmon6$ aplay -l
  **** List of PLAYBACK Hardware Devices ****
  card 1: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
  card 2: Generic_1 [HD-Audio Generic], device 0: ALC289 Analog [ALC289 Analog]
    Subdevices: 1/1
    Subdevice #0: subdevice #0


alsa-info.sh http://alsa-project.org/db/?f=ac666b03be5c051041408a6bf81f2de46f167353
Comment 1 Jaroslav Kysela 2020-11-25 10:16:16 UTC
If you change the volume slider, can you see any changes in /proc/asound/card1/codec#0 file?

Also, try to change the volume in alsamixer or aplay (alsamixer -c 1).
Comment 2 Dmitry Mamchyts 2020-11-25 11:01:05 UTC
No any difference in /proc/asound/card1/codec#0 when I change volume slider. 


Output of /proc/asound/card1/codec#0 :

dmamchyts@ga401ih:~$ cat  /proc/asound/card1/codec#0 
Codec: ATI R6xx HDMI
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x1002aa01
Subsystem Id: 0x00aa0100
Revision Id: 0x100700
No Modem Function Group found
Default PCM:
    rates [0x70]: 32000 44100 48000
    bits [0x2]: 16
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D3 CLKSTOP EPSS
  Power: setting=D0, actual=D0, Clock-stop-OK
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x221: Stereo Digital Stripe
  Converter: stream=0, channel=0
  Digital: Enabled
  Digital category: 0x0
  IEC Coding Type: 0x0
Node 0x03 [Pin Complex] wcaps 0x400381: Stereo Digital
  Control: name="IEC958 Playback Con Mask", index=0, device=0
  Control: name="IEC958 Playback Pro Mask", index=0, device=0
  Control: name="IEC958 Playback Default", index=0, device=0
  Control: name="IEC958 Playback Switch", index=0, device=0
  Pincap 0x00000094: OUT Detect HDMI
  Pin Default 0x185600f0: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x02
Node 0x04 [Audio Output] wcaps 0x221: Stereo Digital Stripe
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
Node 0x05 [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x00000094: OUT Detect HDMI
  Pin Default 0x585600f0: [N/A] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x04
Node 0x06 [Audio Output] wcaps 0x221: Stereo Digital Stripe
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
Node 0x07 [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x00000094: OUT Detect HDMI
  Pin Default 0x585600f0: [N/A] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x06
Node 0x08 [Audio Output] wcaps 0x221: Stereo Digital Stripe
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
Node 0x09 [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x00000094: OUT Detect HDMI
  Pin Default 0x585600f0: [N/A] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x08
Node 0x0a [Audio Output] wcaps 0x221: Stereo Digital Stripe
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
Node 0x0b [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x00000094: OUT Detect HDMI
  Pin Default 0x585600f0: [N/A] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x0a
Node 0x0c [Audio Output] wcaps 0x221: Stereo Digital Stripe
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
Node 0x0d [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x00000094: OUT Detect HDMI
  Pin Default 0x585600f0: [N/A] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x0c



About alsamixer:

I try to follow https://wiki.ubuntu.com/Audio/Alsamixer - no any changes when I press arrow keys.
Comment 3 Jaroslav Kysela 2020-11-25 16:06:09 UTC
Sorry, it appears that we should try card0 - /proc/asound/card0/codec#0 and 'alsamixer -c 0'.
Comment 4 Dmitry Mamchyts 2020-11-25 16:40:14 UTC
no card0

dmamchyts@ga401ih:/tmp$ ll /proc/asound/
total 0
dr-xr-xr-x  16 root root 0 Nov 25 13:31 ./
dr-xr-xr-x 393 root root 0 Nov 25 13:31 ../
dr-xr-xr-x   6 root root 0 Nov 25 13:31 card1/
dr-xr-xr-x   6 root root 0 Nov 25 13:31 card2/
-r--r--r--   1 root root 0 Nov 25 13:53 cards
-r--r--r--   1 root root 0 Nov 25 13:53 devices
lrwxrwxrwx   1 root root 5 Nov 25 19:39 Generic -> card1/
lrwxrwxrwx   1 root root 5 Nov 25 19:39 Generic_1 -> card2/
-r--r--r--   1 root root 0 Nov 25 19:39 hwdep
-r--r--r--   1 root root 0 Nov 25 19:39 modules
dr-xr-xr-x   4 root root 0 Nov 25 13:53 oss/
-r--r--r--   1 root root 0 Nov 25 13:53 pcm
dr-xr-xr-x   6 root root 0 Nov 25 19:39 seq/
-r--r--r--   1 root root 0 Nov 25 13:53 timers
-r--r--r--   1 root root 0 Nov 25 13:53 version


dmamchyts@ga401ih:/tmp$ alsamixer -c 0
invalid card index: 0
  try `alsamixer --help' for more information
Comment 5 Jaroslav Kysela 2020-11-25 16:49:31 UTC
Ok, then try card2.. card1 is HDMI..  /proc/asound/card2/codec#0 and 'alsamixer -c 2'
Comment 6 Dmitry Mamchyts 2020-11-25 18:35:53 UTC
Diff with 0 level and min (5%):


--- Clipboard
+++ Selection
@@ -132,7 +132,7 @@
   Control: name="Speaker Playback Switch", index=0, device=0
     ControlAmp: chs=3, dir=Out, idx=0, ofs=0
   Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
-  Amp-Out vals:  [0x80 0x80]
+  Amp-Out vals:  [0x00 0x00]
   Pincap 0x00010014: OUT EAPD Detect
   EAPD 0x2: EAPD
   Pin Default 0x90170110: [Fixed] Speaker at Int N/A
@@ -164,7 +164,7 @@
   Control: name="Bass Speaker Playback Switch", index=0, device=0
     ControlAmp: chs=3, dir=Out, idx=0, ofs=0
   Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
-  Amp-Out vals:  [0x80 0x80]
+  Amp-Out vals:  [0x00 0x00]
   Pincap 0x0000001c: OUT HP Detect
   Pin Default 0x90170120: [Fixed] Speaker at Int N/A
     Conn = Analog, Color = Unknown



Full output (min):
Codec: Realtek ALC289
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0289
Subsystem Id: 0x10431f11
Revision Id: 0x100002
No Modem Function Group found
Default PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
  Power: setting=D0, actual=D0
GPIO: io=3, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Speaker Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="ALC289 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=5, channel=0
  PCM:
    rates [0x540]: 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Headphone Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=5, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x04 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x05 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x06 [Audio Output] wcaps 0x411: Stereo
  Converter: stream=5, channel=0
  PCM:
    rates [0x40]: 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x07 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x97 0x97]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x40]: 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x24
Node 0x08 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Device: name="ALC289 Analog", type="Audio", device=0
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x27 0x27]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x23
Node 0x09 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x97 0x97]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x22
Node 0x0a [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0b [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0c [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0d [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0e [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0f [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x10 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x11 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x12 [Pin Complex] wcaps 0x40040b: Stereo Amp-In
  Control: name="Internal Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00000020: IN
  Pin Default 0x90a60140: [Fixed] Mic at Int N/A
    Conn = Digital, Color = Unknown
    DefAssociation = 0x4, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x13 [Pin Complex] wcaps 0x40040b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00000020: IN
  Pin Default 0x40000000: [N/A] Line Out at Ext N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0x0, Sequence = 0x0
  Pin-ctls: 0x00:
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x00010014: OUT EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x90170110: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x02
Node 0x15 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0000001c: OUT HP Detect
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x02* 0x03
Node 0x17 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Bass Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000001c: OUT HP Detect
  Pin Default 0x90170120: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 3
     0x02 0x03 0x06*
Node 0x18 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00000024: IN Detect
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x19 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
  Control: name="Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x01 0x01]
  Pincap 0x00003724: IN Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=02, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x1a [Pin Complex] wcaps 0x40048b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00003724: IN Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00: VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x1b [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x00013734: IN OUT EAPD Detect
    Vref caps: HIZ 50 GRD 80 100
  EAPD 0x2: EAPD
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00: VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x02* 0x03
Node 0x1c [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x1d [Pin Complex] wcaps 0x400400: Mono
  Pincap 0x00000020: IN
  Pin Default 0x40663a45: [N/A] Modem Line at Ext N/A
    Conn = Digital, Color = Blue
    DefAssociation = 0x4, Sequence = 0x5
  Pin-ctls: 0x20: IN
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x1e [Pin Complex] wcaps 0x400501: Stereo
  Pincap 0x00000010: OUT
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x06
Node 0x1f [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
  Processing caps: benign=0, ncoeff=142
Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x03211030: [Jack] HP Out at Ext Left
    Conn = 1/8, Color = Black
    DefAssociation = 0x3, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x02 0x03*
Node 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 5
     0x19 0x1a 0x1b 0x1d 0x13
Node 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x00 0x00]
  Connection: 5
     0x19 0x1a 0x1b 0x1d 0x12
Node 0x24 [Audio Selector] wcaps 0x300101: Stereo
  Connection: 3
     0x12* 0x13 0x18


Some screenshots:
https://www.dropbox.com/s/0udpru8eb98rgap/no-sound.png?dl=0
https://www.dropbox.com/s/852dtk50sj51rdu/min-sound.png?dl=0


When I set min volume level (5%) - I can change sound level by changing PCM.
So when I change  level in PCM column - speaker's volume also changed
Comment 7 Jaroslav Kysela 2020-11-26 14:01:17 UTC
Could you try also to raise the Master volume up (in alsamixer)? The "Amp-Out vals" in Node 0x02 (Speaker Playback Volume) should change, too.
Comment 8 Dmitry Mamchyts 2020-11-26 15:10:16 UTC
No sound - Master shows 0 level, Speaker shows 0, PCM shows 0
Min sound (5%) - Master shows 0 level, Speaker shows 58, PCM shows 100
Sound +1 step (10%) - Master shows 2 level, Speaker shows 100, PCM shows 100
Sound +2 step (15%) - Master shows 7 level, Speaker shows 100, PCM shows 100
Sound +3 step (20%) - Master shows 13 level, Speaker shows 100, PCM shows 100
....
Sound +n step (100%) - Master shows 100 level, Speaker shows 100, PCM shows 100

After 5% level - Speaker always has a high level
Comment 9 Dmitry Mamchyts 2020-11-26 15:34:42 UTC
Just now I noticed that the microphone does not work. I try check it in Skype/Viber. 

Ubuntu also doesn't show microphone in playback devices: "No Recording devices available"
Comment 10 Takashi Iwai 2020-11-26 16:47:11 UTC
My wild guess is the bass speaker connected to DAC NID 0x06, which as no volume control.

When you run like below, does the volume become normal?
  hda-verb /dev/snd/hwC2D0 0x17 SET_CONNECT 0x00
Comment 11 Dmitry Mamchyts 2020-11-26 18:14:32 UTC
Yes, your command fix issue with speaker.
Now I volume regulation works. Thank you.
Comment 12 Dmitry Mamchyts 2020-11-26 18:15:27 UTC
What about microphone? I must create new issue?
Comment 13 Takashi Iwai 2020-11-27 08:18:43 UTC
(In reply to Dmitry Mamchyts from comment #11)
> Yes, your command fix issue with speaker.
> Now I volume regulation works. Thank you.

OK, then we need to add a quick to change the routing for this device.

(In reply to Dmitry Mamchyts from comment #12)
> What about microphone? I must create new issue?

Please give alsa-info.sh output taken during your recording test.
Also, give the full dmesg output.  I wonder what's missing in the first card slot (card0).
Comment 14 Dmitry Mamchyts 2020-11-27 08:36:42 UTC
Some helpfully  info:

dmamchyts@ga401ih:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 2: Generic_1 [HD-Audio Generic], device 0: ALC289 Analog [ALC289 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


Check recording:

dmamchyts@ga401ih:~$ arecord -f S16_LE -d 10 -r 16000 --device="hw:2,0" /tmp/test-mic.wav 
Recording WAVE '/tmp/test-mic.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
arecord: set_params:1349: Channels count non available


Your ALSA information is located at http://alsa-project.org/db/?f=d0704708a4e3a8bf9ff64516f92a2afb39a53574


Full dmesg output: https://www.dropbox.com/s/g9lqj39ofiran5g/dmesg?dl=0
Comment 15 Takashi Iwai 2020-11-27 09:13:03 UTC
(In reply to Dmitry Mamchyts from comment #14)
> Check recording:
> 
> dmamchyts@ga401ih:~$ arecord -f S16_LE -d 10 -r 16000 --device="hw:2,0"
> /tmp/test-mic.wav 
> Recording WAVE '/tmp/test-mic.wav' : Signed 16 bit Little Endian, Rate 16000
> Hz, Mono
> arecord: set_params:1349: Channels count non available

You have to pass -c2.  Or use plughw:2,0 instead of hw:2,0.
Comment 16 Dmitry Mamchyts 2020-11-27 09:19:11 UTC
You are right.

dmamchyts@ga401ih:~$ arecord -f S16_LE -d 10 -r 16000 --device="hw:2,0" -c2 /tmp/test-mic.wav
Recording WAVE '/tmp/test-mic.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Stereo
Warning: rate is not accurate (requested = 16000Hz, got = 44100Hz)
         please, try the plug plugin 

dmamchyts@ga401ih:~$ aplay /tmp/test-mic.wav 
Playing WAVE '/tmp/test-mic.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo


All work fine.
A file test-mic.wav contains sounds from microphone.

PS. But Ubuntu doesn't show microphone in playback devices: "No Recording devices available"
Comment 17 Takashi Iwai 2020-11-27 09:34:20 UTC
The microphone isn't for a playback...

For the rest issue, ask Ubuntu at first.  Once after you identify that it's really an upstream problem, please open another bug in this bugzilla.
Comment 18 Dmitry Mamchyts 2020-11-27 09:38:30 UTC
Ok, thank you.
Comment 19 Takashi Iwai 2020-11-27 13:54:03 UTC
OK, below two patches are for fixing the bass speaker DAC assignment.
It became more complicated than originally thought, partly because of asymmetric attributes of pins and DACs on this codec and partly because of the nature of the current parser code.

BTW, the reason why the card 0 is missing is the system tries to probe the AMD ACP drivers at first.  Interestingly there are two drivers matching to the very same PCI ID, and both fail -- which itself is fine, but the probe failure of the second driver happens after assigning the card slot, hence it leaves the slot empty after aborting the probe.  I'm going to submit potentially fixes for this later, but you can ignore it.  It's just a corner case.
Comment 20 Takashi Iwai 2020-11-27 13:54:36 UTC
Created attachment 293841 [details]
Fix patch #1
Comment 21 Takashi Iwai 2020-11-27 13:54:52 UTC
Created attachment 293843 [details]
Fix patch #2
Comment 22 Dmitry Mamchyts 2020-11-27 14:23:24 UTC
Your fixes will be available in new kernel release? 5.10?
Comment 23 Takashi Iwai 2020-11-27 14:43:26 UTC
Hopefully yes, if everything goes right...
Comment 24 Takashi Iwai 2020-12-08 08:57:01 UTC
Let's close.
Comment 25 Dmitry Mamchyts 2020-12-08 09:41:52 UTC
thank you

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