"plug" refuses to play audio at normal sample rates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,

I'm having quite a bit of trouble trying to get dmix working with a
LADSPA EQ plugin.  I think I've narrowed it down to "plug" incorrectly
detecting sample rates.

For example, my sound card (Intel HDA) can play audio at 48000, 96000
and 192000 Hz.  When dmix is set to mix at 48000, I can play audio at
48kHz, as well as other rates my sound card doesn't natively support,
e.g. 88.2kHz, 100kHz, etc.  If I try to play audio at a frequency my
card *does* support (e.g. 96kHz), ALSA bombs out with an "Invalid
argument" error.

If I change the dmix rate, e.g. to 192000 which I would like, then I am
able to play audio at 192kHz, but not 48kHz or 96kHz (I can play audio
at 50kHz and 100kHz though.)

To me it seems that something in the chain is looking to see what sample
rates my sound card is capable of playing, and not bothering to convert
audio being played at those sample rates.  Unfortunately something in
the chain (dmix?) only supports one sample rate, so when the sample rate
isn't being converted, playback fails.

In other words, when I try to play 96kHz audio ALSA sees my card can
play 96kHz audio, so it passes it through unchanged to dmix, which then
barfs because it only accepts 48kHz audio.  If I play 100kHz audio
instead, ALSA sees my card isn't capable of playing that, so it checks
to see what rates are supported, dmix returns that only 48kHz is
allowed, so ALSA down converts the audio to 48kHz where it plays without
any problems.

Is there any way to override this behaviour so I can have all audio
streams dmixed, even those that have a sample rate natively supported by
my sound card?

/etc/asound.conf is below.

Thanks,
Adam.


## Begin ALSA config ##

defaults.pcm.dmix.rate 192000



pcm.eq {


  type ladspa



  slave.pcm "plug:dmix"



  plugins [


    {


      id 1197


      input {


       controls [ -5 -5 -5 -5 -5 -10 -20 -15 -10 -10 -10 -10 -10 -3 -2 ]


      }


    }


  ]
}

pcm.!default


{


        type plug


        slave.pcm "eq"


}

## End ALSA config ##

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux