Asus M3N78-VM digital audio problems
#1
I just built my first HTPC with XBMC, using M3N78-VM mobo. I'm having problems with audio and it's driving me nuts. I'm not new to linux, but I'm more used to server harware without audio.

My objective is to get digital audio out from either the rear optical or mobo spdif header.

I've read lots of forums threads about this and tried a lot of stuff. The most relevant discussion is probably,

https://bugtrack.alsa-project.org/alsa-b...hp?id=4330

and

http://ohioloco.ubuntuforums.org/showpos...stcount=10

Here is what I've done,

- Asus M3N78-VM w/ BIOS 0907
- Intrepid minimal with XBMC
- Kernel updated to 2.6.28
- NVidia 180.35
- Alsa 1.0.19 installed with the script, tried both vanilla (-di) and snapshot (-snap)
- Hooked up internal S/PDIF header to my amp (Yamaha 640) via coaxial

Relevant current info,

alsa-info.sh:

http://www.alsa-project.org/db/?f=33b834...6493d820e0

aplay -l and aplay -L:

http://pastebin.com/m1a6359cc

amixer:

http://pastebin.com/m3748fd1b

lspci:

http://pastebin.com/m23252dc0

Observations/questions,

1. Other people seem to get both "VT1708B Analog" and "VT1708B Digital". I only get Analog. Can anyone tell me what I'm doing wrong?

2. If I manage to get "VT1708B Digital" listed, will the IEC958 channels magically appear? No IEC958 outputs are currently listed with aplay -L

3. I do have an IEC958 (unmuted) in alsamixer - what is it? Other people report having 3.

4. In the BIOS I have "HD Audio" rather than "AC97", and "Internal + External Codec" selected. Is this correct?

5. I tried adding "options snd-hda-intel model=6stack-dig" to /etc/modprobe.d/alsa-base, but it doesn't seem to help. Not sure what this does anyway, just read it on a forum.

I don't have any HDMI capable hardware, so I can't test whether audio over hdmi works (and for now, I don't need it so don't care - just need spdif!).

I've spent almost 2 full days trying to get this to work, and I want to get on to the fun stuff! I only got the mobo on Thursday, so if I can't get this working, I'm going to have to return and exchange it for something else.

Hopefully someone with more alsa experience can help - I'm tearing my hair out! :confused2:
Reply
#2
I have the same board, I just haven't had the time to get my setup ready to roll. I specifically talked to faberfox on IRC who said he had it working. See if you can run him down if he doesn't post here. Also, I believe rodercot has the same board but I'm pretty sure he's doing audio over HDMI.... even so, he may be able to lend a hand.

--Nick
Reply
#3
I have an M3A78-EM which is similar (ATI rather than NVidia video chipset). I've got SPDIF working fine so far without needing to update ALSA. Using Mythbuntu 8.10 as the base OS.

Quote:4. In the BIOS I have "HD Audio" rather than "AC97", and "Internal + External Codec" selected. Is this correct?

In my BIOS the "HD Audio" vs "AC97" only relates to the front panel connector (depending on which one you plugged into the MB).

Do you have a "SPDIF_OUT Mode Setting" in the same screen in the BIOS? If so, that should be set to "SPDIF Output" if you want to use SPDIF rather than HDMI. I believe this is what determines whether you see a Digital card through "aplay -l" (otherwise you just see analog and hdmi).

