[alsa-devel] [PATCH] ASoC: max98357a: add speaker switch

Mark Brown broonie at kernel.org
Mon Feb 10 19:38:03 CET 2020


On Tue, Feb 04, 2020 at 11:04:06AM +0800, Tzung-Bi Shih wrote:

> Some machine may share the same I2S lines for multiple codecs. For
> example, mediatek/mt8183/mt8183-da7219-max98357 shares the same lines
> between max98357a and da7219.  When writing audio data through the I2S
> lines, all codecs on the lines would try to generate sound if they
> accepts DO line.  As a result, multiple codecs generate sound at a
> time.

Rather than adding this in the driver it would be better to add some
_PIN_SWITCH() widgets to the speaker outputs, those exist for
essentially this purpose.

> +	max98357a->spk_switch = ucontrol->value.integer.value[0];
> +	dev_info(component->dev,
> +		 "put speaker switch: %d\n", max98357a->spk_switch);

These _info() prints are too noisy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20200210/a57e032d/attachment.sig>


More information about the Alsa-devel mailing list