Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Tuesday, November 9, 2010

OpenSUSE -Sound Howto

[Content changed and updated!]
You should not have to run kmix or alsamixer as user root.
$ kmix
$ alsamixer 
# /etc/init.d/alsasound stop
# /etc/init.d/alsasound start

----------------
System INFO 
# dmesg
# lspci
# lsmod

# aplay -l
# amixer
# cat /proc/asound/cards
# head -n 3 /proc/asound/card1/codec#0
# amixer
# alsactl init 
# fuser -v /dev/snd/*

---------------------------

Hardware without sound:
ASUS P7P55-M
audio chipset VIA VT1708S
openSUSE 11.3 (64-bit)
===========================
OpenSUSE upgraded from 11.2 to 11.3 and then...:

SDB:Intel-HDA sound problems===========================
SDB:Audio troubleshootingAfter openSUSE installation, in some cases it is necessary to adjust audio mixer settings in order to get sound.
For some sound codecs, the RPM "alsa-firmware" (which is not installed by default) is needed to provide sound functionality. In some other cases, where the audio hardware is newer, a more up-to-date version of ALSA is required. In other cases (due to the very large numbers of audio cards on the market), YaST is not able to configure the card automatically, and hence manual configuration is necessary.
ALSA overview
Note that the openSUSE sound driver comes with an application called “alsa” (advanced linux sound architecture) that is installed by default, and users are given a chance to configure this during the openSUSE installation.
Installing alsa-firmware on openSUSE-10.3 to 11.2

Starting with openSUSE-10.3, some of the older sound cards also require the application “alsa-firmware”, in addition to “alsa” and “alsa-utils”, so before proceeding, ensure that you have “alsa”, “alsa-utils”, and “alsa-firmware” installed.
To see if you have alsa-firmware installed, type in a konsole/xterm:
rpm -q alsa alsa-utils alsa-firmware
and if you get:
alsa-1.0.14-31.2
alsa-utils-1.0.14-27
package alsa-firmware is not installed
then clearly alsa-firmware is not installed, and it is useful for openSUSE-10.3 users (and possibly essential for some hardware codecs under openSUSE-10.3) that you install it now.
For other openSUSE's the alsa versions will differ slightly.
In openSUSE-10.3 - 11.2, to install alsa-firmware, in a konsole/xterm, type "su" (without quotes) followed by root password to get root permissions in that konsole/xterm, and then to install alsa-firmware type: 
# zypper install alsa-firmware
After alsa-firmware is installed, restart your PC (to restart alsa) and check your sound (see STEP-1 below)
STEP-1: How to test your sound 
A simple test to see if your sound works, is to open a konsole or xterm, and type (it may be easier to copy and paste this into your konsole/xterm):
speaker-test -Dplug:front -c2 -l5 -twav
To stop the above test, while the konsole/xterm has the mouse focus, press on the keyboard.
Note you should check your mixer settings (kmix if using KDE, and alsamixer if using Gnome) to ensure that PCM and Master Volume are set high.
If no sound initially, try around 95% and back off the levels once basic sound is established. Note the test for surround sound is different.
If that test yields errors, try instead this more simple test:
speaker-test -c2 -l5 -twav
If there is no sound from either test when using a konsole (or xterm) as a regular user, try as user root. ie type "su" (no quotes, and enter root password when prompted) and then try the test line. If you get sound with root permissions, but you got no sound as a regular user, then you probably have a permissions problem. See below in Step-6 for how to deal with that. Assuming you have no sound at all, go to step-2 below.
STEP-2 

===========================


SDB:AudioTroubleshooting - openSUSE
* in a terminal, or xterm, or konsole, type: uname -a #and post output here
* in a terminal, or xterm, or konsole, type: rpm -qa | grep alsa #and post output here
* in a terminal, or xterm, or konsole, type: cat /etc/modprobe.d/sound #and post output here
* in addition in openSUSE-11.1 run the script /usr/sbin/alsa-info.sh and post here the output URL. Just the URL

===========================
Source
Run (with your PC connected to the Internet) the diagnostic script:

