Thread Rating:
  • 0 Vote(s) - 0 Average
Normalize audio trought alsa plugin and hdmi
#1
I've found this article that explain how-to normalize audio on the fly with an alsa plugin.
Can be adapted to work with nvidia hdmi interface?

http://www.miscfits.com/2009/09/normaliz...audio.html

content of .asoundrc
Code:
pcm.ladcomp {
      type plug
      slave.pcm "ladcomp_compressor";
  }
pcm.ladcomp_compressor {
      type ladspa
      slave.pcm "ladcomp_limiter";
      path "/usr/lib/ladspa";
      plugins [
          {
              label dysonCompress
              input {
                  #peak limit, release time, fast ratio, ratio
                  controls [0 1 0.5 0.99]
              }
          }
      ]
  }
pcm.ladcomp_limiter {
      type ladspa
      slave.pcm "plughw:0,0";
      path "/usr/lib/ladspa";
      plugins [
          {
              label fastLookaheadLimiter
              input {
               #InputGain(Db) -20 -> +20 ; Limit (db) -20 -> 0 ; Release time (s) 0.01 -> 2
               controls [ 20 0 0.8  ]
              }
          }
     ]
  }
Reply
#2
Yes, you will need to change the slave.pcm "plughw:0,0" line. Assuming you are using an ION onboard, it should read slave.pcm "plughw:0,3". Then in your xbmc audio outputs line, you will need to tell it to use the "ladcomp" output in the digital output section (select custom and then type the custom name in the entrypoint below.

HTH
Reply
#3
ty for your answer i'll test it asap

EDIT: worked perfectly. I'm on a Asus M3N78-EM geforce 8300 igp
Reply
#4
Hello,

This is working for me as well, but I would like to use pulseaudio to steam the audio over the network, and it seems that they can't coexist. Is there a way to stream the video audio that is playing in XBMC?
Reply
#5
Does the latest Dharma RC 1 miss any components to make this normalization? I get an error saying: Failed to initialize audio device.
I have an ASRock ION 330 Nettop. Is it missing the alsa plugins, or is the soundcard config wrong? The soundcard is called iec958, and I've tried to replace it in the config, but it still can't initialize the device.
I have installed the ladspa package, but still no luck...
Please help if you know what's wrong... Thanks...
Image

on XBMC 10.1 Dharma
Ubuntu 10.04.1 LTS - XBMCLive
from FreeNAS 8.0-Release
Reply
#6
Would someone be kind enough to go through this step-by-step for me? Namely, what ALSA package do I need to install and where is the .asoundrc file I need to edit located?

Thanks in advance.
Reply
#7
I got this to work, the directions from arad85 were slightly off, you need to add a custom pass-through channel, not change the audio output. You name the custom pass-through channel ladcomp.

I'm also using an ION chipset. If shassino got it to work by changing the audio output, I'm a bit perplexed.

"My way" works like a charm, but it's a tad quiet now. I think I may have messed with the original settings and made XBMC quiet before installing alsa, but it's nice to know it works. Just a surprise when I switch back to TV and I have the Sham-wow guy yelling even LOUDER at me. Now I can watch Batman Begins and The Dark Knight...and anything else with gunshots or explosions.
Reply
#8
here my .asoundrc, i've changed only the suggested line to match nvidia hdmi out. This can work only with alsa, not with Pulse.

After that simply tell xbmc to use a custom digital item called ladcomp

use aplay -l to know the right device id.

Code:
pcm.ladcomp {
      type plug
      slave.pcm "ladcomp_compressor";
  }
pcm.ladcomp_compressor {
      type ladspa
      slave.pcm "ladcomp_limiter";
      path "/usr/lib/ladspa";
      plugins [
          {
              label dysonCompress
              input {
                  #peak limit, release time, fast ratio, ratio
                  controls [0 1 0.5 0.99]
              }
          }
      ]
  }
pcm.ladcomp_limiter {
      type ladspa
      slave.pcm "plughw:0,3";
      path "/usr/lib/ladspa";
      plugins [
          {
              label fastLookaheadLimiter
              input {
               #InputGain(Db) -20 -> +20 ; Limit (db) -20 -> 0 ; Release time (s) 0.01 -> 2
               controls [ 20 0 0.8  ]
              }
          }
     ]
  }
Reply



Normalize audio trought alsa plugin and hdmi00