Sound Blaster Audigy and S/PDIF passthrough

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, cesium

Z_God
New Member
Posts: 6
Joined: Sat Dec 07, 2013 2:13 pm

Sound Blaster Audigy and S/PDIF passthrough

Postby Z_God » Sat Dec 07, 2013 2:23 pm

I'm trying to get S/PDIF passthrough to work with a system which contains a Sound Blaster Audigy 2 and two Sound Blaster PCI128 cards.

I didn't manage to get it to work with ALSA, so I'm trying it with OSS4 now. I'm using Debian Wheezy and I installed OSS4 from the repository. The version is 4.2-build2006.

I disabled vmix and in VLC I set the audio device to /dev/oss/oss_sblive0/pcm4 and checked the box 'Use S/PDIF when possible. This allows me to play one of the test files I have, but the audio skips a lot and in the display of my amplifier I see it keeps switching between LPCM at 48kHz and Dolby Digital. When I'm not playing any sound at all, it also displays LPCM 48kHz. With another test file I do not hear anything at all and I see DTS 3/2.1 flashing on my amplifier.

I did not see yet whether I could use one of the other cards for passthrough, but if that could work better, it would be no problem to switch.

Does anyone recognize my symptoms and have any idea what exactly I should do to get S/PDIF passthrough to work with OSS4 and one of my cards?
Thanks a lot in advance!

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Sound Blaster Audigy and S/PDIF passthrough

Postby igorzwx » Sat Dec 07, 2013 5:23 pm

Z_God wrote:I'm trying to get S/PDIF passthrough to work with a system which contains a Sound Blaster Audigy 2 and two Sound Blaster PCI128 cards.

I didn't manage to get it to work with ALSA, so I'm trying it with OSS4 now. I'm using Debian Wheezy and I installed OSS4 from the repository. The version is 4.2-build2006.

I disabled vmix and in VLC I set the audio device to /dev/oss/oss_sblive0/pcm4 and checked the box 'Use S/PDIF when possible. This allows me to play one of the test files I have, but the audio skips a lot and in the display of my amplifier I see it keeps switching between LPCM at 48kHz and Dolby Digital. When I'm not playing any sound at all, it also displays LPCM 48kHz. With another test file I do not hear anything at all and I see DTS 3/2.1 flashing on my amplifier.

I did not see yet whether I could use one of the other cards for passthrough, but if that could work better, it would be no problem to switch.

Does anyone recognize my symptoms and have any idea what exactly I should do to get S/PDIF passthrough to work with OSS4 and one of my cards?
Thanks a lot in advance!


Type on terminal:

Code: Select all

$ ossinfo


and post the output here (mark it as "code").

Z_God
New Member
Posts: 6
Joined: Sat Dec 07, 2013 2:13 pm

Re: Sound Blaster Audigy and S/PDIF passthrough

Postby Z_God » Sat Dec 07, 2013 6:54 pm

Here is the full output:

Code: Select all

Version info: OSS 4.2 (b 2006/201212190848) (0x00040100) GPL
Platform: Linux/i686 3.2.0-4-686-pae #1 SMP Debian 3.2.51-1 (oor)

Number of audio devices:        10
Number of audio engines:        22
Number of MIDI devices:         3
Number of mixer devices:        3


Device objects
 0: osscore0 OSS core services
 1: oss_sblive0 SB Audigy2 interrupts=821218 (841055)
 2: oss_sbpci0 Sound Blaster PCI128 interrupts=0 (841053)
 3: oss_sbpci1 Sound Blaster PCI128 interrupts=0 (841051)
 4: oss_usb0 USB audio core services

MIDI devices (/dev/midi*)
0: Audigy UART (MIDI port 1 of device object 1)
1: APCI97 UART (MIDI port 1 of device object 2)
2: APCI97 UART (MIDI port 1 of device object 3)

Mixer devices
 0: SB Audigy2 (STAC9750) (Mixer 0 of device object 1)
 1: AC97 Mixer (STAC9721) (Mixer 0 of device object 2)
 2: AC97 Mixer (STAC9721) (Mixer 0 of device object 3)

