Xfce Forum

Sub domains
 

You are not logged in.

#1 2015-04-01 02:12:45

tpatt
Member
Registered: 2015-03-27
Posts: 15

ALSA mixers not working properly

Hi everyone,

I was having issues with basically every audio player I've tried (Audacious, Clementine, XMMS2) so I decided I may try to go back to ALSA.  I removed pulseaudio packages and rebooted, but audio only works on one program, audacious.  I'm assuming that's because I can go into the settings and choose ALSA as my output.  Out of all of the mixers I download, I cannot adjust the volume for PCM (my SPDIF digital coax output).

I guess my question is, how can I control my ALSA settings?  When using ALSA Mixer, I see the level for IEC958, but the volume is 0 and I cannot move the bar up.  Most other bars are adjustable, just not the one I need.  I also installed QasMixer, but after putting all levels at 100% and ensuring IEC958 was checked, still no output.  Audacious is currently the only thing working with pure ALSA audio.  Any suggestions are appreciated!

EDIT: I guess I should add I'm running Debian Jessie...

Last edited by tpatt (2015-04-01 02:43:00)

Offline

#2 2015-04-01 03:41:08

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: ALSA mixers not working properly

wrong output set as default? what shows aplay -l?

also try all devices with the -D flag until you hear something from your speakers:

eg: for me

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

to test the hdmi output i could enter

aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav

to add this output as my default device i would add the following lines tho the /etc/asound.conf

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

pcm.!default {
	type hw
	card 0
	device 3
}

you probably need to reboot

Last edited by sixsixfive (2015-04-01 03:41:43)

Offline

#3 2015-04-01 03:50:54

tpatt
Member
Registered: 2015-03-27
Posts: 15

