OSDN Git Service

ASoC: nau8824: Add a nau8824_components() helper
authorHans de Goede <hdegoede@redhat.com>
Sat, 2 Oct 2021 21:14:58 +0000 (23:14 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 4 Oct 2021 14:55:29 +0000 (15:55 +0100)
commitefee0fca19cbc9a0946a2d7dab2d5546aee2098f
tree37c9c1e1f69ae1c310d98c16e79e50028ad3fff0
parent92d3360108f1839ca40451bad20ff67dd24a1964
ASoC: nau8824: Add a nau8824_components() helper

Some devices using the NAU8824 have only one speaker. To still have things
working properly this requires the left + right channels to both be mixed
to the left speaker output.

This mixer setup is done by userspace based on UCM profiles. But this
requires userspace to know that there is a mono-speaker. Add a helper
function (for the machine driver) to get a components string providing
this info.

This is done inside the codec driver because the codec driver already
has a DMI quirk table.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211002211459.110124-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/nau8824.c
sound/soc/codecs/nau8824.h