Audio devices
SB Audigy2 main                   /dev/oss/oss_sblive0/pcm0  (device index 0)
SB Audigy2 front out              /dev/oss/oss_sblive0/pcm1  (device index 1)
SB Audigy2 side out               /dev/oss/oss_sblive0/pcm2  (device index 2)
SB Audigy2 center/lfe out         /dev/oss/oss_sblive0/pcm3  (device index 3)
SB Audigy2 raw S/PDIF (output only)  /dev/oss/oss_sblive0/pcm4  (device index 4)
SB Audigy2 5.1 output device      /dev/oss/oss_sblive0/pcm5  (device index 5)
Sound Blaster PCI128 (rev 2)      /dev/oss/oss_sbpci0/pcm0  (device index 6)
Sound Blaster PCI128 (playback only)  /dev/oss/oss_sbpci0/pcm1  (device index 7)
Sound Blaster PCI128 (rev 2)      /dev/oss/oss_sbpci1/pcm0  (device index 8)
Sound Blaster PCI128 (playback only)  /dev/oss/oss_sbpci1/pcm1  (device index 9)

Nodes
  /dev/dsp -> /dev/oss/oss_sblive0/pcm0
  /dev/dsp_in -> /dev/oss/oss_sblive0/pcm0
  /dev/dsp_out -> /dev/oss/oss_sblive0/pcm0
  /dev/dsp_ac3 -> /dev/oss/oss_sblive0/pcm0
  /dev/dsp_mmap -> /dev/oss/oss_sblive0/pcm0
  /dev/dsp_multich -> /dev/oss/oss_sblive0/pcm5

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Sound Blaster Audigy and S/PDIF passthrough

Postby igorzwx » Sat Dec 07, 2013 7:26 pm

Z_God wrote:Here is the full output:

Code: Select all

Version info: OSS 4.2 (b 2006/201212190848) (0x00040100) GPL
Platform: Linux/i686 3.2.0-4-686-pae #1 SMP Debian 3.2.51-1 (oor)

Number of audio devices:        10
Number of audio engines:        22
Number of MIDI devices:         3
Number of mixer devices:        3


Device objects
 0: osscore0 OSS core services
 1: oss_sblive0 SB Audigy2 interrupts=821218 (841055)
 2: oss_sbpci0 Sound Blaster PCI128 interrupts=0 (841053)
 3: oss_sbpci1 Sound Blaster PCI128 interrupts=0 (841051)
 4: oss_usb0 USB audio core services

MIDI devices (/dev/midi*)
0: Audigy UART (MIDI port 1 of device object 1)
1: APCI97 UART (MIDI port 1 of device object 2)
2: APCI97 UART (MIDI port 1 of device object 3)

Mixer devices
 0: SB Audigy2 (STAC9750) (Mixer 0 of device object 1)
 1: AC97 Mixer (STAC9721) (Mixer 0 of device object 2)
 2: AC97 Mixer (STAC9721) (Mixer 0 of device object 3)

Audio devices
SB Audigy2 main                   /dev/oss/oss_sblive0/pcm0  (device index 0)
SB Audigy2 front out              /dev/oss/oss_sblive0/pcm1  (device index 1)
SB Audigy2 side out               /dev/oss/oss_sblive0/pcm2  (device index 2)
SB Audigy2 center/lfe out         /dev/oss/oss_sblive0/pcm3  (device index 3)
SB Audigy2 raw S/PDIF (output only)  /dev/oss/oss_sblive0/pcm4  (device index 4)
SB Audigy2 5.1 output device      /dev/oss/oss_sblive0/pcm5  (device index 5)
Sound Blaster PCI128 (rev 2)      /dev/oss/oss_sbpci0/pcm0  (device index 6)
Sound Blaster PCI128 (playback only)  /dev/oss/oss_sbpci0/pcm1  (device index 7)
Sound Blaster PCI128 (rev 2)      /dev/oss/oss_sbpci1/pcm0  (device index 8)
Sound Blaster PCI128 (playback only)  /dev/oss/oss_sbpci1/pcm1  (device index 9)

Nodes
  /dev/dsp -> /dev/oss/oss_sblive0/pcm0
  /dev/dsp_in -> /dev/oss/oss_sblive0/pcm0
  /dev/dsp_out -> /dev/oss/oss_sblive0/pcm0
  /dev/dsp_ac3 -> /dev/oss/oss_sblive0/pcm0
  /dev/dsp_mmap -> /dev/oss/oss_sblive0/pcm0
  /dev/dsp_multich -> /dev/oss/oss_sblive0/pcm5


Code: Select all

SB Audigy2 raw S/PDIF (output only)  /dev/oss/oss_sblive0/pcm4  (device index 4)


You may try /dev/oss/oss_sblive0/pcm4 with Audacious ( → Preferences):

1. it allows to disable vmix
2. do not enable "format conversions" (crappy resampler).

Your mixer may have a kind of "digital-out output control", for example:

Code: Select all

$ ossmix | grep dig
codec4.jack.int-digout.mute ON|OFF (currently OFF)


