You are not logged in.

#1 2014-04-24 17:44:19

ltorres
Member
Registered: 2012-01-18
Posts: 7

HDMI audio on Lenovo L540 not working

I am trying to get HDMI output to work on a Lenovo L540 through the Mini DisplayPort to an HDMI output, and I am getting video but am not getting audio output. I opened Pulse Audio Audio control (pavucontrol) and under Output Devices, it recognizes that HDMI/ DisplayPort is plugged in. I can run a video in VLC and set pulse audio to put the audio on "Built-in Audio Digital Stereo HDMI" and the volume activity bar is moving, but there is no output

Here is the output for cat /proc/asound/cards

 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf2534000 irq 46
 1 [HDMI           ]: HDA-Intel - HDA Intel HDMI
                      HDA Intel HDMI at 0xf2530000 irq 48
29 [ThinkPadEC     ]: ThinkPad EC - ThinkPad Console Audio Control
                      ThinkPad Console Audio Control at EC reg 0x30, fw unknown

And the output for aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC292 Analog [ALC292 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/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

I also created a file called ~/.asoundrc and it contains:

pcm.!default {
type hw
card 1
device 3
}

Last edited by ltorres (2014-04-24 17:56:34)

Offline

#2 2014-04-24 18:39:11

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: HDMI audio on Lenovo L540 not working

What does

amixer -c HDMI

say?

Offline

#3 2014-04-24 19:29:12

ltorres
Member
Registered: 2012-01-18
Posts: 7

Re: HDMI audio on Lenovo L540 not working

$ amixer -c HDMI
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',2
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

I also have created /etcmodprobe.d/alsa.conf in order to get the audio to work, before I couldn't get audio to work on just my laptop speakers:

$ cat /etc/modprobe.d/alsa.conf 
options snd_hda_intel index=1

Last edited by ltorres (2014-04-24 19:47:52)

Offline

#4 2014-04-24 19:55:51

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: HDMI audio on Lenovo L540 not working

I would try getting HDMI audio to work with alsa first. With pulseaudio killed check:

speaker-test -c 2 -t wav -D plughw:HDMI

If it works, PA is at fault, look at its wiki. If it does not work, check settings of HDMI with iecset from alsa-utils package. Check your boot parameters (radeon.audio=1), depending on the drivers used.

Both cards use snd-hda-intel, use vid and pid like I suggested [on the wiki], otherwise it is a gamble at every boot.

Last edited by emeres (2014-04-24 19:58:30)

Offline

#5 2014-04-25 05:43:52

ltorres
Member
Registered: 2012-01-18
Posts: 7

Re: HDMI audio on Lenovo L540 not working

I tried running

speaker-test -c 2 -t wav -D plughw:HDMI

And I get

Playback device is plughw:HDMI
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Playback open error: -2,No such file or directory

Then I ran

iecset audio on

And I get:

control "IEC958 Playback Default" (index -1) not found

Do you think I have to change something in my /etc/modprob.d/alsa.conf?

Offline

#6 2014-04-25 08:14:09

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: HDMI audio on Lenovo L540 not working

In your case there is no device 0 for HDMI and that is what speaker-test looked for, I overlooked that, sorry. Use instead:

speaker-test -c 2 -t wav -D plughw:HDMI,3

Check the manual/info/help for iecset, it might be necessary to be in audio, but that brings other aspects with it, so running iecset as root, might work better. Try:

iecset -D hw:HDMI
iecset -D hw:HDMI,3

Last edited by emeres (2014-04-25 09:57:33)

Offline

#7 2014-04-25 16:33:06

ltorres
Member
Registered: 2012-01-18
Posts: 7

Re: HDMI audio on Lenovo L540 not working

I looked over some of your earlier comments, and I set the video and audio PID, based off your previous suggestions:

$ lspci -nn | grep -i audio
00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 05)

$ cat /etc/modprobe.d/alsa.conf 
options snd_hda_intel index=0 model=auto vid=8086 pid=0c0c
options snd_hda_intel index=1 model=auto vid=8086 pid=8c20

And added this to /etc/default/grub , though not sure what this would do because I'm not running a radeon video card, just an intel video card

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.audio=1"

Now with the previous comment you made, I did these:

$ sudo iecset -D hw:HDMI
Mode: consumer
Data: non-audio
Rate: 48000 Hz
Copyright: permitted
Emphasis: none
Category: PCM coder
Original: original
Clock: 1000 ppm

and

$ sudo iecset -D hw:HDMI,3
ALSA lib conf.c:4578:(parse_args) Unknown parameter 1
ALSA lib conf.c:4711:(snd_config_expand) Parse arguments error: No such file or directory
ALSA lib control.c:953:(snd_ctl_open_noupdate) Invalid CTL hw:HDMI,3
snd_ctl_open: No such file or directory
[lee@arch ~]$ sudo iecset -D hw:HDMI,3
ALSA lib conf.c:4578:(parse_args) Unknown parameter 1
ALSA lib conf.c:4711:(snd_config_expand) Parse arguments error: No such file or directory
ALSA lib control.c:953:(snd_ctl_open_noupdate) Invalid CTL hw:HDMI,3
snd_ctl_open: No such file or directory

