A52 (ac3/Dolby Digital) encoding for SPDIF output

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

A52 (ac3/Dolby Digital) encoding for SPDIF output

Postby mcarans » Fri Jul 02, 2010 7:41 pm

Hi,

1. Does OSS support the Realtek 889A?
2. Does OSS supports encoding of multichannel sound to Dolby DIgital for output through SPDIF (ie. I don't mean passthrough of already encoded AC3)?

Questions below assume answer to 1 and 2 is yes. If not, ignore.
3. Will it work in Ubuntu Lucid 10.04LTS and how is it set up?
4. Is it easy to switch between the AC3 encoding SPDIF device and other sound devices (ie. without reloading OSS and preferably through a GUI)?
5. If using Pusleaudio, can Pulseaudio be made to use the AC3 encoding in OSS and if so, how is it set up in Lucid?

(So far I have got AC3 encoding working in Alsa, but not with Pulseaudio in Lucid).

Thanks,
Mike
mcarans
New Member
 
Posts: 2
Joined: Fri Jul 02, 2010 7:24 pm

Re: A52 (ac3/Dolby Digital) encoding for SPDIF output

Postby cesium » Sat Jul 03, 2010 12:18 am

Realtek 889A is the hdaudio codec, right?

1. Yes.

2. SPDIF is supported by oss_hdaudio. However, I don't have experience using it, nor using this specific codec with SPDIF. It should work, but I can't guarantee this.

3. OSSv4 works with Ubuntu (I use debian, personally). This page might be helpful.

You can either download a .deb from this website, or build an OSS deb from source. Then, you'll need to use 'dpkg' to install it (there's also an official debian package, but it probably doesn't exist on Ubuntu?).

After installation, you'll need to set up software to use OSS. Many will work automatically, but you probably need to install OSS plugin packages (e.g. libsdl1.2debian-oss or -all, libesd0, libwine-oss, libcanberra-gstreamer, gstreamer0.10-plugins-good (or -bad if it's old), etc.). For testing purposes, I think you can skip most setup after install, until you're comfortable with OSS (or decide to uninstall it).

4. You don't have to reload OSS, but there's no GUI for this. The default output is /dev/dsp symlink, and the spdif output is probably /dev/oss/oss_hdaudio0/spdout0 (usually symlinked to /dev/dsp_ac3). You can either order software individually to use the spdif output and the method to do that is slightly different for most programs (e.g. 'mplayer -ao oss:/dev/dsp_ac3' etc. other programs have other switches/config files), or you can change /dev/dsp symlink back and forth (probably 'sudo ln -sf /dev/oss/oss_hdaudio0/spdout0 /dev/dsp' and 'sudo ln -sf /dev/oss/oss_hdaudio0/pcm0 /dev/dsp').

Pulseaudio using programs may be able to use its interface, but I'm not sure whether defining multiple OSS devices in its config works (the one time I tried, it copied the device description, so it was a bit clunky. Another person told me his copy couldn't use anything other than /dev/dsp device). Note that Pulse requires some manual fiddling in order to work at all with OSSv4.

5. I don't know. You'll probably have to set module-oss to use the /dev/oss/oss_hdaudio0/spdout0 device too, but that might be buggy (see above). Btw, I suspect Pulse can be made to do AC3 with ALSA, but that probably requires some fiddling with ~/.asoundrc. That's beyond my knowledge.
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: A52 (ac3/Dolby Digital) encoding for SPDIF output

Postby mcarans » Sat Jul 03, 2010 1:51 pm

Thanks for your help.

Realtek 889A is the chipset of the sound on my motherboard.

I have found that there is some bug that prevents me using AC3 with Alsa and Pulseaudio and at this point, it isn't clear whether the bug is in Alsa or Pulseaudio.

It sounds like OSS works very like Alsa rather than Pulseaudio.

Before I expend a lot of time installing it, I would want to be sure that I can get AC3 through SPDIF working as I've spent an inordinate amount of time trying to do it with Pulseaudio and Alsa. Has anyone done this with OSS successfully with any sound card?

Since it isn't possible to switch between sound cards, Is it possible to output to two simultaneously? I would want to output through HDMI and SPDIF.
mcarans
New Member
 
Posts: 2
Joined: Fri Jul 02, 2010 7:24 pm

Re: A52 (ac3/Dolby Digital) encoding for SPDIF output

Postby cesium » Sat Jul 03, 2010 6:36 pm

It is possible to change default output, but you can't move an app once it decided to use a card (unless perhaps it uses Pulse under OSS rather than OSS directly). IIRC, it's the same in ALSA. It's not possible to output to two simultaneously (ok, a program using the API can do it, but I mean not in the sense of a simple outside intervention - one will have to record the output and than play it back).

I know spdout works under ALC888 chip for other users, not sure whether they have an AC3 setup though. I suspect HDMI wouldn't work though...
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am


Return to Linux

Who is online

Users browsing this forum: Bing [Bot] and 1 guest