Jump to content
  • 0

Alsa, no sound


lambd0x
 Share

Question

Hello everyone I've just finished installing Funtoo in my desktop and managed to get almost everything to work, but still I've not been able to configure sound with alsa.

 

I've installed awesome and created a widget for sound control that calls up alsa. But every time I try to open alsa from it I get an error, just the same if I try it directly from terminal:

 

lambd0x@lambd0x ~ $ alsamixer
cannot open mixer: No such file or directory
lambd0x@lambd0x ~ $ sudo alsamixer
cannot open mixer: No such file or directory
 

And the widget doesn't show any interface, just default. What can I do to get it working?

Thanks for your time :)

 

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

Please run the alsa-info.sh

wget http://www.alsa-project.org/alsa-info.sh
chmod +x alsa-info.sh
./alsa-info.sh

Post the link to  your ALSA information in your reply.

On my computer:

rj@funtoo ~ $ ./alsa-info.sh
ALSA Information Script v 0.4.64
--------------------------------

This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.

dmesg
lspci
lsmod
aplay
amixer
alsactl
/proc/asound/
/sys/class/sound/
~/.asoundrc (etc.)

See './alsa-info.sh --help' for command line options.

Automatically upload ALSA information to www.alsa-project.org? [y/N] : y
Uploading information to www.alsa-project.org ... Done!

Your ALSA information is located at http://www.alsa-project.org/db/?f=0a44bb859e5ab780ae80ee103e30c182a438fe27

Please inform the person helping you.
Link to comment
Share on other sites

  • 0

ALSA Information Script v 0.4.64
--------------------------------

This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.

  dmesg
  lspci
  lsmod
  aplay
  amixer
  alsactl
  /proc/asound/
  /sys/class/sound/
  ~/.asoundrc (etc.)

See './alsa-info.sh --help' for command line options.

