You are not logged in.

#1 2017-08-17 04:07:47

archnemesis
Member
Registered: 2009-11-27
Posts: 53

[SOLVED] No sound, alsamixer shows no mute toggle for PCM

I've just installed archlinux, and IIRC I think I initially had sound using mplayer but not in firefox. It turns out firefox switched from alsa to pulseaudio, so I installed pulseaudio and then firefox had sound. However, after restarting my computer, I now have no sound in anything, and there is no longer a mute toggle on the PCM channel in alsamixer. If I try muting or unmuting PCM using 'amixer sset PCM unmute' it says "Invalid command!", although I can still adjust other channels in commandline such as Master. Did installing pulseaudio screw something up?

$ lsmod | grep '^snd' | column -t
snd_hda_codec_realtek  73728   1   
snd_hda_codec_generic  69632   1   snd_hda_codec_realtek
snd_hda_intel          36864   4   
snd_hda_codec          106496  3   snd_hda_intel,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_core           65536   4   snd_hda_intel,snd_hda_codec,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hwdep              16384   1   snd_hda_codec
snd_pcm                86016   3   snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              28672   1   snd_pcm
snd                    69632   15  snd_hda_intel,snd_hwdep,snd_hda_codec,snd_timer,snd_hda_codec_generic,snd_hda_codec_realtek,snd_pcm

$ ls -l /dev/snd
total 0
drwxr-xr-x  2 root root       60 Aug 17 12:49 by-path
crw-rw----+ 1 root audio 116,  2 Aug 17 12:49 controlC0
crw-rw----+ 1 root audio 116,  7 Aug 17 12:49 hwC0D0
crw-rw----+ 1 root audio 116,  4 Aug 17 12:53 pcmC0D0c
crw-rw----+ 1 root audio 116,  3 Aug 17 13:12 pcmC0D0p
crw-rw----+ 1 root audio 116,  5 Aug 17 12:53 pcmC0D1p
crw-rw----+ 1 root audio 116,  6 Aug 17 12:49 pcmC0D2c
crw-rw----+ 1 root audio 116,  1 Aug 17 12:49 seq
crw-rw----+ 1 root audio 116, 33 Aug 17 12:49 timer

Last edited by archnemesis (2017-08-19 06:29:50)

Offline

#2 2017-08-17 06:12:18

archnemesis
Member
Registered: 2009-11-27
Posts: 53

Re: [SOLVED] No sound, alsamixer shows no mute toggle for PCM

So I can across an older thread here which said exiting X and running alsamixer from the tty to unmute it fixes the problem, even after reloading X. This works, however I still cant mute or unmute from alsamixer or amixer when in X, and I assume this will be required each time I reboot as the guy said. So it's half-solved.

Offline

#3 2017-08-17 06:25:59

archnemesis
Member
Registered: 2009-11-27
Posts: 53

Re: [SOLVED] No sound, alsamixer shows no mute toggle for PCM

Actually, it still doesn't work with chromium or firefox, only mplayer.

Offline

#4 2017-08-17 07:15:42

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,709

Re: [SOLVED] No sound, alsamixer shows no mute toggle for PCM

Something other than pulse might be blocking your devices and pulse can't properly access them. What's the output of

