LinuxMCE Forums

General => Users => Topic started by: geekyhawkes on July 21, 2009, 11:11:43 am

Title: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 21, 2009, 11:11:43 am
I am just wondering if there are enough of us out there interested in getting hdmi audio working so we can sponsor (thom probably) to get it working.  I understand that at some point this will be integrated in to 0810, but at the moment it might be a while off.

If you are interested can you add your name and how much (in $$) you would be willing to contribute;

Geekyhawkes $100
Title: Re: How many of us are interested in HDMI audio?
Post by: totallymaxed on July 21, 2009, 01:29:41 pm
I am just wondering if there are enough of us out there interested in getting hdmi audio working so we can sponsor (thom probably) to get it working.  I understand that at some point this will be integrated in to 0810, but at the moment it might be a while off.

If you are interested can you add your name and how much (in $$) you would be willing to contribute;

Geekyhawkes $100

We have it working here under 0710 & 0810 for nVidia based GPU's at least. You need to install a recent nVidia driver build (180.51 works...and we are currently using 180.61) and an updated alsa-1.0.19 or above.

All the best

Andrew
Title: Re: How many of us are interested in HDMI audio?
Post by: Murdock on July 21, 2009, 03:05:04 pm
I need to play around with that more in 710, I'm running hdmi for video from my diskless MD to my reciever and a spdif coax connection for audio. Ideally I'd love to remove the coax and run straight hdmi (if only to get rid of one more cable :) ). Is there a wiki on how to set this up for nvidia based GPUs? If not after I get it working I'll post something on the wiki about it.
Title: Re: How many of us are interested in HDMI audio?
Post by: totallymaxed on July 21, 2009, 03:19:20 pm
I need to play around with that more in 710, I'm running hdmi for video from my diskless MD to my reciever and a spdif coax connection for audio. Ideally I'd love to remove the coax and run straight hdmi (if only to get rid of one more cable :) ). Is there a wiki on how to set this up for nvidia based GPUs? If not after I get it working I'll post something on the wiki about it.

I dont think there is a wiki page on this yet...but I will make one asap ;-)

Together with updated nVidia & alsa drivers we also have an updated AVwizard that makes actually changing/configuring HDMI audio as simple as running the wizard. This should be in the SVN for 0810 soon.

Andrew
Title: Re: How many of us are interested in HDMI audio?
Post by: Murdock on July 21, 2009, 03:23:45 pm
Very nice!
Title: Re: How many of us are interested in HDMI audio?
Post by: brake16 on July 21, 2009, 07:19:26 pm

I dont think there is a wiki page on this yet...but I will make one asap ;-)


There is a wiki page for this.  It was last updated six weeks ago.  http://wiki.linuxmce.com/index.php/Audio_over_HDMI
However, there's no real instructions for how to set it up on this page.

I'm eagerly awaiting your version.
Bryce
Title: Re: How many of us are interested in HDMI audio?
Post by: colinjones on July 21, 2009, 09:36:48 pm
Andrew - have you any idea what is going on with the nVidia driver versions? It seems to have flipped back and forth between 180.xx and 185.. a couple of times, with the latest being a 185.xx, have you tried those versions?
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 21, 2009, 10:22:21 pm
Sounds good andrew.  I have been running 180.60 and alsa 1.20 for a while but had little / no luck under mce getting HDMI audio. Out of interest how have you stopped the avwizard / mce changing the asound.conf file away from hdmi?
Title: Re: How many of us are interested in HDMI audio?
Post by: merkur2k on July 21, 2009, 10:24:29 pm
By updating the avwizard to know about HDMI audio, so that it creates a valid asound.conf.
Title: Re: How many of us are interested in HDMI audio?
Post by: totallymaxed on July 21, 2009, 11:02:06 pm
By updating the avwizard to know about HDMI audio, so that it creates a valid asound.conf.

100% correct ;-)

Andrew
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 22, 2009, 12:56:10 pm
Looking forward to this update being available for the rest of us!

Good work again andrew!
Title: Re: How many of us are interested in HDMI audio?
Post by: totallymaxed on July 22, 2009, 01:42:25 pm
Looking forward to this update being available for the rest of us!

Good work again andrew!

All committed to the svn last night. So they can be checked out if you want to build them yourselves or they will be in the next build on Sunday i would think.

All the best

Andrew
Title: Re: How many of us are interested in HDMI audio?
Post by: Murdock on July 22, 2009, 03:37:51 pm
Very nice, thanks Andrew!
Title: Re: How many of us are interested in HDMI audio?
Post by: totallymaxed on July 22, 2009, 04:03:32 pm
Very nice, thanks Andrew!