/usr/sbin/alsa-info.sh
and select the share/upload option, post here the website/URL address it gives you for the script output.
Your ALSA information is located at http://www.alsa-project.org/db/?f=5eca09337ca520808677a5fea87048b2b94a8779
Please inform the person helping you.
If you can't find that, then run:
/usr/sbin/alsa-info.sh --no-upload
and open the file
/tmp/alsa-info.txt
and copy the file and paste the contents on New - Pastie and press paste on that site, and post here the website/URL address where the pasted contents end up after pressing paste.
========================

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 1/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 0: Intel [HDA Intel], device 1: VT1708S Digital [VT1708S Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
# cat /proc/asound/cards
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xf5ff8000 irq 38
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf7bfc000 irq 17
# head -n 3 /proc/asound/card1/codec#0
Codec: Nvidia GPU 0b HDMI/DP
Address: 0
Function Id: 0x1
# amixer
Simple mixer control 'Master Front',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [on]
  Front Right: Playback 0 [0%] [-34.50dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 0 [0%] [-51.00dB]
  Front Right: Playback 0 [0%] [-51.00dB]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 42
  Mono:
  Front Left: Playback 42 [100%] [0.00dB] [on]
  Front Right: Playback 42 [100%] [0.00dB] [on]
Simple mixer control 'Front Mic',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [on]
  Front Right: Playback 0 [0%] [-34.50dB] [on]
Simple mixer control 'Front Mic Boost',0
  Capabilities: cvolume penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 3
  Front Left: Capture 3 [100%] [30.75dB]
  Front Right: Capture 3 [100%] [30.75dB]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 42
  Mono:
  Front Left: Playback 42 [100%] [0.00dB] [on]
  Front Right: Playback 42 [100%] [0.00dB] [on]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 42
  Mono: Playback 42 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 42
  Mono: Playback 42 [100%] [0.00dB] [on]
Simple mixer control 'Side',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 42
  Mono:
  Front Left: Playback 34 [81%] [-12.00dB] [on]
  Front Right: Playback 34 [81%] [-12.00dB] [on]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [on]
  Front Right: Playback 0 [0%] [-34.50dB] [on]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Mic Boost',0
  Capabilities: cvolume penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 3
  Front Left: Capture 0 [0%] [0.00dB]
  Front Right: Capture 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch penum
  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 penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 0 [0%] [-16.50dB] [on]
  Front Right: Capture 0 [0%] [-16.50dB] [on]
Simple mixer control 'Digital',0
  Capabilities: cvolume penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 120
  Front Left: Capture 0 [0%] [-30.00dB]
  Front Right: Capture 0 [0%] [-30.00dB]
Simple mixer control 'Independent HP',0
  Capabilities: enum
  Items: 'OFF' 'ON'
  Item0: 'OFF'
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Stereo Mixer' 'Mic' 'Front Mic' 'Line'
  Item0: 'Stereo Mixer'
Simple mixer control 'Smart 5.1',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
======================
The order of audio devices could also be reversed.
That order of audio devices is enough to cause a problem if your desktop/applications look at the wrong device, and IMHO it is important you sort that. 

Please, what are you using for a speaker test for sound?
If no sound in any application, then try each of the following in a terminal, first as a regular user and then with root permissions. Try with and without headsets:
  • first:
    speaker-test -Dplug:front -c2 -l5 -twav
  • second, try again:
    speaker-test -c2 -l5 -twav
  • third:
    speaker-test -c2 -D hw:0,0 -t wav -l3
  • fourth, this next command has a volume meter at the bottom of its output with a changing number of #'s and %'s to show volume levels so run this command and tell me if the number of #'s and %'s are changing:
    aplay -vv /usr/share/sounds/alsa/Front_*
  • fifth: and also:
    aplay -vv /usr/share/sounds/alsa/test.wav
Do any of those give an indication of sound ?

Also, what happens if you disable pulse audio and then test? i.e. you could open up a Terminal session and enter su - and then the password.

At the terminal prompt enter this command (with root permissions).
# setup-pulseaudio --disable
restart and test.

If that does not work, then you MUST enable it again with (with root permissions):
# setup-pulseaudio --enable
Whether any of the above works, or does not work, PLEASE write a bug report on openSUSE-11.3 as this should work automatically. There is guidance for writing bug reports here: Submitting Bug Reports - openSUSE Please write the bug report against component "sound" in openSUSE-11.3 M7. Please include ALL salient information in the bug report, as the SuSE-GmbH sound packager, who is also an alsa sound driver developer, will refuse to read a forum thread. Any forum thread. Please attach to the bug report the /tmp/alsa-info.txt file from running:
# /usr/sbin/alsa-info.sh --no-upload
... the advantage of raising the bug report is if the alsa developer (also a SuSE-GmbH sound packagers) fixes the bug, he will also send it upstream so that ALL linux distributions will benefit from the fix. Both Fedora and SuSE have an excellent reputation for this (sending fixes upstream). The most popular Linux distribution has a poor reputation in this regard.
===========================
ii  alsa-base                                1.0.20+dfsg-1
         ALSA driver configuration files
ii  alsa-utils                               1.0.20-1
         ALSA utilities
ii  libesd-alsa0                             0.2.41-4
         Enlightened Sound Daemon (ALSA) - Shared lib
ii  libsdl1.2debian-alsa                     1.2.13-4+b1
         Simple DirectMedia Layer (with X11 and ALSA

$ sudo alsactl init
Unknown hardware: "HDA-Intel" "Analog Devices AD1986A"
"HDA:11d41986,104381b3,00100500" "0x1043" "0x81cb"
Hardware is initialized using a guess method

$ cat /proc/asound/cards
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfe024000 irq 22

$ cat /proc/asound/devices
  0: [ 0]   : control
 16: [ 0- 0]: digital audio playback
 17: [ 0- 1]: digital audio playback
 24: [ 0- 0]: digital audio capture
 33:        : timer

alsamixer shows:
Card: 
Chip: 
(everything is unmuted)

$ aplay -l
 
$ aplay -L
$ cat /proc/asound/card0/codec#0
=======================


Uncomplete workaround until it can be fixed:
Connect your speakers or headset to the rear speaker out port (black)
Do Not use the LIne Out Port (green or lime)!
You can hear mp3 and wav files

No comments: