[alsa-devel] [PATCH v2 2/2] ASoC: omap-mcpdm: Replace legacy driver

Mark Brown broonie at opensource.wolfsonmicro.com
Sat Aug 20 09:01:14 CEST 2011


On Fri, Aug 19, 2011 at 10:41:19AM +0300, Peter Ujfalusi wrote:

> +/*
> + * DAPM event function to ensure, that the host side McPDM interface is turned
> + * off after the codec's DAC.
> + */
> +static int omap_mcpdm_interface_event(struct snd_soc_dapm_widget *w,
> +		struct snd_kcontrol *kcontrol, int event)

So, the issue here is that the CODEC you're using on your system lacks
DAC mute support and doesn't handle the end of the input stream
gracefully?  This doesn't sound like a McPDM specific issue at all, and
I'm slightly surprised we don't run into it more often.

Currently the sequence we use on stream teardown is:

  1. Mute.
  2. Stop stream.
  3. Wait for the DAPM teardown time.
  4. Power down.

but it seems like what your CODEC actually wants is:

  1. Power down.
  2. Stop stream.

which isn't at all unresonable and if the CODEC is actually able to
support that mode of operation well then it'll be lower power.  This
seems like something we should be supporting in the core as I would
expect other devices will find it useful, PDM class D speaker drivers
being the most obvious example.

I do think it'd be helpful to split this code out as a separate patch
as it's the controversial bit...


More information about the Alsa-devel mailing list