For the time being under 0810 Alpha you will need to do apt-get dist-upgrade on your Core & MD's... this will get you the new AVwizard and any other fixes changes since you last upgraded. For the time being you will need to upgrade nVidia & alsa drivers by hand though I'm afraid.

Andrew
Title: Re: How many of us are interested in HDMI audio?
Post by: Murdock on July 22, 2009, 04:09:59 pm
Hmm, do we want to put that somewhere in the wiki? If ya don't mind I put it in near the top: http://wiki.linuxmce.com/index.php/LinuxMCE-0810_alpha2
Title: Re: How many of us are interested in HDMI audio?
Post by: totallymaxed on July 22, 2009, 06:48:04 pm
Hmm, do we want to put that somewhere in the wiki? If ya don't mind I put it in near the top: http://wiki.linuxmce.com/index.php/LinuxMCE-0810_alpha2


Have updated that page a little with some additional info.

Andrew
Title: Re: How many of us are interested in HDMI audio?
Post by: Murdock on July 22, 2009, 07:32:49 pm
Much better, Thanks. I'm going to be rebuilding my 810 dev environment soon and will use this.
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 23, 2009, 07:30:50 pm
Is anyone having any luck getting this working?  I have the new AV wizard but am not getting any sound out via HDMI.

I do have nvidea 180.60 installed (checked with "sudo cat /proc/driver/nvidia/version").  

I am also running Alsa 1.0.20 installed using the ubuntuforums script (and reinstalled under this alpha version post update just in case).

I have made sure the output isnt muted under Sudo alsamixer.

Is there anything else i can try to rule out to get this audio working?


P.S I have also tried it with 185.14 driver and it is just the same.
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 24, 2009, 06:22:45 pm
EDIT: Post no longer relevant reinstalled , see below
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 25, 2009, 12:45:25 pm
EDIT: No longer relevant reinstalled, see below
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 27, 2009, 09:17:03 am
Ok, so had to reinstall my machine this weekend (again) and have reinstalled a fresh MCE machine from the latest alpha with the updated avwizard.  I am running Nvidia latest 185 driver, alsa 1.0.20.  Under KDE with a modified asound.conf i have audio over hdmi with no problems.  During the avwizard I get no audio over hdmi and likewise under mce.

I dropped to kde and found one of the 3 digital devices muted under alsamixer.  I have unmuted it but sadly i still dont have hdmi audio.

A Sudo aplay -L lists all of the correct outputs for my card,  but even speaker test gives no audio;

speaker-test -t wav -D plug:front -c2 -l2
aplay -D plug:hdmi /usr/share/sounds/KDE_Window_Open.wav (same result - no audio)

I am wondering if it something to do with the asound.conf generated by the avwizard?

Is there something I am missing, or something else i can do to get this working?  
(I am using an M378-EM motherboard if that matters).
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 27, 2009, 10:25:43 pm
Anyone had any success with this update & HDMI audio? I am trying to work out why my hdmi audio might not be working.  Thanks
Title: Re: How many of us are interested in HDMI audio?
Post by: merkur2k on July 27, 2009, 11:01:30 pm
I am in the same situation as you and have done basically the same steps, other than reinstalling. same results. the devices are there and should be working, but nothing comes out.
Title: Re: How many of us are interested in HDMI audio?
Post by: nite_man on July 28, 2009, 10:16:02 am
I suppose that HDMI audio works in 0810 only. The reason - system doesn't recognize sound card properly under 0710. Even with upgraded kernel, the latest ALSA and nVidia drivers. I have MB Asus M3N78-EM. Under 0710 HD device is listed in the aplay -l and aplay -L output. But lspci shows sound card as unknown device but under 0810 is displayed as nVidia or something (don't remember exactly). So, the problem is there I guess.
Title: Re: How many of us are interested in HDMI audio?
Post by: totallymaxed on July 28, 2009, 11:19:12 am
I suppose that HDMI audio works in 0810 only. The reason - system doesn't recognize sound card properly under 0710. Even with upgraded kernel, the latest ALSA and nVidia drivers. I have MB Asus M3N78-EM. Under 0710 HD device is listed in the aplay -l and aplay -L output. But lspci shows sound card as unknown device but under 0810 is displayed as nVidia or something (don't remember exactly). So, the problem is there I guess.

For nVidia based machines we have this working under 0710 & 0810. You need nVidia 180.22 (or later) driver and alsa-1.0.20 (or later) and a valid asound.conf;


For pcm audio via the hdmi connector you should have a something like the following in asound.conf;

pcm.!default "plug:hdmi"

All the best