I've seen people online posting about getting the snd_ctl_open error, but usually when they try to run alsamixer. I seem to open alsamixer fine and have audio on the laptop working. I also have all the sound modules loaded:

$ lsmod | grep '^snd' | column -t
snd_hda_codec_hdmi     36588  1
snd_hda_codec_realtek  46566  1
snd_hda_codec_generic  53211  1   snd_hda_codec_realtek
snd_hda_intel          37704  9
snd_hda_codec          99871  4   snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel
snd_hwdep              6332   1   snd_hda_codec
snd_pcm                79815  3   snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_timer              18718  1   snd_pcm
snd                    59286  27  snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,thinkpad_acpi

Offline

#8 2014-04-25 18:23:55

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: HDMI audio on Lenovo L540 not working

ltorres wrote:

I looked over some of your earlier comments, and I set the video and audio PID, based off your previous suggestions

Those are vendor and product identifications [or identicators] actually and might come handy in the future with other hardware, but good move. I got a little confused with mine posts in other threads, but it is on the wiki as stated.

$ sudo iecset -D hw:HDMI
Mode: consumer
Data: non-audio
Rate: 48000 Hz
Copyright: permitted
Emphasis: none
Category: PCM coder
Original: original
Clock: 1000 ppm

And that seems to be the culprit, data is set to non-audio. So this should solve your issue:

iecset -D hw:HDMI audio on
#and to test it
speaker-test -c 2 -t wav -D plughw:HDMI,3

Iecset sets up hardware cards, not alsa devices, which is it does not accept -D hw:HDMI,x argument or the code does not execute right.

I do understand that you may not be that familiar with all of this, it is recommended however to read at least the manuals before running any commands (man, info). That might prevent you from doing more harm then good, and you learn something. So when someone suggests checking a thing, take your time to understand what it does. Playing with grub if it is unnecessary, might end up leaving you with a non-booting system and I am allowed to misread or forget about a thing or two. Also after you alter grub, you must run grub-mkconfig to actually install the configuration on /boot, but it seems unnecessary in your case.

Last edited by emeres (2014-04-25 18:31:45)

Offline

#9 2014-04-26 17:04:11

ltorres
Member
Registered: 2012-01-18
Posts: 7

Re: HDMI audio on Lenovo L540 not working

Thanks for the tip, I'll try to spend more time in the manual for some clues. I ran grub-mkconfig earlier to update the grub file, but luckily it is still booting. Now Data is set to audio for HDMI when iecset is run

sudo iecset -D hw:HDMI
Mode: consumer
Data: audio
Rate: 48000 Hz
Copyright: permitted
Emphasis: none
Category: PCM coder
Original: original
Clock: 1000 ppm

So with Data: audio set, it still isn't outputing audio. I also modifed /etc/modprobe.d/alsa.conf to include id's:

options snd_hda_intel id=PCH index=0 model=auto vid=8086 pid=0c0c
options snd_hda_intel id=HDMI index=1 model=auto vid=8086 pid=8c20

I also tried using a different Mini DisplayPort to HDMI adapter, froma different brand, to rule out hardware problems. I also updated the entire system as well. I'm not sure where to look elsewhere now. I had a friend run iecset, and he didn't get any error messages on his computer. I get:

$ sudo iecset 
control "IEC958 Playback Default" (index -1) not found

I'm wondering if this has any effect?
Card 1 is a Realtek ALC292
Card 2 is an Intel Haswell HDMI

Offline

#10 2014-04-26 17:40:58

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: HDMI audio on Lenovo L540 not working

Iecset looks for the default card, which you set up as PCH, which does not have 'control "IEC958 Playback Default"'. That is the reason for the message "not found". All sound goes now by default though PCH, so whatever application you want to send sound though HDMI has to be set up in that way.
Since you always use sudo iecset I assume iecset alone does not change parameters, right? And you are not in the audio group (run groups)?
Look for Intel specific HDMI aspects and for your specific laptop. One thing you may want to try is to boot a live linux distribution like mint, it should autoconfigure, seek configuration files for clues if you get HDMI output working with it. Although it probably uses pulseaudio as default.
Did you ever got HDMI to work with Windows or any other OS? Is the monitor/TV set up properly? Some tools to check: xrandr, get-edid, edid-decode.

xrandr --props; env DISPLAY=:0.1 xrandr --props; 

Change DISPLAY variable accordingly to your setup.
One last thing is to go to alsamixer, hit F6 and choose 'ThinkPadEC', check what options you have there. Obviously any IEC958 output on the HDMI card in alsamixer should be unmuted, but you already have done that.
I will into this a little further, when I find some time. Play around with xrandr.

Offline

#11 2014-05-08 14:52:22

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: HDMI audio on Lenovo L540 not working

I did manage to get hold of hdmi cable for a short period of time, so I tested my setup. I used iecset before to set proper signal format, so that step was not necessary. Using a hd4850 with fglrx on arch x64 I did not have any special properties for audio using xrandr, however I did not test is extensively. Once unmuted audio worked over HDMI when proper format and number of channels was set without any distortions.
Did you made any progress?

Offline

Board footer

Powered by FluxBB