You are not logged in.
I found it strange that when I use alsamixer to adjust volume, "Headphone" actually controls the speaker, while "Speaker" controls nothing. That can be annoying when I plug my headphone in and out, because Pulse Audio will set "Headphone" volume to 0 when I plug the headphone out, and actually, it result my PC's speaker to be muted.
I found quite a lot configure files related to ALSA And Pulse Audio. I don't know which one exactly causes it. Thank you.
Offline
Hi there, what laptop are you using? I'm on an HP Spectre x360 and had a similar issue - it turned out the pins were being mapped incorrectly.
The Arch Wiki has a nice section on debugging this using a tool called HDA Analyiser. It pops open a gui to let you edit the pins directly - and once you've found the correct settings, it'll generate a script to run at startup to ensure those settings are always used.
Offline
I followed the arch wiki to run hda-analyzer, but I got following errors.
***@archlinux-*** ~ % sudo ./run.py
Using temporary directory: /dev/shm/hda-analyzer
You may remove this directory when finished or if you like to
download the most recent copy of hda-analyzer tool.
File cached /dev/shm/hda-analyzer/hda_analyzer.py
File cached /dev/shm/hda-analyzer/hda_guilib.py
File cached /dev/shm/hda-analyzer/hda_codec.py
File cached /dev/shm/hda-analyzer/hda_proc.py
File cached /dev/shm/hda-analyzer/hda_graph.py
File cached /dev/shm/hda-analyzer/hda_mixer.py
Downloaded all files, executing hda_analyzer.py
Traceback (most recent call last):
File "/dev/shm/hda-analyzer/hda_analyzer.py", line 546, in <module>
sys.exit(main(sys.argv))
File "/dev/shm/hda-analyzer/hda_analyzer.py", line 523, in main
if read_nodes(sys.argv[1:]) == 0:
File "/dev/shm/hda-analyzer/hda_analyzer.py", line 89, in read_nodes
read_nodes2(c.card, i)
File "/dev/shm/hda-analyzer/hda_analyzer.py", line 60, in read_nodes2
c = HDACodec(card, codec)
File "/dev/shm/hda-analyzer/hda_codec.py", line 1041, in __init__
self.parse_proc()
File "/dev/shm/hda-analyzer/hda_codec.py", line 1140, in parse_proc
self.proc_codec = HDACodecProc(self.card, self.device, file)
File "/dev/shm/hda-analyzer/hda_proc.py", line 481, in __init__
self.parse(proc_file)
File "/dev/shm/hda-analyzer/hda_proc.py", line 669, in parse
node.add_device(line[10:])
File "/dev/shm/hda-analyzer/hda_proc.py", line 265, in add_device
self.wrongfile('more than one PCM device?')
File "/dev/shm/hda-analyzer/hda_proc.py", line 143, in wrongfile
raise ValueError, "wrong proc file format (%s)" % msg
ValueError: wrong proc file format (more than one PCM device?)
Offline
Thanks for posting up the output. Could you tell me a bit more about your setup? Have you got just the one sound card or more than one?
Could you post up the contents of `proc/asound/cards` and `/proc/asound/card0/codec#0`?
Offline
Thanks for posting up the output. Could you tell me a bit more about your setup? Have you got just the one sound card or more than one?
Could you post up the contents of `proc/asound/cards` and `/proc/asound/card0/codec#0`?
This is `proc/asound/cards`:
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7a10000 irq 30
1 [HDMI ]: HDA-Intel - HDA Intel HDMI
HDA Intel HDMI at 0xf7a14000 irq 32
This is `/proc/asound/card0/codec#0`:
Codec: VIA VT1802
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x11068446
Subsystem Id: 0x15582300
Revision Id: 0x100000
No Modem Function Group found
Default PCM:
rates [0x0]:
bits [0x0]:
formats [0x0]:
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x08 [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
Device: name="VT1802 Analog", type="Audio", device=0
Device: name="VT1802 Alt Analog", type="Audio", device=2
Amp-Out caps: ofs=0x2a, nsteps=0x2a, stepsize=0x05, mute=0
Amp-Out vals: [0x16 0x16]
Converter: stream=5, channel=0
PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x09 [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
Amp-Out caps: ofs=0x2a, nsteps=0x2a, stepsize=0x05, mute=0
Amp-Out vals: [0x20 0x20]
Converter: stream=5, channel=0
PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
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 [Audio Output] wcaps 0x611: Stereo Digital
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x0f [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x10 [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="VT1802 Analog", type="Audio", device=0
Amp-In caps: ofs=0x0b, nsteps=0x1f, stepsize=0x05, mute=1
Amp-In vals: [0x1f 0x1f]
Converter: stream=1, 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
0x1e
Node 0x11 [Audio Input] wcaps 0x10051b: Stereo Amp-In
Amp-In caps: ofs=0x0b, nsteps=0x1f, stepsize=0x05, mute=1
Amp-In vals: [0x8b 0x8b]
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
0x1f
Node 0x12 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x14 [Audio Mixer] wcaps 0x20050b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x80 0x80] [0x00 0x00]
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 2
0x34 0x21
Node 0x15 [Audio Mixer] wcaps 0x20050b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x80 0x80] [0x00 0x00]
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 2
0x35 0x21
Node 0x16 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x17 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x18 [Audio Mixer] wcaps 0x20050b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x80 0x80] [0x80 0x80]
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 2
0x38 0x21
Node 0x19 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x1a [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x1b [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x1c [Audio Mixer] wcaps 0x20050b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x80 0x80] [0x80 0x80]
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 2
0x3c 0x21
Node 0x1d [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x1e [Audio Selector] wcaps 0x300501: Stereo
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 5
0x2b 0x2a 0x29 0x21 0x30*
Node 0x1f [Audio Selector] wcaps 0x300501: Stereo
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 5
0x2b* 0x2a 0x29 0x21 0x30
Node 0x20 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x21 [Audio Mixer] wcaps 0x20050b: Stereo Amp-In
Control: name="Mic Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Control: name="Mic Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
Amp-In vals: [0x1a 0x1a] [0x80 0x80] [0x80 0x80]
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 3
0x2b 0x2a 0x29
In-driver Connection: 4
0x2b 0x2a 0x29 0x08
Node 0x22 [Beep Generator Widget] wcaps 0x70040c: Mono Amp-Out
Control: name="Beep Playback Volume", index=0, device=0
ControlAmp: chs=1, dir=Out, idx=0, ofs=0
Control: name="Beep Playback Switch", index=0, device=0
ControlAmp: chs=1, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x0a, nsteps=0x12, stepsize=0x05, mute=1
Amp-Out vals: [0x8e]
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Node 0x23 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x24 [Pin Complex] wcaps 0x40050d: 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 0x00010050: OUT EAPD Balanced
EAPD 0x3: BALANCED EAPD
Pin Default 0x901701f0: [Fixed] Speaker at Int N/A
Conn = Analog, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x40: OUT
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 2
0x14* 0x3e
Node 0x25 [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: [0x00 0x00]
Pincap 0x0001001c: OUT HP EAPD Detect
EAPD 0x2: EAPD
Pin Default 0x022140f0: [Jack] HP Out at Ext Front
Conn = 1/8, Color = Green
DefAssociation = 0xf, 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: 1
0x15
Node 0x26 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x27 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x28 [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 0x422140f0: [N/A] HP Out at Ext Front
Conn = 1/8, Color = Green
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x18
Node 0x29 [Pin Complex] wcaps 0x400481: Stereo
Pincap 0x00002324: IN Detect
Vref caps: HIZ 50 100
Pin Default 0x50a701f0: [N/A] Mic at Int N/A
Conn = Analog, Color = Unknown
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 0x2a [Pin Complex] wcaps 0x400481: Stereo
Pincap 0x00002324: IN Detect
Vref caps: HIZ 50 100
Pin Default 0x418130f8: [N/A] Line In at Ext Rear
Conn = 1/8, Color = Blue
DefAssociation = 0xf, Sequence = 0x8
Pin-ctls: 0x00: VREF_HIZ
Unsolicited: tag=00, enabled=0
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x2b [Pin Complex] wcaps 0x400481: Stereo
Control: name="Mic Boost Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Pincap 0x00002324: IN Detect
Vref caps: HIZ 50 100
Pin Default 0x01a190f0: [Jack] Mic at Ext Rear
Conn = 1/8, Color = Pink
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x21: IN VREF_50
Unsolicited: tag=02, enabled=1
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x2c [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x2d [Pin Complex] wcaps 0x400701: Stereo Digital
Pincap 0x00000010: OUT
Pin Default 0x474410f0: [N/A] SPDIF Out at Ext Rear Panel
Conn = RCA, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x0e
Node 0x2e [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x2f [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x30 [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=0x2f, mute=0
Amp-In vals: [0x02 0x02]
Pincap 0x00000020: IN
Pin Default 0x90a601f0: [Fixed] Mic at Int N/A
Conn = Digital, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x31 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x32 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x33 [Pin Complex] wcaps 0x40050c: Mono Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80]
Pincap 0x00000010: OUT
Pin Default 0x501701f0: [N/A] Speaker at Int N/A
Conn = Analog, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x3e
In-driver Connection: 1
0x1c
Node 0x34 [Audio Selector] wcaps 0x300501: Stereo
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 2
0x08 0x09*
Node 0x35 [Audio Selector] wcaps 0x300501: Stereo
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 2
0x08* 0x09
Node 0x36 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x37 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x38 [Audio Selector] wcaps 0x300501: Stereo
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 2
0x08* 0x09
Node 0x39 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x3a [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x3b [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x3c [Audio Selector] wcaps 0x300501: Stereo
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 2
0x08* 0x09
Offline
I commented out the `raise` statement in `hda_analyzer.py`, fixed several bugs, and successfully made the script run. Here is the result.
This is my speaker.
This is my headphone.
Offline
I've just tried to install arch on another hard drive on my computer. Surprisingly, I found the problem doesn't happen to my newly-installed arch. Then I use `diff` to compare my old arch's `/proc/asound/card0/codec#0` to the newer one
sun@archlinux-sun ..f-fc07-45a8-ba5b-a8fb7af3168c/home/sun % diff /proc/asound/card0/codec\#0 codec\#0
25c25
< Converter: stream=5, channel=0
---
> Converter: stream=0, channel=0
36,37c36,37
< Amp-Out vals: [0x1f 0x1f]
< Converter: stream=5, channel=0
---
> Amp-Out vals: [0x00 0x00]
> Converter: stream=0, channel=0
67,68c67,68
< Amp-In vals: [0x1f 0x1f]
< Converter: stream=1, channel=0
---
> Amp-In vals: [0x80 0x80]
> Converter: stream=0, channel=0
95c95
< Amp-In vals: [0x80 0x80] [0x00 0x00]
---
> Amp-In vals: [0x00 0x00] [0x80 0x80]
102c102
< Amp-In vals: [0x80 0x80] [0x00 0x00]
---
> Amp-In vals: [0x00 0x00] [0x80 0x80]
144c144
< Amp-In vals: [0x1a 0x1a] [0x80 0x80] [0x80 0x80]
---
> Amp-In vals: [0x80 0x80] [0x80 0x80] [0x80 0x80]
157c157
< Amp-Out vals: [0x8e]
---
> Amp-Out vals: [0x0a]
165c165
< Amp-Out vals: [0x00 0x00]
---
> Amp-Out vals: [0x80 0x80]
258c258
< Amp-In vals: [0x03 0x03]
---
> Amp-In vals: [0x00 0x00]
I think the problem seems to be `stream`. And it just costs me too much to reinstall the system. How can I fix this.
Offline