sudo fuser -v /dev/snd/*

do you have any asound.conf or .asoundrc in your home dir or etc? Can you post them if so?

Mod note: Please edit your post to append new information if no one has replied yet, bumping is considered rude.

Last edited by V1del (2017-08-17 07:16:35)

Offline

#5 2017-08-17 08:24:45

archnemesis
Member
Registered: 2009-11-27
Posts: 53

Re: [SOLVED] No sound, alsamixer shows no mute toggle for PCM

Sorry about the bump

$ sudo fuser -v /dev/snd*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  bob        425 F.... pulseaudio
                     bob       2836 F.... alsamixer

No, I have no asound.conf or .asoundrc in my home dir or etc

Last edited by archnemesis (2017-08-17 08:27:00)

Offline

#6 2017-08-17 09:27:08

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,709

Re: [SOLVED] No sound, alsamixer shows no mute toggle for PCM

That looks alright. So probably your pulse setup is incorrect (and you bypass pulse with mplayer so it works). Install pulseaudio-alsa and lib32-alsa-plugins, play something back from a non working application and post

pacmd list-cards
pacmd list-sinks
pacmd list-sink-inputs

You will likely also want to install pavucontrol, it will intuitively show you how pulseaudio manages audio streams of applications and their relations to the sound cards in your system, you shouldn't be using alsa tools to manage your volumes they aren't indicative of how pulse sees your devices.

Offline

#7 2017-08-18 03:33:20

archnemesis
Member
Registered: 2009-11-27
Posts: 53

Re: [SOLVED] No sound, alsamixer shows no mute toggle for PCM

Thanks, I installed those packages and now sound is working on everything I think. I found a good schematic at the ubuntu forums: https://ubuntuforums.org/showthread.php?t=1794581
I have a few questions for you if you don't mind:
Given that pulseaudio is an audio server that intermediates between sound sources and ALSA, shouldn't mplayer interfere with this since it uses ALSA directly as far as I can tell? This doesn't seem to be the case though, as I am able to use mplayer and play a video in my browser simultaneously.
Is pulseaudio analogous to jackd, and if so, which is better?
Is ALSA superior to pulseaudio, given it seems to be the default in arch and other distros, and it seems to get a bad rap as far as I can tell?

1 card(s) available.
    index: 0
	name: <alsa_card.pci-0000_00_14.2>
	driver: <module-alsa-card.c>
	owner module: 6
	properties:
		alsa.card = "0"
		alsa.card_name = "HDA ATI SB"
		alsa.long_card_name = "HDA ATI SB at 0xfe200000 irq 16"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:14.2"
		sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card0"
		device.bus = "pci"
		device.vendor.id = "1002"
		device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
		device.product.id = "4383"
		device.product.name = "SBx00 Azalia (Intel HDA)"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		input:analog-stereo: Analog Stereo Input (priority 60, available: unknown)
		output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
		output:analog-surround-21: Analog Surround 2.1 Output (priority 800, available: unknown)
		output:analog-surround-21+input:analog-stereo: Analog Surround 2.1 Output + Analog Stereo Input (priority 860, available: unknown)
		output:analog-surround-40: Analog Surround 4.0 Output (priority 700, available: unknown)
		output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (priority 760, available: unknown)
		output:analog-surround-41: Analog Surround 4.1 Output (priority 800, available: unknown)
		output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Output + Analog Stereo Input (priority 860, available: unknown)
		output:analog-surround-50: Analog Surround 5.0 Output (priority 700, available: unknown)
		output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Output + Analog Stereo Input (priority 760, available: unknown)
		output:analog-surround-51: Analog Surround 5.1 Output (priority 800, available: unknown)
		output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Output + Analog Stereo Input (priority 860, available: unknown)
		output:analog-surround-71: Analog Surround 7.1 Output (priority 700, available: unknown)
		output:analog-surround-71+input:analog-stereo: Analog Surround 7.1 Output + Analog Stereo Input (priority 760, available: unknown)
		output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500, available: unknown)
		output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5560, available: unknown)
		off: Off (priority 0, available: unknown)
	active profile: <output:analog-stereo+input:analog-stereo>
	sinks:
		alsa_output.pci-0000_00_14.2.analog-stereo/#0: Built-in Audio Analog Stereo
	sources:
		alsa_output.pci-0000_00_14.2.analog-stereo.monitor/#0: Monitor of Built-in Audio Analog Stereo
		alsa_input.pci-0000_00_14.2.analog-stereo/#1: Built-in Audio Analog Stereo
	ports:
		analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: unknown)
			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: Line In (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: Headphones (priority 9000, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-headphones"
		iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
			properties:
				
1 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_00_14.2.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 9959
	volume: front-left: 13622 /  21% / -40.93 dB,   front-right: 13622 /  21% / -40.93 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	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 .. 1837.33 ms
	card: 0 <alsa_card.pci-0000_00_14.2>
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC892 Analog"
		alsa.id = "ALC892 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA ATI SB"
		alsa.long_card_name = "HDA ATI SB at 0xfe200000 irq 16"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:14.2"
		sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card0"
		device.bus = "pci"
		device.vendor.id = "1002"
		device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
		device.product.id = "4383"
		device.product.name = "SBx00 Azalia (Intel HDA)"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "352768"
		device.buffering.fragment_size = "176384"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Built-in Audio Analog Stereo"
		alsa.mixer_name = "Realtek ALC892"
		alsa.components = "HDA:10ec0892,18497892,00100302"
		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: Headphones (priority 9000, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-lineout>

1 sink input(s) available.
    index: 19
	driver: <protocol-native.c>
	flags: START_CORKED 
	state: RUNNING
	sink: 0 <alsa_output.pci-0000_00_14.2.analog-stereo>
	volume: front-left: 50470 /  77% / -6.81 dB,   front-right: 50470 /  77% / -6.81 dB
	        balance 0.00
	muted: no
	current latency: 65.31 ms
	requested latency: 25.00 ms
	sample spec: float32le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	resample method: copy
	module: 8
	client: 14 <Firefox>
	properties:
		media.name = "AudioStream"
		application.name = "Firefox"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.process.id = "1110"
		application.process.user = "bob"
		application.process.host = "bob"
		application.process.binary = "firefox"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "e222fcb76c9540e29043cedadca10711"
		application.process.session_id = "c1"
		application.icon_name = "firefox"
		module-stream-restore.id = "sink-input-by-application-name:Firefox"

Offline

#8 2017-08-18 03:50:45

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: [SOLVED] No sound, alsamixer shows no mute toggle for PCM

I can't answer all your questions, but pulse audio is an audio server that allows for more than one stream at a time to go to the sound card.  ALSA is a driver for sound cards, it has no server built in.  So basically, pulse is not superior to ALSA, but instead it is a layer on top of ALSA that allows for multiple streams at once.

Offline

#9 2017-08-18 07:48:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,709

Re: [SOLVED] No sound, alsamixer shows no mute toggle for PCM

archnemesis wrote:

Thanks, I installed those packages and now sound is working on everything I think. I found a good schematic at the ubuntu forums: https://ubuntuforums.org/showthread.php?t=1794581
I have a few questions for you if you don't mind:
Given that pulseaudio is an audio server that intermediates between sound sources and ALSA, shouldn't mplayer interfere with this since it uses ALSA directly as far as I can tell? This doesn't seem to be the case though, as I am able to use mplayer and play a video in my browser simultaneously.

This is why I told you to install pulseaudio-alsa. MPlayer can only play back via the ALSA API, by installing pulseaudio-alsa you now have an /etc/asound.conf that will redirect applications that request access to an ALSA device back to pulse, so that pulseaudio can manage the audio stream.

Is pulseaudio analogous to jackd, and if so, which is better?

Yes and no, they are both sound servers to help you manage where audio should end up. But they have distinctly different purposes. jack is for low latency and high performance needs like audio production. It isn't suited for a general purpose system, doesn't accommodate for powersaving features or automatic device switching. There's a slide of a presentation by both the JACK and pulse developers that details the differences more closely, will see if I can dig that up.

Is ALSA superior to pulseaudio, given it seems to be the default in arch and other distros, and it seems to get a bad rap as far as I can tell?

As circleface mentioned they aren't interchangeable. When you are using pulse you are using the sound drivers provided by the ALSA project. What people usually mean when they speak of using ALSA alone, is having it in combination with the user-space ALSA libraries that allow some of the features pulse has to be replicated, but with a static configuration.

schematically speaking the relation is like this:

Application -> Pulseaudio -> ALSA kernel space -> sound hardware or Application -> ALSA user space (dmix other alsa plugins) -> ALSA kernel space -> sound hardware.

If your setup is non dynamic you can create relevant ALSA configuration that will allow you to use similar features like pulse provides, however there are a lot of things pulse does behind the scenes to help a good "desktop" experience: E.g. it allows to move applications between different audio cards without restarting the relevant applications, dynamic latency adjustment (you don't have to have that good of a latency for simple music playback, which will help with powersaving e.g.)

And another thing, that indirectly directly affects you as an end user. The pulseaudio API is easier for developers to develop for, which is one of the reasons Firefox has now made pulseaudio mandatory because they don't have the man power to support two different APIs

Last edited by V1del (2017-08-18 09:21:59)

Offline

#10 2017-08-18 11:14:38

archnemesis
Member
Registered: 2009-11-27
Posts: 53

Re: [SOLVED] No sound, alsamixer shows no mute toggle for PCM

Thanks, I think I understand it a bit better now, especially the two different aspects of ALSA which was confusing me a bit.

Offline

Board footer

Powered by FluxBB