All of lore.kernel.org
 help / color / mirror / Atom feed
* echo-cancellation plugin advice?
@ 2007-08-26 22:18 Robert Brewer
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Brewer @ 2007-08-26 22:18 UTC (permalink / raw)
  To: alsa-devel

I'm writing a small speech input app for my laptop.  My app is
unusable when other sounds are being generated by the laptop, such as
from a music playing app.  For this reason, I'd like to have an echo
cancellation plugin that would cancel out the music played on the
laptop speakers when it is received by the mic.  I think this should
be doable since the music is playing through alsa.  I've done some
poking in the plugin documentation, and it's not clear to me how to
architect this plugin.  Ideally, I would route all my music playing
apps through the echo cancelling plugin.  I would also route the mic
capture stream through the plugin.  So the plugin must handle both
playback and capture streams.  Does the asym plugin hold the answers I
need?  Does anyone have any thoughts on how I might do this?  There
are several open source echo cancellation algorithms available, so I'm
mainly asking for advice on implementing this as an alsa plugin.

Thanks,
Rob
-- 
Robert W. Brewer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* echo-cancellation plugin advice?
@ 2012-05-07 14:15 Max Klein
  2012-05-08 10:38 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Max Klein @ 2012-05-07 14:15 UTC (permalink / raw)
  To: alsa-devel

> Well, asym wouldn't be the answer.  Basically you'll need to open two
> slave PCMs in one plugin.  So, it's no simple filter-type plugin.
> It's doable, but not easy as it sounds, I guess.

Takashi, can you please further explain why asym is not the solution and what you see as a problem? I am also trying to figure out if it would be possible to create such a plugin for ALSA? I am still searching for some good starting points on how to write an ALSA plugin...

Jean-Marc Valin (http://lists.linuxaudio.org/pipermail/linux-audio-dev/2005-June/012454.html) already released his work as part of speex but as far I know there is no plugin that has been made out of it?

Thanks for any hint!

-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: echo-cancellation plugin advice?
  2012-05-07 14:15 echo-cancellation plugin advice? Max Klein
@ 2012-05-08 10:38 ` Takashi Iwai
  2023-10-27 10:38   ` [alsa-devel] " f.antonini
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2012-05-08 10:38 UTC (permalink / raw)
  To: Max Klein; +Cc: alsa-devel

At Mon, 07 May 2012 16:15:06 +0200,
Max Klein wrote:
> 
> > Well, asym wouldn't be the answer.  Basically you'll need to open two
> > slave PCMs in one plugin.  So, it's no simple filter-type plugin.
> > It's doable, but not easy as it sounds, I guess.
> 
> Takashi, can you please further explain why asym is not the solution and what you see as a problem?

Well...  Do you understand what asym plugin is supposed to do?

> I am also trying to figure out if it would be possible to create such a plugin for ALSA? I am still searching for some good starting points on how to write an ALSA plugin...
> 
> Jean-Marc Valin (http://lists.linuxaudio.org/pipermail/linux-audio-dev/2005-June/012454.html) already released his work as part of speex but as far I know there is no plugin that has been made out of it?

For a good echo cancellation, you'll need both input and output
streams, i.e. the recording source and the playback stream you are
sending out.  A normal plugin works just like a filter.  Get one
stream, process it, and output.  But, now you need two streams in
different directions in a single plugin instance.

asym doesn't do that.  asym is just to pass through a slave PCM.
The only job of asym plugin is to provide the different pass-thru
slave PCM for each direction (input/output).  Nothing more than that.


Takashi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [alsa-devel] echo-cancellation plugin advice?
  2012-05-08 10:38 ` Takashi Iwai
@ 2023-10-27 10:38   ` f.antonini
  0 siblings, 0 replies; 4+ messages in thread
From: f.antonini @ 2023-10-27 10:38 UTC (permalink / raw)
  To: alsa-devel

Hi Everyone

I arrived at this thread because I need to implement an acoustic echo canceller based on the Speex library. I think that the Speex plugin available under 'alsa-plugins' repository would be the best starting point, but I need to provide as input both the streams (input and output).
For what I understand the current implementation provides just one input (the audio stream coming from the MIC) and so it can't remove the echo of the playback audio. It works as a filter as explained before. Right?
Please can you suggest some hints provide both the recording source and the playback stream as one input to an ALSA plugin? Is it doable anyhow?

Thanks in advance for your help

Fabio Antonini

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-27 10:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-07 14:15 echo-cancellation plugin advice? Max Klein
2012-05-08 10:38 ` Takashi Iwai
2023-10-27 10:38   ` [alsa-devel] " f.antonini
  -- strict thread matches above, loose matches on Subject: below --
2007-08-26 22:18 Robert Brewer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.