You are not logged in.

#1 2014-11-15 20:36:43

toni
Member
Registered: 2011-10-15
Posts: 437

No sound in alsa

I have no sound using alsa.

cat /procs/asound/cards outputs:

 0 [HDMI           ]: HDA-Intel - HDA Intel HDMI
                      HDA Intel HDMI at 0xf7c14000 irq 34
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf7c10000 irq 35

The volume in alsamixer is set '00' and in green color. Volume level is set to 100.

Last edited by toni (2014-11-22 17:09:26)

Offline

#2 2014-11-15 21:04:45

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

Re: No sound in alsa

Is this a new installation? For how long has ALSA not produced sound? Do any applications produce sound?

Offline

#3 2014-11-15 21:19:27

toni
Member
Registered: 2011-10-15
Posts: 437

Re: No sound in alsa

drcouzelis wrote:

Is this a new installation? For how long has ALSA not produced sound? Do any applications produce sound?

It is not a new installation. It was working but I have changed from laptop. Old laptop died and I have a new one. In my old laptop it was working but in the new is not.  I have arch linux installed in an external hdd. After booting in the new laptop I have no sound.

Offline

#4 2014-11-16 17:06:54

toni
Member
Registered: 2011-10-15
Posts: 437

Re: No sound in alsa

I don't understand anything.... this morning without doing anything, no packages upgrade, the sound has worked and now, this evening, sound does not work again..... I have not installed anything  and I haven't upgraded the system....

It seems like sometimes works and sometimes not, depending on how the service is started during boot maybe?

Offline

#5 2014-11-16 17:38:46

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

Re: No sound in alsa

I fixed it. You're welcome. wink

Is sound still not working at times? I wonder if it's flaky hardware...

Offline

#6 2014-11-16 17:56:59

toni
Member
Registered: 2011-10-15
Posts: 437

Re: No sound in alsa

drcouzelis wrote:

I fixed it. You're welcome. wink

Is sound still not working at times? I wonder if it's flaky hardware...

Yes, it is. But I think the problem is that sometimes on booting, the default sound card gets HDMI and sometimes PCH. I guess that when PCH is taken into account, the sound works, otherwise, if HDMI is set by default at boot time, then it does not work.

so how can I set by default PCH sound card?


cat /proc/asound/modules outputs:

 0 snd_hda_intel
 1 snd_hda_intel

I guess one is HDMI and the another is PCH, but as both have the same name so how to set the default one using:
/etc/modprobe.d/alsa-base.conf

options snd_hda_intel index=0
options snd_hda_intel index=1

lsmod |grep snd outputs:

snd_hda_codec_hdmi     49213  1 
snd_hda_codec_realtek    67469  1 
snd_hda_codec_generic    63126  1 snd_hda_codec_realtek
snd_hda_intel          26387  5 
snd_hda_controller     26938  1 snd_hda_intel
snd_hda_codec         108536  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
snd_hwdep              17244  1 snd_hda_codec
snd_pcm                88487  4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_timer              26614  1 snd_pcm
snd                    73436  18 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              13031  2 snd,snd_hda_codec

Last edited by toni (2014-11-16 18:07:26)

Offline

#7 2014-11-16 18:15:50

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: No sound in alsa

toni wrote:

/etc/modprobe.d/alsa-base.conf

options snd_hda_intel index=0
options snd_hda_intel index=1

I think this may be confusing your system -- the file is contradictory...

My version of this file has the "=1" line only and works: try that.

EDIT: What is the output of:

aplay -l

Last edited by Head_on_a_Stick (2014-11-16 18:18:04)


Jin, Jîyan, Azadî

Offline

#8 2014-11-16 18:28:08

toni
Member
Registered: 2011-10-15
Posts: 437

Re: No sound in alsa

Head_on_a_Stick wrote:
toni wrote:

/etc/modprobe.d/alsa-base.conf

options snd_hda_intel index=0
options snd_hda_intel index=1

