Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do you change the ALSA device Firefox/Flash uses?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Malvineous
Apprentice
Apprentice


Joined: 20 Oct 2006
Posts: 281
Location: Brisbane, Australia

PostPosted: Fri Dec 28, 2007 9:19 am    Post subject: How do you change the ALSA device Firefox/Flash uses? Reply with quote

Hi everyone,

I've got some 64-bit LADSPA plugins attached to my default ALSA device, so when the 32-bit Flash plugin tries to play sound from within 64-bit Firefox, it fails because I assume the 32-bit ALSA can't load the 64-bit LADSPA plugin.

If I remove the LADSPA plugin then everything works fine, so it would make sense to set up another ALSA PCM device that doesn't use any plugins - only I can't figure out how to get Firefox and/or the Flash plugin to use a different ALSA device - they seem to be hard-coded to use "default".

Does anyone know how to point Firefox/Flash at a different ALSA device? (or make them work with 64-bit LADSPA plugins? I tried installing a 32-bit version of the same plugin, but it just makes the Flash window disappear/go grey when it tries to play sound.)

Any ideas would be much appreciated!
Back to top
View user's profile Send private message
Wormo
Retired Dev
Retired Dev


Joined: 29 Nov 2004
Posts: 526
Location: SB County California

PostPosted: Sat Dec 29, 2007 6:30 am    Post subject: Reply with quote

How about this:

Code:

pcm.dsp0 {
  type plug
  slave.pcm "dmix"
}


i.e. send /dev/dsp0 straight to dmix module and skip the eq device you set up.
Or did you already try this and it didn't work for some reason?

BTW nice howto on setting up the ladspa eq.
Back to top
View user's profile Send private message
MostAwesomeDude
Guru
Guru


Joined: 12 Aug 2007
Posts: 373

PostPosted: Sat Dec 29, 2007 7:37 am    Post subject: Reply with quote

I want to know how you got Flash to respect ALSA -- it refuses to use anything besides OSS for me.
Back to top
View user's profile Send private message
Malvineous
Apprentice
Apprentice


Joined: 20 Oct 2006
Posts: 281
Location: Brisbane, Australia

PostPosted: Sat Dec 29, 2007 8:50 am    Post subject: Reply with quote

Wormo wrote:
i.e. send /dev/dsp0 straight to dmix module and skip the eq device you set up.
Or did you already try this and it didn't work for some reason?

BTW nice howto on setting up the ladspa eq.

Thanks :-)

Yes, I do have this in my ALSA config but that redirects OSS to an ALSA device - it seems the latest version of Flash (9?) has native ALSA support so it won't take advantage of this. The problem is it only uses the PCM device identified as "default", but since this doesn't work with the LADSPA EQ (32-bit ALSA trying to load 64-bit LADSPA plugin) I really need some way of telling Flash to use a different ALSA device.

Ironically enough I'd be happy if Flash would use OSS instead, because then that redirection trick should work...

Edit: Okay, it turned out the problems I was having with the 32-bit version of the LADSPA plugins was because I pinched them from a 32-bit box and forgot about the dependencies. Now if I point LADSPA at /usr/lib32/ladspa/ instead then 32-bit Flash works fine through the EQ, but 64-bit programs crash because they can't load 32-bit libraries.

If I change it to point LADSPA at /usr/lib64/ladspa/ it works fine for 64-bit programs, but 32-bit Flash goes back to complaining that it can't find the EQ plugin.

Any ideas how to get 32-bit LADSPA plugins to automatically load from /usr/lib32 and 64-bit ones to load from /usr/lib64???
Back to top
View user's profile Send private message
Malvineous
Apprentice
Apprentice


Joined: 20 Oct 2006
Posts: 281
Location: Brisbane, Australia

PostPosted: Sat Dec 29, 2007 11:49 pm    Post subject: Solved! Reply with quote

Okay, I think I've solved this now, but not in the way I originally posted about. Turns out I was heading in the right direction all along, but a typo got in the way :-(

All that needs to be done is to edit /etc/env.d/60ladspa, and add the 32-bit plugin directory to the search path, i.e:
Code:
LADSPA_PATH=/usr/lib64/ladspa:/usr/lib32/ladspa

Then 64-bit programs will pick up their plugins from lib64, and 32-bit programs will try and fail to load anything from lib64, and will then move on to lib32 where they'll successfully be able to load the matching plugins.

Now I've got equalised sound coming from 32-bit Flash, via ALSA, mixed in with music from 64-bit Audacious. Hooray :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum