Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Here another one NO Alsa audio via HDMI
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Fitap
Apprentice
Apprentice


Joined: 13 Mar 2011
Posts: 187
Location: Rosario, Argentina

PostPosted: Sat Jul 21, 2018 7:27 pm    Post subject: [Solved] Here another one NO Alsa audio via HDMI Reply with quote

Hi to all.

I run on a fresh and clean install and it's a nigthmare for me understand what do ALSA with the hardware, well, I'm a bit non clever user, I know.

Code:


dmesg | grep snd

[    0.366496] snd_hda_intel 0000:00:03.0: enabling device (0000 -> 0002)
[    0.366755] snd_hda_intel 0000:00:1b.0: enabling device (0000 -> 0002)
[    0.375638] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC892: line_outs=3 (0x14/0x15/0x16/0x0/0x0) type:line
[    0.375642] snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    0.375644] snd_hda_codec_realtek hdaudioC1D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[    0.375646] snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0
[    0.375647] snd_hda_codec_realtek hdaudioC1D0:    dig-out=0x11/0x1e
[    0.375649] snd_hda_codec_realtek hdaudioC1D0:    inputs:
[    0.375650] snd_hda_codec_realtek hdaudioC1D0:      Front Mic=0x19
[    0.375652] snd_hda_codec_realtek hdaudioC1D0:      Rear Mic=0x18
[    0.375654] snd_hda_codec_realtek hdaudioC1D0:      Line=0x1a
[    0.535100] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops 0xffffffff81ed3c80



Code:


aplay -l


**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 3: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0



Code:


aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=HDMI,DEV=0
    HDA Intel HDMI, HDMI 0
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
    HDA Intel HDMI, HDMI 1
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
    HDA Intel HDMI, HDMI 2
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=3
    HDA Intel HDMI, HDMI 3
    HDMI Audio Output
default:CARD=PCH
    HDA Intel PCH, ALC892 Analog
    Default Audio Device
sysdefault:CARD=PCH
    HDA Intel PCH, ALC892 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Digital
    HDMI Audio Output



Code:


cat /proc/asound/cards

 0 [HDMI           ]: HDA-Intel - HDA Intel HDMI
                      HDA Intel HDMI at 0xdfd34000 irq 30
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xdfd30000 irq 29


Code:

                           <*> HD Audio PCI                                                                                     
                            [*] Build hwdep interface for HD-audio driver                                             
                            [*] Allow dynamic codec reconfiguration                                                   
                            [ ] Support digital beep via input layer                                                       
                            [ ] Support initialization patch loading for HD-audio                                   
                           <*> Build Realtek HD-audio codec support                                               
                           <*> Build Analog Device HD-audio codec support                                     
                           < > Build IDT/Sigmatel HD-audio codec support                                       
                           < > Build VIA HD-audio codec support                                                     
                           <*> Build HDMI/DisplayPort HD-audio codec support                               
                           < > Build Cirrus Logic codec support                                                       
                           < > Build Conexant HD-audio codec support                                           
                           < > Build Creative CA0110-IBG codec support                                         
                           < > Build Creative CA0132 codec support                                               
                           < > Build C-Media HD-audio codec support                                             
                           < > Build Silicon Labs 3054 HD-modem codec support                           
                            -*- Enable generic HD-audio codec parser                                               
                           (10) Default time-out for HD-audio power-save mode



Code:


uname -a

Linux gentoo-dk 4.14.52-gentoo #5 SMP Sat Jul 21 15:51:27 -03 2018 x86_64 Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz GenuineIntel GNU/Linux



Code:

