Friday, September 30, 2011

No sound on Realtek ALC269VB under Linux

As of 30/09/2011, ALC269VB is not the support model listed in
www.realtek.com/downloads/downloadsview.aspx?langid=1&pfid=24&level=4&conn=3&downtypeid=3

I thought it must be a key (e.g. laptop-amic) to define in /etc/modprobe.d/alsa-base.conf
for the sound card to work properly like
https://help.ubuntu.com/community/HdaIntelSoundHowto
and http://siripong-computer-tips.blogspot.com/2011/07/82801i-vostro-v13-debian-no-sound.html

After hours of trial and error changing snd-hda-intel model=auto, basic, asus
and reboots, there were no sounds from Realtek ALC269VB of ASUS X43B Series.


Finally, I found that the root cause was that
"the modern video-cards have an little audio support built-in, for HDMI.
In some cases, ALSA misunderstand where is the 'main' sound hardware".
From http://www.linuxquestions.org/questions/slackware-14/no-sound-with-flash-player-in-firefox-after-adding-nvidia-gt-220-graphics-card-809773/


$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: SB [HDA ATI SB], device 0: ALC269VB Analog [ALC269VB Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0


Solution
======
The solution is simply set the default PCM device.


How to do that
===========
Big Thanks to: http://alsa.opensrc.org/.asoundrc

# Using aplay -L you can get a List of existing PCM output devices.

$ aplay -L
....
front:CARD=SB,DEV=0
HDA ATI SB, ALC269VB Analog
Front speakers
......

# To set the default device, place a pcm.!default line in the .asoundrc

$ echo 'pcm.!default front:SB' > ~/.asoundrc

While aplay is still error, there are sounds from vlc and iceweasel.

$ aplay /usr/share/sounds/alsa/Noise.wav
Playing WAVE '/usr/share/sounds/alsa/Noise.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1071: Channels count non available



My Environment
============
ASUS X43BY-VX036D
Linux debian wheezy 3.0.0-1-amd64
Advanced Linux Sound Architecture Driver Version 1.0.24.

$ lspci -k
00:00.0 Host bridge: Advanced Micro Devices [AMD] Family 14h Processor Root Complex
    Subsystem: Advanced Micro Devices [AMD] Pavilion DM1Z-3000 Host bridge
00:01.0 VGA compatible controller: ATI Technologies Inc Device 9806
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: radeon
00:01.1 Audio device: ATI Technologies Inc Wrestler HDMI Audio [Radeon HD 6250/6310]
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: HDA Intel
00:04.0 PCI bridge: Advanced Micro Devices [AMD] Family 14h Processor Root Port
    Kernel driver in use: pcieport
00:11.0 SATA controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] (rev 40)
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ahci
00:12.0 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ohci_hcd
00:12.2 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ehci_hcd
00:13.0 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ohci_hcd
00:13.2 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ehci_hcd
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 42)
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: piix4_smbus
00:14.1 IDE interface: ATI Technologies Inc SB7x0/SB8x0/SB9x0 IDE Controller (rev 40)
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: pata_atiixp
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40)
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: HDA Intel
00:14.3 ISA bridge: ATI Technologies Inc SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)
    Subsystem: ASUSTeK Computer Inc. Device 100c
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40)
00:14.5 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ohci_hcd
00:15.0 PCI bridge: ATI Technologies Inc SB700/SB800 PCI to PCI bridge (PCIE port 0)
    Kernel driver in use: pcieport
00:15.1 PCI bridge: ATI Technologies Inc SB700/SB800 PCI to PCI bridge (PCIE port 1)
    Kernel driver in use: pcieport
00:16.0 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ohci_hcd
00:16.2 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ehci_hcd
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 0 (rev 43)
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 3
    Kernel driver in use: k10temp
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 6
00:18.6 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 5
00:18.7 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 7
01:00.0 VGA compatible controller: ATI Technologies Inc NI Seymour [AMD Radeon HD 6470M]
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: radeon
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: r8169
04:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
    Subsystem: Lite-On Communications Inc Device 6623
    Kernel driver in use: ath9k


Useful commands + output
=====================
$ aplay /usr/share/sounds/alsa/Noise.wav
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
aplay: main:666: audio open error: No such file or directory

$ sudo alsamixer

$ dmesg | grep -i hda
[ 8.100103] HDA Intel 0000:00:01.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 8.100259] HDA Intel 0000:00:01.1: irq 42 for MSI/MSI-X
[ 8.100298] HDA Intel 0000:00:01.1: setting latency timer to 64
[ 8.442707] HDA Intel 0000:00:14.2: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 8.588950] hda_codec: ALC269VB: BIOS auto-probing.
[ 8.592614] input: HDA ATI SB Mic as /devices/pci0000:00/0000:00:14.2/sound/card1/input13
[ 8.592763] input: HDA ATI SB Headphone as /devices/pci0000:00/0000:00:14.2/sound/card1/input14

$ cat /proc/asound/card1/codec* | grep Codec
Codec: Realtek ALC269VB

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=Generic,DEV=0
    HD-Audio Generic, HDMI 0
    HDMI Audio Output
front:CARD=SB,DEV=0
    HDA ATI SB, ALC269VB Analog
    Front speakers
surround40:CARD=SB,DEV=0
    HDA ATI SB, ALC269VB Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=SB,DEV=0
    HDA ATI SB, ALC269VB Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=SB,DEV=0
    HDA ATI SB, ALC269VB Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=SB,DEV=0
    HDA ATI SB, ALC269VB Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=SB,DEV=0
    HDA ATI SB, ALC269VB Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers


$ sudo modinfo -p snd_hda_intel
index:Index value for Intel HD audio interface. (array of int)
id:ID string for Intel HD audio interface. (array of charp)
enable:Enable Intel HD audio interface. (array of bool)
model:Use the given board model. (array of charp)
position_fix:DMA pointer read method.(0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO). (array of int)
bdl_pos_adj:BDL position adjustment offset. (array of int)
probe_mask:Bitmask to probe codecs (default = -1). (array of int)
probe_only:Only probing and no codec initialization. (array of int)
single_cmd:Use single command to communicate with codecs (for debugging only). (bool)
enable_msi:Enable Message Signaled Interrupt (MSI) (int)
patch:Patch file for Intel HD audio interface. (array of charp)
beep_mode:Select HDA Beep registration mode (0=off, 1=on, 2=mute switch on/off) (default=1). (array of int)
power_save:Automatic power-saving timeout (in second, 0 = disable). (int)
power_save_controller:Reset controller in power save mode. (bool)

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

options snd cards_limit=1
options snd-hda-intel model=auto position_fix=0

alias snd-card-1 snd-hda-intel

No comments:

Post a Comment