Check to see if there is an updated revision of the BIOS you have. For my board some fixes were made relating to sound being able to be used over the HDMI channel. Your board has had a number of BIOS updates. (http://support.asus.com/download/downloa...l=M3N78-VM).

The last time sound was screwed up on my machine (all of a sudden it was working over optical and then it wasn't) I did the following.
  1. Deleted all the ALSA related configuration files in my home directory. Typically this is .asoundrc and .asoundrc.asoundconf.
  2. Reset the default card using asoundconf. "asoundconf list" (choose the one which isn't HDMI). Then "asoundconf set-default-card SB" in my case. This should recreate the .asound* files in the home directory. The .asoundrc.asoundconf file should have reference to iec958 even though it doesn't show up in "aplay -L" for me.
  3. Restart ALSA. "sudo /etc/init.d/alsa-utils restart"
  4. Check IEC958 is unmuted in "alsamixer"
  5. "speaker-test -c2" to see if that works. If not try by explicitly defining the iec958 device. "speaker-test -Diec958 -c2".
  6. If that doesn't work then download a 5 channel wav file and use "aplay XYZ.wav".

I've observed that if speaker-test doesn't work, often aplay will work and then from then on sound works fine everywhere. I wonder whether aplay "patches" up any other problems that there might beHuh

Hope this helps...
Reply
#4
probably best to ensure that pulseaudio is disabled as well
Reply
#5
What version does your alsamixer report Now that you upgraded, it should be 1.0.19 if it's not it did not take. You will not see a VT1708B digital in aplay. make sure you unmute the iec958 channel after you did the upgrades and you should have digital out of the SPDIF header on the board, you will NOT get it from the output at the back panel until the bug is sorted out.

The M3N78-VM is it;s own animal for some reason. It is NOT the same as the other board in this group like the M3A's etc, they use an Realtek AC1200 codec and this board uses a AC883-886 and that seems to be the issue.

I know that some people do see the VT1708B digital device BUT that is coded wrong anyhow, on this board that is seen as a digital input for some reason, that is what the pin is defined in code.

Also if you have not upgraded the bios on the board, make sure that you have it set to spdif out and not hdmi, on later bios rev's this is removed from the bios.

unmuting alsa is usually the culprit or the Alsa upgrade did not take. you should not need to use -snap after Kernel 2.6.24 it was only an issue with that kernel and 1.0.18a that I recall.

If you use the alsa upgrade script found on the guides in this site you should only have to spec -di to the command line. This is the struct I am talking about, and this in your files supplied above. I am not sure why it is not working for you, do you have an optical output device you can plug into the on-board header to try. Although I have a dual optical and coaxial and they both work fine. OHM out your rca connector and make sure your connector is not touching to ground somewhere. I am reaching a little but it looks like you covered all the basis I mention above.

Node 0x21 [Pin Complex] wcaps 0x400601: Stereo Digital
Pincap 0x00010030: IN OUT EAPD
EAPD 0x2: EAPD
Pin Default 0x47c421f0: [N/A] SPDIF In at Ext Rear Panel
Conn = RCA, Color = Grey
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x40: OUT
Power: setting=D0, actual=D0



Good Luck.

Dave
Reply
#6
Hi folks. Thanks for the info!

Quote:What version does your alsamixer report Now that you upgraded, it should be 1.0.19 if it's not it did not take.

Yep, reports 1.0.19.

Quote:make sure you unmute the iec958 channel

Yep it's unmuted.

Quote:Also if you have not upgraded the bios on the board, make sure that you have it set to spdif out and not hdmi, on later bios rev's this is removed from the bios.

The board shipped with 05XX, and to start with I had the SPDIF option checked. I've since upgraded to 0907 which is the latest, and the option has gone. I guess (hope) that means it should justwork™.

I've had play with speaker-test and aplay, and some DTS and DD wav files. Still not looking too good.

In the meantime I've hooked up 6-channel analog, and apart from the house looking like it got burgled as a result of digging through cupboards trying to find enough 3.5mm-RCA cables, I at least have some kind of output!

I'm going to do some more testing later and will report back. I'm just glad I now know that it is possible!

Thanks again.
Reply
#7
I also did a basic test of the spdif header-rca lead I made with a multimeter and it looks fine.

I've done a bit more testing and can't say I've made much progress.

"speaker-test -c2" works but only over analog

"speaker-test -Diec958 -c2" reports that iec958 not found.

"speaker-test -Dhdmi -c2" runs, but I can't tell if it works

If I try playing a test DTS or DD wav with aplay, I get data-y sounding noises over the analog, and nothing digital, which is a bit weird in itself.

" mplayer -channels 2 test.dts" works over analog and I get the dts downmixed to stereo

" mplayer -channels 6 test.dts" doesnt work no output at all
Reply
#8
I'm confused!

As a temporary measure, I have have hooked up analog cables to the 6-channel inputs on my amp. I can't even get that working properly!

When I run,

speaker-test -c6 -twav

I get,

0 - Front Left ..... I hear "front left" from both front and rear left speakers
4 - Centre ..... nothing
1 - Front Right ..... I hear "front right" from both front and rear right speakers
3 - Rear Right ..... nothing
2 - Rear Left ..... nothing
5 - LFE ..... nothing

When I run,

speaker-test -c6 -DplugConfusedurround51 -twav

I get no output at all.

Back on the digital problem, I still don't understand why on this alsa bug comments,

https://bugtrack.alsa-project.org/alsa-b...hp?id=4330

The user xKingx has the same mobo + bios, but has the VT1708B Digital as well as analog, and his/her "aplay -L" lists iec958. Feels like I should have this as well. What could cause the difference?

I really appreciate all the help - I'm out of my depth Big Grin
Reply
#9
By chance do you have a iec958 channel in your capture page in alsamixer. tab to the 2nd page and see. Also try taking the 6stack-dig line OUT of your modprobe.d/alsa-base file.

Also, Make sure your main, and front channels are at 80 and Unmuted, I have seen them get muted by default after an upgrade, I spent a couple hours on this on night to find they had been muted. - DOH!

Dave
Reply
#10
Hi thanks for reply.

Everything is unmuted. This is what my alsamixer looks like,

http://imagebin.ca/view/91yTkQY.html

I've also tried with an without the 6stack-dig, and with a few others (6stack, 6stack-dig-demo).

What do you think re the fact that "aplay -l" doesn't list VT1708B Digital - I can't tell whether this is significant, other than the fact that it means I don't have iec958 as a device which I can output to using aplay/mplayer/etc using for example -Diec958. It seems that other people who have this working, have this listed.
Reply
#11
Well That all looks fine, for the heck of it have you tried starting a file and then going into alsamixer while the file is playing and play with some settings.

I am sure mine ran on the optical output from the header without the digital being displayed in aplay. I do think it is significant but really the output off the header I think is controlled by the southbridge chip and the output on the backplane is controlled by the VIA codec.

This is why you used to have the switch in the bios to allow it pass to spdif or hdmi was to tell it to use the header in case of an add-in video card was being used or to use the on-board hdmi. I guessed that Asus removed this later as a result of not needing the switch as the on-board header should always be outputting something.

I am out of ideas without getting into forcing plugs and stuff with asound and asoundrc files. Have you any way of testing the hdmi output to see if that works at all.

What are your XBMC audio settings set to right now and are you passing to a rcvr.

Dave
Reply
#12
More playing about,

1. Speaker test

Doesn't seem to matter what I do, I can only get speaker-test to output front right and front left, no matter what I specify for -c, which is weird.

If I try and use aplay with any setting like -Dsurround51 it appears to work, but I hear nothing - is that supposed to work?

2. mplayer

If I play a DTS wav with mplayer, I get multichannel analog output (can mute individual channels in alsamixer). yay! If I play a dolby digital, I just get noise which I guess is undecoded or something. I don't really understand what is happening here, or why it works.

3. XBMC settings

I don't really know what to do here. Obviously I can't put iec958 for the passthrough, as this device doesn't exist. If I do, I just get "Unable to initialize audio device" when I play anything which would normally be passed through. Same if I put "default" instead of iec958.

If I choose analog, then try to play a dvd, it just freezes playback after a few seconds (might be an unrelated problem I guess).

4. The header

I probed the spdif header with a multimeter, and there doesn't seem to be anything live on it during playback, but my test gear isn't too good. I could borrow an oscilliscope but that seems like overkill for now.

5. Receiver

I'm trying to output to a Yamaha receiver which supports DTS etc. In terms of receiver side setup, I'm pretty sure it's fine. I can unplug the coax from the mobo and stick it into my dvd player and it works fine.

I'm feeling a bit deflated at the moment, having bought all the bits to build this system, including choosing this mobo specifically for SPDIF. If I don't get it working I think I'm going to have to return and exchange it pretty soon. I'm a bit worried they won't exchange as it might not technically be faulty.

Not sure what to try next. I was thinking about reinstalling everything, and maybe rolling the BIOS back to an older version. The things which are bugging me particularly are,

- It feels like "aplay -L" should list iec958. Without this I can't imagine how to get passthrough to work from xbmc.

- Other people have this working, so I must be missing something, as the board is capable of outputting spdif from the internal header.

- I don't know enough about alsa etc to come up with an effective strategy for testing and solving this problem.
Reply
#13
Hi same problem here. Can't get the optical spdif working. I did the same thing, tried to buy everything so my system would be as compatible as possible. I already tossed an ati mobo because configuring the ati drivers is such a PITA and so I could get VDPAU working and now digital audio is broken! I am just using analog out for the moment until this can be fixed.

Not sure if this has been pointed out yet but there is an Alsa bug report for this problem:

https://bugtrack.alsa-project.org/alsa-b...hp?id=4330
Reply
#14
Hi adrian.

Yeah I saw the alsa defect and comments about the toslink. Hopefully that will get sorted out at some point if the hardware is capable.

I'm trying to get the onboard spdif header to output to my receiver over coax. Still not working, but I've managed to get 5.1 over analog now, which will have to do for now, and means I can get on with cool xbmc features :-)

Could I ask what you get for "aplay -l" and "aplay -L"?
Reply
#15
You guys did try this:

http://forum.xbmc.org/showthread.php?tid=35901&page=3

Right?

xnappo
Reply

Logout Mark Read Team Forum Stats Members Help
Asus M3N78-VM digital audio problems0