You are not logged in.

#1 2018-11-30 16:33:15

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 79

[Audio] Unable to configure pulseaudio for speakers 2.1

Hi,
I've changed to 2.1 speakers and I've search in Internet to configure pulseaudio.
These are the changes I did in /etc/pulse/daemon.conf:

$ diff /etc/pulse/daemon.conf /etc/pulse/daemon.conf.old 
resample-method = soxr-mq									   |	; resample-method = speex-float-1
enable-lfe-remixing = yes									   |	; enable-lfe-remixing = no
lfe-crossover-freq = 170									   |	; lfe-crossover-freq = 0
default-sample-format = float32le								   |	; default-sample-format = s16le
default-sample-rate = 44100									   |	; default-sample-rate = 44100
alternate-sample-rate = 48000									   |	; alternate-sample-rate = 48000
default-sample-channels = 3									   |	; default-sample-channels = 2
default-channel-map = front-left,front-right,lfe						   |	; default-channel-map = front-left,front-right

I don't know how to check if pulseaudio is correctly loading those changes but when I execute 'pacmd list-sinks' shows this:

1 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: (none)
	priority: 9039
	volume: front-left: 16634 /  25% / -35,73 dB,   front-right: 16634 /  25% / -35,73 dB
	        balance 0,00
	base volume: 65536 / 100% / 0,00 dB
	volume steps: 65537
	muted: no
	current latency: 430,85 ms
	max request: 158 KiB
	max rewind: 158 KiB
	monitor source: 1
	sample spec: s32le 2ch 44100Hz
	channel map: front-left,front-right
	             Estéreo
	used by: 1
	linked by: 1
	configured latency: 460,00 ms; range is 0,50 .. 2000,00 ms
	card: 1 <alsa_card.pci-0000_00_1f.3>
	module: 7
	properties:
		alsa.resolution_bits = "32"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC662 rev3 Analog"
		alsa.id = "ALC662 rev3 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xdf120000 irq 128"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a170"
		device.product.name = "Sunrise Point-H HD Audio"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "705600"
		device.buffering.fragment_size = "352800"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Estéreo Analógico"
		device.description = "Audio Interno Estéreo Analógico"
		alsa.mixer_name = "Realtek ALC662 rev3"
		alsa.components = "HDA:10ec0662,10199c7d,00100300 HDA:8086280b,80860101,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: yes)
			properties:
				
		analog-output-headphones: Auriculares analógicos (priority 9000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-lineout>

In 'sample spec' shows 's32le 2ch 44100Hz', these are not the same values in daemon.conf. Which makes me think the rest of the values aren't being respected either. Am I checking with the wrong command?
Thanks.

Offline

#2 2018-11-30 16:44:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 5,677

Re: [Audio] Unable to configure pulseaudio for speakers 2.1

Surround profiles are usually available as, well, specific profiles. Shot in the dark:

pacmd set-card-profile alsa_output.pci-0000_00_1f.3  output:analog-surround-21+input:analog-stereo

(use the available profiles from pacmd list-cards if that one turns out to be incorrect) the default-channel-map and sample channels are usually only relevant on sinks that do not themselves provide that information, nearly every udev-detected ALSA card does so however, so the channel maps are split up into profiles, irrespective of the channel-map that is configured.

Similarly the sample spec will be driven by what you are actually playing. It doesn't make sense to apply a CPU intensive resampling effort if the actual source you are playing back advertises a different format that is compatible with your device. So what you are configuring in that regard is a suggestion, should an application request a stream that is incompatible with the capabilities of your device, pulseaudio will instead open the device with your specified parameters and resample accordingly.

Due to that it might also be relevant what you are actually playing, what's

pacmd list-sink-inputs

during this?

Last edited by V1del (2018-11-30 16:48:23)

Offline

#3 2018-11-30 16:52:43

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 79

Re: [Audio] Unable to configure pulseaudio for speakers 2.1

'pacmd list-cards' doesn't show any 2.1 profile:

    index: 1
	name: <alsa_card.pci-0000_00_1f.3>
	driver: <module-alsa-card.c>
	owner module: 7
	properties:
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xdf120000 irq 128"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a170"
		device.product.name = "Sunrise Point-H HD Audio"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Audio Interno"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		input:analog-stereo: Estéreo Analógico Input (priority 65, available: no)
		output:analog-stereo: Estéreo Analógico Output (priority 6500, available: unknown)
		output:analog-stereo+input:analog-stereo: Estéreo Analógico.Duplex (priority 6565, available: unknown)
		output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: unknown)
		output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Estéreo Analógico Input (priority 5965, available: unknown)
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5700, available: no)
		output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI 2) Output + Estéreo Analógico Input (priority 5765, available: no)
		output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 600, available: no)
		output:hdmi-surround-extra1+input:analog-stereo: Digital Surround 5.1 (HDMI 2) Output + Estéreo Analógico Input (priority 665, available: no)
		output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 600, available: no)
		output:hdmi-surround71-extra1+input:analog-stereo: Digital Surround 7.1 (HDMI 2) Output + Estéreo Analógico Input (priority 665, available: no)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5700, available: no)
		output:hdmi-stereo-extra2+input:analog-stereo: Digital Stereo (HDMI 3) Output + Estéreo Analógico Input (priority 5765, available: no)
		output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 600, available: no)
		output:hdmi-surround-extra2+input:analog-stereo: Digital Surround 5.1 (HDMI 3) Output + Estéreo Analógico Input (priority 665, available: no)
		output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 600, available: no)
		output:hdmi-surround71-extra2+input:analog-stereo: Digital Surround 7.1 (HDMI 3) Output + Estéreo Analógico Input (priority 665, available: no)
		output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5700, available: no)
		output:hdmi-stereo-extra3+input:analog-stereo: Digital Stereo (HDMI 4) Output + Estéreo Analógico Input (priority 5765, available: no)
		output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (priority 600, available: no)
		output:hdmi-surround-extra3+input:analog-stereo: Digital Surround 5.1 (HDMI 4) Output + Estéreo Analógico Input (priority 665, available: no)
		output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (priority 600, available: no)
		output:hdmi-surround71-extra3+input:analog-stereo: Digital Surround 7.1 (HDMI 4) Output + Estéreo Analógico Input (priority 665, available: no)
		output:hdmi-stereo-extra4: Digital Stereo (HDMI 5) Output (priority 5700, available: no)
		output:hdmi-stereo-extra4+input:analog-stereo: Digital Stereo (HDMI 5) Output + Estéreo Analógico Input (priority 5765, available: no)
		output:hdmi-surround-extra4: Digital Surround 5.1 (HDMI 5) Output (priority 600, available: no)
		output:hdmi-surround-extra4+input:analog-stereo: Digital Surround 5.1 (HDMI 5) Output + Estéreo Analógico Input (priority 665, available: no)
		output:hdmi-surround71-extra4: Digital Surround 7.1 (HDMI 5) Output (priority 600, available: no)
		output:hdmi-surround71-extra4+input:analog-stereo: Digital Surround 7.1 (HDMI 5) Output + Estéreo Analógico Input (priority 665, available: no)
		off: Apagado (priority 0, available: unknown)
	active profile: <output:analog-stereo+input:analog-stereo>
	sinks:
		alsa_output.pci-0000_00_1f.3.analog-stereo/#0: Audio Interno Estéreo Analógico
	sources:
		alsa_output.pci-0000_00_1f.3.analog-stereo.monitor/#1: Monitor of Audio Interno Estéreo Analógico
		alsa_input.pci-0000_00_1f.3.analog-stereo/#2: Audio Interno Estéreo Analógico
	ports:
		analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-linein: En línea (priority 8100, latency offset 0 usec, available: no)
			properties:
				
		analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: yes)
			properties:
				
		analog-output-headphones: Auriculares analógicos (priority 9000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
		hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"
				device.product.name = "ASUS VX239"
		hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-4: HDMI / DisplayPort 5 (priority 5500, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"

Offline

#4 2018-11-30 16:59:49

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 5,677

Re: [Audio] Unable to configure pulseaudio for speakers 2.1

And you actually have 2.1 hardware? If this is a laptop, which model exactly?  Or why would you want to enable this? FWIW this looks like a newer codec, if you are on LTS try to reproduce on the current linux kernel, sometimes appropriate support has to be switched on in ALSA because the device doesn't automatically advertise for it. What's your output for

amixer -c0

Offline

#5 2018-11-30 17:04:26

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 79

Re: [Audio] Unable to configure pulseaudio for speakers 2.1

The speakers are a P3060 Edifier (https://www.edifier.com/my/en/speakers/p3060-2.1-usb) and are connected to the standard audio output of a PC (with the typical audio cable plugged into the green output).

$ amixer -c0
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 58 [67%] [-21.75dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [off]
  Front Right: Playback [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 'Front',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 'Front Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Front 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 'Surround',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 'Center',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 'LFE',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 'Line',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Line 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 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
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 'IEC958',3
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',4
  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: 'Enabled'
Simple mixer control 'Channel Mode',0
  Capabilities: enum
  Items: '2ch' '4ch' '6ch'
  Item0: '2ch'
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Input Source',1
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Rear Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Rear 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]

Offline

#6 2018-11-30 17:09:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 5,677

Re: [Audio] Unable to configure pulseaudio for speakers 2.1

You might not get that out of the standard jack.

FWIW try switching the channel mode in amixer (or alsamixer for that matter) to 4 Channel mode (you might have to restart pulse after that change with

systemctl --user restart pulseaudio

so that it reparses new config)

Last edited by V1del (2018-11-30 17:20:59)

Offline

#7 2018-11-30 17:22:59

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 2,996

Re: [Audio] Unable to configure pulseaudio for speakers 2.1

Those speakers only have a stereo input. The split from 2 channels to 2.1 channels is just done by a simple low-pass filter in the sub box.

No changes were required to your previous configuration.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#8 2018-12-01 15:53:28

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 79

Re: [Audio] Unable to configure pulseaudio for speakers 2.1

Slithery wrote:

Those speakers only have a stereo input. The split from 2 channels to 2.1 channels is just done by a simple low-pass filter in the sub box.

No changes were required to your previous configuration.

ok, thanks.

Offline

Board footer

Powered by FluxBB