Hello, Before I start spewing out system details, what I've tried and not, what's almost working and not, let me just say that my question basically boils down to this: does anyone here know how to enable 6-channel audio from an Asus M2V (VT1708/A [Azalia HDAC], ALC861) internal S/PDIF connector to a graphics card, which then sends an audio-video HDMI signal to a TV or receiver, and the sound is received as 6-channel on the TV/receiver end? I have an Asus M2V motherboard, with the on-board (internal) S/PDIF connected to a MSI NX7300GS-MD256EH graphics card, from which I send an HDMI signal to my TV. (See the thread "[Problem]S/PDIF" in the Asus M2V forums at http://vip.asus.com/forum/view.aspx?id=20080809163520000&board_id=1&model=M2V&page=1&SLanguage=en-us if you're interested in how I managed to figure the connector out.) The TV then sends the sound to my receiver through an optical cable. I know this is perhaps not an optimal setup but my receiver doesn't have HDMI connectors, and besides I've read it somewhere that it's best to route audio through the TV as the TV will make sure audio and video are in sync even if the TV has to do some time-consuming image processing... Stereo sound through the HDMI connection work just fine, but I have spent the last three days trying to get 5.1 working without success. Hundreds of different attempts with aplay and mplayer, compiling newer versions of mplayer, ffmpeg, the kernel etc., tweaking ~/.asoundrc and /etc/asound.conf, but with no success. I think I've gotten close, though, I hopefully just need some final pointers from the people on this list. TV transmissions with Dolby Digital sound makes the receiver happy (the Dolby Digital is recognized by the receiver and I get 5.1 sound). So, here comes the details. It's a lot, but I've probably left something important out. Tell me what, and I'll provide it. I've ripped some sound from my "Garden State" DVD using debian$ mplayer -dvd-device /dev/hdc dvd://1 -chapter 2 -aid 128 -channels 6 -dumpfile gardenstate.128.ac3.51.wav -dumpaudio which file thinks is a 5.1 file: debian$ file gardenstate.128.ac3.51.wav gardenstate.128.ac3.51.wav: ATSC A/52 aka AC-3 aka Dolby Digital stream, 48 kHz,, complete main (CM) 3 front/2 rear, LFE on,, 448 kbit/s reserved Dolby Surround mode but mplayer by default sees it as 2channel. When I force it using -channel 6 the sound is "choppy", so the best I can get from mplayer is using -channel 4: debian$ mplayer -channels 4 gardenstate.128.ac3.51.wav MPlayer dev-SVN-r28227-4.3.2 (C) 2000-2008 MPlayer Team Playing gardenstate.128.ac3.51.wav. libavformat file format detected. [lavf] Audio stream found, -aid 0 ========================================================================== Opening audio decoder: [liba52] AC3 decoding with liba52 Using SSE optimized IMDCT transform Using MMX optimized resampler AUDIO: 48000 Hz, 4 ch, s16le, 448.0 kbit/14.58% (ratio: 56000->384000) Selected audio codec: [a52] afm: liba52 (AC3-liba52) ========================================================================== AO: [oss] 48000Hz 4ch s16le (2 bytes per sample) I can't get anything but static from the file when using aplay. I've also downloaded (and unzipped) some test files to play around with: http://www.halfgaar.net/media/chan-id.zip http://www.sr.se/laddahem/multikanal/dts/norrlanda.zip http://www.sr.se/laddahem/MultiKanal/Dts/SURROUNDTEST_011212.zip http://www.sr.se/laddahem/MultiKanal/DD/SURROUNDTEST_DD_640.zip But the only one I can get anything but static from, using either mplayer or aplay, is chan-id.wav. And I only get the front left and right channels from that one. Trying the others just gives various kinds of static sounds: debian$ aplay -Dplug:iec958 Norrlanda.wav debian$ aplay -Dplug:iec958 SURROUNDTEST_DD_640.wav debian$ aplay -Diec958 SURROUNDTEST_DD_640.wav debian$ mplayer -ao alsa:device=plughw=0.1 SURROUNDTEST_DD_640.wav (How do I play the others with aplay (or mplayer) to get an idea of how they should sound?) So, as already mentioned, what I think I need is to somehow enable 6-channel sound on the S/PDIF connector, but I have absolutely no idea how to do that. I've done extensive Google searches for "+linux +alsa +spdif", "+linux +alsa +iec958", "+linux +M2V +alsa" and so on, read a lot of forum posts and such, but to no avail. The closest thing to date is probably http://alsa.opensrc.org/index.php/DigitalOut but unfortunately that hasn't helped either. I've also looked at http://forums.debian.net/viewtopic.php?t=21890&sid=f6ce5d6c6cee624ca68e1097b926657b and would really appreciate it if someone could explain how I'd go about changing the "volume setting" values mentioned. The closest thing I've gotten so far is: debian$ /usr/local/bin/mplayer -ao alsa:noblock:device=plug=iec958 chan-id.wav MPlayer dev-SVN-r28227-4.3.2 (C) 2000-2008 MPlayer Team Playing chan-id.wav. Audio only file format detected. ========================================================================== Opening audio decoder: [pcm] Uncompressed PCM audio decoder AUDIO: 44100 Hz, 6 ch, s16le, 4233.6 kbit/100.00% (ratio: 529200->529200) Selected audio codec: [pcm] afm: pcm (Uncompressed PCM) ========================================================================== AO: [alsa] 48000Hz 6ch s16le (2 bytes per sample) (And similar output when specifying "-channels 6" and using the gardenstate.128.ac3.51.wav file.) This makes me happy, as alsa seem to be at least trying to output 6-channel sound, but I only get sound in the front left and right speakers, and my receiver doesn't recognize the sound as being Dolby Digital. I have also tried with the hwac3 audio codec in mplayer, but then I get no audio whatsoever, not even stereo front speakers: debian$ /usr/local/bin/mplayer -ao alsa:noblock:device=iec958 -ac hwac3 testsounds/gardenstate.128.ac3.51.wav MPlayer dev-SVN-r28227-4.3.2 (C) 2000-2008 MPlayer Team Playing testsounds/gardenstate.128.ac3.51.wav. libavformat file format detected. [lavf] Audio stream found, -aid 0 ========================================================================== Forced audio codec: hwac3 Opening audio decoder: [hwac3] AC3/DTS pass-through S/PDIF No accelerated IMDCT transform found hwac3: switched to AC3, 448000 bps, 48000 Hz AUDIO: 48000 Hz, 2 ch, ac3, 448.0 kbit/29.17% (ratio: 56000->192000) Selected audio codec: [hwac3] afm: hwac3 (AC3 through S/PDIF) ========================================================================== AO: [alsa] 48000Hz 2ch ac3 (1 bytes per sample) No matter what "-channels" option I specify, mplayer always says "48000Hz 2ch ac3" and there is complete silence. And hwac3 only sort of "works" with the Garden State DVD rip, when trying with the others I get an "Cannot find codec for audio format 0x1." (or 0x2001) error and mplayer aborts. I've tried running mplayer with "-af lavcac3enc" to somehow send 6-channel sound but with no success. speaker-test does only give sound in front left and right speakers... I've tried all the "model=" options when modprobing snd-hda-intel mentioned in Documentation/sound/alsa/ALSA-Configuration.txt in the kernel sources, and the one I'm currently using is 6stack-dig. What else...? I run Debian unstable, kernel 2.6.27.7 yesterday and I compiled 2.6.28 earlier today: CONFIG_SND=y CONFIG_SND_TIMER=m CONFIG_SND_PCM=m CONFIG_SND_RAWMIDI=m CONFIG_SND_OSSEMUL=y CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m CONFIG_SND_PCM_OSS_PLUGINS=y CONFIG_SND_VERBOSE_PROCFS=y CONFIG_SND_VMASTER=y CONFIG_SND_MPU401_UART=m CONFIG_SND_AC97_CODEC=m CONFIG_SND_DRIVERS=y CONFIG_SND_AC97_POWER_SAVE=y CONFIG_SND_AC97_POWER_SAVE_DEFAULT=2 CONFIG_SND_PCI=y CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDA_CODEC_REALTEK=y CONFIG_SND_HDA_CODEC_VIA=y CONFIG_SND_HDA_GENERIC=y CONFIG_SND_HDA_POWER_SAVE=y CONFIG_SND_HDA_POWER_SAVE_DEFAULT=2 CONFIG_SND_VIA82XX=m debian:/usr/src/mplayer# lsmod Module Size Used by snd_hda_intel 350544 0 snd_pcm_oss 42784 0 snd_mixer_oss 16704 1 snd_pcm_oss snd_pcm 79432 2 snd_hda_intel,snd_pcm_oss snd_timer 22224 1 snd_pcm snd_page_alloc 9744 2 snd_hda_intel,snd_pcm nvidia 8107728 28 kvm_amd 27604 0 kvm 153712 1 kvm_amd rtc_cmos 11928 0 rtc_core 17284 1 rtc_cmos rtc_lib 3008 1 rtc_core dvb_usb_vp7045 10692 0 dvb_usb 17932 1 dvb_usb_vp7045 dvb_core 91308 1 dvb_usb usbhid 19108 0 pata_marvell 4736 0 parport_pc 30120 0 parport 24736 1 parport_pc 8250_pnp 17792 0 8250 23624 1 8250_pnp serial_core 22016 1 8250 Some HW info (output of lspci and "aplay -L" edited): debian:/usr/src/mplayer# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: VT82xx [HDA VIA VT82xx], device 0: ALC861 Analog [ALC861 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: VT82xx [HDA VIA VT82xx], device 1: ALC861 Digital [ALC861 Digital] Subdevices: 1/1 Subdevice #0: subdevice #0 debian:/usr/src/mplayer# aplay -L [snip] cards 'cards.pcm' front 'cards.pcm.front' rear 'cards.pcm.rear' center_lfe 'cards.pcm.center_lfe' side 'cards.pcm.side' surround40 'cards.pcm.surround40' surround41 'cards.pcm.surround41' surround50 'cards.pcm.surround50' surround51 'cards.pcm.surround51' surround71 'cards.pcm.surround71' iec958 'cards.pcm.iec958' spdif 'cards.pcm.iec958' modem 'cards.pcm.modem' default 'cards.pcm.default' dmix 'cards.pcm.dmix' dsnoop 'cards.pcm.dsnoop' debian:/usr/src/mplayer# cat /proc/asound/cards 0 [VT82xx ]: HDA-Intel - HDA VIA VT82xx HDA VIA VT82xx at 0xfbffc000 irq 17 debian:/usr/src/mplayer# lspci -v 00:00.0 Host bridge: VIA Technologies, Inc. K8T890CF Host Bridge Subsystem: VIA Technologies, Inc. K8T890CF Host Bridge Flags: bus master, medium devsel, latency 64 Capabilities: [50] Power Management version 2 Capabilities: [60] HyperTransport: Slave or Primary Interface Capabilities: [58] #00 [0000] [snip] 00:01.0 PCI bridge: VIA Technologies, Inc. [K8T890 North / VT8237 South] PCI Bridge (prog-if 00 [Normal decode]) Flags: bus master, 66MHz, medium devsel, latency 0 Bus: primary=00, secondary=01, subordinate=01, sec-latency=0 Capabilities: [70] Power Management version 2 [snip] 80:01.0 Audio device: VIA Technologies, Inc. VT1708/A [Azalia HDAC] (VIA High Definition Audio Controller) (rev 10) Subsystem: ASUSTeK Computer Inc. Device 81e7 Flags: bus master, fast devsel, latency 0, IRQ 17 Memory at fbffc000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable- Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00 Capabilities: [100] Virtual Channel <?> Kernel driver in use: HDA Intel Kernel modules: snd-hda-intel Other web pages I've already checked: http://jon.aslund.org/2008/10/22/note-to-self http://ubuntuforums.org/archive/index.php/t-470047.html https://help.ubuntu.com/community/HdaIntelSoundHowto https://bugs.launchpad.net/ubuntu/+source/linux/+bug/138322 http://www.halfgaar.net/surround-sound-in-linux http://alsa.opensrc.org/SurroundSound http://www.mail-archive.com/git-commits-head@xxxxxxxxxxxxxxx/msg18740.html Sorry about the length of the message, but I'm really frustrated and I also wanted to provide enough details to not be immediately met with "please provide further info" replies. Though I wouldn't be surprised if I've forgot to mention something vital. :) If the answer is "forget about it, this will never work", a (rather obvious) follow-up question is: can anyone recommend a graphics card with built-in sound card, a motherboard, or a motherboard/graphics card combo that does work well under Linux, including 6-channel sound over HDMI? I very much prefer fanless graphics cards, by the way. And I'd prefer not having to rebuild everything, if possible I'd like to keep my current CPU, memory etc. /L ------------------------------------------------------------------------------ _______________________________________________ Alsa-user mailing list Alsa-user@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-user