Dsp: Difference between revisions

From Hackepedia
Jump to navigationJump to search
m removed image
add /dev/dsp creation
Line 1: Line 1:
To create your /dev/dsp in linux if it doesn't exist:
$ grep snd_pcm_oss /proc/modules
$
not found.. so we'll add it:
# modprobe snd_pcm_oss
# grep snd_pcm_oss /proc/modules
snd_pcm_oss 54528 0 - Live 0xf04a2000
snd_mixer_oss 20032 1 snd_pcm_oss, Live 0xf048b000
snd_pcm 95016 3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec, Live 0xf01dd000
snd 58980 8   
snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer, Live 0xf01b1000
okay it's there now. The drivers will be different based on your soundcard. Now to make it take affect next reboot, we will add it to /etc/modules
# echo snd_pcm_oss >> /etc/modules
== dsp already in use ==
Sometimes you will have two applications trying to access your audio device.  
Sometimes you will have two applications trying to access your audio device.  
The culprit can be discovered with lsof assuming your audio device is /dev/dsp like it is on BSD:
The culprit can be discovered with lsof assuming your audio device is /dev/dsp like it is on BSD:

Revision as of 12:32, 23 March 2006

To create your /dev/dsp in linux if it doesn't exist:

$ grep snd_pcm_oss /proc/modules
$

not found.. so we'll add it:

# modprobe snd_pcm_oss 
# grep snd_pcm_oss /proc/modules
snd_pcm_oss 54528 0 - Live 0xf04a2000 
snd_mixer_oss 20032 1 snd_pcm_oss, Live 0xf048b000
snd_pcm 95016 3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec, Live 0xf01dd000
snd 58980 8    
snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer, Live 0xf01b1000

okay it's there now. The drivers will be different based on your soundcard. Now to make it take affect next reboot, we will add it to /etc/modules

# echo snd_pcm_oss >> /etc/modules


dsp already in use

Sometimes you will have two applications trying to access your audio device. The culprit can be discovered with lsof assuming your audio device is /dev/dsp like it is on BSD:

$ lsof | grep dsp
firefox-b 14905 frank    1w  VCHR       30,3        0t0     38 /dev/dsp0.0
firefox-b 14905 frank    1w  VCHR       30,3        0t0     38 /dev/dsp0.0
firefox-b 14905 frank    1w  VCHR       30,3        0t0     38 /dev/dsp0.0
firefox-b 14905 frank    1w  VCHR       30,3        0t0     38 /dev/dsp0.0

as you can see, one of the websites I am viewing with firefox has claimed access to my dsp first. I must now close that tab in firefox, and restart xmms, and all is well.


Stop embedded audio in Firefox

vi ~/.mozilla/firefox/0wt4rci4.default/chrome/userContent.css

and add these lines (creating the file if it doesn't already exist)

/* block embedded sounds */
embed[src*=.mid] { display: none !important }
embed[src*=.mp2] { display: none !important }
embed[src*=.mp3] { display: none !important }
embed[src*=.mp4] { display: none !important }
embed[src*=.wav] { display: none !important }
embed[src*=.wma] { display: none !important }

Stop embedded audio in flash

Not a highly recommended hack, but I opened

vi ~/.mozilla/plugins/libflashplayer.so

and did a

/dsp

which found /dev/dsp which I replaced with /dev/xxx in order to stop flash from accessing my /dev/dsp, as it never released it properly.


Once you have audio working, you may want to try listening to an online streaming radio station such as our recommend streaming stations.