cat: /proc/asound/version: No such file or directory
grep: /proc/asound/cards: No such file or directory
cat: /proc/asound/cards: No such file or directory
cat: /proc/asound/modules: No such file or directory
ls: cannot access /dev/snd/*: No such file or directory
grep: /proc/asound/cards: No such file or directory
/usr/sbin/alsactl: save_state:1595: No soundcards found...
cat: /tmp/alsa-info.0UAoNvum2u/alsactl.tmp: No such file or directory
Automatically upload ALSA information to www.alsa-project.org? [y/N] : y

Uploading information to www.alsa-project.org ...  Done!

Your ALSA information is located at http://www.alsa-project.org/db/?f=f56b142bfd1cb791667856e0cc606f7792768345

Please inform the person helping you.

 

 

 

The strange is that /var/lib/portage/world says that alsa-utils is installed

lambd0x@lambd0x ~/Downloads $ cat /var/lib/portage/world
app-admin/sudo
media-libs/libexif
media-plugins/alsa-plugins
media-sound/alsa-utils
media-sound/pulseaudio
media-sound/volumeicon
net-irc/irssi
sys-boot/boot-update
sys-kernel/debian-sources
sys-kernel/linux-firmware
www-client/firefox
www-client/links
x11-base/xorg-x11
x11-drivers/xf86-video-intel
x11-terms/xterm
x11-wm/awesome
 

 

Link to comment
Share on other sites

  • 0

All Loaded Modules has no snd kernel modules loaded.

 

 

These are the snd modules loaded on my system:
rj@funtoo ~ $ sudo lsmod | grep snd
snd_hda_codec_realtek    67127  1
snd_hda_codec_generic    63158  1 snd_hda_codec_realtek
snd_hda_codec_hdmi     45117  1
snd_hda_intel          26327  1
snd_hda_controller     26646  1 snd_hda_intel
snd_hda_codec         104456  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                88603  4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_timer              26614  1 snd_pcm
snd                    69340  10 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
Link to comment
Share on other sites

  • 0

This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.

  dmesg
  lspci
  lsmod
  aplay
  amixer
  alsactl
  /proc/asound/
  /sys/class/sound/
  ~/.asoundrc (etc.)

See './alsa-info.sh --help' for command line options.

cat: /proc/asound/version: No such file or directory
grep: /proc/asound/cards: No such file or directory
cat: /proc/asound/cards: No such file or directory
cat: /proc/asound/modules: No such file or directory
ls: cannot access /dev/snd/*: No such file or directory
grep: /proc/asound/cards: No such file or directory
/usr/sbin/alsactl: save_state:1595: No soundcards found...
cat: /tmp/alsa-info.DyHlMiTKcK/alsactl.tmp: No such file or directory
Automatically upload ALSA information to www.alsa-project.org? [y/N] : y
Uploading information to www.alsa-project.org ...  Done!

Your ALSA information is located at http://www.alsa-project.org/db/?f=c1a1b03b9ad55ee45c2f0cd34bbd11c42b6f4884

Please inform the person helping you.
 

 

Same thing.

Link to comment
Share on other sites

  • 0

Linux funtoo 3.19.3-1~exp1
hda_snd_intel has matching pciids for your sound hardware but the system is not auto-loading it.

funtoo rj # modprobe -c | grep -i 8086.*0c0c
alias pci:v00008086d00000C0Csv*sd*bc*sc*i* snd_hda_intel
funtoo rj # modprobe -c | grep -i 8086.*8c20
alias pci:v00008086d00008C20sv*sd*bc*sc*i* snd_hda_intel

Set auto-load hda-snd-intel kernel module.
Open /etc/conf.d/modules as root in text editor.

Add snd-hda-intel to modules=

modules="snd-hda-intel"

Save/exit text editor.

Reboot

Link to comment
Share on other sites

  • 0

ALSA Information Script v 0.4.64
--------------------------------

This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.

  dmesg
  lspci
  lsmod
  aplay
  amixer
  alsactl
  /proc/asound/
  /sys/class/sound/
  ~/.asoundrc (etc.)
See './alsa-info.sh --help' for command line options.

cat: /proc/asound/version: No such file or directory
grep: /proc/asound/cards: No such file or directory
cat: /proc/asound/cards: No such file or directory
cat: /proc/asound/modules: No such file or directory
ls: cannot access /dev/snd/*: No such file or directory
grep: /proc/asound/cards: No such file or directory
/usr/sbin/alsactl: save_state:1595: No soundcards found...
cat: /tmp/alsa-info.v7YNDCLcjD/alsactl.tmp: No such file or directory
Automatically upload ALSA information to www.alsa-project.org? [y/N] : y
Uploading information to www.alsa-project.org ...  Done!

Your ALSA information is located at http://www.alsa-project.org/db/?f=7e7f3a22ee5151087b0052fd1b3a45e2107b48b8

Please inform the person helping you.

 

Link to comment
Share on other sites

  • 0

snd-hda-intel has to be loaded for sound.
Open 2 terminals,login as root or use sudo if installed in Terminal 2.
Terminal 1:

dmesg -e  -w

Terminal 2:

modprobe -vv snd-hda-intel

Post the output from the command in Terminal 2 and any output in Terminal 1 after the [Date Time] tag.

 

 

The output appears like this on a system with working sound.
Terminal 2 output:

funtoo rj # modprobe -vv snd-hda-intel
modprobe: INFO: custom logging function 0x80512d0 registered
insmod /lib/modules/3.19.3-1~exp1/kernel/sound/soundcore.ko
insmod /lib/modules/3.19.3-1~exp1/kernel/sound/core/snd.ko cards_limit=1
insmod /lib/modules/3.19.3-1~exp1/kernel/sound/core/snd-timer.ko
insmod /lib/modules/3.19.3-1~exp1/kernel/sound/core/snd-pcm.ko
insmod /lib/modules/3.19.3-1~exp1/kernel/sound/core/snd-hwdep.ko
insmod /lib/modules/3.19.3-1~exp1/kernel/sound/pci/hda/snd-hda-codec.ko
insmod /lib/modules/3.19.3-1~exp1/kernel/sound/pci/hda/snd-hda-controller.ko
insmod /lib/modules/3.19.3-1~exp1/kernel/sound/pci/hda/snd-hda-intel.ko
modprobe: INFO: context 0x9dae150 released

Terminal 1 output:

[Nov 4 11:30] snd_hda_intel 0000:01:00.1: Handle VGA-switcheroo audio client
[ +0.017330] input: HDA ATI HDMI HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input5
[ +0.007888] sound hdaudioC0D2: autoconfig: line_outs=4 (0x14/0x15/0x16/0x17/0x0) type:line
[ +0.000009] sound hdaudioC0D2: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ +0.000005] sound hdaudioC0D2: hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[ +0.000004] sound hdaudioC0D2: mono: mono_out=0x0
[ +0.000004] sound hdaudioC0D2: dig-out=0x1e/0x0
[ +0.000004] sound hdaudioC0D2: inputs:
[ +0.000005] sound hdaudioC0D2: Rear Mic=0x18
[ +0.000005] sound hdaudioC0D2: Front Mic=0x19
[ +0.000004] sound hdaudioC0D2: Line=0x1a
[ +0.000004] sound hdaudioC0D2: CD=0x1c
[ +0.000003] sound hdaudioC0D2: dig-in=0x1f
[ +0.018750] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card0/hdaudioC0D2/input6
[ +0.001899] input: HDA Intel Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input7
[ +0.003180] input: HDA Intel Front Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8
[ +0.001279] input: HDA Intel Line as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9
[ +0.000298] input: HDA Intel Line Out Front as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
[ +0.000312] input: HDA Intel Line Out Surround as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
[ +0.000273] input: HDA Intel Line Out CLFE as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[ +0.000255] input: HDA Intel Line Out Side as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
Link to comment
Share on other sites

  • 0

Hi, I found a way to get alsamixer working and managed to change it's configurations. It does identify: default,  HDA Intel HDMI(chip Intel haswell) and HDA Intel PCH(chip Realtek ALC887-V). However just the last one shows up channels to be configured. I've unmuted Master, but no sound yet.

 

The results your requested...

Terminal 1:

...
[  +0.083369] input: HDA Intel HDMI HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.0/sound/card0/input8
[  +0.000042] input: HDA Intel HDMI HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.0/sound/card0/input9
[  +0.000035] input: HDA Intel HDMI HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.0/sound/card0/input10
[  +0.035024] sound hdaudioC1D2: autoconfig: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line
[  +0.000002] sound hdaudioC1D2:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[  +0.000001] sound hdaudioC1D2:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[  +0.000001] sound hdaudioC1D2:    mono: mono_out=0x0
[  +0.000000] sound hdaudioC1D2:    inputs:
[  +0.000002] sound hdaudioC1D2:      Rear Mic=0x18
[  +0.000001] sound hdaudioC1D2:      Front Mic=0x19
[  +0.000001] sound hdaudioC1D2:      Line=0x1a
[  +0.000001] sound hdaudioC1D2:      CD=0x1c
[  +0.009288] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card1/hdaudioC1D2/input11
[  +0.000436] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card1/input12
[  +0.000072] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1b.0/sound/card1/input13
[  +0.000077] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1b.0/sound/card1/input14
[  +0.000078] input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1b.0/sound/card1/input15
...

Terminal 2:

modprobe: INFO: custom logging function 0x409d40 registered
modprobe: INFO: context 0xaf9260 released

I've been looking for other clues and came across profiling and mix-ins. Wouldn't be necessary to use them in order to play something?

I have setup a core flavor so far.

 

Details above:

!!! Found 2 make.conf files, using both '/etc/make.conf' and '/etc/portage/make.conf'

=== Enabled Profiles: ===

        arch: pure64
       build: current
     subarch: intel64-haswell-pure64
      flavor: core
     mix-ins: (not set)


=== All inherited flavors from core flavor: ===

                         minimal (from core flavor)


I also ran the alsa script again and it gave me what follows:

This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.

  dmesg
  lspci
  lsmod
  aplay
  amixer
  alsactl
  /proc/asound/
  /sys/class/sound/
  ~/.asoundrc (etc.)

See './alsa-info.sh --help' for command line options.

Automatically upload ALSA information to www.alsa-project.org? [y/N] : y
Uploading information to www.alsa-project.org ...  Done!

Your ALSA information is located at http://www.alsa-project.org/db/?f=1706580caa6746a247a8eb3e6a203e78e4114aa4

Please inform the person helping you.

By the way, as I did get alsamixer working from removing every older config file of it and reinstalling it the emerging again alsa-lib my volumeicon recognizes the configs set by alsamixer.

Link to comment
Share on other sites

  • 0

The output from alsainfo looks good. HDMI audio is set to default card 0.
If you don't have speakers that connect to HDMI you need to switch card 1 to card 0 with an .asoundrc file.

APLAY

**** 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: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I use this script to output asoundrc

#!/bin/bash
# asoundrc v0.1.0 20090101 markc@renta.net GPLv3
# asoundrc v0.2.0 20090320 quatro_por_quatro@yahoo.es GPLv3
#
# A simple script to create a particular default audio device regardless
# of what cards are loaded or in what order. It could be used anytime or
# placed in a ~/.bashrc script for a persistent setup every login.
#
# Usage: asoundrc [DEFAULT_CARD] > ~/.asoundrc

# use the first parameter as the card name, or else
# look for the sound card, discarding those that are only microphones
# when there are multiple cards, use the first one
if default_card="${1:-$(cat "$(for f in $(ls -1 /proc/asound/card[0-9]*/{midi,codec}* 2>/dev/null); do echo "${f%/*}"; done \
| sed -e '\|^[\[:blank:]\]$|d' -e 'q')/id" 2>/dev/null)}"; then
   echo "Using sound card: ${default_card}" >&2 
   cat /proc/asound/card[0-9]*/id | \
   gawk --assign default_card="${default_card}" \
