[LIVE] Please help, how configure asound.conf
#1
Please, I need help, how configure asound.conf to get sound from HDMI during navigation in XBMC and have possibility to switch audio output to analog 5.1 during playback.

At this moment my asound.conf is empty - sound during navigation is going from analog.

So I tried insert this :

pcm.!default {
type plug
slave {
pcm "hdmi"
}
}


then I have sound from HDMI during navigation in XBMC, but I'm not able get 5.1 sound from analog during playback.

Thanks for help

Alda
Reply
#2
please use custom audiodevice in xbmc audio settings as plughw:x,y where x - number of your card (0 or 1, or 2...), y - number of your device (0-9)

you can find it after

aplay -L
aplay -l

for example -

plughw:0,7
plughw:0,9
Nvidia Shield
kodi 18.1 RC1
Reply
#3
I have a custom asound.conf file that you may be interested in and I'll post it below.

With this setup I can have dual audio output from the HDMI port and the Optical port (both on board).

Generally if I'm watching TV I'll use sound through HDMI and it plays through my TV. If I want 5.1 sound through my receiver I'll turn the volume on my tv off and turn my receiver on.

Keep in mind that I'm using on board HDMI and Optical Out. You may have to modify this to fit your needs.

results from aplay -l
Code:
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC889A Analog [ALC889A Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC889A Digital [ALC889A Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

asound.conf file
Code:
cat /etc/asound.conf
pcm.!default {
        type plug
        slave {
                pcm "both_digital"
        }
}

pcm.both_digital {
        type route
        slave {
                pcm multi
                channels 4
        }
        ttable.0.0 1.0
        ttable.1.1 1.0
        ttable.0.2 1.0
        ttable.1.3 1.0
}

# Toslink digital_1 output
pcm.digital_1 {
        type hw
        card 0
        device 1
        channels 2
}

# HDMI digital_2 output
pcm.digital_2 {
        type hw
        card 0
        device 3
        channels 2
}

pcm.multi {
        type multi
        slaves.a {
                pcm "digital_1"
                channels 2
        }

        slaves.b {
                pcm "digital_2"
                channels 2
        }

        bindings.0.slave a
        bindings.0.channel 0
        bindings.1.slave a
        bindings.1.channel 1
        bindings.2.slave b
        bindings.2.channel 0
        bindings.3.slave b
        bindings.3.channel 1
}


XBMC Audio Settings:
Audio output = analog
speaker configuration = 5.1
Boost volume level on downmix = off (not really sure what this does)
Audio Output Device = Simultaneous output to RS880 Audio Device [Radeon HD 4200]
How to use Git
| AMD Athlon II X3 Triple Core Processor 2.9 GHz |GIGABYTE GA-MA785GM-US2H Mobo 2GB DDR2 Ram | MSI N430GT |
| Logitec Harmony Smart Control Remote| 52" Sharp Aquos LED TV | Denon AVR-X1000 |
| Freenas Server with 18TB ASRock Intel Avoton C2750 |
Reply
#4
Okay, I upgraded my Asrock 330 to 10.10 and have lost sound - mostly. Everything is unmuted in Alsamixer. MP3 play fine at the desktop. Currently I get navigation sounds but nothing else. I had music working in XBMC using Pulseaudio but if I watched a movie that required passthru I got no audio. Currently I have Pulseaudio removed.

I have a custom audio device for both normal audio and XBMC. The device is listed as "plughw:0,3" When I attempt to play MP3 I get a failed to initialize message. I am running SVN code, it was compiled when Pulse was installed - do I need to recompile? I would think not but just in case... Eek

The results of aplay -L

Code:
aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=NVidia
    HDA NVidia, VT1708S Analog
    Default Audio Device
front:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    Front speakers
surround40:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, NVIDIA HDMI
    HDMI Audio Output
dmix:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    Direct sample mixing device
dmix:CARD=NVidia,DEV=1
    HDA NVidia, VT1708S Digital
    Direct sample mixing device
dmix:CARD=NVidia,DEV=3
    HDA NVidia, NVIDIA HDMI
    Direct sample mixing device
dsnoop:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    Direct sample snooping device
dsnoop:CARD=NVidia,DEV=1
    HDA NVidia, VT1708S Digital
    Direct sample snooping device
dsnoop:CARD=NVidia,DEV=3
    HDA NVidia, NVIDIA HDMI
    Direct sample snooping device
hw:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    Direct hardware device without any conversions
hw:CARD=NVidia,DEV=1
    HDA NVidia, VT1708S Digital
    Direct hardware device without any conversions
hw:CARD=NVidia,DEV=3
    HDA NVidia, NVIDIA HDMI
    Direct hardware device without any conversions
plughw:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    Hardware device with all software conversions
plughw:CARD=NVidia,DEV=1
    HDA NVidia, VT1708S Digital
    Hardware device with all software conversions
plughw:CARD=NVidia,DEV=3
    HDA NVidia, NVIDIA HDMI
    Hardware device with all software conversions

and aplay -l

Code:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 0: NVidia [HDA NVidia], device 1: VT1708S Digital [VT1708S Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I'd appreciate some help. Huh Sound has got to be THE most frustrating thing right up there with video Stare I DO currently have nav sounds - very weird. Turning off the settings for AC3 and DTS make no difference - my receiver IS capable though and I would normally want those on. I'd prefer to have Pulseaudio installed but....

The .asoundrc file I used to use is as follows:

Code:
pcm.!default {
type plug
slave {
pcm "hdmi"
}
}
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#5
remove pulse
recompile xbmc with --disable-pulse in ./configure
after that use plughw:0,3 as custom audio device
do you use hdmi - right ?
Nvidia Shield
kodi 18.1 RC1
Reply
#6
I removed pulse using an apt-get remove pulseaudio and it removed a few packages. I see some Pulse packages still listed in package manager - yank those too?

I am doing a make clean; ./boostrap; ./configure --disable-pulse which I will follow with make -j4

Sound good?

Yes, I am using HDMI through a switching receiver capable of decoding DTS etc. and will use plughw:0,3

In the past I've run into issues and been able to solve them but it sure does seem like this is an area where things are always an issue! I cannot understand why ALSA always mutes an output too, sheesh!

Appreciate the advice!

Update: No-go. I did see where configure had Pulse listed as NO so I did that right. Compilation went fine with no issue. XBMC has both passthru and and standard sound output devices listed as plughw:0,3 I get nav sounds but trying to play an MP3 I get a failure to initialize error still. Ideas?
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#7
Weird, I compiled again last night and while I still have the error it now has a red X icon and I see a red speaker appear in the top right corner when audio initialization fails. Odder still nav sounds continue to work after the failure - that's new!

I have another box on Zotac hardware that is running 10.04 that I believe is working fine using the asoundrc file I posted up earlier. I think I will look over that box a bit and if it's doing all it should perhaps move back to 10.04 on this Asrock and see if it works better. The Zotac has Pulse running on it fine and passthru works I believe. Before dumping this I'll try yanking the rest of the Pulse stuff I see in package managed though just to see if that helps. <sigh>
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#8
Smile 
Okay, it's pretty broken now Shocked One other thing that might play into this was that I was using 64bit Linux. Generally I've NOT done this as the advice was always to stay away but a friend had good success and things seemed to have changed. <shrug> Whatever the case the box is going to be rebuilt now. I took a look at the Zotac I've got running a full desktop. It's got 32bit 10.10 on it and I thought it was 10.04 - I was shocked. It's working fine using the asouondrc file I used to use on this Asrock with older Ubuntu distro. so either the Asrock hardware is goofy or perhaps the 64bit is causing issues. That box also runs PPA code so that's a variable but IMO shouldn't matter. I'll post back on how this goes, I really do want at least this one box running dev code!Nerd
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#9
Sad 
Okay 32bit Ubuntu 10.10 loaded up. I am using Pulse, I have compiled with Pulse on by default. I get nav sounds, I get MP3, I get NO passthru. I have used "hdmi" as the passthru, IE86, and Custom with plughw:0,3. When I exit having used the custom passthru and failing to get audio on a 5.1 movie my console displays the following errors:

Code:
ALSA lib conf.c:4500:(parse_args) Unknown parameter AES0
ALSA lib conf.c:4633:(snd_config_expand) Parse arguments error: No such file or directory
ALSA lib pcm.c:2208:(snd_pcm_open_noupdate) Unknown PCM plughw:0,3,AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2

I get this both with and without an .asoundrc file.

If I use ie86 as passthru I get this:

Code:
ALSA lib setup.c:96:(snd_sctl_install) Cannot lock ctl elem

Frustrating when I read links like this -> http://www.xbmcboxes.com/asrock-ion-330-...ion-guide/ and know I had it working previously with just an .asoundrc file. My Zotac of course works fine just using HDMI for passthru, I guess I will run some aplay commands on it and see what's what Sad

P.S. For those who troubleshoot this in the future - window XBMC using the \ key and you can watch the console for errors and catch them more easily...
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#10
Well, I lied. My Zotac running 10.10 is ALSO not allowing for passthru! I thought it had been working fine as I've been watching plenty of TV shows and listening to music on it. Last night I decided to watch a movie, something I thought I'd already done before, and it failed miserably! SAME errors as on my Asrock. Googling seems to indicate that Ubuntu 10.x in general has issues with "passthru" of AC3 and DTS audio streams via HDMI Sad

Has anyone gotten HDMI passthru working on Ubuntu 10.x with an ION chipset? I'm going to try compiling ALSA on my Asrock from scratch, if that fails I may move back to 9.04 or perhaps 9.10.
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#11
I moved back to 9.10 on my Zotac. Same XBMC code, different ALSA, works perfectly with my old .asoundrc file. I am VERY tempted to update ALSA to see if it goes to hell but then I'd be breaking a working system. I have a second duplicate Zotac and the Asrock, I will probably install 9.10 on the Zotac, upgrade ALSA, and see if it breaks to test this so I at least have a working system to watch for now :-( Naturally I don't get CPU\GPU temps and the xorg video setup is slightly dorked up on the working box. This is what I get for not having backed up that machine before a drive went bad <shrug>
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#12
BLKMGK Wrote:I moved back to 9.10 on my Zotac. Same XBMC code, different ALSA, works perfectly with my old .asoundrc file. I am VERY tempted to update ALSA to see if it goes to hell but then I'd be breaking a working system. I have a second duplicate Zotac and the Asrock, I will probably install 9.10 on the Zotac, upgrade ALSA, and see if it breaks to test this so I at least have a working system to watch for now :-( Naturally I don't get CPU\GPU temps and the xorg video setup is slightly dorked up on the working box. This is what I get for not having backed up that machine before a drive went bad <shrug>

Not sure it would make any difference, but I use:
sudo apt-get purge pulseaudio

...I've had countless entaglements with pulse and avoid it entirely now.

Good luck!
Reply
#13
well, it's not like I haven't reinstalled Ubuntu 10.01 a few times now. I'm open to trying to purge Pulse and I'll also look into Ubuntu minimal as suggested elsewhere. Worse comes to worse I bork it and reinstall - with an SSD and a fast USB stick it's cake! Appreciate the suggestion!
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#14
All I ever did was do a clean install of XBMC Live, most recent download.

add x-swat ppa and install nvidia-current.

Then in /etc/modprobe.d

I created a new snd_hd_intel.conf file
and inserted the following line:

Code:
options snd-hda-intel enable_msi=0 probe_mask=0xffff,0xfff2


Then I lunched alsamixer and unmuted all the spdif outputs.

And then created the standard asound.conf file:
Code:
pcm.!default hdmi:NVidia

and then tested the speakers:
Code:
speaker-test -c2 -Dplug:hdmi
or
Code:
speaker-test -D plughw:0,3 -c2

I am going to a tv, though that doesn't support 5.1 so I am not sure I can help you with actually getting 5.1.
Reply
#15
lithiumc Wrote:All I ever did was do a clean install of XBMC Live, most recent download.

add x-swat ppa and install nvidia-current.

Then in /etc/modprobe.d

I created a new snd_hd_intel.conf file
and inserted the following line:

Code:
options snd-hda-intel enable_msi=0 probe_mask=0xffff,0xfff2


Then I lunched alsamixer and unmuted all the spdif outputs.

And then created the standard asound.conf file:
Code:
pcm.!default hdmi:NVidia

and then tested the speakers:
Code:
speaker-test -c2 -Dplug:hdmi
or
Code:
speaker-test -D plughw:0,3 -c2

I am going to a tv, though that doesn't support 5.1 so I am not sure I can help you with actually getting 5.1.

Well, is this on ION hardware? If you aren't passing audio through the passthru device which would be AC3 or DTS you won't ever see this. In fact if I disable both of those in settings I get sound everywhere - but not surround sound decoded by my receiver.

the speaker-test stuff I've tried has all worked from the commandline. I've done the 6speaker test and even played a DTS audio file which seemed to work. But when I try in XBMC I get errors in the command window that launched it that mirror an old bug and XBMC displays audio errors. I have tried several different devices - hw:0,3 and plughw:0,3 and hdmi:0,3 which all work with speaker test. Heck I think just hdmi works too :-O

I have tried to decipher the language of ALSA but geez it's cryptic to me. I know I have a soundcard on 0 and I know the device is #3. I think I can name it but XBMC doesn't seem to parse the name correctly and errors. Meanwhile same code works fine on 9.10 so I think it's ALSA. I have a sapre box I may install 10.10 minimal on just to see if that works - it's a Zotac exactly the same as the one working fine on 9.10. It has Openelec on it now so I can blow that away easily enough....
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
[LIVE] Please help, how configure asound.conf00
This forum uses Lukasz Tkacz MyBB addons.