The officially official Devuan Forum!

You are not logged in.

#1 2025-06-03 06:25:38

MLEvD
Member
Registered: 2021-02-14
Posts: 165  

What is the procedure for sound out of alsa without pulseaudio?

Can't figure out how to get sound without pulseaudio!

Is there a handy guide somewhere? Nothing complicated, just audio from headphone jack is needed, no input, no networking.

Alsa complains of no sound server, no Jack, OSS, or Pulse. Does one need OSS or Jack for audio without Pulse?

Asking for a friend with an eee pc.

Offline

#2 2025-06-03 08:26:23

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,407  

Re: What is the procedure for sound out of alsa without pulseaudio?

What does "Alsa complains of no sound server" mean?

Offline

#3 2025-06-03 08:37:08

MLEvD
Member
Registered: 2021-02-14
Posts: 165  

Re: What is the procedure for sound out of alsa without pulseaudio?

Sorry my bad, I mean mocp (music on console player) complains of no sound server >_<

Offline

#4 2025-06-03 08:49:14

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,407  

Re: What is the procedure for sound out of alsa without pulseaudio?

I don;t know what mocp does (not in the repo), but I would expect if you run it via apulse it'd be happy using pure ALSA.

Afaiui, I'd note that ALSA is the sound system the kernel implements for operating the sound card(s). All layers above that, including s.c. sound servers, typically just use the ALSA API with various forms of wrappings over it. I.e., ALSA is not an alternative but a more basic API level.

Offline

#5 2025-06-03 09:15:28

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 288  
Website

Re: What is the procedure for sound out of alsa without pulseaudio?

I use mocp in my only-ALSA Daedalus box; it should work regardless of DE. Have you instaled alsa-utils?

@ralph.ronnquist: mocp belongs to the moc package.

Last edited by PedroReina (2025-06-03 09:17:48)

Offline

#6 2025-06-03 09:31:03

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,407  

Re: What is the procedure for sound out of alsa without pulseaudio?

Thanks. So when I installed it and try to use it, it does indeed complain. I have pure ALSA only on an excalibur installation.

Preliminary strace suggests it needs a "mixer" PCM

Offline

#7 2025-06-03 09:50:44

MLEvD
Member
Registered: 2021-02-14
Posts: 165  

Re: What is the procedure for sound out of alsa without pulseaudio?

OK thanks so far, if I install apulse and remove pulsaudio, then moc/mocp plays without pulse, and sounds fine

BUT when I reinstall pulse, moc/mocp just goes back to launching pulse? I only want pulse at desktop level init 5 or lower level init when I choose to launch it. Otherwise, I just want moc/mocp to default to apulse.

Offline

#8 2025-06-03 10:32:29

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,407  

Re: What is the procedure for sound out of alsa without pulseaudio?

Yes, pulseaudio is quite "intrusive"; it installs itself as the default audio path handler into the ALSA configuration which makes it difficult to use together with alternatives or differently by different users or different use cases.

Similarly it seems mocp has a per-user configuration making it hard for a user to have it used differently in different use cases. And being server based, I guess it will be determined by the start-up use case for the server.

I actually had a different issue, namely that my analog output is on card 1, and I didn't have the default CTL device configured properly. So now, instead of solving it with apulse I have the following in my /etc/alsa/conf.d/00-defaults.conf

defaults.pcm.!card 1
defaults.ctl.!card 1

For you, the use case differentiator would be with the files /usr/share/alsa/alsa.conf.d/pulse.conf and/or /usr/share/alsa/pulse-alsa.conf, which define how pulseaudio hooks into ALSA. If those files are absent, then pure ALSA is in use, and with those files in place pulseaudio takes over the audio path (I don't remeber which is "the master").
And there is also /etc/alsa/conf.d/99-pulse.conf...

Offline

#9 2025-06-03 12:00:24

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 288  
Website

Re: What is the procedure for sound out of alsa without pulseaudio?

Preliminary strace suggests it needs a "mixer" PCM

I had this problem trying to use HDMI sound output, but when I selected analogic output (the one asked for by OP), it worked.

Offline

#10 2025-06-03 12:22:47

igorzwx
Member
Registered: 2024-05-06
Posts: 161  

Re: What is the procedure for sound out of alsa without pulseaudio?

ralph.ronnquist wrote:

Yes, pulseaudio is quite "intrusive"; it installs itself as the default audio path handler into the ALSA configuration

It is not exactly the case. ALSA was stripped off software mixer to be raped by pulseaudio. The problem is that the secret esoteric technology of configuring software mixers for ALSA was somehow forgotten, largely because of dementia, perhaps. If ALSA is such a problem, one may try OSS4. It is not very difficult to compile. The PKGBUILD and patches are available here:
_https://aur.archlinux.org/packages/oss-git

OSS was designed as a classical sound system. More exactly, it was the first one.
ALSA was designed as a sort of universal software mixer. That is why it does not permit "exclusive mode".
ALSA without a correctly configured software mixer is like a car without a motor and wheels.

⟡ AI Overview

ALSA has both a userspace component and a kernel component. The kernel component provides drivers that directly interact with sound hardware, while the userspace component provides a higher-level API for applications to interact with the sound devices. The userspace component offers more general functions like mixing, routing, and effects, abstracting away the complexities of different hardware

Last edited by igorzwx (2025-06-03 15:26:50)

Offline

#11 2025-06-04 18:55:56

delgado
Member
Registered: 2022-07-14
Posts: 245  

Re: What is the procedure for sound out of alsa without pulseaudio?

igorzwx wrote:

⟡ AI Overview
(...)

You marked the AI stuff, which is the correct way to site it - good.

On the other hand ...
AI translates to Artificial Idiot in my world. I like stupid things in (e.g.) movies, but not in a technical al forum. Please do not (re-)post such stuff. Thanks.

Offline

#12 2025-06-05 01:11:30

igorzwx
Member
Registered: 2024-05-06
Posts: 161  

Re: What is the procedure for sound out of alsa without pulseaudio?

@delgado

If you pretend to be more intelligent than AI, you may try to help MLEvD to solve the problem.

Offline

#13 2025-06-05 07:20:34

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,407  

Re: What is the procedure for sound out of alsa without pulseaudio?

@igorzwx if you know it all so well, why don't you turn that into helping rather than spewing innuendo and flaffing about other ways of doing things?
Or at least, keep it to your own threads.

Offline

#14 2025-06-05 10:16:56

igorzwx
Member
Registered: 2024-05-06
Posts: 161  

Re: What is the procedure for sound out of alsa without pulseaudio?

Perhaps, one may try

SoundDriver = ALSA

See: _https://wiki.archlinux.org/title/MOC#Configuration

There might be some other options...

To use MOC with OSS v4.1 you must change OSSMixerDevice to /dev/ossmix in your configuration file (located in ~/.moc). For issues with the interface try changing the OSSMixerChannel by pressing w in mocp (to change to the sofware mixer).
_https://wiki.archlinux.org/title/Open_Sound_System#MOC

Offline

Board footer