View previous topic :: View next topic |
Author |
Message |
mark4 n00b
Joined: 26 Feb 2011 Posts: 46
|
Posted: Sat Jan 05, 2013 11:14 pm Post subject: Alsa will not use HDMI as default device |
|
|
Im not able to find a configuration that will make my HDMI audio the default. some info...
speaker-test -c 2 -r 48000 -D hdmi:0,1 gives me audio so i know my HDMI audio is working
i have "options snd-hda-intel index=1,0" as my last line in /etc/modules.d/alsa.conf to switch the order of my devices,
cat /proc/asound/cards gives me...
0 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfb080000 irq 28
1 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xfb720000 irq 100
so i know HDMI is the first device.
no matter what i put in ~/.asoundrc alsa will not push any audio out my HDMI. I have been to multiple pages claiming to have working configurations for this and nothing has supplied me with a working configuration. Worked 12+ hours on this on irc.freenode.net #gentoo and #alsa all to no avail.
Can anyone tell me how to get alsa to use my HDMI as the default audio device?
im not using pulseaudio or jack. |
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Sat Jan 05, 2013 11:26 pm Post subject: |
|
|
If that speaker-test line give you audio via HDMI, it means your alsa.conf line is not doing what you want it to do. Doesn't surprise me, that line doesn't make much sense. Do this: https://bbs.archlinux.org/viewtopic.php?pid=1045829#p1045829 <- not directly this of course, that user wanted to do the opposite of what you want , but same principle. |
|
Back to top |
|
|
mark4 n00b
Joined: 26 Feb 2011 Posts: 46
|
Posted: Sun Jan 06, 2013 12:11 am Post subject: |
|
|
Gusar wrote: | If that speaker-test line give you audio via HDMI, it means your alsa.conf line is not doing what you want it to do. Doesn't surprise me, that line doesn't make much sense. Do this: https://bbs.archlinux.org/viewtopic.php?pid=1045829#p1045829 <- not directly this of course, that user wanted to do the opposite of what you want :), but same principle. |
This didnt help me, this guys issue was that his HDMI and onboard sound cards were in the opposite order he wanted. My HDMI is card 0. card 1 is the default. and NOTHING i try has made it otherwise. :/
EDIT:
ACTUALLY my HDMI IS now my default... but playing anything still has blaring silence. I modified my modules.d/alsa.conf file so somehow my HDMI is the system default but i cannot get any audio out. Im guessing that this is now a channel issue.
now im totally confused. with the changes i have in my modules.d/alsaa.conf speakertest now needs to be
speaker-test -c 2 -r 48000 -D hdmi:1,1
and cat /proc/asound/cards returns
0 [HDMI ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xfb720000 irq 100
1 [PCH ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfb080000 irq 28
and again no matter what i put in .asoundrc silence ensues
:/ |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Sun Jan 06, 2013 7:11 am Post subject: |
|
|
mark4 wrote: | speaker-test -c 2 -r 48000 -D hdmi:1,1 |
So presumably you could put in ~/.asoundrc:
Code: | pcm.!default {
slave.pcm "hdmi:1,1"
} |
_________________ Improve your font rendering and ALSA sound |
|
Back to top |
|
|
klz n00b
Joined: 07 Jun 2011 Posts: 42
|
Posted: Wed Jul 09, 2014 12:58 pm Post subject: |
|
|
any news on this ?
I have an intel sound card with the same issue as OP. I can play sound through HDMI with Code: | mplayer -ao alsa:device=hdmi=1 some_sound_file.mp3 | When i try some combination of Code: | #!/bin/bash
for(( k = 0; k <= 1; k++ ))
do
for(( i = 0; i <= 10; i++ ))
do
echo "$k,$i"
mplayer -endpos 6 -ao alsa:device=hw=$k.$i Downloads/soundcloud_feedme_mix.mp3
done
done
| the only one that makes some noise are the laptop speakers at i=1,k=0.
I've been trying to find some sort of alsa config setting so i do not need to pass the (device=hdmi=1)-command every time i want to play something through hdmi. Because now i do not have a way to play firefox (i.e. flash, for watching live streams) via HDMI.
Next im going to try to get pulseaudio to work, i assume/hope this will solve my problem. But still i would really like to know the native alsa setting with which i can make my HDMI-sound work.
p.s. PaulBredbury's suggestion for pcm.!default { slave.pcm "hdmi:1,1" } does not work for me.
Last edited by klz on Thu Jul 10, 2014 10:57 pm; edited 1 time in total |
|
Back to top |
|
|
sebB l33t
Joined: 02 Mar 2011 Posts: 806 Location: S.O. France
|
Posted: Wed Jul 09, 2014 3:38 pm Post subject: |
|
|
Look at aplay -l
Create a .asoundrc
Code: | pcm.!default
{ type hw
card X
device Y
} |
For me X=1 and Y=3 because aplay-l return
Code: | carte 1: HDMI [HDA ATI HDMI], périphérique 3: HDMI 0 [HDMI 0] |
Restart aslasound service. |
|
Back to top |
|
|
klz n00b
Joined: 07 Jun 2011 Posts: 42
|
Posted: Wed Jul 09, 2014 4:32 pm Post subject: |
|
|
Hi sebB,
Unfortunately that does not work. Instead of "carte 1: HDMI" mine states "hdmi: PCH".
My HDMI devices are on 3,7&8 on card 1. My laptop speakers are on card 1 device 0.
This is why mplayer -ao alsa:device=hw=1.0 some_sound_file.mp3 does give me some sound (over laptop speakers), but every other combination $i.$k gives silence ( on 1.3& 1.7 & 1.8 ) and fail immediately on the others.
The problem is that it only work when i put device=hdmi=1, and i do not know how to capture that in .asoundrc. Since none of the hw-combination play sound via hmdi.
Last edited by klz on Thu Jul 10, 2014 10:56 pm; edited 1 time in total |
|
Back to top |
|
|
sebB l33t
Joined: 02 Mar 2011 Posts: 806 Location: S.O. France
|
Posted: Wed Jul 09, 2014 5:12 pm Post subject: |
|
|
Can you post your aplay -l |
|
Back to top |
|
|
klz n00b
Joined: 07 Jun 2011 Posts: 42
|
Posted: Thu Jul 10, 2014 10:55 pm Post subject: |
|
|
Hi SebB (i mistook -l for -L earlier)
aplay -l
Code: | **** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: PCH [HDA Intel PCH], device 0: CX20590 Analog [CX20590 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0 |
aplay -L
Code: | null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
sysdefault:CARD=Loopback
Loopback, Loopback PCM
Default Audio Device
sysdefault:CARD=PCH
HDA Intel PCH, CX20590 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, CX20590 Analog
Front speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, CX20590 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, CX20590 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, CX20590 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, CX20590 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, CX20590 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
HDA Intel PCH, HDMI 0
HDMI Audio Output
hdmi:CARD=PCH,DEV=1
HDA Intel PCH, HDMI 1
HDMI Audio Output
hdmi:CARD=PCH,DEV=2
HDA Intel PCH, HDMI 2
HDMI Audio Output
|
|
|
Back to top |
|
|
sebB l33t
Joined: 02 Mar 2011 Posts: 806 Location: S.O. France
|
Posted: Sun Jul 13, 2014 6:53 pm Post subject: |
|
|
Can you test if one of this gives sound. Replace X,Y by 1,3 1,7 1,8
Quote: | aplay -D plughw:X,Y /usr/share/sounds/alsa/Front_Center.wav
aplay -D hw:X,Y /usr/share/sounds/alsa/Front_Center.wav |
|
|
Back to top |
|
|
|
|
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
|
|