Sound over HDMI : alsa_amixer settings help

2,075 views
Skip to first unread message

michael colvin

unread,
May 31, 2015, 3:31:59 AM5/31/15
to andro...@googlegroups.com
Hi guys.
I can't get the sound to go over the HDMI connection (I know it can work, I had linux installed before). I'm guessing the mixer settings need to be adjusted.

Does some one know to set things in alsa_amixer?

I see the HDMI/DP seems to be turned off but trying to turn it on gives an error.

This is 4.4 r2, if that makes a difference.

root@x86:/system/etc # alsa_amixer controls
numid=1,iface=CARD,name='HDMI/DP,pcm=3 Jack'
numid=2,iface=MIXER,name='IEC958 Playback Con Mask'
numid=3,iface=MIXER,name='IEC958 Playback Pro Mask'
numid=4,iface=MIXER,name='IEC958 Playback Default'
numid=5,iface=MIXER,name='IEC958 Playback Switch'
numid=6,iface=PCM,name='ELD',device=3
numid=7,iface=PCM,name='Playback Channel Map',device=3

root@x86:/system/etc # alsa_amixer contents
numid=1,iface=CARD,name='HDMI/DP,pcm=3 Jack'
; type=BOOLEAN,access=r-------,values=1
: values=off
numid=2,iface=MIXER,name='IEC958 Playback Con Mask'
; type=IEC958,access=r-------,values=1
: values=[AES0=0x0f AES1=0xff AES2=0x00 AES3=0x00]
numid=3,iface=MIXER,name='IEC958 Playback Pro Mask'
; type=IEC958,access=r-------,values=1
: values=[AES0=0x0f AES1=0x00 AES2=0x00 AES3=0x00]
numid=4,iface=MIXER,name='IEC958 Playback Default'
; type=IEC958,access=rw------,values=1
: values=[AES0=0x04 AES1=0x00 AES2=0x00 AES3=0x00]
numid=5,iface=MIXER,name='IEC958 Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=6,iface=PCM,name='ELD',device=3
; type=BYTES,access=r--v----,values=0
: values=
numid=7,iface=PCM,name='Playback Channel Map',device=3
; type=INTEGER,access=rw---R--,values=8,min=0,max=36,step=0
: values=0,0,0,0,0,0,0,0
| | TLV size error (259, 8, 0)!

root@x86:/system/etc # alsa_amixer cset numid=1 values=on
amixer: Control default element write error: Operation not permitted


Jarvis Chung

unread,
May 31, 2015, 10:39:24 PM5/31/15
to andro...@googlegroups.com
Hi Michael,

About this issue, I think it's ELD issue or AMD/ATI issue.
If the ELD not get right value, the speaker is not work for alsa(only AMD/ATI).
You could check status as below:
   cat /proc/asound/card*/codec#0.*
   cat /proc/asound/card*/eld#0.*

I try to change and added HDMI.state and nVidia.state into /system/etc/alsa/, but I still not get sound.

For now, I also change kernel and set speaker address when HDMI init., I could get right ELD value and tested alsa_aplay hw:0,3, but it's not work for AMD/ATI card.

But, I success nVidia graphic card.

Thanks.
Jarvis


michael colvin於 2015年5月31日星期日 UTC+8下午3時31分59秒寫道:

michael colvin

unread,
Jun 5, 2015, 5:20:12 AM6/5/15
to andro...@googlegroups.com
Hi Jarvis

looking at the stats in the files you suggested.  It appears that HDMI is detected as being connected. What is ELD? I have not looked at how audio is handled under linux before.

codec#0 is as follows

Codec: ATI R6xx HDMI
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x1002aa01
Subsystem Id: 0x00aa0100
Revision Id: 0x100200
No Modem Function Group found
Default PCM:
    rates [0x70]: 32000 44100 48000
    bits [0x2]: 16
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D3
  Power: setting=D0, actual=D0
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x201: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
Node 0x03 [Pin Complex] wcaps 0x400381: Stereo Digital
  Control: name="HDMI/DP,pcm=3 Jack", index=0, device=0
  Control: name="IEC958 Playback Con Mask", index=0, device=0
  Control: name="IEC958 Playback Pro Mask", index=0, device=0
  Control: name="IEC958 Playback Default", index=0, device=0
  Control: name="IEC958 Playback Switch", index=0, device=0
  Control: name="ELD", index=0, device=3
  Pincap 0x00000094: OUT Detect HDMI
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=01, enabled=1
  Connection: 1
     0x02

Jarvis Chung

unread,
Jun 7, 2015, 11:19:50 PM6/7/15
to andro...@googlegroups.com
Hi Michael,

You could find ELD desc. as below:
    # cat /proc/asound/card*/eld#0.*
monitor_present 1
eld_valid 1
monitor_name ASUS VS229
connection_type HDMI
eld_version [0x2] CEA-861D or below
edid_version [0x3] CEA-861-B, C or D
manufacture_id 0x6904
product_id 0x22c2
port_id 0x0
support_hdcp 0
support_ai 0
audio_sync_delay 0
speakers [0x1] FL/FR
sad_count 1
sad0_coding_type [0x1] LPCM
sad0_channels 2
sad0_rates [0xe0] 32000 44100 48000
sad0_bits [0xe0000] 16 20 24