Andrew
Title: Re: How many of us are interested in HDMI audio?
Post by: wierdbeard65 on July 28, 2009, 12:10:36 pm
Ok, time for me to bring the thread down with a couple of dumb questions  ;)

I've been following it with interest, but not because of cabling issues, more because of available expansion slots.

The (recycled) device I intend to use as an MD in my living room has limited slots(2). It also doesn't have suitable on-board graphics. One slot will be requitred for my PVR-150 card to connect to my Sky STB. I only have one more slot, so will if this works, will I be able to get away with one card doing both graphics and audio, or will I require a USB sound "card"? I don't want surround sound and will be using the TV's built-in speakers. Assuming audio over HDMI works and a single card will do both, which cards are suitable candidates?

Just to be clear here (before anyone tells me to go and buy another MD or whatever!  ;)) I am still at the proof of concept / WAF stage. Once I have it all working and the family have decided they can't live without it, I intend to move my STB to my core (so the PVR-150 will move) and replace the MD with one of the tiny ION-based boards that Andrew has been raving about. At the moment, though, I need the least (zero?) cost solution.
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 28, 2009, 01:42:13 pm
Nice to know I am not on my own after the update.  I will check the asound.conf as I am running alsa 1.0.20 and Nvidia 185.14.  I did have HDMI audio working under KDE before the MCE install, although my asound.conf will have changed by then.

Andrew, have you had to tweak anything further to get HDMI audio under myth?  I read on their wiki something to do with EDID settings to get HDMI audio under myth. 

If i get it working i will report back.

Thanks.
Title: Re: How many of us are interested in HDMI audio?
Post by: merkur2k on July 28, 2009, 04:48:34 pm
weirdbierd, i do not know of any single card solution that provides both audio and video. some video cards with an hdmi connector have a connector or header to connect to a sound card to get the audio into hdmi, but you still need a separate audio device. usb is probably the way to go in your case, i know you can get some 2 channel usb adapters for very cheap.
Title: Re: How many of us are interested in HDMI audio?
Post by: wierdbeard65 on July 28, 2009, 04:59:30 pm
merkur2k,

Thanks for that - oh well, it was worth hoping ;)
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 29, 2009, 12:28:35 pm
Below is my asound.conf created by the avwizard:

pcm_slave.spdif_convert48k {
   pcm "spdif"
   rate 48000
}

pcm.spdif_playback {
   type plug
   slave spdif_convert48k
}

pcm_slave.hdmi_convert48k {
   pcm "hdmi"
   rate 48000
}

pcm.hdmi_playback {
   type plug
   slave hdmi_convert48k
}

pcm.asym_spdif {
   type asym
   playback.pcm "spdif_playback"
   capture.pcm "plughw:0"
}

pcm.asym_hdmi {
   type asym
   playback.pcm "hdmi_playback"
   capture.pcm "plughw:0"
}

pcm.asym_analog {
   type asym
   playback.pcm "plug:dmix"
   capture.pcm "plughw:0"
}
pcm.!default asym_hdmi


This is the one that was autogenerated by selecting HDMI from the avwizard.  I have tried pasting my own asound.conf over the top but each time i restart my machine then the asound file is changed during boot up by mce and doesnt work.
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 29, 2009, 12:35:16 pm
This is my original asound.conf that gave me audio over hdmi under KDE before installing mce;




pcm.!default {
        type plug
        slave {
                pcm multi
                rate 48000
        }
        ttable.0.0 1.0
        ttable.1.1 1.0
        ttable.0.2 1.0
        ttable.1.3 1.0
}

#ctl.!default hdmiout

pcm.optical {
        type hw
        card 0
        device 1
}

ctl.optical {
        type hw
        card 0
        device 1
}

pcm.hdmiout {
        type hw
        card 0
        device 3
}

ctl.hdmiout {
        type hw
        card 0
        device 3
}

pcm.multi {
        type multi
        slaves.a.pcm "hdmiout"
        slaves.a.channels 2
        slaves.b.pcm "optical"
        slaves.b.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
}

ctl.multi {
        type hw
        card 0
}




Does it matter what type of soundcard is listed under webadmin for MD?  Mine was set up as standard sound card, but i can see HDA Nvidia as an option.  Higher up the page I have an H listed under sound.
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 29, 2009, 12:55:08 pm
There might be a clue or 2 in the following links, i havent got time to read them now, but should inform us all;

http://ubuntuforums.org/showthread.php?t=1143028

http://www.mythtv.org/wiki?title=AllensDigitalAudioHowto

http://www.mythtv.org/wiki/Configuring_Digital_Sound#Setting_up_ALSA.27s_.asoundrc.2C_Properly