┌──────────────────────────── AlsaMixer v1.1.2 ─────────────────────────────┐
│ Card: HDA Intel HDMI                                                                                             F1:  Help               │
│ Chip: Intel Haswell HDMI                                                                                  F2:  System information │
│ View: F3: Playback  F4: Capture  F5:[All]                                                           F6:  Select sound card  │
│ Item: S/PDIF                                                                                                          Esc: Exit               │
│                                                                                                                                                            │
│                                                                                                                                                            │
│                                                                                                                                                       │
│                                                                                                                                                            │
│                                                                                                                                                            │
│                      ┌──┐     ┌──┐     ┌──┐     ┌──┐                                                                                   │
│                      │OO│     │OO│     │OO│     │OO│                                                                                │
│                      └──┘     └──┘     └──┘     └──┘                                                                         │
│                   < S/PDIF >S/PDIF 1 S/PDIF 2 S/PDIF 3                                                                             │
│                                                                                                                                                           │
│                                                                                                                                                            │
│                                                                                                                                                             │
│                                                                                                                                                        │
│                                                                                                                                                             │
└───────────────────────────────────────────────────────────────────────────┘


If I boot from an usb stick with ubuntu and have sound ok, I use only ALSA and I think what just with ALSA is a enough.

Also I tested this follow command with no result.

Code:

aplay -D plughw:(input),(input) /usr/share/sounds/alsa/Front_Center.wav


Where more I must to check ?

Regards.


Last edited by Fitap on Sun Jul 22, 2018 10:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5279

PostPosted: Sat Jul 21, 2018 7:58 pm    Post subject: Reply with quote

You have four HDMI audio output devices there, make sure you select the right one. plughw:0,0 may not be correct; try 0,3 0,7 0,8 0,9.
Back to top
View user's profile Send private message
Fitap
Apprentice
Apprentice


Joined: 13 Mar 2011
Posts: 187
Location: Rosario, Argentina

PostPosted: Sat Jul 21, 2018 8:07 pm    Post subject: Reply with quote

Thanks for response Ant P.

No one of those channel plays sound.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41537
Location: 56N 3W

PostPosted: Sat Jul 21, 2018 8:41 pm    Post subject: Reply with quote

Fitap,

Look in
Code:
$ cat /proc/asound/devices
  2: [ 1]   : control
  3: [ 1- 3]: digital audio playback
  4: [ 1- 7]: digital audio playback
  5: [ 1- 8]: digital audio playback
  6: [ 1- 9]: digital audio playback
  7: [ 1-10]: digital audio playback
  8: [ 1- 0]: hardware dependent
  9: [ 0]   : control
 10: [ 0- 0]: digital audio playback
 11: [ 0- 0]: digital audio capture
 12: [ 0- 3]: digital audio playback
 13: [ 0- 0]: hardware dependent
 33:        : timer
Thats mine.
Your video card HDMI outputs are on card 0, mine are card 1. I have 5 HDMI outputs.
My HDMI outputs are be 1,3 1,7 1,8 1,9 and 1,10

If your snd device minor numbers (the left column) are not mostly sequential, you may have devices missing. Check your kernel for
Code:
CONFIG_SND_DYNAMIC_MINORS=y
and dmesg for something like too many HDMI devices.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Fitap
Apprentice
Apprentice


Joined: 13 Mar 2011
Posts: 187
Location: Rosario, Argentina

PostPosted: Sat Jul 21, 2018 9:13 pm    Post subject: Reply with quote

Thanks for the input NeddySeagoon


Code:


zgrep CONFIG_SND_DYNAMIC_MINORS /proc/config.gz

CONFIG_SND_DYNAMIC_MINORS=y



Code:


dmesg | grep -i hdmi

[    0.546917] input: HDA Intel HDMI HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.0/sound/card0/input10
[    0.546951] input: HDA Intel HDMI HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.0/sound/card0/input11
[    0.546985] input: HDA Intel HDMI HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.0/sound/card0/input12
[    0.547035] input: HDA Intel HDMI HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:03.0/sound/card0/input13



Code:


cat /proc/asound/devices

  2: [ 1]   : control
  3: [ 1- 0]: digital audio playback
  4: [ 1- 0]: digital audio capture
  5: [ 1- 3]: digital audio playback
  6: [ 1- 2]: digital audio capture
  7: [ 1- 0]: hardware dependent
  8: [ 0]   : control
  9: [ 0- 3]: digital audio playback
 10: [ 0- 7]: digital audio playback
 11: [ 0- 8]: digital audio playback
 12: [ 0- 9]: digital audio playback
 13: [ 0- 0]: hardware dependent
 33:        : timer



