How to force Java Sound to use ALSA not OSS?

For drivers and kernel modules.
Post Reply
Message
Author
soundman
Posts: 1
Joined: Wed 16 Dec 2009, 10:54

How to force Java Sound to use ALSA not OSS?

#1 Post by soundman »

Hi All, my first post here so keeping my fingers crossed.

Normally I can find everything I need thru Google, but now I need help from the experts! I have a Java Sound application running under Puppy 4.0 (and JRE1.6.0_07), but now I want to implement 5.1 surround sound. I've configured my .asoundrc file so that part is all working well.

Here's the issue - Java always uses /dev/dsp as the driver. I've read in a few other linux distro forums that all you need to do is uninstall OSS to force Java to use ALSA /dev/snd/ drivers, but nobody says how this is done. It is not listed in PETget so I assume it's part of the core kernel, and I'm not at the level of building my own Puppy.

Is there any easy way this can be done?

TIA.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#2 Post by disciple »

I don't think Puppy includes oss - it just has Alsa's "oss emulation". Maybe you can configure it to disable that, but if Java really uses oss unless it is not present, then I'd say it is a stupid program :) Surely it can be configured to use Alsa...
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#3 Post by Patriot »

Hmmm .....


disciple is correct ... puppy only have alsa installed with oss-emulation layer ... To try removing the oss emulation layer, you'll need to unload the modules ... all that has snd_seq*, snd_*_oss and snd_pcm ... example:

#lsmod | grep -e '_oss|_seq'

#rmmod [one module name]

Frankly, I'm not a fan of Java and I have no idea how Java can bork like this ... a little googling does seem to indicate a problematic library ...


Rgds

User avatar
WB7ODYFred
Posts: 169
Joined: Sun 14 Dec 2008, 02:15
Location: Oregon & Washington

Recreate /dev/dsp

#4 Post by WB7ODYFred »

mknod /dev/dsp 14 3
mknod /dev/dsp1 14 19
mknod /dev/dsp2 14 35
mknod /dev/dsp3 14 51

chmod 777 /dev/dsp*

if needed mknod /dev/mixer 14 0
chmod 777 /dev/mixer

Fora USB Headset audio setup
rmmod snd-usb-audio
modprobe snd-usb-audio

Then try to play audio using the alsaplayer or vlc or gzine

vi /etc/modprobe.conf
# --- ALSACONF version 1.0.22 ---
alias snd-card-0 snd-usb-audio
alias sound-slot-0 snd-usb-audio
alias snd-card-1 snd-es1938
alias sound-slot-1 snd-es1938

/etc/rc.d/rc.alsa status
/etc/rc.d/rc.alsa stop
/etc/rc.d/rc.alsa start
/etc/rc.d/rc.alsa status


I have an ess esonic sound chip es1938 in my PC an plugged in a USB Headset for my audio use

Post Reply