LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Alsa sound not working after removing Pulseaudio (https://www.linuxquestions.org/questions/linux-newbie-8/alsa-sound-not-working-after-removing-pulseaudio-4175581657/)

marconap 06-07-2016 09:08 AM

Alsa sound not working after removing Pulseaudio
 
Hi all, I removed pulseaudio in order to get sound working because my monitor is connected through hdmi but I want to keep the audio signal on the PC speaker. I didn't find any trick to make this so I decided to remove pulseaudio.
After removing, all alsa commands give the following errors:

ALSA lib conf.c:3028: ( snd_config_update_r ) Cannot access file /etc/alsa-pulse.conf
ALSA lib pcm.c:2205: ( snd_pcm_open_noupdate ) Unknown PCM default

So, I defined the ALSA_CONFIG_PATH and now I obtain the second error only (Unknown PCM default). If I run alsaconf every seems ok. The test sound from Yast works correctly, but I need to play sounds with aplay at command line level.
The second audio card (hdmi) is unconfigured, but nothing changes if I configure it.

Any suggestion?

Thanks a lot
Marco

dolphin_oracle 06-07-2016 09:43 AM

opensuse?

the easy way to do this is in pavucontrol (the pusleaudio configuration settings manager) and disable the HDMI profile.

Shadow_7 06-07-2016 09:54 AM

pulseaudio over jackd might be what you're after. Or not. In my case the HDMI audio is hw:0,3 which is hard to point at with just pulseaudio / pavucontrol. I know it's that because of $( cat /proc/asound/card0/pcm3p/info ).

You can change pulseaudio options which let you start and stop it, instead of removing it entirely. By default it restarts if it crashes. Just add "autospawn = no" to /etc/pulse/client.conf (in debian). You might need to have multiple .asoundrc configurations when you switch between audio setups.

$ pulseaudio --kill

$ pulseaudio --start

-----

FILE: .asoundrc
Code:

defaults.ctl.card 0
defaults.pcm.card 0
defaults.pcm.device 0

for using alsa.

-----

FILE: .asoundrc
Code:

pcm.pulse { type pulse }
ctl.pulse { type pulse }
pcm.!default { type pulse }
ctl.!default { type pulse }

for using pulseaudio.

-----

I tend to have both in the .asoundrc and comment (#) out the one I'm not using. The over jackd variant is little more complex and not without it's quirks. But you can access the soundcard with pulseaudio and jackd at the same time. Which is nice for things like jackeq.

marconap 06-07-2016 10:11 AM

X11 bell
 
Thanks, now I got the aplay working.. I solved defining the ALSA_CONFIG_PATH and assigning audio group to the only user of the PC.
But my original problem is to get the X11 bell to work :-(

Marco

Shadow_7 06-07-2016 10:27 AM

xkbbell ?

$ sudo apt-get install x11-xkb-utils

Not sure if that's the "bell" you're after.

Shadow_7 06-07-2016 10:45 AM

$ xkbbell -display :0

And then ^G aka [CTRL] + [G] beeps. If that was what you're after. Probably uses the pcspkr output which wont do anything if your motherboard doesn't have that hardware.

marconap 06-08-2016 02:24 AM

xkbbell is installed but mute. The monitor is connected trough hdmi and I have the suspect that the sound is flowing in that channel. Aplay xxx.wav works fine with the sound card.


All times are GMT -5. The time now is 06:14 PM.