[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ec805fc-07cc-6091-551a-771dffe459d0@amd.com>
Date: Thu, 16 Dec 2021 17:54:45 +0530
From: Ajit Kumar Pandey <AjitKumar.Pandey@....com>
To: Mark Brown <broonie@...nel.org>
Cc: alsa-devel@...a-project.org, Vijendar.Mukunda@....com,
Alexander.Deucher@....com, Basavaraj.Hiregoudar@....com,
Sunil-kumar.Dommati@....com, Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: max98357a: Add mixer control to mute/unmute speaker
On 12/9/2021 2:10 AM, Mark Brown wrote:
> Actually now I look again the only control interface this driver has is
> GPIOs but it does expose a digital interface with constraints as input
> so doesn't fit within simple-amplifier. However this is just powering
> off the amplifier to achieve mute rather than a separate mute control so
> it'd probably be better to use a SND_SOC_DAPM_PIN_SWITCH() for the
> Speaker widget to do this, this would also end up addressing Jaroslav's
> thing with the naming as a side effect. Sorry about the confusion there.
Thanks for suggestion. We tried using SND_SOC_DAPM_PIN_SWITCH() for the
speaker widget and it invoke dapm_event callback based on switch i.e
max98357a_sdmode_event() but codec driver isn't enabling/disabling gpios
in such event callback instead they are doing that in dai_ops trigger
callback. In our platform single I2S controller instance (cpu-dai) is
connected to two different endpoints with a single PCM device, hence we
want to switch or enable/disable output based on Machine driver controls
only.
Initially we thought to configure gpio within sdmode_event callback but
there was some pop noise issue reported in one platform with that change
hence reverted. Check
https://patchwork.kernel.org/project/alsa-devel/patch/20200721114232.2812254-1-tzungbi@google.com/#23502085
So we thought of exposing a mixer control to enable/disable amp from UCM
in our platform without breaking existing functionality. Please let us
know any other alternative way if possible.
Powered by blists - more mailing lists