If ELD not support and not find speaker, you could check your dmesg log and find:
     <6>[   26.144181] sound hdaudioC0D0: HDMI ATI/AMD: no speaker allocation for ELD
     <6>[   26.145344] sound hdaudioC0D0: HDMI ATI/AMD: no speaker allocation for ELD
    ......

I keep to check this issue, but I don't why HD-Audio not found right ELD speaker.

Thanks.
Jarvis

michael colvin於 2015年6月5日星期五 UTC+8下午5時20分12秒寫道:

michael colvin

unread,
Jun 9, 2015, 4:34:25 AM6/9/15
to andro...@googlegroups.com
Hi Jarvis
  eld0:0
    has
    monitor_present 0
    eld_valid 0

  dmesg didn't show any error relating to hdmi.  Any guess why it thinks it not there but knows it is connected?

michael colvin

unread,
Jun 10, 2015, 3:32:40 PM6/10/15
to andro...@googlegroups.com
Hey
  I loaded a regular copy on linux on the machine. the eld#0.0 that it gets is below.
Advanced Linux Sound Architecture Driver Version k3.13.0-37-generic. is the version on linux.

"
monitor_present        1
eld_valid        1
monitor_name       
connection_type        HDMI
eld_version        [0x2] CEA-861D or below
edid_version        [0x0] no CEA EDID Timing Extension block present
manufacture_id        0x0
product_id        0x0

port_id            0x0
support_hdcp        0
support_ai        0
audio_sync_delay    0
speakers        [0x1] FL/FR
sad_count        1
sad0_coding_type    [0x1] LPCM
sad0_channels        2
sad0_rates        [0xe0] 32000 44100 48000
sad0_bits        [0x60000] 16 20

Jarvis Chung

unread,
Jun 30, 2015, 3:46:48 AM6/30/15
to andro...@googlegroups.com
Hi Michael,

About HDMI issue, I try use chroot to Debian and enabled x-server.
HDMI will initial and find speaker, then I switch to Android, I could play YouTube and music.

If we need to use HDMI, I think we need driver or find how to initial HDMI speaker(EDID).

Thanks.
Jarvis

michael colvin於 2015年6月11日星期四 UTC+8上午3時32分40秒寫道:

Federico Brinkworth

unread,
Jul 1, 2015, 2:40:13 AM7/1/15
to andro...@googlegroups.com
Hi Michael,

I have the same problem and after to search and search for a fix, I applied an awful workaround.

In /etc/init.sh I added at the end of do_init() the next lines:

mv /dev/snd/pcmC0D0p /dev/snd/pcmC0D0p_tmp
mv /dev/snd/pcmC0D3p /dev/snd/pcmC0D0p
mv /dev/snd/pcmC0D0p_tmp /dev/snd/pcmC0D3p

The devices could be different, it depend of your hardware.

I believe that C0 means card number 0, and D0 means device 0. In my case, HDMI is the device 3 (D3). The p at the end I think mean that is a player device.

I know that isn't elegant, but is the only way that I found to fix the problem.

I hope it help you.

Best,
Fede.

Jarvis Chung

unread,
Jul 1, 2015, 11:51:39 PM7/1/15
to andro...@googlegroups.com
Hi Fede,

Thanks for your help.

This solution is not working for me.

For kernel 4.0.6, it looks like to fix "speaker not found" issue, but I still can't get sound.
Your solution could fix "pcm not found" issue for Android audio finger.

Could you share your hardware info?

Thank you.
Jarvis

Federico Brinkworth於 2015年7月1日星期三 UTC+8下午2時40分13秒寫道:

Federico Brinkworth

unread,
Jul 6, 2015, 1:18:35 PM7/6/15
to andro...@googlegroups.com
Hi Jarvis,

I'm sorry, but I've installed android-x86 in a pc for a friend, and I've sent it to him time ago, I cant get the hardware list.

But, this are the manufacturer specifications:

NVIDIA GT 705, 1GB RAM
Dual Core Intel Celeron 2957U Haswell
sodimm 4GB DDR3 L x 1 Slot
MB chips HM70 Intel
HDD 500GB
WIFI  802.11 BGN Half
2 USB 3.0
4 USB 2.0
HDMI 1.4 FullHD 1080p Digital AUIDO Dolby/DTS
VGA
NET 10/100/1000 GL
SD reader
PXE support
Power 65W

Sorry for the poor technical data.

Best,
Fede.

Jarvis Chung

unread,
Jul 6, 2015, 9:50:04 PM7/6/15
to andro...@googlegroups.com
Hi Federico,

Thanks for your share.

I have some question, could you share to me?
    1. Do you connect HDMI to NVIDIA GT-705 and get sound?
    2. NVIDIA GT-705 support hardware accelerate 3D game?

Thank you.

Sincerely,

Jarvis

Federico Brinkworth於 2015年7月7日星期二 UTC+8上午1時18分35秒寫道:

Federico Brinkworth

unread,
Jul 8, 2015, 11:28:48 PM7/8/15
to andro...@googlegroups.com
Hi Jarvis

1. Yes, I get sound over HDMI with the changing devices' trick. I think that worked because there are only one audio card that deliver both output, speakers and HDMI.

2. I don't know if HDMI to NVIDIA GT-705 have support hardware accelerate 3D game, I do not tested that.

Regards,
Fede. 
Reply all
Reply to author
Forward
0 new messages