ZSNES and osspd

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

Post Reply
QuattroPro

ZSNES and osspd

Post by QuattroPro »

I know that sound and Linux is a contentious topic on this forum. That being said, there is another effort that is attempting to make the situation more manageable.

Kernel 2.6.31 brings CUSE, character device emulation in userspace. Tejun Heo used this to implement osspd, a daemon which emulates /dev/dsp, adsp, and mixer and redirects their sound output to...whatever. Currently, the only redirection implemented sends this input to pulseaudio. However, this means that OSS mixing on Linux happens without intervention (having to run aoss or padsp). Contrary to Tejun's webpage, osspd 1.3 does implement mmap. (here: http://thread.gmane.org/gmane.comp.file-systems.fuse.devel/6843/focus=7723

This makes OSS, at least for linux users using pulseaudio, a viable way to play sound.

Using Fedora 11, I had to install 2.6.31, an updated version of FUSE (currently 2.8.1), and the osspd daemon (found here: http://www.kernel.org/pub/linux/kernel/people/tj/ossp/). The kernel has to be compiled with

Code: Select all

CONFIG_PREEMPT=y
CONFIG_SND_HRTIMER=m
CONFIG_SCHED_HRTICK=y
CONFIG_HZ_1000=y
CONFIG_HZ=1000
and ALSA's oss emulation disabled

Code: Select all

# CONFIG_SOUND_OSS_CORE is not set
# CONFIG_SND_MIXER_OSS is not set
# CONFIG_SND_PCM_OSS is not set
# CONFIG_SND_SEQUENCER_OSS is not set
Once modules cuse and snd_hrtimer are loaded, osspd is run (chmod a+rw /dev/dsp etc.), and you have permission to write to the dev entires, applications using OSS work with no intervention.

I have a Realtek ALC888 codec, and when using this setup + zsnes -ad oss, the latency is way better than using -ad alsa. Granted this is with the unofficial "Link Swing Test", but from my viewpoint, he doesn't swing faster than the speed of sound.

Since it is relatively new, there are bugs. Some OSS applications play at a much faster rate than normal (festalon, in my experience).

I believe that osspd is set to be adopted in Mandriva 2010 and Ubuntu 10.04.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

This doesn't really help us in any way. But thanks for the information.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Post Reply