mbox series

[0/2] ASoC: mt6359: skip first time data at the beginning of DMIC recording

Message ID 1603521686-13036-1-git-send-email-jiaxin.yu@mediatek.com
Headers show
Series ASoC: mt6359: skip first time data at the beginning of DMIC recording | expand

Message

Jiaxin Yu Oct. 24, 2020, 6:41 a.m. UTC
This patch fixed the pop noise at the beginning of DMIC recording.

Jiaxin Yu (2):
  ASoC: mt6359: skip first time data at the beginning of DMIC recording
  dt-bindings: mediatek: mt8192: add ul-delay-ms property

 .../devicetree/bindings/sound/mt6359.yaml     |  6 +++
 sound/soc/codecs/mt6359.c                     | 38 +++++++++++++++++--
 sound/soc/codecs/mt6359.h                     |  1 +
 3 files changed, 41 insertions(+), 4 deletions(-)

Comments

Mark Brown Oct. 26, 2020, 12:33 p.m. UTC | #1
On Sat, Oct 24, 2020 at 02:41:25PM +0800, Jiaxin Yu wrote:
> We can choose to drop away any length of data from the beginning according
> to project needs. Some projects don't want to throw away any data, because
> they want to use recorded data to do echo cancellation, so they have to
> make sure that they are aligned with the reference data as much as
> possible. Or there are other algorithms in the upper layer to eliminate
> this noise. Or some projects want to eliminate this noise form the kernel
> layer. However, the minimum recommended value is 50ms to skip pop noise.

This seems like something that would apply equally to all DMICs so
should be done at a more general level rather than in this specific
driver, for example it could be done in the DMIC driver.
Jiaxin Yu Oct. 27, 2020, 10:28 a.m. UTC | #2
On Mon, 2020-10-26 at 12:33 +0000, Mark Brown wrote:
> On Sat, Oct 24, 2020 at 02:41:25PM +0800, Jiaxin Yu wrote:
> > We can choose to drop away any length of data from the beginning according
> > to project needs. Some projects don't want to throw away any data, because
> > they want to use recorded data to do echo cancellation, so they have to
> > make sure that they are aligned with the reference data as much as
> > possible. Or there are other algorithms in the upper layer to eliminate
> > this noise. Or some projects want to eliminate this noise form the kernel
> > layer. However, the minimum recommended value is 50ms to skip pop noise.
> 
> This seems like something that would apply equally to all DMICs so
> should be done at a more general level rather than in this specific
> driver, for example it could be done in the DMIC driver.

Hi Brown,

So you suggest that we use sound/soc/codecs/dmic.c to control the delay
after recording?
If so, should we add one more CODEC('dmic-codec' and 'dmic-hifi') to
dmic's dai-link? It looks link dmic.c has helped us do something to
control dmics.
Mark Brown Oct. 27, 2020, 1:15 p.m. UTC | #3
On Tue, Oct 27, 2020 at 06:28:58PM +0800, Jiaxin Yu wrote:
> On Mon, 2020-10-26 at 12:33 +0000, Mark Brown wrote:

> > This seems like something that would apply equally to all DMICs so
> > should be done at a more general level rather than in this specific
> > driver, for example it could be done in the DMIC driver.

> So you suggest that we use sound/soc/codecs/dmic.c to control the delay
> after recording?
> If so, should we add one more CODEC('dmic-codec' and 'dmic-hifi') to
> dmic's dai-link? It looks link dmic.c has helped us do something to
> control dmics.

Yes, exactly.