You are not logged in.

#1 2021-01-27 19:40:34

josephemorgan91
Member
Registered: 2017-01-08
Posts: 24

[SOLVED] Switching to Speaker output doesn't disable headphones, cont.

This is a continuation of an issue I was having a few months ago, the previous post is here.

Switching the value in analog-output-headphones.conf still seems to fix the issue, but what I've noticed is that it's only a temporary fix. After a few days, I notice that my headphones aren't muting when my speakers are on again. When I go to check the configuration file, somehow it's been changed back to the value that's causing the problem.

Does anyone know a] How I can determine what is editing the configuration file, and b] how to prevent it?

Thanks!

Last edited by josephemorgan91 (2021-01-29 00:22:19)

Offline

#2 2021-01-27 20:55:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,349

Re: [SOLVED] Switching to Speaker output doesn't disable headphones, cont.

The config file gets overwritten on pulse/pipewire updates depending on what you are using here, either add the file to a pacman.conf's NoExtract= directive, or make a copy, name it what you like and create a udev rule redirecting your card to the new file.

The former would be something like

NoExtract = usr/share/alsa-card-profile/mixer/paths/analog-output-headphones.conf

the later needs a bit more work e.g. a file in /etc/udev/rules.d/91-pulseaudio.conf

 SUBSYSTEM!="sound", GOTO="pulseaudio_end"
 ACTION!="change", GOTO="pulseaudio_end"
 KERNEL!="card*", GOTO="pulseaudio_end"

SUBSYSTEMS=="pci", ATTRS{vendor}=="1022", ATTRS{device}=="1457", ENV{ACP_PROFILE_SET}="my-analog-output-headphones.conf"

LABEL="pulseaudio_end"

Offline

#3 2021-01-28 23:43:23

josephemorgan91
Member
Registered: 2017-01-08
Posts: 24

Re: [SOLVED] Switching to Speaker output doesn't disable headphones, cont.

Thanks for all the help, V1del.

Unfortunately, it looks like the fix that I discovered from my previous post is no longer working. analog-output-headphones.conf shows the correct value, but even after a reboot, using pacmd to switch between headphones and speakers toggles the headphones on and off, but not the speakers.

I'm not sure what could have changed, aside from updating pulse audio.

Here's the output of pacmd list-sinks with the headphones port active:

1 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_09_00.3.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
	state: RUNNING
	suspend cause: (none)
	priority: 9039
	volume: front-left: 39304 /  60% / -13.32 dB,   front-right: 39304 /  60% / -13.32 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 100.13 ms
	max request: 17 KiB
	max rewind: 17 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 3
	fixed latency: 100.14 ms
	card: 2 <alsa_card.pci-0000_09_00.3>
	module: 8
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC1220 Analog"
		alsa.id = "ALC1220 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 0xf7700000 irq 83"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:09:00.3"
		sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:09:00.3/sound/card1"
		device.bus = "pci"
		device.vendor.id = "1022"
		device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
		device.product.id = "1457"
		device.product.name = "Family 17h (Models 00h-0fh) 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 00h-0fh) HD Audio Controller Analog Stereo"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
			properties:
				
		analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-headphones>

and with the lineout port active:

1 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_09_00.3.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
	state: RUNNING
	suspend cause: (none)
	priority: 9039
	volume: front-left: 65444 / 100% / -0.04 dB,   front-right: 65444 / 100% / -0.04 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 100.13 ms
	max request: 17 KiB
	max rewind: 17 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 3
	fixed latency: 100.14 ms
	card: 2 <alsa_card.pci-0000_09_00.3>
	module: 8
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC1220 Analog"
		alsa.id = "ALC1220 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 0xf7700000 irq 83"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:09:00.3"
		sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:09:00.3/sound/card1"
		device.bus = "pci"
		device.vendor.id = "1022"
		device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
		device.product.id = "1457"
		device.product.name = "Family 17h (Models 00h-0fh) 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 00h-0fh) HD Audio Controller Analog Stereo"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
			properties:
				
		analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-lineout>

Speakers are active in both cases, headphones are only active when the headphones port is active.

Offline

#4 2021-01-28 23:49:22

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,349

Re: [SOLVED] Switching to Speaker output doesn't disable headphones, cont.

It's a bit of an unfortunate situation right now, as pipewire uses the same config files pulseaudio does, but internally refers to newer versions than is stably released. If I'm reading the current package changelogs correctly it has now been adjusted so that alsa-card-profiles contains the configs meant for pipewire, and the configurations meant for pulse are back at their original location of /usr/share/pulseaudio/alsa-mixer/profile-sets/ so make sure to check there as well.

Offline

#5 2021-01-29 00:21:59

josephemorgan91
Member
Registered: 2017-01-08
Posts: 24

Re: [SOLVED] Switching to Speaker output doesn't disable headphones, cont.

V1del wrote:

It's a bit of an unfortunate situation right now, as pipewire uses the same config files pulseaudio does, but internally refers to newer versions than is stably released. If I'm reading the current package changelogs correctly it has now been adjusted so that alsa-card-profiles contains the configs meant for pipewire, and the configurations meant for pulse are back at their original location of /usr/share/pulseaudio/alsa-mixer/profile-sets/ so make sure to check there as well.

That would definitely explain why changing the configuration file isn't producing the results I was expecting.


Applied the change from the previous file to /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf and everything seems to be working correctly. I can't thank you enough V1del, you've been super helpful.

Marking as solved, but I'm wondering a couple things that you might be able to answer. First, is this a bug or is this intended behavior? Is there a reason that the config file exists as it currently does? Do you know where I can start to find an answer to that? I'd love to be in touch with the devs and maybe even submit an issue/pull request, but I've never done that before.

Thanks!

Offline

Board footer

Powered by FluxBB