I think this may be confusing your system -- the file is contradictory...

My version of this file has the "=1" line only and works: try that.

EDIT: What is the output of:

aplay -l

aplay -l results:

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC284 Analog [ALC284 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Offline

#9 2014-11-16 18:37:23

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: No sound in alsa

Did you try removing the first line from /etc/modprobe.d/alsa-base.conf?

I'm crap at sound problems so I'm not going to be able to help you much...


Jin, Jîyan, Azadî

Offline

#10 2014-11-16 18:41:50

toni
Member
Registered: 2011-10-15
Posts: 437

Re: No sound in alsa

Head_on_a_Stick wrote:

Did you try removing the first line from /etc/modprobe.d/alsa-base.conf?

I'm crap at sound problems so I'm not going to be able to help you much...

Yes, I have just done now and reboot system. It does not work.

Offline

#11 2014-11-16 18:44:26

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: No sound in alsa

Well, that's the limit of my technical expertise on this subject... hmm
I'm bailing out, you're on your own -- good luck!


Jin, Jîyan, Azadî

Offline

#12 2014-11-16 18:46:06

toni
Member
Registered: 2011-10-15
Posts: 437

Re: No sound in alsa

Head_on_a_Stick wrote:

Well, that's the limit of my technical expertise on this subject... hmm
I'm bailing out, you're on your own -- good luck!

Ok, don't worry. I highly appreciate all your help in this post and others. Your opinions are always welcome for me. Thanks very much.

Offline

#13 2014-11-16 20:38:28

toni
Member
Registered: 2011-10-15
Posts: 437

Re: No sound in alsa

Headphones are working but not laptop speakers....

Offline

#14 2014-11-16 20:50:31

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: No sound in alsa

toni wrote:

Headphones are working but not laptop speakers....

Do the speakers work with other operating systems?
It could be a hardware problem.


Jin, Jîyan, Azadî

Offline

#15 2014-11-16 21:01:38

toni
Member
Registered: 2011-10-15
Posts: 437

Re: No sound in alsa

Head_on_a_Stick wrote:
toni wrote:

Headphones are working but not laptop speakers....

Do the speakers work with other operating systems?
It could be a hardware problem.

In others operating systems they work.

Offline

#16 2014-11-16 21:08:04

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: No sound in alsa

Maybe I missed it in the previous posts but have you tried to follow this method from the wiki page:  Set the default sound card using Alsa

I had to re-read this section a few times until I grasped what you're being told to do.  It did fix my issue with having an on-board and a separate soundcard.  One was being detected over the other at random on every reboot. 
Here's my current config: 

#/etc/modprobe.d/alsa-base.conf

options snd slots=snd_ctxfi,snd_hda_intel
options snd_ctxfi index=0
options snd_hda_intel index=-2

Last edited by MoonSwan (2014-11-16 21:08:29)

Offline

#17 2014-11-16 21:23:56

toni
Member
Registered: 2011-10-15
Posts: 437

Re: No sound in alsa

MoonSwan wrote:

Maybe I missed it in the previous posts but have you tried to follow this method from the wiki page:  Set the default sound card using Alsa

I had to re-read this section a few times until I grasped what you're being told to do.  It did fix my issue with having an on-board and a separate soundcard.  One was being detected over the other at random on every reboot. 
Here's my current config: 

#/etc/modprobe.d/alsa-base.conf

options snd slots=snd_ctxfi,snd_hda_intel
options snd_ctxfi index=0
options snd_hda_intel index=-2

How can I know which is the correct sound card?

[toni@toni ~]$  cat /proc/asound/modules
 0 snd_hda_intel
 1 snd_hda_intel

[toni@toni ~]$  lsmod | grep snd
snd_hda_codec_hdmi     49213  1 
snd_hda_codec_realtek    67469  1 
snd_hda_codec_generic    63126  1 snd_hda_codec_realtek
snd_hda_intel          26387  5 
snd_hda_controller     26938  1 snd_hda_intel
snd_hda_codec         108536  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
snd_hwdep              17244  1 snd_hda_codec
snd_pcm                88487  4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_timer              26614  1 snd_pcm
snd                    73436  18 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              13031  2 snd,snd_hda_codec

[toni@toni ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC284 Analog [ALC284 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

[toni@toni ~]$ cat /proc/asound/cards
 0 [HDMI           ]: HDA-Intel - HDA Intel HDMI
                      HDA Intel HDMI at 0xf7c14000 irq 34
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf7c10000 irq 31

Last edited by toni (2014-11-16 21:28:07)

Offline

#18 2014-11-16 21:33:09

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: No sound in alsa

Is this a laptop or desktop?  Do you have an off-board/separate soundcard?  If all you have is an on-board soundcard I would pick "0 snd_hda_intel" just because it's the first one detected.  Follow the wiki's advice on how to set this up and reboot.  If you get sound have a party!  If not, pick "1 snd_hda_intel" and repeat the process.  One of them will work and then you'll know which one is the correct soundcard to pick in the future.  If you do mess with the alsa-base.conf file and get your sound issue fixed I strongly recommend you copy it to a backup medium or somewhere else on your hard drive.  That way in the future all you need to do is copy it to the correct directory and reboot.

Offline

#19 2014-11-16 22:14:37

toni
Member
Registered: 2011-10-15
Posts: 437

Re: No sound in alsa

MoonSwan wrote:

Is this a laptop or desktop?  Do you have an off-board/separate soundcard?  If all you have is an on-board soundcard I would pick "0 snd_hda_intel" just because it's the first one detected.  Follow the wiki's advice on how to set this up and reboot.  If you get sound have a party!  If not, pick "1 snd_hda_intel" and repeat the process.  One of them will work and then you'll know which one is the correct soundcard to pick in the future.  If you do mess with the alsa-base.conf file and get your sound issue fixed I strongly recommend you copy it to a backup medium or somewhere else on your hard drive.  That way in the future all you need to do is copy it to the correct directory and reboot.

It's a laptop.

It both has the same name....


cat /proc/asound/modules outputs:

 0 snd_hda_intel
 1 snd_hda_intel

how can indicate order in " /etc/modprobe.d/alsa-base.conf" config file? As below, by trying first one line and then the another?

First attempt:

    options snd_hda_intel index=0

Second attempt:

    options snd_hda_intel index=1

Last edited by toni (2014-11-16 22:14:48)

Offline

#20 2014-11-16 22:39:10

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: No sound in alsa

Damnit somehow my config file I posted failed to show up!  Here it is (again) and it should show you the syntax you're trying to duplicate by putting each "soundcard" on a separate line.  See this code for an example configuration:

#/etc/modprobe.d/alsa-base.conf

options snd slots=snd_ctxfi,snd_hda_intel
options snd_ctxfi index=0
options snd_hda_intel index=-2

I think what the kernel is seeing is the same soundcard that's registering different outputs.  One is an analog device, e.g. card 0: PCH [HDA Intel PCH], device 0: ALC284 Analog [ALC284 Analog].  The other is an HDMI device that's used when you plug in HDMI cables and a suitable output such as a stero amp, e.g. card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]

If I'm right you'll want to follow these instructions that I've cut/pasted from the Arch wiki Alsa page that I posted earlier:

When loading modules that are used by multiple cards (for example snd-hda-intel) it is recommended to include vendor and product identifications into options. To get vid and pid use:

$ lspci -nn | grep -i audio

00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) [1002:4383] (rev 40)
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] RV770 HDMI Audio [Radeon HD 4850/4870] [1002:aa30]
07:05.0 Multimedia audio controller [0401]: VIA Technologies Inc. VT1720/24 [Envy24PT/HT] PCI Multi-Channel Audio Controller [1412:1724] (rev 01)