EDIT: Notice that Audacious has a kind of "open-source crap" inside, which converts everything to 32bit (it cannot be disabled), see: viewtopic.php?f=3&t=3834

See also "man ossplay".

Code: Select all

ossplay -R -vvvv -d<devname> filename

Z_God
New Member
Posts: 6
Joined: Sat Dec 07, 2013 2:13 pm

Re: Sound Blaster Audigy and S/PDIF passthrough

Postby Z_God » Sat Dec 07, 2013 8:34 pm

I tried Audacious, but it only plays for a single second and then it stops.

When I grep the ossmix output, I get the following output:

Code: Select all

$ ossmix |grep dig
Selected mixer 0/SB Audigy2 (STAC9750)
front.digcd <monovol> (currently 100)
surr.digcd <monovol> (currently 0)
record.digcd <monovol> (currently 100)


I also tried connecting a USB device which has both S/PDIF in and out, but I could not get anything out of the S/PDIF output at all (it works with ALSA). Is S/PDIF supported with USB devices?

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Sound Blaster Audigy and S/PDIF passthrough

Postby igorzwx » Sat Dec 07, 2013 8:49 pm

Z_God wrote:I tried Audacious, but it only plays for a single second and then it stops.

When I grep the ossmix output, I get the following output:

Code: Select all

$ ossmix |grep dig
Selected mixer 0/SB Audigy2 (STAC9750)
front.digcd <monovol> (currently 100)
surr.digcd <monovol> (currently 0)
record.digcd <monovol> (currently 100)


I also tried connecting a USB device which has both S/PDIF in and out, but I could not get anything out of the S/PDIF output at all (it works with ALSA). Is S/PDIF supported with USB devices?


OSS4 USB support is experimental (usually, it does not work).

Try:

Code: Select all

ossplay -R -vvvv -d<devname> filename


If Audacious failed, you may report bug to Michał viewtopic.php?f=3&t=3834

Z_God
New Member
Posts: 6
Joined: Sat Dec 07, 2013 2:13 pm

Re: Sound Blaster Audigy and S/PDIF passthrough

Postby Z_God » Sat Dec 07, 2013 9:08 pm

igorzwx wrote:

Code: Select all

ossplay -R -vvvv -d<devname> filename

That one did the trick!! All my test files play perfectly now. Now I know that everything is working properly, I can look into the problems with VLC and Audacious specifically.

Thank you very much!!

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Sound Blaster Audigy and S/PDIF passthrough

Postby igorzwx » Sat Dec 07, 2013 9:20 pm

Z_God wrote:
igorzwx wrote:

Code: Select all

ossplay -R -vvvv -d<devname> filename

That one did the trick!! All my test files play perfectly now. Now I know that everything is working properly, I can look into the problems with VLC and Audacious specifically.

Thank you very much!!


1. VLC is crap

2. You may try DeadBeef Player with Petrov's resampler viewtopic.php?f=3&t=3543&start=90#p19477

DeadBeef is using "default device" /dev/dsp
You may relink it to "spdif". It should look like this:

Code: Select all

$ ossinfo
Nodes
/dev/dsp -> /dev/oss/oss_sblive0/pcm4


It is simply a "symbolic link", see "ossinfo"

Changing the Default Sound Output
__https://wiki.archlinux.org/index.php/OSS#Changing_the_Default_Sound_Output

/dev/dsp is the default audio device in the system. It's connected to the main speakers and the primary recording source (such as microphone). The system administrator can set /dev/dsp to be a symbolic link to the desired default device. The ossinfo utility can be used to list the available audio devices in the system. http://manuals.opensound.com/usersguide/dsp.html


3. You may ask Michał to fix that bug in Audacious (run Audacious from terminal and read the output) viewtopic.php?f=3&t=3834

4. You may also try MPlayer.
Last edited by igorzwx on Mon Feb 17, 2014 9:39 pm, edited 1 time in total.

Z_God
New Member
Posts: 6
Joined: Sat Dec 07, 2013 2:13 pm

Re: Sound Blaster Audigy and S/PDIF passthrough

Postby Z_God » Sat Dec 07, 2013 11:17 pm

I'll look into DeadBeaf do you also have a recommendation for videos?

I will look into the details with Audacious and report them soon.

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Sound Blaster Audigy and S/PDIF passthrough

Postby igorzwx » Sat Dec 07, 2013 11:34 pm

Z_God wrote:do you also have a recommendation for videos?


I am using SMPlayer2 with MPlayer2
Do not forget to fix config! See: viewtopic.php?f=3&t=5206

You may also try SMPlayer and UMPlayer with MPlayer

If you want to play HD videos, you may need to upgrade your hardware.


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 6 guests