Re: ALSA mixers not working properly

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC1200 Analog [ALC1200 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC1200 Digital [ALC1200 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I did a test based on my output with the digital output and I just get a fast ticking in my speakers.

aplay -D plughw:0,1 filename.mp3

Last edited by tpatt (2015-04-01 03:53:33)

Offline

#4 2015-04-01 04:07:38

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: ALSA mixers not working properly

tpatt wrote:

aplay -D plughw:0,1 filename.mp3

don't use an mp3 file, use one of the wav files provided by alsa

also wat's the output of

amixer -c 0 -i

Offline

#5 2015-04-01 04:25:52

tpatt
Member
Registered: 2015-03-27
Posts: 15

Re: ALSA mixers not working properly

sixsixfive wrote:
tpatt wrote:

aplay -D plughw:0,1 filename.mp3

don't use an mp3 file, use one of the wav files provided by alsa

also wat's the output of

amixer -c 0 -i

I'd also like to add that after editing /etc/asound.conf and specifying my default PCM device, everything works with one drawback... two applications cannot play at the same time.  If youtube is playing, audacious gives an error.  If audacious is playing,  youtube will scroll as if it's playing, but no audio comes out.  Stopping audacious and refreshing youtube produces audio and vice versa.  Is that normal for alsa?


Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 31 [100%] [0.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [on]
  Front Right: Playback 31 [100%] [0.00dB] [on]
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 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [on]
  Front Right: Playback 31 [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 31 [100%] [12.00dB] [on]
  Front Right: Playback 31 [100%] [12.00dB] [on]
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: 3 [100%] [30.00dB]
  Front Right: 3 [100%] [30.00dB]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [on]
  Front Right: Playback 31 [100%] [0.00dB] [on]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 31 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 31 [100%] [0.00dB] [on]
Simple mixer control 'Side',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 27 [87%] [-6.00dB] [off]
  Front Right: Playback 27 [87%] [-6.00dB] [off]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 22 [71%] [-1.50dB] [off]
  Front Right: Playback 23 [74%] [0.00dB] [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: 3 [100%] [30.00dB]
  Front Right: 3 [100%] [30.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Beep',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [12.00dB] [off]
  Front Right: Playback 31 [100%] [12.00dB] [off]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 19 [61%] [12.00dB] [on]
  Front Right: Capture 19 [61%] [12.00dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 12 [39%] [1.50dB] [off]
  Front Right: Capture 12 [39%] [1.50dB] [off]
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 'Rear Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [12.00dB] [off]
  Front Right: Playback 31 [100%] [12.00dB] [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: 3 [100%] [30.00dB]
  Front Right: 3 [100%] [30.00dB]

And the links to the ALSA wav files did not work.  Do you have others?

Last edited by tpatt (2015-04-01 04:53:30)

Offline

#6 2015-04-01 08:44:23

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: ALSA mixers not working properly

tpatt wrote:

Stopping audacious and refreshing youtube produces audio and vice versa.  Is that normal for alsa?


Looks like your card doesn't support hardware mixing, but you can use dmix just add this to your asound.conf

pcm.dsp {
    type plug
    slave.pcm "dmix"
}

also requires the alsa plugins package

tpatt wrote:

And the links to the ALSA wav files did not work.  Do you have others?

hm, strange they should be there if you installed the alsa utils package

Offline

#7 2015-04-01 15:04:02

tpatt
Member
Registered: 2015-03-27
Posts: 15

Re: ALSA mixers not working properly

sixsixfive wrote:
tpatt wrote:

Stopping audacious and refreshing youtube produces audio and vice versa.  Is that normal for alsa?


Looks like your card doesn't support hardware mixing, but you can use dmix just add this to your asound.conf

pcm.dsp {
    type plug
    slave.pcm "dmix"
}

also requires the alsa plugins package

tpatt wrote:

And the links to the ALSA wav files did not work.  Do you have others?

hm, strange they should be there if you installed the alsa utils package

Is this relatively safe to do?  I'd like to not introduce anything that may cause more issues.  I guess if I have issues I can always remove the config.  If audacious is paused, youtube will not play.  Only if a song in audacious is stopped will something else play.  It would be nice to pause something while playing something else temporarily... I can play two youtube videos at once, just not two different apps.

I was able successfully play the included alsa files.  Sorry, I think I was reading another site last night and there was a link to wav files that no longer existed...

Thanks for all the help!

Last edited by tpatt (2015-04-01 15:48:31)

Offline

#8 2015-04-01 16:09:19

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: ALSA mixers not working properly

tpatt wrote:

Is this relatively safe to do?

yupp, it's totally safe just remove the lines or file and reboot/reload alsa and all changes are gone

Offline

#9 2015-04-01 16:12:29

tpatt
Member
Registered: 2015-03-27
Posts: 15

Re: ALSA mixers not working properly

OK, I added it and rebooted and it still does the same thing.  I put it under everything already in there, was that correct?

ALSA error: snd_pcm_open failed: Device or resource busy.

Last edited by tpatt (2015-04-01 16:12:53)

Offline

#10 2015-04-01 16:14:51

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: ALSA mixers not working properly

did you install the alsa-plugins package?

Offline

#11 2015-04-01 16:28:30

tpatt
Member
Registered: 2015-03-27
Posts: 15

Re: ALSA mixers not working properly

I don't see a package by that name... is that the package name?

A search with apt-get install alsa<tab>:

alsa-base              alsaplayer-daemon      alsaplayer-text
alsa-firmware-loaders  alsaplayer-esd         alsaplayer-xosd
alsamixergui           alsaplayer-gtk         alsa-tools
alsa-oss               alsaplayer-jack        alsa-tools-gui
alsaplayer-alsa        alsaplayer-nas         alsa-utils
alsaplayer-common      alsaplayer-oss         

Last edited by tpatt (2015-04-01 16:32:12)

Offline

#12 2015-04-01 16:32:39

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: ALSA mixers not working properly

oops its named libasound2-plugins on debian

Offline

#13 2015-04-01 16:36:59

tpatt
Member
Registered: 2015-03-27
Posts: 15

Re: ALSA mixers not working properly

sixsixfive wrote:

oops its named libasound2-plugins on debian

Yes, that's installed.

Offline

#14 2015-04-01 16:49:40

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: ALSA mixers not working properly

hm maybe the wrong index is set please post the output of

ls -l /proc/asound

and maybe

cat /proc/asound/card0/id

&

lsmod|grep snd

edit: also i forgot to mention instead of dmix you can also use pulseaudio since your default output device is now set

Last edited by sixsixfive (2015-04-01 17:04:23)

Offline

#15 2015-04-01 17:11:20

tpatt
Member
Registered: 2015-03-27
Posts: 15

Re: ALSA mixers not working properly

ls -l /proc/asound:

total 0
dr-xr-xr-x 6 root root 0 Apr  1 12:08 card0
dr-xr-xr-x 4 root root 0 Apr  1 12:08 card1
-r--r--r-- 1 root root 0 Apr  1 12:08 cards
-r--r--r-- 1 root root 0 Apr  1 12:08 devices
-r--r--r-- 1 root root 0 Apr  1 12:08 hwdep
lrwxrwxrwx 1 root root 5 Apr  1 12:08 Intel -> card0
-r--r--r-- 1 root root 0 Apr  1 12:08 modules
lrwxrwxrwx 1 root root 5 Apr  1 12:08 NVidia -> card1
dr-xr-xr-x 2 root root 0 Apr  1 12:08 oss
-r--r--r-- 1 root root 0 Apr  1 12:08 pcm
dr-xr-xr-x 2 root root 0 Apr  1 12:08 seq
-r--r--r-- 1 root root 0 Apr  1 12:08 timers
-r--r--r-- 1 root root 0 Apr  1 12:08 version

cat /proc/asound/card0/id:

Intel

lsmod|grep snd:

snd_hda_codec_hdmi     45118  1 
snd_hda_codec_realtek    67127  1 
snd_hda_codec_generic    63107  1 snd_hda_codec_realtek
snd_hda_intel          26327  7 
snd_hda_controller     26727  1 snd_hda_intel
snd_hda_codec         104463  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
snd_hwdep              13148  1 snd_hda_codec
snd_pcm                88662  5 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_timer              26614  1 snd_pcm
snd                    65244  21 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
soundcore              13026  2 snd,snd_hda_codec

I didn't have an issue with default devices on pulseaudio, I had an issue with playback.  And if I install pulse, I'll have to tell audacious to use it or else it won't play, correct?  In which case, I could have issues.  I'm rolling on a few hours now without it, and haven't had one issue.

Also, I still have no volume control neither with a mixer nor with a playback application, only with my speakers.

Last edited by tpatt (2015-04-01 17:44:03)

Offline

#16 2015-04-01 19:04:00

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: ALSA mixers not working properly

@outputs

hm everything looks fine, but i remember that some intel cards have trouble with different devices

How may cards are known? are there two? one analog one digital?

cat /proc/asound/cards

>I didn't have an issue with default devices on pulseaudio, I had an issue with playback.

your default card was the analog output, so alsa was playing on this output (0:0)-->you couldn't anything since there was nothing connected to this output

now you forced the default output to be (0:1) --> you hear something since you speakers are connected to that output

>I'll have to tell audacious to use it or else it won't play, correct?

corrrect,

ALSA/OSS/... are sound systems (one of them is essential since this is the part that is talking to your sound card)

Pulseaudio, phonon, jack, esd... are servers that manage the access to your sound system, since your sound card doesn't support hardware mixing you need one of those tools(software mixing)

so currently you have 2 apps playing sound but only one can have access use your soundsystem

if you install a sound server both applications will send their sound to the server(eg pulse) the server mixes both sound streams and sends them to your soundsystem - problem solved!

>Also, I still have no volume control neither with a mixer nor with a playback application, only with my speakers.

your amixer -c 0 -i output tells a different story, you probably refer to the xfce-mixer(which req. gstreamer & gstreamer-alsa)

try the alsamixer instead:

alsamixer

Offline

#17 2015-04-01 20:03:40

tpatt
Member
Registered: 2015-03-27
Posts: 15

Re: ALSA mixers not working properly

I can run alsamixer, but like I said, none of the controls change my volume and the SPDIF level is at 0 with no bar above it.  If I change master volume to 0, volume is still up.

Maybe I never mentioned that.  I removed pulse because playback in every app was freezing for 5 seconds or so randomly.  It happened in all playback apps, but moreso in certain ones (audacious).  Now audacious works flawlessly with pulse uninstalled.  So I should now be able to install pulseaudio and pavucontrol without issue?  Is asound.conf what makes everything bypass pulseaudio?  I'm just trying to figure out how I can have control of my volume while not using pulseaudio smile  I'm not sure if that's possible in my case, which I'm fine with since I rarely need to adjust volume on the PC itself.  I may look into a dedicated sound card.  Are Creatives highly compatible?

Last edited by tpatt (2015-04-01 20:09:09)

Offline

#18 2015-04-01 21:34:06

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: ALSA mixers not working properly

>SSPDIF level is at 0 with no bar above it

thats normal since it is only a switch on/off (press m to toggle mute)

>So I should now be able to install pulseaudio and pavucontrol without issue?

theoretically yes

>Is asound.conf what makes everything bypass pulseaudio?

no asound.conf configures alsa.
pulseaudio sits on top of alsa like a pyramid: http://tuxradar.com/files/LXF130.audio.layers.png

>I may look into a dedicated sound card.  Are Creatives highly compatible?

I havent turned on my tower since ~5years, so i can't say anything about dedicated sound cards...

Offline

#19 2015-04-01 23:34:22

tpatt
Member
Registered: 2015-03-27
Posts: 15

Re: ALSA mixers not working properly

Yes, it does mute/unmute, now I just need to have mixing ability and possible volume control.  I installed phonon... do I need to configure it?  Where are the settings?  I'd rather not go with pulse again.

Offline

#20 2015-04-02 15:05:09

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: ALSA mixers not working properly

tpatt wrote:

possible volume control.

so PCM or Master doesn't work for you?

I installed phonon

Why? its a mutimedia api mainly used by qt

the only way to get this working without pulseaudio is dmix or by using OSS(which is just not possible in debian)

Last edited by sixsixfive (2015-04-02 15:06:00)

Offline

#21 2015-04-02 16:37:10

tpatt
Member
Registered: 2015-03-27
Posts: 15

Re: ALSA mixers not working properly

No, the only thing that works is mute/unmute of SPDIF.  Master and PCM can be brought to 0 and volume is still at 100.

I'll look into dmix and see if I can get it going.  If not, no big deal.  Thanks again.

Offline

#22 2015-04-02 23:54:09

tpatt
Member
Registered: 2015-03-27
Posts: 15

Re: ALSA mixers not working properly

OK, I installed pulse again and after playing a few songs, I was just sitting idle with a few browser tabs open full of text (no sound or video), and the music started freezing for a few seconds at a time... constantly.

I removed pulse and am now back to ALSA.  I'm doing a stress test by streaming 720p to my Roku (all 4 CPUs in the 90-98% range)  AND playing back 720p on the local PC while playing music and there's no issue whatsoever.

I tried following a guide for dmix and I'm stuck at the complex approach here: http://alsa.opensrc.org/Dmix#6._The_com … ameters.29 and I'm not sure what all is required.  I am able to dmix multiple mp3s in alsaplayer, but I'm also able to dmix youtube videos on the same browser.  It's just when two different apps need to play sound.  I read somewhere that dmix can only mix 2 channels max, which wouldn't help me anyway.  Is anyone familiar with this guide and how I would go about configuring an Intel ALC1200 chip?  If not, I'll just deal with the mixing issue till I do a hardware upgrade...  Thanks!

Offline

#23 2015-04-09 02:00:34

tpatt
Member
Registered: 2015-03-27
Posts: 15

Re: ALSA mixers not working properly

Wanna hear something pretty funny?  After all this work I went through switching to ALSA, I think I solved the issue with pulseaudio...

Every now and then, I was getting Buffer I/O errors on bootup during fsck, but then it would just continue and boot normally.  I thought I'd pay attention to it this time, and I realized it was my oldest hard drive (out of 3 in my system) which primarily has all of my music on it.  I thought that may make sense why mp3 playback was the only thing having issues.  Streaming from the web never had an issue.  ALSA playback was 99.9% perfect, with a very rare audio freeze, but I figured that was just "Linux audio".

I transferred all 30GB of data off of that partition onto a new ext4 partition on my 1.5TB drive, reinstalled pulseaudio, and I've been several hours with no issues.  I can't believe that may have solved all of my problems.... Yes, I have blond hair.

P.S. The transfer of data took forever due to the transfer rate being between 100KB/s and 2MB/s.  This is a drive that should get 100MB/s easily.  Do you think the conversion from NTFS to ext4 had anything to do with that or is it likely all due to the buffer errors?

Offline

Board footer

Powered by FluxBB