You are not logged in.

#1 2016-07-04 19:46:55

freq
Member
From: web
Registered: 2016-03-05
Posts: 11
Website

Pure Alsa

I am running an Intel Turbot (minnowboard max's younger sibling) and audio is piped over HDMI.

I have no need for pulse audio and am at a loss as to how to get Alsa to work by itself.

In the old days Alsa was the standard and it worked perfectly.

Any guidance would be much appreciated!

Thank You in advance.

-freq


I run Debian, btw.

Offline

#2 2016-07-04 20:02:02

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,357
Website

Re: Pure Alsa

https://wiki.archlinux.org/index.php/Ad … chitecture

If you're stuck somewhere on that page, please specify.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2016-07-04 20:04:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Pure Alsa

freq wrote:

In the old days Alsa was the standard and it worked perfectly.

I guess I must be old.  I've never used PA - only alsa.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2016-07-04 20:58:05

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

Re: Pure Alsa

In ye olde days all we had was OSS and it had no support for USB audio and we liked it! In all seriousness there are valid reasons for pulseaudio's existence, and it provides many useful features over ALSA's userspace that some might not need, which is fine since you can still use normal ALSA. But as mentioned you should read through the wiki article and come back with specifics.

Last edited by V1del (2016-07-04 21:05:54)

Offline

#5 2016-07-05 19:42:34

freq
Member
From: web
Registered: 2016-03-05
Posts: 11
Website

Re: Pure Alsa

I will look at the wiki. I just wanted to state that for pulseaudio, you just have to change the /etc/libao.conf from alsa to pulse and remove the second line, reboot and it works.

Originally I had all of the alsa packages and libao had default as alsa and the second line was there; there was no sound.

I will scan the wiki for some way to enable hdmi sound with alsa only. Thank you for your quick replies.


I run Debian, btw.

Offline

#6 2016-07-05 20:19:05

freq
Member
From: web
Registered: 2016-03-05
Posts: 11
Website

Re: Pure Alsa

Hdmi is set as default in alsamixer. It is the correct card:

/proc/asound/pcm
00-03: HDMI 0 : HDMI 0 : playback 1
00-07: HDMI 1 : HDMI 1 : playback 1

I went through the wiki and set everything to spec. Running pianobar gives me this:

[?] Create station from artist or title: olao_alsa WARNING: Unable to open surround playback.  Trying default device...
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
ao_alsa ERROR: Unable to open ALSA device 'default' for playback => No such file or directory
/!\ Cannot open audio device.

my /etc/libao.conf:

default_driver=alsa

Am I going in the right direction? Thank you again


I run Debian, btw.

Offline

#7 2016-07-06 00:01:15

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

Re: Pure Alsa

Something is blocking your card by directly accessing it, and dmix can't open the card. check

sudo fuser -v /dev/snd/*

to find the culprit and try to configure it to use your default device instead of a direct hw:0 or similar

Offline

#8 2016-07-06 03:36:59

freq
Member
From: web
Registered: 2016-03-05
Posts: 11
Website

Re: Pure Alsa

It gives me no output. I ran 'fuser -v /dev/snd/*' as sudo. What should /etc/libao.conf look like?

Mine is simply:

default_driver=alsa

If that is correct, I'm not certain where to turn. I read the wiki and it mentions blacklisting.

When I change my /etc/libao.conf to 'default_driver=pulse' and install pulseaudio w/ pulseaudio-alsa, it works right off the bat but tends to stop working after my monitor blanks and will not reset without a reboot.

I have a lenovo 23" monitor, sound is piped via HDMI and outputs via stereo jack to my speakers. Could the monitor be forgetting its role after waking from sleep?

Last edited by freq (2016-07-06 03:37:38)


I run Debian, btw.

Offline

#9 2016-07-06 06:30:58

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

Re: Pure Alsa

Stop working after the monitor blanks is a "feature"  of your monitor. Can you define if you want to use pulseaudio or ALSA now? Possible solutions will differ depending on what you want to use, and constantly hopping between the two will make finding a proper solution difficult. Since you mentioned pure ALSA in the thread opener I'm going to continue in that direction: I'm guessing now that  hw:0,0 might not be the correct subdevice of your card. can you post

aplay -lL

and then go through the list of subdevices with

speaker-test -Dhw:$CARD,$SUBDEV -c2

until you find the correct and working one, and then   create a configuration to the effect of https://wiki.archlinux.org/index.php/Ad … s_not_work (remove pulseaudio-alsa, as its /etc/asound.conf would conflict with what you define here)

Offline

#10 2016-07-06 11:03:31

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Pure Alsa

freq, do you have any audio daemons running, like in this thread? Because something like a MIDI daemon will block PulseAudio from using the sound card! smile

Offline

#11 2016-07-06 11:41:46

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

Re: Pure Alsa

@drcouzelis we already established that that isn't the case (see two posts above yours)  and freq doesn't want to use pulseaudio (or so...)

Offline

#12 2016-07-06 11:53:10

phw
Member
Registered: 2013-05-27
Posts: 318

Re: Pure Alsa

freq wrote:

In the old days Alsa was the standard and it worked perfectly.

In the old days ALSA was only able to handle sound output of one application at a time, wouldn't call that perfect smile But I heard we have something called dmix now (that is also old, but my direct ALSA usage predates it).

Offline

#13 2016-07-06 16:14:47

freq
Member
From: web
Registered: 2016-03-05
Posts: 11
Website

Re: Pure Alsa

V1del wrote:

Stop working after the monitor blanks is a "feature"  of your monitor. Can you define if you want to use pulseaudio or ALSA now? Possible solutions will differ depending on what you want to use, and constantly hopping between the two will make finding a proper solution difficult. Since you mentioned pure ALSA in the thread opener I'm going to continue in that direction: I'm guessing now that  hw:0,0 might not be the correct subdevice of your card. can you post

aplay -lL

and then go through the list of subdevices with

speaker-test -Dhw:$CARD,$SUBDEV -c2

until you find the correct and working one, and then   create a configuration to the effect of https://wiki.archlinux.org/index.php/Ad … s_not_work (remove pulseaudio-alsa, as its /etc/asound.conf would conflict with what you define here)


$ aplay -lL
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ speaker-test -Dhw:$CARD,$SUBDEV -c2

speaker-test 1.1.1
Playback device is hw:,
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib conf.c:4755:(snd_config_expand) Parse arguments error: Invalid
argument
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM hw:,
Playback open error: -22,Invalid argument


I run Debian, btw.

Offline

#14 2016-07-06 17:17:29

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

Re: Pure Alsa

Use [ code ] tags when pasting command output: https://wiki.archlinux.org/index.php/Co … ow_to_post

You weren't supposed to literally copy the $DEV and $SUBDEV strings but replace them with values from your card, in your case

speaker-test -Dhw:0,3 -c2
speaker-test -Dhw:0,7 -c2

One of them should be producing audio, and then you can create a ALSA configuration as detailed in the link...

Offline

Board footer

Powered by FluxBB