Just when run aplay -D plughw:(input),(input) /usr/share/sounds/alsa/Front_Center.wav only in card 1 (PCH) the command prompt returns, into HDMI never command prompt returns
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5279

PostPosted: Sat Jul 21, 2018 11:24 pm    Post subject: Reply with quote

That sounds like some other program is blocking the sound card. Use fuser -v /dev/snd/pcm* to see what it is.
Back to top
View user's profile Send private message
Fitap
Apprentice
Apprentice


Joined: 13 Mar 2011
Posts: 187
Location: Rosario, Argentina

PostPosted: Sun Jul 22, 2018 12:24 am    Post subject: Reply with quote

Code:

fuser -v /dev/snd/pcm*



Nothing returns
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5715

PostPosted: Sun Jul 22, 2018 12:53 am    Post subject: Reply with quote

I have this on my htpc, maybe this will help...

Code:
$ cat /etc/asound.conf
defaults.pcm.card 0
defaults.pcm.device 3
defaults.ctl.card 0

_________________
overlay | patches
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41537
Location: 56N 3W

PostPosted: Sun Jul 22, 2018 10:05 am    Post subject: Reply with quote

Fitap,

Code:
ls /dev/snd/ -l
should show an entry for every device minor number in /proc/asound/devices.
If not, devtmpfs is not mounted. You may or may not notice that.
Do you have any /dev/hd* entries?
You should not, its an indicator that you are using the static /dev list that devtmpfs gets mounted over the top of.

All the entries in /dev/snd/ should show
Code:
crw-rw---- 1 root audio 116, ...

devtmpfs creates the entries, then udev fixes the permissions.
Your normal user needs to be in the audio group.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Fitap
Apprentice
Apprentice


Joined: 13 Mar 2011
Posts: 187
Location: Rosario, Argentina

PostPosted: Sun Jul 22, 2018 3:04 pm    Post subject: Reply with quote

Thanks for the input bunder

I'm still looking for workaround.


Thanks for response NeddySeagoon

Code:

ls /dev/snd -l

total 0
drwxr-xr-x  2 root root       80 jul 22 11:44 by-path
crw-rw----+ 1 root audio 116,  8 jul 22 11:44 controlC0
crw-rw----+ 1 root audio 116,  2 jul 22 11:44 controlC1
crw-rw----+ 1 root audio 116, 11 jul 22 11:44 hwC0D0
crw-rw----+ 1 root audio 116,  7 jul 22 11:44 hwC1D0
crw-rw----+ 1 root audio 116,  9 jul 22 11:44 pcmC0D3p
crw-rw----+ 1 root audio 116, 10 jul 22 11:44 pcmC0D7p
crw-rw----+ 1 root audio 116,  4 jul 22 11:44 pcmC1D0c
crw-rw----+ 1 root audio 116,  3 jul 22 11:44 pcmC1D0p
crw-rw----+ 1 root audio 116,  6 jul 22 11:44 pcmC1D2c
crw-rw----+ 1 root audio 116,  5 jul 22 11:44 pcmC1D3p
crw-rw----+ 1 root audio 116, 33 jul 22 11:44 timer


Code:


grep fitap /etc/group | grep audio

audio:x:18:fitap



Quote:

Do you have any /dev/hd* entries?


Code:

ls /dev/hd* -l

ls: can't access to "/dev/hd*" not such file or directory
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41537
Location: 56N 3W

PostPosted: Sun Jul 22, 2018 3:19 pm    Post subject: Reply with quote

Fitap,

Something is broken in /dev/snd/

You have 4 HDMI outputs in alsamixer but only 2 in /dev/snd on card 0.
Code:
crw-rw----+ 1 root audio 116,  9 jul 22 11:44 pcmC0D3p
crw-rw----+ 1 root audio 116, 10 jul 22 11:44 pcmC0D7p


You should have
Code:
  9: [ 0- 3]: digital audio playback
 10: [ 0- 7]: digital audio playback
 11: [ 0- 8]: digital audio playback
 12: [ 0- 9]: digital audio playback
