You are not logged in.
The fact that pavucontrol allows me to use headphones makes me think that the audio hardware works.
However I can't get the speaker work.
The ALSA wiki page says that manual installation is not necessary, so I just installed `alsa-utils` to have alsamixer and amixer, and `pulseaudio` and `pavucontrol`.
I hear no audio, however. So I tried unmuting the channels, but `amixer sset Speaker unmute` gives `amixer: Mixer attach default error: No such file or directory`, and similarly `alsamixer` gives `cannot open mixer: No such file or directory`.
I have the feeling I just miss some package.
Last edited by Enrico1989 (2020-07-19 19:51:01)
Offline
The suggestion of installing `sof-firmware` I found here for my Dell Vostro 5590 made the audio work.
Well, not really. I'm just going crazy with all these pulseaudio/alsamixer/amixer/pavucontrol and all of that. That stuff is just what undefined behavior actually is
Last edited by Enrico1989 (2020-07-19 19:52:20)
Offline
If you use pulseaudio you should use pulseaudio tools first to try to fix this, ALSA is below that.
pavucontrol is such a tool (often shows up as "Mixer" only in your DE). It has lots of settings, some of them half hidden. Try if you can't at least get a better grasp at the situation with that.
If that doesn't help you should use pulseaudio command line tools to provide some troubleshooting info.
I probably don't need to tell you that the archwiki has a pulseaudio page. With a dedicated troubleshooting sub-page: https://wiki.archlinux.org/index.php/Pu … leshooting
Offline
Ok, it turns out I was mislead by the volume controller of the headphone. Even without the headphones connected, but only with the volume controller connected, I could push its + button and the audio was becoming audible, but using the laptop keyboard's volume up didn't have the same effect. The thing is, for some reason the latter took much longer to reach audible volume percentage from starting from 0%.
In the meanwhile I have unistalled pavucontrol, pulseaudio, pulsemixer, as I want to understand a bit better what each piece of audio-related software is for. I'm going to uninstall sof-firmware to see if that is actually needed or not.
Offline
I'm still not happy with how the audio works, because it does not interact well with my i3blocks blocklet for audio control, which I really need to use to change audio from speaker to headphones (but not only) without having to open pavucontrol everytime, and if I don't understand what pavucontrol is telling me, I can certainly not figure out how to fix these things.
So to start out, what are these 3 entries here? Only the one which is selected makes me hear the sound.
Offline
They are the devices for hdmi, i.e. if you had external monitors connected you could route audio through them, this is entirely normal and expected. I'm not quite sure what your remaining problem is? It sounds like your headset/microphone has a separate hardware internal volume control, if that is the case you can't really influence that from the OS.
Maybe instead of being confused by UI controls, you might want to check or post how the general state looks like, so the outputs of
amixer -c0
pacmd list-cards
pacmd list-sinks
can help us to get an overview of how your general state looks like.
FWIW sof-firmware and how it handles and allocates audio controls is quite a new and different concept from how it used to work and the things surrounding this are currently quite WIP. Pulseaudio 14 should have some better handling of the logic sof cards use.
Last edited by V1del (2020-08-08 14:43:52)
Offline
Then probably I just need to investigate how the audio blocklet in i3blocks interacts with the devices, as at the moment it it moves to those hdmi things, which means no sound, if there's nothing connected to the HDMI.
However, the outputs of those commands are:
$ amxier -c0
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 87 [100%] [0.00dB] [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] [off]
Front Right: Playback 87 [100%] [0.00dB] [off]
Simple mixer control 'Headphone 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 '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 'Mic Mute-LED Mode',0
Capabilities: enum
Items: 'On' 'Off' 'Follow Capture' 'Follow Mute'
Item0: 'Follow Mute'
Simple mixer control 'IEC958',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',1
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',2
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 63
Front Left: Capture 0 [0%] [-17.25dB] [off]
Front Right: Capture 0 [0%] [-17.25dB] [off]
Simple mixer control 'Capture',1
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 63
Front Left: Capture 0 [0%] [-17.25dB] [off]
Front Right: Capture 0 [0%] [-17.25dB] [off]
Simple mixer control 'Auto-Mute Mode',0
Capabilities: enum
Items: 'Disabled' 'Enabled'
Item0: 'Disabled'
Simple mixer control 'Dmic0',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 70
Front Left: Capture 50 [71%] [0.00dB] [on]
Front Right: Capture 50 [71%] [0.00dB] [on]
Simple mixer control 'Dmic1 2nd',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 70
Front Left: Capture 50 [71%] [0.00dB]
Front Right: Capture 50 [71%] [0.00dB]
Simple mixer control 'Headset 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 'Input Source',0
Capabilities: cenum
Items: 'Headset Mic' 'Headphone Mic'
Item0: 'Headset Mic'
Simple mixer control 'Input Source',1
Capabilities: cenum
Items: 'Headset Mic' 'Headphone Mic'
Item0: 'Headset Mic'
Simple mixer control 'PGA1.0 1 Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 32
Mono:
Front Left: Playback 32 [100%] [0.00dB]
Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'PGA2.0 2 Master',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 80
Front Left: Capture 50 [62%] [0.00dB]
Front Right: Capture 50 [62%] [0.00dB]
Simple mixer control 'PGA3.0 3 Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 32
Mono:
Front Left: Playback 32 [100%] [0.00dB]
Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'PGA4.0 4 Master',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 80
Front Left: Capture 50 [62%] [0.00dB]
Front Right: Capture 50 [62%] [0.00dB]
Simple mixer control 'PGA7.0 7 Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 32
Mono:
Front Left: Playback 32 [100%] [0.00dB]
Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'PGA8.0 8 Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 32
Mono:
Front Left: Playback 32 [100%] [0.00dB]
Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'PGA9.0 9 Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 32
Mono:
Front Left: Playback 32 [100%] [0.00dB]
Front Right: Playback 32 [100%] [0.00dB]
$ pacmd list-cards
1 card(s) available.
index: 0
name: <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
driver: <module-alsa-card.c>
owner module: 6
properties:
alsa.card = "0"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "DellInc.-Vostro5590--0RN4TP"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "02c8"
device.string = "0"
device.description = "sof-hda-dsp"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
HiFi: Play HiFi quality Music (priority 8000, available: unknown)
off: Off (priority 0, available: unknown)
active profile: <HiFi>
sinks:
alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink/#0: sof-hda-dsp HDMI3/DP3 Output
alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink/#1: sof-hda-dsp HDMI2/DP2 Output
alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink/#2: sof-hda-dsp HDMI1/DP1 Output
alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink/#3: sof-hda-dsp Speaker + Headphones
sources:
alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink.monitor/#0: Monitor of sof-hda-dsp HDMI3/DP3 Output
alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink.monitor/#1: Monitor of sof-hda-dsp HDMI2/DP2 Output
alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink.monitor/#2: Monitor of sof-hda-dsp HDMI1/DP1 Output
alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink.monitor/#3: Monitor of sof-hda-dsp Speaker + Headphones
alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__source/#4: sof-hda-dsp Headset Mono Microphone + Headphones Stereo Microphone
alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_6__source/#5: sof-hda-dsp Digital Microphone
ports:
[Out] HDMI3: HDMI3/DP3 Output (priority 700, latency offset 0 usec, available: no)
properties:
[Out] HDMI2: HDMI2/DP2 Output (priority 600, latency offset 0 usec, available: no)
properties:
[Out] HDMI1: HDMI1/DP1 Output (priority 500, latency offset 0 usec, available: no)
properties:
[Out] Speaker: Speaker (priority 100, latency offset 0 usec, available: unknown)
properties:
[Out] Headphones: Headphones (priority 200, latency offset 0 usec, available: yes)
properties:
[In] Headset: Headset Mono Microphone (priority 300, latency offset 0 usec, available: yes)
properties:
[In] Mic2: Headphones Stereo Microphone (priority 200, latency offset 0 usec, available: yes)
properties:
[In] Mic1: Digital Microphone (priority 100, latency offset 0 usec, available: unknown)
properties:
Finally, maybe you meant pacmd list-sink-inputs? If so:
1 sink input(s) available.
index: 42
driver: <protocol-native.c>
flags: START_CORKED
state: RUNNING
sink: 3 <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink>
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
muted: no
current latency: 45.67 ms
requested latency: 23.22 ms
sample spec: float32le 2ch 44100Hz
channel map: front-left,front-right
Stereo
resample method: speex-float-1
module: 8
client: 172 <qutebrowser>
properties:
application.icon_name = "chromium-browser"
media.name = "Playback"
application.name = "qutebrowser"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "33"
application.process.id = "11129"
application.process.user = "enrico"
application.process.host = "redviper"
application.process.binary = "QtWebEngineProcess"
application.language = "en_GB.UTF-8"
window.x11.display = ":0"
application.process.machine_id = "72c06e13382f463eb97900ab06d05bdf"
application.process.session_id = "1"
module-stream-restore.id = "sink-input-by-application-name:qutebrowser"
Offline
No I did mean pacmd list-sinks, for the level we are interested in the sinks are important, sink-inputs are the actual clients they are only interesting in the context that they play to the correct sink, but we need some sink information to know whether things are set up correctly here.
E.g. if your configured default sink is a hdmi device by accident then it's no surprise that new clients (applications) start out on a HDMI sink. But this is usually something you have to configure once and it will be remembered in the future
Offline
Sorry, I must have done a typo when I tried pacmd list-sinks, so I thought it did not exist. However, here's the output:
$ pacmd list-sinks
4 sink(s) available.
index: 0
name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE|UNAVAILABLE
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: yes
current latency: 0.00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 0
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 341.00 ms
card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
module: 6
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HDMI3 (*)"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "5"
alsa.card = "0"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "DellInc.-Vostro5590--0RN4TP"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "02c8"
device.string = "hw:sofhdadsp,5"
device.buffering.buffer_size = "65472"
device.buffering.fragment_size = "16320"
device.access_mode = "mmap+timer"
device.profile.name = "HiFi: hw:sofhdadsp,5: sink"
device.profile.description = "HDMI3/DP3 Output"
device.description = "sof-hda-dsp HDMI3/DP3 Output"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
[Out] HDMI3: HDMI3/DP3 Output (priority 700, latency offset 0 usec, available: no)
properties:
active port: <[Out] HDMI3>
index: 1
name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE|UNAVAILABLE
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: yes
current latency: 0.00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 1
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 341.00 ms
card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
module: 6
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HDMI2 (*)"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "4"
alsa.card = "0"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "DellInc.-Vostro5590--0RN4TP"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "02c8"
device.string = "hw:sofhdadsp,4"
device.buffering.buffer_size = "65472"
device.buffering.fragment_size = "16320"
device.access_mode = "mmap+timer"
device.profile.name = "HiFi: hw:sofhdadsp,4: sink"
device.profile.description = "HDMI2/DP2 Output"
device.description = "sof-hda-dsp HDMI2/DP2 Output"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
[Out] HDMI2: HDMI2/DP2 Output (priority 600, latency offset 0 usec, available: no)
properties:
active port: <[Out] HDMI2>
index: 2
name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_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: yes
current latency: 0.00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 2
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 341.00 ms
card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
module: 6
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HDMI1 (*)"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "3"
alsa.card = "0"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "DellInc.-Vostro5590--0RN4TP"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "02c8"
device.string = "hw:sofhdadsp,3"
device.buffering.buffer_size = "65472"
device.buffering.fragment_size = "16320"
device.access_mode = "mmap+timer"
device.profile.name = "HiFi: hw:sofhdadsp,3: sink"
device.profile.description = "HDMI1/DP1 Output"
device.description = "sof-hda-dsp HDMI1/DP1 Output"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
[Out] HDMI1: HDMI1/DP1 Output (priority 500, latency offset 0 usec, available: no)
properties:
active port: <[Out] HDMI1>
* index: 3
name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause: (none)
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: 306.73 ms
max request: 63 KiB
max rewind: 63 KiB
monitor source: 3
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 1
linked by: 1
configured latency: 341.00 ms; range is 0.50 .. 341.00 ms
card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
module: 6
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HDA Analog (*)"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "DellInc.-Vostro5590--0RN4TP"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "02c8"
device.string = "hw:sofhdadsp"
device.buffering.buffer_size = "65472"
device.buffering.fragment_size = "16320"
device.access_mode = "mmap+timer"
device.profile.name = "HiFi: hw:sofhdadsp: sink"
device.profile.description = "Speaker + Headphones"
device.description = "sof-hda-dsp Speaker + Headphones"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
[Out] Speaker: Speaker (priority 100, latency offset 0 usec, available: unknown)
properties:
[Out] Headphones: Headphones (priority 200, latency offset 0 usec, available: yes)
properties:
active port: <[Out] Speaker>
Offline
From this output, at least from pulse's side, everything looks as expected/intended. So this might indeed be a strange behaviour of the i3bar plugin which I don't have any hands on experience with.
FWIW if you want to disable the HDMI devices entirely so that no misdetection/accidental usage of them happens you could edit /usr/share/alsa/ucm2/sof-hda-dsp/HiFi.conf and remove the last line including a HDMI configuration. That's a bit of a hack, and will likely get overriden on updates of the alsa-ucm-conf package unless you add the relevant file to the NoExtract directives or remember to do that readjustment again (... maybe they have evolved until then to make this generally more controllable)
Offline
V1del, I applied the hack you said, and I see the output of those commands change accordingly: no more HDMi entries there.
And so I'm all set in pulseaudio. I guess at the moment I will want to connect an HDMi monitor to this laptop and play the audio there, I'll have to undo this change, right?
This is also helping me understand what's wrong with the i3blocks blocklet which should govern the audio. If I correctly understood the script of the blocklet, when cliked the blocklet loops on the sinks listed by `pacmd list-sinks` (the doc reads "Left/right clicks change default playback device"), so it looks normal to me that it does not work well if headphones and speaker are listed under the same sink as different ports, as in my case.
So my questions is: what is the meaning of having headphones and speaker as different ports under the same sink? Aren't they two distinct sinks?
Well, another question is: how does the concept of "playback device" apply to this discussion? Is it a synonym for "sink", for "port", for something else, or for nothing at all?
Offline
Try setting-up an asoundrc file under you user. I suggest option 2.
pcm.!default {
type plug
slave {
pcm "hw:1,0"
}
}
ctl.!default {
type hw
card 1
}
pcm.dsp {
type plug
slave.pcm "intel"
}
SECOND OPTION - EITHER WILL WORK - use this option for multiplexing
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1
Last edited by EndUserOnly (2020-08-13 05:22:36)
Offline
@EndUseronly No, that won't help their particular problem at all.
@Enrico
Regarding your questions, ports are usually for devices where the relevant conditions are mutually exclusive (you can't play back different audio on headphone or speaker, they are logically linked, plugging in a headphone usually just mutes the speaker component but you can't play back something entirely different on just the speaker or just the headphones , they will receive the same audio signals), sinks on the other hand are completely disjoint from each other And you could have program y play back from hdmi while program x plays back on your built in audio card (which is, depending on port setting, outputting to your speakers or your headphones).
A "playback device" is ultimately a sink yes. Sinks can take a few more specialised forms, but for normal usage and in default configuration you will have a sink per physical output audio card available on your system.
Offline
V1del, in principle I understand the explanation, but I can't still get my head around this issue, because with all the factors involved (the laptop, the HDMI screen, the headphones, pulseaudio, ...) every reaction of the system to my attempts to fix the audio seems random.
Indeed, here I am again. Same issue, different output of those commands, and what I've done in the middle is keeping my system updated with `sudo pacman -Syu` every now and then, booting windows 10 sometimes, and connecting an HDMI screen to the laptop (besides those headphones I mentioned already).
I can get the audio from the headphones , if connected via the USB thingy, which has it's own physical vol+ and vol- buttons, but not from the laptop's speaker. This time I have been pressing the vol+ key long enough. It does not come out.
When I phisically disconnect the headphones, in the "Output devices" tab of pulseaudio, only one entry is listed, sof-hda-dsp Speaker + Headphones, and the dropdown "Port:" menu shows "Speaker" (which is the one I choose) and "Headphones (unplugged)". If I select either the former or the latter, no sound comes out, but in both cases I see the volume of the music I'm playing on youtube. And this is true even if I connect the headphones via the jack connector, except that the latter option in the dropdown reads "Headphones (plugged in)".
Still with headphones disconnected, the outputs to those three commands above, are as follows:
$ amixer -c0
Invalid card number.
...
jj
Ok, let's try 1
$ amixer -c1
amixer: Mixer hw:1 load error: Invalid argument
Ok, let's try 2
$ amixer -c2
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 0 [0%] [-65.25dB] [off]
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] [off]
Front Right: Playback 87 [100%] [0.00dB] [off]
Simple mixer control 'Headphone 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 '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 'Mic Mute-LED Mode',0
Capabilities: enum
Items: 'On' 'Off' 'Follow Capture' 'Follow Mute'
Item0: 'Follow Mute'
Simple mixer control 'IEC958',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',1
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',2
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 63
Front Left: Capture 0 [0%] [-17.25dB] [off]
Front Right: Capture 0 [0%] [-17.25dB] [off]
Simple mixer control 'Capture',1
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 63
Front Left: Capture 0 [0%] [-17.25dB] [off]
Front Right: Capture 0 [0%] [-17.25dB] [off]
Simple mixer control 'Auto-Mute Mode',0
Capabilities: enum
Items: 'Disabled' 'Enabled'
Item0: 'Disabled'
Simple mixer control 'Dmic0',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 70
Front Left: Capture 50 [71%] [0.00dB] [on]
Front Right: Capture 50 [71%] [0.00dB] [on]
Simple mixer control 'Dmic1 2nd',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 70
Front Left: Capture 50 [71%] [0.00dB]
Front Right: Capture 50 [71%] [0.00dB]
Simple mixer control 'Headset 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 'Input Source',0
Capabilities: cenum
Items: 'Headset Mic' 'Headphone Mic'
Item0: 'Headset Mic'
Simple mixer control 'Input Source',1
Capabilities: cenum
Items: 'Headset Mic' 'Headphone Mic'
Item0: 'Headset Mic'
Simple mixer control 'PGA1.0 1 Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 32
Mono:
Front Left: Playback 32 [100%] [0.00dB]
Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'PGA2.0 2 Master',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 80
Front Left: Capture 50 [62%] [0.00dB]
Front Right: Capture 50 [62%] [0.00dB]
Simple mixer control 'PGA3.0 3 Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 32
Mono:
Front Left: Playback 32 [100%] [0.00dB]
Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'PGA4.0 4 Master',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 80
Front Left: Capture 50 [62%] [0.00dB]
Front Right: Capture 50 [62%] [0.00dB]
Simple mixer control 'PGA7.0 7 Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 32
Mono:
Front Left: Playback 32 [100%] [0.00dB]
Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'PGA8.0 8 Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 32
Mono:
Front Left: Playback 32 [100%] [0.00dB]
Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'PGA9.0 9 Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 32
Mono:
Front Left: Playback 32 [100%] [0.00dB]
Front Right: Playback 32 [100%] [0.00dB]
Is the number 2 because of the `alsa.card = "2"` line in the output below?
$ pacmd list-cards
1 card(s) available.
index: 1
name: <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
driver: <module-alsa-card.c>
owner module: 8
properties:
alsa.card = "2"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "DellInc.-Vostro5590--0RN4TP"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card2"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "02c8"
device.string = "2"
device.description = "sof-hda-dsp"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
HiFi: Play HiFi quality Music (priority 8000, available: unknown)
off: Off (priority 0, available: unknown)
active profile: <HiFi>
sinks:
alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink/#1: sof-hda-dsp Speaker + Headphones
sources:
alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink.monitor/#2: Monitor of sof-hda-dsp Speaker + Headphones
alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__source/#3: sof-hda-dsp Headset Mono Microphone + Headphones Stereo Microphone
alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_6__source/#4: sof-hda-dsp Digital Microphone
ports:
[Out] Speaker: Speaker (priority 100, latency offset 0 usec, available: unknown)
properties:
[Out] Headphones: Headphones (priority 200, latency offset 0 usec, available: no)
properties:
[In] Headset: Headset Mono Microphone (priority 300, latency offset 0 usec, available: no)
properties:
[In] Mic2: Headphones Stereo Microphone (priority 200, latency offset 0 usec, available: no)
properties:
[In] Mic1: Digital Microphone (priority 100, latency offset 0 usec, available: unknown)
properties:
$ pacmd list-sinks
1 sink(s) available.
* index: 1
name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause: (none)
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: 23.29 ms
max request: 4 KiB
max rewind: 4 KiB
monitor source: 2
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 1
linked by: 3
configured latency: 23.22 ms; range is 0.50 .. 341.00 ms
card: 1 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
module: 8
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HDA Analog (*)"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "2"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "DellInc.-Vostro5590--0RN4TP"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card2"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "02c8"
device.string = "hw:sofhdadsp"
device.buffering.buffer_size = "65472"
device.buffering.fragment_size = "16320"
device.access_mode = "mmap+timer"
device.profile.name = "HiFi: hw:sofhdadsp: sink"
device.profile.description = "Speaker + Headphones"
device.description = "sof-hda-dsp Speaker + Headphones"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
[Out] Speaker: Speaker (priority 100, latency offset 0 usec, available: unknown)
properties:
[Out] Headphones: Headphones (priority 200, latency offset 0 usec, available: no)
properties:
active port: <[Out] Speaker>
My target is to control audio seamlessly and deterministically from pulseaudio.
EDIT
I had to unmute the channels relative to the laptop sound card using alsamixer. Which sounds like the headphones, when connected via the USB volume controller have their own sound card. Is this correct?
It seems that pulseaudio has only the degrees of freedom that alsamixer allows (I guess ALSA would be more correct, as I could use amixer instead of alsamixer to interface with ALSA, right?). I start thinking that maybe using alsamixer instead of pulseaudio can be easier. At least when something seems to work in unexpected ways. I mean, pusleaudio kept showing the sound bars changing even if the music was not audible as they were muted in ALSA... It's totally counterintuitive!
I'll experiment a bit and come back if I need.
EDIT2
I had tried already using `sudo alsactl store` (I've initially found it somewhere on a stackexchange site I don't remember), but then I found it again here), which errored in some way I don't remember. Then this answer on unix.stackexchange prompted me to try generating a conf file for alsa using asoundconf. In this context I run `asoundconf set-default-card sofhdadsp`. The audio was still going to 0 AND mute upon reboot, but then I tried again `sudo alsactl store` and it worked.
I haven't gained much knowledge out of this solution, to be honest, but at least I've got that with alsamixer I can fairly easily control everything about ALSA if other tools seem to misbehave. The wikipage, however, is not that helpful in my opinion. I frankly don't know how to improve it, for the simple reason that I have scarse knowledge of the topic, as it should be apparent from this thread.
I'll mark this as SOLVED in some day.
Last edited by Enrico1989 (2020-08-29 16:24:57)
Offline