On Sun, 06 Jan 2008 12:08:40 +1000
Adam Nielsen <[EMAIL PROTECTED]> wrote:
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/alsa-user
>
Well, I managed to change sample rate by editing as root my
/usr/share/alsa/alsa.conf
file, this line in it:
defaults.pcm.dmix_rate 48000
.
The fact that HDA_INTEL cards mixers do not have sample rate control is
a bug IMO - because, say, M-Audio Revolution mixer _does_ have such
a mixer control.
I haven't yet had time to file the bug, but I'm getting closer ...
Regards,
Sergei.
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user