Quick look seems to be lots of ways of getting asound.conf working, but we need to work out how to stop MCE re-editing the file at reboot.

Andrew, could you posta  copy of a working asound.conf from one of your machines for us to look at as well please?

Thanks
Title: Re: How many of us are interested in HDMI audio?
Post by: totallymaxed on July 29, 2009, 01:42:55 pm
There might be a clue or 2 in the following links, i havent got time to read them now, but should inform us all;

http://ubuntuforums.org/showthread.php?t=1143028

http://www.mythtv.org/wiki?title=AllensDigitalAudioHowto

http://www.mythtv.org/wiki/Configuring_Digital_Sound#Setting_up_ALSA.27s_.asoundrc.2C_Properly

Quick look seems to be lots of ways of getting asound.conf working, but we need to work out how to stop MCE re-editing the file at reboot.

Andrew, could you posta  copy of a working asound.conf from one of your machines for us to look at as well please?

Thanks

Here is a working asound.conf from an MD setup to route spdif over hdmi to a Denon Surround receiver;

Code: [Select]
pcm_slave.spdif_convert48k {
        pcm "spdif"
        rate 48000
}

pcm.spdif_playback {
        type plug
        slave spdif_convert48k
}

pcm_slave.hdmi_convert48k {
        pcm "hdmi"
        rate 48000
}

pcm.hdmi_playback {
        type plug
        slave hdmi_convert48k
}

pcm.asym_spdif {
        type asym
        playback.pcm "spdif_playback"
        capture.pcm "plughw:0"
}

pcm.asym_hdmi {
        type asym
        playback.pcm "hdmi_playback"
        capture.pcm "plughw:0"
}

pcm.asym_analog {
        type asym
        playback.pcm "plug:dmix"
        capture.pcm "plughw:0"
}
pcm.!default asym_hdmi


All the best

Andrew
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 29, 2009, 05:16:53 pm
Couple of questions, does spdif support all forms of audio?  Are you using this asound.conf to play mp3s or just dvds? 

How have you got on with myth as they have loads of posts with random changes to try and get hdmi audio working under myth.

======Does anyone know how we can stop MCE changing the asound.conf file at reboot?=========================

Or is there a way i can adjust the template asound.conf that the avwizard uses?

Title: Re: How many of us are interested in HDMI audio?
Post by: wierdbeard65 on July 29, 2009, 05:30:55 pm
======Does anyone know how we can stop MCE changing the asound.conf file at reboot?=========================

I've seen this question asked here many times, not just about asound.conf, but about a lot of the config files as well as the startup files.

I'm sure I read somewhere that MCE overwrites the files using values stored in the database somewhere. Can anyone confirm? If so, then perhaps the way forward to to dig in to the database (or wherever else it's getting the replacements from) and change it there, rather than trying to stop the files being replaced / changed?

It's reasonable to assume that whoever set up MCE initially to overwrite this stuff, did so for a good reason. We risk breaking something if we prevent it doing this.
Title: Re: How many of us are interested in HDMI audio?
Post by: geekyhawkes on July 29, 2009, 05:44:09 pm
It looks like the asound.conf file is kept under /usr/pluto/templates/asound.conf.  

Strange though i cannot see how it works out which asound.conf to create based on avwizard selection as there is only 1 file at the location and it matches the output of the avwizard whatever you pick.

ANyone who knows mce better than me cast some light on this issue?  My asound.conf matches the one andrew posted yet i get no mp3 or dvd audio via hdmi.


EDIT:  I have no idea what that template is used for but i have tried changing both the template and my asound.conf files with no luck.  Each time i reboot then i get no where, MCE still changes the asound.conf file i have created. 

ANDREW, when you modified the avwizard where did you provide the asound.conf information?  Is it in a referance file or is it compiled somehow?  This is driving me crazy now, it just shouldnt be this difficult!
Title: Re: How many of us are interested in HDMI audio?
Post by: Murdock on September 21, 2009, 03:34:59 pm
Any updates on this item?
Title: Re: How many of us are interested in HDMI audio?
Post by: thezfunk on September 25, 2009, 07:05:17 am
geekyhawkes, you are my brother by another mother.  I have been struggling for two days to get HDMI audio working and through your posts and posts the length and breath of the webtertubs I have learned alot but I am at the same spot you are.  HDMI audio does not work.  I will be posting more complete info in my thread.
Title: Re: How many of us are interested in HDMI audio?
Post by: rperre on October 13, 2009, 05:17:36 pm
Anybody have any luck getting hdmi audio to work with these settings?

Looks like my asound.conf stays the same, but somehow no sound over hdmi.

Richard