'{print "pcm."$1" { type hw; card "$1"; }\nctl."$1" { type hw; card "$1"; }" }
END {print "pcm.!default pcm."default_card"\nctl.!default ctl."default_card}'
else
   echo "Warning: No sound cards found." >&2
fi

I set epro right after booting into base the first time so proper use flags are set prior to merging audio/video programs,desktop environment.
Otherwise you have problems with some video/audio file formats not playing,flash drives not automounting,etc.. 
 

rj@funtoo ~ $ sudo epro show

=== Enabled Profiles: ===

        arch: x86-32bit
       build: stable
     subarch: generic_32
      flavor: desktop
     mix-ins: lxde


=== All inherited flavors from desktop flavor: ===

                     workstation (from desktop flavor)
                            core (from workstation flavor)
                         minimal (from core flavor)

=== All inherited mix-ins from desktop flavor: ===

                               X (from workstation flavor)
                           audio (from workstation flavor)
                             dvd (from workstation flavor)
                           media (from workstation flavor)
      mediadevice-audio-consumer (from media mix-in)
                mediadevice-base (from mediadevice-audio-consumer mix-in)
      mediadevice-video-consumer (from media mix-in)
                mediadevice-base (from mediadevice-video-consumer mix-in)
        mediaformat-audio-common (from media mix-in)
          mediaformat-gfx-common (from media mix-in)
        mediaformat-video-common (from media mix-in)
                  console-extras (from workstation flavor)
                           print (from desktop flavor)

Link to comment
Share on other sites

  • 0

Hi!

So I need to create a .asoundrc defining the other card to play. I assume your .asoundrc doesn't work for me. Considering that I got these two:

 cat /proc/asound/cards 
 0 [HDMI           ]: HDA-Intel - HDA Intel HDMI
                      HDA Intel HDMI at 0xf0514000 irq 31
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf0510000 irq 32

but what is the required syntax to set the correct card in this file?

 

So far I tried what I read at gentoo/funtoo alsa page:

nano .asoundrc


pcm.!default {
        type hw
        card 0
}

ctl.!default {
        type hw
        card 1
}


Another thing, I saw at the same page that there is a command to test my audio card output. But it reports that the file or the directory doesn't exist, is it normal?

aplay -D default test.wav
aplay: main:722: audio open error: No such file or directory

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...