so 8 and 9 are missing.
Whatever is in /dev/snd does not match your hardware.

Please put your dmesg output on a pastebin.

For a test we might correctly create the /dev/snd/ entries by hand but it won't persist across reboots.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Fitap
Apprentice
Apprentice


Joined: 13 Mar 2011
Posts: 187
Location: Rosario, Argentina

PostPosted: Sun Jul 22, 2018 5:22 pm    Post subject: Reply with quote

You are rigth NeddySeagoon, sorry was my mistake, I downgrade kernel and that resport is about 4.9.95, now I am on last stable kernel again, 4.14.52


Code:


ls /dev/snd/ -l
total 0
drwxr-xr-x  2 root root       80 jul 22 14:09 by-path
crw-rw----+ 1 root audio 116,  8 jul 22 14:09 controlC0
crw-rw----+ 1 root audio 116,  2 jul 22 14:09 controlC1
crw-rw----+ 1 root audio 116, 13 jul 22 14:09 hwC0D0
crw-rw----+ 1 root audio 116,  7 jul 22 14:09 hwC1D0
crw-rw----+ 1 root audio 116,  9 jul 22 14:09 pcmC0D3p
crw-rw----+ 1 root audio 116, 10 jul 22 14:09 pcmC0D7p
crw-rw----+ 1 root audio 116, 11 jul 22 14:09 pcmC0D8p
crw-rw----+ 1 root audio 116, 12 jul 22 14:09 pcmC0D9p
crw-rw----+ 1 root audio 116,  4 jul 22 14:09 pcmC1D0c
crw-rw----+ 1 root audio 116,  3 jul 22 14:09 pcmC1D0p
crw-rw----+ 1 root audio 116,  6 jul 22 14:09 pcmC1D2c
crw-rw----+ 1 root audio 116,  5 jul 22 14:09 pcmC1D3p
crw-rw----+ 1 root audio 116, 33 jul 22 14:09 timer



Here you are dmesg pastebin
sys-kernel/gentoo-sources-4.14.52
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41537
Location: 56N 3W

PostPosted: Sun Jul 22, 2018 6:21 pm    Post subject: Reply with quote

Fitap,

Thats better,

Code:
crw-rw----+ 1 root audio 116,  9 jul 22 14:09 pcmC0D3p
crw-rw----+ 1 root audio 116, 10 jul 22 14:09 pcmC0D7p
crw-rw----+ 1 root audio 116, 11 jul 22 14:09 pcmC0D8p
crw-rw----+ 1 root audio 116, 12 jul 22 14:09 pcmC0D9p


Test 0,3, 0,7 0,8 and 0,9 one should work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Fitap
Apprentice
Apprentice


Joined: 13 Mar 2011
Posts: 187
Location: Rosario, Argentina

PostPosted: Sun Jul 22, 2018 9:17 pm    Post subject: Reply with quote

NeddySeagoon

The test parameter in my case is 0,7

I know that because booting with Ubuntu can find out running aplay command.

The strange things is when I back into Gentoo and exec the same test command, nothing sound, but the command runs ok.

Also ran the test with this ohter command: speaker-test -Dhw:<input,input> -c2 -twav where input in my case is 0,7 and running the test, the screen show me 0 - Front Left and 1 - Front Right

Others parameter out of 0,7 show me 0 - Unknow and 1 - Unknow
Back to top
View user's profile Send private message
Fitap
Apprentice
Apprentice


Joined: 13 Mar 2011
Posts: 187
Location: Rosario, Argentina

PostPosted: Sun Jul 22, 2018 10:27 pm    Post subject: Reply with quote

bunder wrote:
I have this on my htpc, maybe this will help...

Code:
$ cat /etc/asound.conf
defaults.pcm.card 0
defaults.pcm.device 3
defaults.ctl.card 0


I tested with kernel 4.17 and no luck.

I'm back to stable last kernel and finally bunder was rigth, but in my case set up on /etc/asound.conf and the sound after few seconds on playback get distortion.

I set up the sound map into ~/.asoundrc and the sound works fine.

Thanks for helping.

I learned this lesson

My best.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum