can't get digital audio (SPDIF) in anything but stereo - AVS Forum
Forum Jump: 
 
Thread Tools
post #1 of 18 Old 11-17-2012, 04:33 PM - Thread Starter
Senior Member
 
dkap's Avatar
 
Join Date: Aug 2002
Location: in the dark
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Running Linux Mint 13, the only digital audio (SPDIF / IEC958) hardware output options are Digital Stereo and Digital Stereo + Analog Input. This appears to be a common problem. The resulting sound output is Pro Logic, according to my preamp. Not great, by any means.

Following the recommendations here:

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

1) I tried switching to the Digital Stereo + Analog Input option, but that doesn't bring up any additional "output devices" tab. Must not be applicable to Mint.

2) I edited PulseAudio's daemon.conf settings, but no change even after stopping and restarting it.

It makes no sense to me why a digital pass-through would be limited to two channels when all the analog and HDMI outputs have all of them available... That suggests it isn't a hardware limitation, so I'm assuming there's something else involved in getting IEC958 to act correctly.

Dan
dkap is offline  
Sponsored Links
Advertisement
 
post #2 of 18 Old 11-17-2012, 06:58 PM
Senior Member
 
kwisher's Avatar
 
Join Date: Jun 2008
Posts: 305
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Have you tried running alsamixer from a terminal to make sure all your devices are unmuted? Mine are usually muted by default on a new install, not sure why.
kwisher is offline  
post #3 of 18 Old 11-17-2012, 07:34 PM - Thread Starter
Senior Member
 
dkap's Avatar
 
Join Date: Aug 2002
Location: in the dark
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
alsamixer shows all channels turned on. I can toggle Master to mute (M) and it mutes all sound, but toggling the individual channels doesn't seem to have any effect. Does that signify anything?

Also, all the channels show zero gain. I'm not quire sure how to interpret the red-white-green volume bars, but they all show 100 (%) below them.

I did find this (step 3):

http://www.johannes-bauer.com/linux/dolby/

That sounds like a similar issue. I'm using VLC, not Movie Player, but maybe there's a comparable course of action? Basically, the computer needs to be told to not process the sound (seems like the ultimate "duh!" comment, given that it's a digital pass-through in the first place) ... just let the preamp handle it.

VLC's Audio preferences contains default/Alsa/PulseAudio options, but that didn't seem to have any effect...

Dan
dkap is offline  
post #4 of 18 Old 11-17-2012, 09:04 PM
AVS Special Member
 
waterhead's Avatar
 
Join Date: May 2007
Posts: 1,280
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 13 Post(s)
Liked: 12
You may want to refer to the Alsa wiki on this:

http://alsa.opensrc.org/DigitalOut

I believe the digital output is seen as stereo because the audio stream is usually encoded, like AC3.
waterhead is offline  
post #5 of 18 Old 11-17-2012, 09:44 PM
AVS Special Member
 
waterhead's Avatar
 
Join Date: May 2007
Posts: 1,280
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 13 Post(s)
Liked: 12
The wiki I referred to says the digital is called IEC958. I have an Intel quad core with Intel HD audio, and when I first checked I don't recall seeing that listed. The wiki also refers to AC3 as being used. I searched Synaptic package manager for AC3, and the package alsa-tools popped up. It contains an AC3 encoder.

I installed the alsa-tools package. When I checked again, I now see the IEC958 listed. It is possible it was there all along, so I'm not positive that installing that package had anything to do with it.
waterhead is offline  
post #6 of 18 Old 11-17-2012, 10:01 PM - Thread Starter
Senior Member
 
dkap's Avatar
 
Join Date: Aug 2002
Location: in the dark
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Thanks for the Alsa Wiki link. It doesn't quite match my setup, but it's fairly close. I have the IEC958 entry under Device Aliases, but after that I'm not sure what to do. I don't see anything in VLC that allows the card/device to be specified. But even if that option were there, I'm not following how that would solve anything. I already know IEC958 is functional based on the Mint audio settings and the fact that the toslink cable is the only thing connected to the preamp... It seems like I need to modify the IEC958 behavior, not enable it.

Dan
dkap is offline  
post #7 of 18 Old 11-17-2012, 10:07 PM
AVS Special Member
 
waterhead's Avatar
 
Join Date: May 2007
Posts: 1,280
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 13 Post(s)
Liked: 12
Did you try the part about testing, using aplay?

http://alsa.opensrc.org/DigitalOut#Test_your_setup
waterhead is offline  
post #8 of 18 Old 11-17-2012, 10:22 PM - Thread Starter
Senior Member
 
dkap's Avatar
 
Join Date: Aug 2002
Location: in the dark
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by waterhead View Post

Did you try the part about testing, using aplay?[/url]

I don't quite understand the directions...
Code:
aplay -D iec958:CARD=M2496,DEV=0 Norrlanda.wav

Obviously I download that file, but then what? Do I save it to a location of my choosing, cd into that directory, then run the command, or do I save it somewhere that Also is preconfigured to look?

Dan

p.s. A power outage two days ago seems to have wiped out my wireless router, so I have to look stuff up on this computer then walk to the other end of the house to try it out since I can't get online on the HTPC...
dkap is offline  
post #9 of 18 Old 11-17-2012, 11:09 PM - Thread Starter
Senior Member
 
dkap's Avatar
 
Join Date: Aug 2002
Location: in the dark
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I don't know if it's a step forward or a step sideways, but I noticed in VLC's audio configuration that selecting Also brings up an option to enable SPDIF output when available, plus a list of output devices (what the Also wiki referred to). With that, I can get full Dolby Digital output via several options such as IE958, digital with no conversion, and PulseAudio server.

However ... with that change, there's an awful garbled/clicking noise that replaces any discernible audio. But if I skip ahead in the playback, it goes away and stays away if I go back to any of the earlier points where it occurred. Very strange. I've tried it on a few different DVDs and they do the same thing. Perhaps an Also glitch?

Dan
dkap is offline  
post #10 of 18 Old 11-18-2012, 07:17 AM
AVS Special Member
 
waterhead's Avatar
 
Join Date: May 2007
Posts: 1,280
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 13 Post(s)
Liked: 12
There will usually be several audio devices listed on your system. To test you need to tell aplay which is the digital output. I will post the output of my system. I also have a nVidia card that has HDMI outputs, but I didn't include them in these examples.

First, here is the output of aplay -L. The digital out is in red lettering:
Code:
~$ aplay -L
default
    Playback/recording through the PulseAudio sound server
pulse
    Playback/recording through the PulseAudio sound server
front:CARD=PCH,DEV=0
    HDA Intel PCH, STAC92xx Analog
    Front speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, STAC92xx Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, STAC92xx Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, STAC92xx Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, STAC92xx Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, STAC92xx Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
'iec958:CARD=PCH,DEV=0
    HDA Intel PCH, STAC92xx Digital
    IEC958 (S/PDIF) Digital Audio Output'
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, STAC92xx Analog
    Direct sample mixing device
dmix:CARD=PCH,DEV=1
    HDA Intel PCH, STAC92xx Digital
    Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
    HDA Intel PCH, STAC92xx Analog
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
    HDA Intel PCH, STAC92xx Digital
    Direct sample snooping device
hw:CARD=PCH,DEV=0
    HDA Intel PCH, STAC92xx Analog
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
    HDA Intel PCH, STAC92xx Digital
    Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, STAC92xx Analog
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
    HDA Intel PCH, STAC92xx Digital
    Hardware device with all software conversions

Now the output of aplay -l.
Code:
~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: STAC92xx Analog [STAC92xx Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: STAC92xx Digital [STAC92xx Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

This means to play a file, I have to specify the card and the device. the card will always be 0, but the device can be 0 or 1. I tried two methods, and here are my results:
Code:
~$ aplay -D hw:0,1 ~/Music/SURROUNDTEST_011212.wav 
Playing WAVE '/home/paul/Music/SURROUNDTEST_011212.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

:~$ aplay -D iec958:CARD=PCH,DEV=0 ~/Music/SURROUNDTEST_011212.wav
Playing WAVE '/home/paul/Music/SURROUNDTEST_011212.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

If I go by the info I got from aplay -L, then my digital SHOULD be card=0 device=0. So my first example would be using the wrong output. When I did get sound, it was a buzz and a whooshing sound. But I don't have this system set up for surround sound.

What you need to do is to try the outputs, and see if the DTS or DD light on the receiver comes on when trying to play through the different tests.

Edit: I found and corrected an error that I made when doing my tests.
waterhead is offline  
post #11 of 18 Old 11-18-2012, 10:09 AM - Thread Starter
Senior Member
 
dkap's Avatar
 
Join Date: Aug 2002
Location: in the dark
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Phew, I got a working wireless signal again ... makes following instructions and reporting back much easier!
Code:
aplay -D iec958:CARD=PCH,DEV=0 ~/Music/Prelude.wav

Playing WAVE '/home/user1/Music/Prelude.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

The preamp reports it as DTS being received, so that looks (and sounds) good.

I also tried playing a DVD in Movie Player just now. It defaults to Stereo output, so I changed it to AC3 Passthrough. Still registers as Pro Logic even after closing and restarting the player.

Edit: I ran the DD test WAV and it showed as Dolby Digital on the preamp. I guess that means the passthrough itself is okay, but something in the software layer is screwy?

Dan
dkap is offline  
post #12 of 18 Old 11-18-2012, 11:19 AM
AVS Special Member
 
waterhead's Avatar
 
Join Date: May 2007
Posts: 1,280
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 13 Post(s)
Liked: 12
You may now need to change your system configuration to use this as the default audio connection. I think one of the How-To's that you reference described how to do this. The only problem may be in how you list the audio. In the past I had to use the 'hw:0,0' description, and I don't know if it will accept the 'CARD=PCH,DEV=0' discription.

Try playing the file again, this time use this:
Code:
aplay -D hw:0,0 ~/Music/Prelude.wav

And see if you also get DTS output.
waterhead is offline  
post #13 of 18 Old 11-18-2012, 11:24 AM - Thread Starter
Senior Member
 
dkap's Avatar
 
Join Date: Aug 2002
Location: in the dark
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Yeah, that method works, too. Now to figure out which of the guides covered how to change the default audio... smile.gif I'll work on that when I get back in a couple hours.

Dan
dkap is offline  
post #14 of 18 Old 11-18-2012, 11:26 AM
AVS Special Member
 
waterhead's Avatar
 
Join Date: May 2007
Posts: 1,280
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 13 Post(s)
Liked: 12
Quote:
Originally Posted by dkap View Post

Yeah, that method works, too. Now to figure out which of the guides covered how to change the default audio... smile.gif I'll work on that when I get back in a couple hours.
Dan
Good, 'cause I'm watching the Packer game right now.
waterhead is offline  
post #15 of 18 Old 11-18-2012, 11:37 AM
AVS Special Member
 
waterhead's Avatar
 
Join Date: May 2007
Posts: 1,280
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 13 Post(s)
Liked: 12
I was just thinking, the default audio output is most likely 0,0. Try playing the file without specifying the connection.
Code:
aplay  ~/Music/Prelude.wav

If that gives DTS too, then it is the video application that needs to be configured.
waterhead is offline  
post #16 of 18 Old 11-18-2012, 05:25 PM - Thread Starter
Senior Member
 
dkap's Avatar
 
Join Date: Aug 2002
Location: in the dark
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Success! I couldn't find the how-to from earlier that you were thinking of, but I saw the references in the first link I posted to installing pavucontrol for PulseAudio volume control (new PulseAudio supposedly has DD/DTS passthru), so I gave th at a try to see if it's cleaner output than Alsa.
Code:
sudo apt-get install pavucontrol

After installing, I checked the DTS and AC3 boxes ... but it still only showed the Digital Stereo profile in the Config tab. Seemed like it might be a dead end, but I tried it out and it works perfectly for both Dolby Digital and DTS. smile.gif
Quote:
Originally Posted by waterhead View Post

I was just thinking, the default audio output is most likely 0,0. Try playing the file without specifying the connection.
Code:
aplay  ~/Music/Prelude.wav
If that gives DTS too, then it is the video application that needs to be configured.

Nope, that's just static. So, that means hw:0,0 isn't the default audio output?
Quote:
Originally Posted by waterhead View Post

Good, 'cause I'm watching the Packer game right now.

Aiming for sainthood?! That's going above and beyond for a Wisconsin resident.

Dan
dkap is offline  
post #17 of 18 Old 11-18-2012, 08:17 PM
AVS Special Member
 
waterhead's Avatar
 
Join Date: May 2007
Posts: 1,280
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 13 Post(s)
Liked: 12
Quote:
Originally Posted by dkap View Post

Success! I couldn't find the how-to from earlier that you were thinking of, but I saw the references in the first link I posted to installing pavucontrol for PulseAudio volume control (new PulseAudio supposedly has DD/DTS passthru), so I gave th at a try to see if it's cleaner output than Alsa.
Code:
sudo apt-get install pavucontrol
After installing, I checked the DTS and AC3 boxes ... but it still only showed the Digital Stereo profile in the Config tab. Seemed like it might be a dead end, but I tried it out and it works perfectly for both Dolby Digital and DTS. smile.gif
So it works? That's good to hear. Since the audio stream is encoded, then it is possible it still is a stereo stream.
Quote:
Originally Posted by dkap View Post

Nope, that's just static. So, that means hw:0,0 isn't the default audio output?
No, but I'm not sure. There may be more too it than that.
Quote:
Originally Posted by dkap View Post

Aiming for sainthood?! That's going above and beyond for a Wisconsin resident.
Dan
As long as you aren't a Bears fan, I won't get into any trouble.
waterhead is offline  
post #18 of 18 Old 11-19-2012, 12:26 AM - Thread Starter
Senior Member
 
dkap's Avatar
 
Join Date: Aug 2002
Location: in the dark
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by waterhead View Post

So it works? That's good to hear. Since the audio stream is encoded, then it is possible it still is a stereo stream.

It registers as DD and DTS, as applicable, on the preamp. But more importantly, it sounds correct. The Stereo / Pro Logic output sounded very muddied in comparison.
Quote:
As long as you aren't a Bears fan, I won't get into any trouble.

You're safe then. smile.gif

Dan
dkap is offline  
Reply HTPC - Linux Chat



Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off