You are not logged in.

#1 2010-06-23 01:32:10

Xenodamus
Member
Registered: 2006-11-09
Posts: 15

[SOLVED] asoundrc upmixing only works in amarok

Hello,
I have a SoundBlaster X-Fi Titanium and I'm having issues with upmixing stereo sources to 5.1 channels.  It seems to only work for amarok and I suspect for phonon based applications as well.  Well I'd like to make it work for kaffeine which no longer uses phonon and my web browser.  Is there a way to solve this issue?

Last edited by Xenodamus (2010-06-25 02:12:05)

Offline

#2 2010-06-23 04:02:14

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] asoundrc upmixing only works in amarok

"Having issues" is too vague. What exactly is the problem?

I recommend you read this thread.

Offline

#3 2010-06-23 06:28:59

Xenodamus
Member
Registered: 2006-11-09
Posts: 15

Re: [SOLVED] asoundrc upmixing only works in amarok

brebs wrote:

"Having issues" is too vague. What exactly is the problem?

I recommend you read this thread.

Already did and it hasn't helped since i have a different problem and I got upmixing to partially work.

The issue is that upmixing works with amarok which uses phonon-xine, but doesn't with Kaffeine which uses xine-lib directly or Flash Player.  I had to add a comment line to the device in order for phonon to see it as described in their documentation, but again it only works for programs that use phonon.  So, how can I use the upmix 'device' for all programs, save for genuine 5.1 sources?

I suppose I could always switch to a video player that uses phonon if all else fails.

Last edited by Xenodamus (2010-06-23 06:35:16)

Offline

#4 2010-06-23 06:47:57

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] asoundrc upmixing only works in amarok

You're still being too vague. Why not post your ~/.asoundrc?

You can redefine the "default" PCM (which is for 2-channel stereo) to do upmixing.

ALSA, AFAIK, isn't clever enough to be able to alter its actions based on the number of channels of input.

Offline

#5 2010-06-23 07:21:49

Xenodamus
Member
Registered: 2006-11-09
Posts: 15

Re: [SOLVED] asoundrc upmixing only works in amarok

brebs wrote:

You're still being too vague. Why not post your ~/.asoundrc?

You can redefine the "default" PCM (which is for 2-channel stereo) to do upmixing.

ALSA, AFAIK, isn't clever enough to be able to alter its actions based on the number of channels of input.

That's a damn shame.  I suppose that's a job for an ALSA frontend?  Why does audio management have to be so complicated in Linux?

Here's the .asoundrc file, although I think I have to configure xine to use that PCM.

# http://alsa.opensrc.org/SurroundSound 
 # http://alsa.opensrc.org/index.php/Low-pass_filter_for_subwoofer_channel_(HOWTO) 
 # Arch Linux:  pacman -S ladspa blop swh-plugins libsamplerate tap-plugins cmt 
 # speaker-test -D upmix_20to51 -c 2 -t wav 
 # listplugins 
 # analyseplugin cmt 
 # http://plugin.org.uk/ladspa-swh/docs/ladspa-swh.html 
 pcm.lowpass_21to21 { 
     type ladspa 
     slave.pcm upmix_21to51 
     path "/usr/lib/ladspa" 
     channels 3 
     plugins { 
       0 { 
          id 1098  # Identity (Audio) (1098/identity_audio) 
          policy duplicate 
          input.bindings.0 "Input"; 
          output.bindings.0 "Output"; 
       } 
 
       1 { 
          id 1052  # High-pass filter 
          policy none 
          input.bindings.0 "Input"; 
          output.bindings.0 "Output"; 
          input { 
             controls [ 100 ] 
          } 
       } 
 
       2 { 
          id 1052  # High-pass filter 
          policy none 
          input.bindings.1 "Input"; 
          output.bindings.1 "Output"; 
          input { 
             controls [ 100 ] 
          } 
       } 
 
       3 { 
          id 1051  # Low-pass filter 
          policy none 
          input.bindings.2 "Input"; 
          output.bindings.2 "Output"; 
          input { 
             controls [ 100 ] 
          } 
       } 
 
    } 
 } 
 
 
 pcm.upmix_20to51 { 
    type plug 
    slave.pcm "lowpass_21to21" 
    slave.channels 3 
    ttable { 
       0.0     1       # left channel 
       1.1     1       # right channel 
       0.2     0.5     # mix left and right ... 
       1.2     0.5     # ... channel for subwoofer 
    } 
 } 
 
 
 pcm.upmix_21to51 { 
    type plug 
    slave.pcm surround51 
    slave.channels 6 
    ttable { 
       0.0     1       # front left 
       1.1     1       # front right 
       0.2     1       # rear left 
       1.3     1       # rear right 
 
       # Front left/right to center. 
       0.4     0.5 
       1.4     0.5 
 
       # Subwoofer, more powerful to compensate for bass-removal from other speakers. 
       # Would normally be 1. 
       2.5     2 
     } 
    hint {
    show on
    description "Stereo to 5.1"
    }
}

Offline

#6 2010-06-24 16:16:52

metzengerstein
Member
Registered: 2010-06-04
Posts: 61

Re: [SOLVED] asoundrc upmixing only works in amarok

Have you tried brebs' suggestion? Most applications use "!default" as their ouput device. So why not change this like:

 #pcm.upmix_20to51 { 
 pcm.!default { 
   type plug 
    slave.pcm "lowpass_21to21" 
    slave.channels 3 
    ttable { 
       0.0     1       # left channel 
       1.1     1       # right channel 
       0.2     0.5     # mix left and right ... 
       1.2     0.5     # ... channel for subwoofer 
    } 
 }

Or to have a better volume control, you can define a new pcm device with the softvol plugin. Problably the easiest way is to use this on the PCM device:

 pcm.upmix_20to51 { 
    type plug 
    slave.pcm "lowpass_21to21" 
    slave.channels 3 
    ttable { 
       0.0     1       # left channel 
       1.1     1       # right channel 
       0.2     0.5     # mix left and right ... 
       1.2     0.5     # ... channel for subwoofer 
    } 
 }

 pcm.!default {
       type                 softvol
       slave.pcm       "pcm.upmix_20to51"
       control {
              name       "PCM"
              card         0           #your default soundcard!
       }
 }

Offline

#7 2010-06-25 02:03:29

Xenodamus
Member
Registered: 2006-11-09
Posts: 15

Re: [SOLVED] asoundrc upmixing only works in amarok

metzengerstein wrote:

Have you tried brebs' suggestion? Most applications use "!default" as their ouput device. So why not change this like:

No that didn't work, but the !default device does for the upmix_21to51.  Thank you!

Offline

Board footer

Powered by FluxBB