Re: [LAD] Best way to insert DSP module in audio chain in Linux

From: Patrick Shirkey <pshirkey@email-addr-hidden>
Date: Mon Aug 30 2010 - 15:18:15 EEST

On Mon, August 30, 2010 5:00 am, Kim Therkelsen wrote:
>
> Hi,
>
> I want to make is a DSP module that improves the sound quality
> of the sound coming from the laptop builtin speakers by applying DSP
> (FIR/IIR filters).
> I want to route all audio played back (from for
> instance an offline WAV or MP3 file, from a movie, or streamed from the
> internet) to
> pass through the
> DSP plugin whenever headphones are NOT connected. When headphones are
> connected no processing should be applied.
> I
> want to place the DSP module as close to the hardware as possible to
> make sure all audio is really routed through the DSP plugin so I always
> can enjoy
> the DSP improvements made to the sound.
>
> Where should I place this module/DSP code?
> - As a plugin to PulseAudio?
>
> - As a plugin to ALSA?
> - As its own virtual sound card?
>
> - In the audio driver for my built-in sound card?
> - As a kernel module?
>
>
> I have tried loading the LADSPA-module using the module-ladspa-sink in
> PulseAudio but I am not sure this is the best solution.

It is the recommended solution if you are using PA for your sound server.

> I need to remove some limitations in module-ladspa-sink to get it working
> properly ( multichannel audio, only DSP processing for internal speakers).
>
>
>
> My requirements:
>
> 1) Must be able to detect if headphones are connected
>

IIUC, PA gets this info from ALSA

> 2) Must be able to process stereo and multichannel (5.1/7.1) formats. I
> need the multichannel formats to perform binaural downmixing to
> stereo.

I'm not sure how the dolby multichannel support is in ALSA. It may depend
on the internal capabilities of the device.

> So it is important that I can receive multichannel audio and mix it down
> to stereo and output it to a stereo soundcard.
>

This may better handled in app.

-- 
Patrick Shirkey
Boost Hardware Ltd.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Mon Aug 30 16:15:07 2010

This archive was generated by hypermail 2.1.8 : Mon Aug 30 2010 - 16:15:07 EEST