Last numbers in square brackets are [vid:pid], so for the above example, for setting Azalia as default card following is correct:

/etc/modprobe.d/alsa-base.conf

# SB [HDA ATI SB]
options snd-hda-intel index=0 model=auto vid=1002 pid=4383
# HDMI [HDA ATI HDMI]
options snd-hda-intel index=1 model=auto vid=1002 pid=aa30
# HiFi [Audiotrak Prodigy 7.1 HiFi]
options snd-ice1724 index=2 model=prodigy71hifi vid=1412 pid=1724

Tip: To list vendor and product IDs of USB sound cards, use the lsusb command instead of lspci.

Basically you want Alsa to "see" each iteration of the same soundcard as a separate "device," in this case the analog and digital modes of one soundcard.  The instructions I pasted here should help you sort this out but if not post again and I'll do my best to help you where I can.

Last edited by MoonSwan (2014-11-16 22:41:00)

Offline

#21 2014-11-17 20:22:00

toni
Member
Registered: 2011-10-15
Posts: 437

Re: No sound in alsa

MoonSwan wrote:

Damnit somehow my config file I posted failed to show up!  Here it is (again) and it should show you the syntax you're trying to duplicate by putting each "soundcard" on a separate line.  See this code for an example configuration:

#/etc/modprobe.d/alsa-base.conf

options snd slots=snd_ctxfi,snd_hda_intel
options snd_ctxfi index=0
options snd_hda_intel index=-2

I think what the kernel is seeing is the same soundcard that's registering different outputs.  One is an analog device, e.g. card 0: PCH [HDA Intel PCH], device 0: ALC284 Analog [ALC284 Analog].  The other is an HDMI device that's used when you plug in HDMI cables and a suitable output such as a stero amp, e.g. card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]

If I'm right you'll want to follow these instructions that I've cut/pasted from the Arch wiki Alsa page that I posted earlier:

When loading modules that are used by multiple cards (for example snd-hda-intel) it is recommended to include vendor and product identifications into options. To get vid and pid use:

$ lspci -nn | grep -i audio

00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) [1002:4383] (rev 40)
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] RV770 HDMI Audio [Radeon HD 4850/4870] [1002:aa30]
07:05.0 Multimedia audio controller [0401]: VIA Technologies Inc. VT1720/24 [Envy24PT/HT] PCI Multi-Channel Audio Controller [1412:1724] (rev 01)

Last numbers in square brackets are [vid:pid], so for the above example, for setting Azalia as default card following is correct:

/etc/modprobe.d/alsa-base.conf

# SB [HDA ATI SB]
options snd-hda-intel index=0 model=auto vid=1002 pid=4383
# HDMI [HDA ATI HDMI]
options snd-hda-intel index=1 model=auto vid=1002 pid=aa30
# HiFi [Audiotrak Prodigy 7.1 HiFi]
options snd-ice1724 index=2 model=prodigy71hifi vid=1412 pid=1724

Tip: To list vendor and product IDs of USB sound cards, use the lsusb command instead of lspci.

Basically you want Alsa to "see" each iteration of the same soundcard as a separate "device," in this case the analog and digital modes of one soundcard.  The instructions I pasted here should help you sort this out but if not post again and I'll do my best to help you where I can.

Finally, I have solved it by creating file /etc/modprobe.d/alsa-base.conf which content is:

# Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
options snd_hda_intel index=1 model=auto vid=8086 pid=0c0c
# Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 04)
options snd_hda_intel index=0 model=auto vid=8086 pid=8c20

The problem was the order in which they were initialized at boot time. It was not taking into account the correct one.

Last edited by toni (2014-11-17 20:22:50)

Offline

#22 2014-11-22 16:06:09

toni
Member
Registered: 2011-10-15
Posts: 437

Re: No sound in alsa

Suddenly again the problem has appeared after a few days, see here

Offline

Board footer

Powered by FluxBB