[alsa-devel] Realtek ALC662 rev1 no sound over HDMI

crow crow at linux.org.ba
Mon Jun 27 19:49:15 CEST 2011

On Mon, Jun 27, 2011 at 5:40 PM, Stephen Warren <swarren at nvidia.com> wrote:
> Takashi Iwai wrote at Monday, June 27, 2011 3:14 AM:
>> At Sun, 26 Jun 2011 18:45:30 +0200, crow wrote:
>> >
>> > I am trying to get sound working on kernel 2.6.39 (under archlinux
>> > x86_64 bit distribution) over HDMI to my digital receiver but without
>> > luck. Before this post i asked in #alsa for help, and everything we
>> > tried over there didnt get the sound over HDMI.
>> > I connected headphones to the green jack and ran speaker-test and
>> > there is sound over jack, analog sound plays fine. But runing
>> > alsamixer un-muting spdif/iec958/spdif (1) and trying to re run
>> > speaker-test doesn't output sound over HDMI to my digital receiver.
>> Note that on your device HDMI goes through Nvidia HDMI codec, thus
>> it's irrelevant with ALC262 at all.  The machine shows an SPDIF
>> output connected to ALC262, but this must be different from the HDMI
>> output.  So, the first SPDIF/IEC958 setup is also irrelevant.
>> The second IEC958 setup is for HDMI.

Thanks for explaining it, and you are right HDMI indeed goes through
Nvidia HDMI codec, just in my case i dont get any audio signal through
As you mentioned that above, I took coaxial and digital cable and
connected it directly to SPDIF digital/optical, and did speaker-test
there was sound on my speakers.
Tested with :
speaker-test -c 2 -D hw:0,1
The above is also for both spdif outputs. So indeed ALC262 seems works
just fine.

> Crow, you might find the following document helpful:
> ftp://download.nvidia.com/XFree86/gpu-hdmi-audio-document/gpu-hdmi-audio.html
>> > I tried to use /etc/asound.conf for global settings (tooked from
>> > 2.6.35 archlinux i686 installation) but does not work with 2.6.39
>> > installation, even I am not able to play analog sound:
>> > speaker-test -c2 -twav -l1
>> > This above works without asound.conf, and it plays analog sound on headphones.
>> >
>> > This is how i tried to play sound over HDMI:
>> > speaker-test -c2 -D plughw:0,3 -twav -l1
>> >
>> > The above command does output sound on 2.6.35 (but just over Fron Right)
>> So, something was wrong even on 2.6.35?

With 2.6.35 this my Setup works somehow using HDMI (which is actualy
what I want), with optical/digital spdif i didnt tested it recently,
as with VDR/XBMC
on first time setup I was getting some cracks on speakers, it could be
also my digital receiver problem through (Onkyo TX-SR606), but using
HDMI it doesnt cracks.

> Crow, please try a more default command:
> speaker-test -c 2 -D hw:0,3

I tried above command but without luck, nothing is comming to digital
receiver. I dont even see ony display that it send any audio signal.

>> > I run alsa-info.sh script on both installation and it can be found on
>> > (2) kernel 2.6.39 and (3) kernel 2.6.35.
>> >
>> > I was hoping to get sound working with 2.6.39 (current official
>> > archlinux kernel) over HDMI by just un-muting spdif with alsamixer,
>> > but it seems not to be that easy.
>> >
>> > (1) http://www.abload.de/img/alsa01ji6j.png
>> > (2) http://www.alsa-project.org/db/?f=7bf61ad34a4bb51b615773aab69ae904693a07d7
>> > (3) http://www.alsa-project.org/db/?f=3694c9052c2b8f5d78f8a9e2a465a7c94885449b
>> It's Nvidia, so make sure that the video-driver side supports HDMI
>> audio properly.  You can check /proc/asound/card0/eld#* file to see
>> whether the monitor is properly detected and what ELD values are
>> read.
> ELD data isn't supported on the MCP7x chipset, so the ELD files won't
> appear.

As Warren wrote there isnt ELD files there.

> Crow, which NVIDIA video driver are you using? Can you please try
> upgrading to the latest release from:
> ftp://download.nvidia.com/XFree86/Linux-x86/275.09.07/

I am using that driver already, official archlinux driver:
pacman -Qi nvidia
Name           : nvidia
Version        : 275.09.07-1
URL            : http://www.nvidia.com/
Licenses       : custom
Groups         : None
Provides       : None
Depends On     : kernel26>=2.6.39  kernel26<2.6.40  nvidia-utils=275.09.07
Optional Deps  : None
Required By    : None
Conflicts With : nvidia-96xx  nvidia-173xx
Replaces       : None
Installed Size : 4388.00 K
Packager       : Ionut Biru <ibiru at archlinux.org>
Architecture   : x86_64
Build Date     : Tue 14 Jun 2011 07:08:31 PM CEST
Install Date   : Sat 25 Jun 2011 08:57:15 PM CEST
Install Reason : Explicitly installed
Install Script : Yes
Description    : NVIDIA drivers for kernel26.

I dont have any GUI here, trough i installed xorg,nvidia,alsa and
prepared for VDR/XBMC.
Greping lsmod i see nvidia and snd_hda_codec_hdmi modul loaded.

$ lsmod |grep snd_hda_codec_*
snd_hda_codec_hdmi     22784  1
snd_hda_codec_realtek   297871  1
snd_hda_codec          77703  3
snd_hwdep               6342  1 snd_hda_codec
snd_pcm                73736  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd                    57384  7
$ lsmod |grep nvidia
nvidia              11767757  0
i2c_core               20165  5

With 2.6.35 kernel it is snd_hda_codec_nvhdmi modul trough
(alsa-info.sh output I linked in first post)

Well I must mark this as solved. Inside .xine/config i have :hdmi as
output device defined, and i get sound on my speakers using just HDMI
as connection to my digital receiver.
grep "^[^#]" /var/lib/vdr/.xine/config
audio.output.speaker_arrangement:Pass Through

I actualy didnt test it before with xine, and was trying just
speaker-test which seems could not output sound over :hdmi (0,3).
Maybe there is bug in speaker-test, but then after getting it work
with xine i could test it with speaker-test to..
Then i reboted my htpc and got it.. It seems HDMI output isnt
activated, or speaker-test cant activate it somehow..
$ speaker-test -c 2 -r 48000 -D hw:0,3
$ speaker-test -c 2 -D hw:0,3
Both above command dont work after first boot. And with aplay i get
this (command from 13.7. Test Playback With ALSA Physical Devices (1):
aplay -D hw:0,3 /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:1065: Channels count non available

But if i run xine, which connects to VDR i get sound, and after
killing xine, and re-run speaker-test i got audio over HDMI just
$ speaker-test -c 2 -r 48000 -D hw:0,3
$ speaker-test -c 2 -D hw:0,3

Even aplay play the file with 'hwplug' I dont get anything on speakers
(trough xine, and after killing xine, speaker-test play sound just
$ aplay -D plughw:0,3 /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

(1) ftp://download.nvidia.com/XFree86/gpu-hdmi-audio-document/gpu-hdmi-audio.html

More information about the Alsa-devel mailing list