You are not logged in.

#1 2015-04-10 19:40:42

yuri_rage
Member
Registered: 2015-04-10
Posts: 4

[SOLVED] Bizarre ALSA behavior (suddenly no sound in some cases)

I use an NVidia HDMI card to output both sound and video on my HTPC.  Until recently, it worked flawlessly.  Now, I am unable to get sound output in any web browser, nor have I been able to successfully get aplay to work when troubleshooting.  However, I can get (full 5.1 surround) sound by selecting the NVidia HDMI 1 output in both VLC and Kodi.

I can get speaker-test to work when I issue:

$ speaker-test -c 6 -D hdmi:NVidia,1

aplay is not so successful:

$ aplay -D hdmi:NVidia,1 /usr/share/sounds/alsa/Front_Center.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1239: Channels count non available

Normally, plughw is the fix for that, however no sound is output via the following:

$ aplay -D plughw:1,7 /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

I've tried many other permutations of aplay -D to no avail.  They all fail in similar manners.  I confirmed via alsamixer that all channels/devices are unmuted.

I have made no recent hardware changes.  My system is up to date via pacman -Syu and running smoothly otherwise.

My previously working .asoundrc is as follows:

pcm.!default {
 type plug
 slave.pcm {
 type hw
 card 1
 device 7
 }
}

Here are the results of aplay -l and aplay -L:

$ aplay -l;aplay -L
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 0: ALC1150 Analog [ALC1150 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 1: ALC1150 Digital [ALC1150 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
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default:CARD=Generic
    HD-Audio Generic, ALC1150 Analog
    Default Audio Device
sysdefault:CARD=Generic
    HD-Audio Generic, ALC1150 Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    Front speakers
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output

Any ideas on what might have happened and/or how to fix default audio output?

Last edited by yuri_rage (2015-04-16 15:08:25)

Offline

#2 2015-04-13 15:58:01

jfarthing84
Member
From: Daytona Beach, FL
Registered: 2015-04-13
Posts: 17
Website

Re: [SOLVED] Bizarre ALSA behavior (suddenly no sound in some cases)

Sounds very similar to my issue, except that sound works in GNOME, just not in KDE.

Offline

#3 2015-04-13 16:03:28

yuri_rage
Member
Registered: 2015-04-10
Posts: 4

Re: [SOLVED] Bizarre ALSA behavior (suddenly no sound in some cases)

Still no solution here.  I tried the default fallback kernel, in case it was a recent update issue, but that did not help.  I have not yet attempted reversion to an earlier release.

Here is my system info:

$ uname -a        
Linux ****** 3.19.3-3-ARCH #1 SMP PREEMPT Wed Apr 8 14:10:00 CEST 2015 x86_64 GNU/Linux

jfarthing84, it does seem similar.  Perhaps some applications "speak" ALSA better than others (or use more direct hardware access).  I find it very odd that aplay offers little help with troubleshooting the issue.

Last edited by yuri_rage (2015-04-13 16:07:28)

Offline

#4 2015-04-13 16:42:13

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Bizarre ALSA behavior (suddenly no sound in some cases)

You've defined the pcm, but you're missing an accompanying ctl definition.

Offline

#5 2015-04-16 15:06:57

yuri_rage
Member
Registered: 2015-04-10
Posts: 4

Re: [SOLVED] Bizarre ALSA behavior (suddenly no sound in some cases)

Thank you, brebs, for pointing out my mistake.

This is my new .asoundrc:

pcm.!default {
 type plug
 slave.pcm {
 type hw
 card 1
 device 7
 }
}

defaults.ctl.card 1

I now get correct sound output from

$ aplay -D default /usr/share/sounds/alsa/Front_Center.wav

After a full reboot and several browser starts/restarts, both Firefox and Chrome are capable of sound output, though YouTube via Chrome seems finicky (which I think we may be able to chalk up to Google's refusal to play nice with Flash).

Offline

#6 2015-04-16 15:09:26

yuri_rage
Member
Registered: 2015-04-10
Posts: 4

Re: [SOLVED] Bizarre ALSA behavior (suddenly no sound in some cases)

I'm still curious as to why the behavior suddenly changed, but I'll settle for having a solution.  Thank you again!

Offline

Board footer

Powered by FluxBB