diff options
author | Jaska Uimonen <jaska.uimonen@linux.intel.com> | 2019-10-08 11:44:43 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-10-10 15:17:02 +0100 |
commit | 5d43001ae43606dc525f55c482c545afba01bb55 (patch) | |
tree | 4aed186ff4044ac91fb16aa26a97ab91d5b2f47d /sound/soc/sof/sof-priv.h | |
parent | b4be427683cf6debda331a5d6a4af34885851d19 (diff) | |
download | lwn-5d43001ae43606dc525f55c482c545afba01bb55.tar.gz lwn-5d43001ae43606dc525f55c482c545afba01bb55.zip |
ASoC: SOF: acpi led support for switch controls
Currently sof doesn't support acpi leds with mute switches. So implement
acpi leds following quite shamelessly existing HDA implementation by
Takashi Iwai.
Mute leds can be enabled in topology by adding led and direction token
in switch control private data.
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191008164443.1358-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-priv.h')
-rw-r--r-- | sound/soc/sof/sof-priv.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 44f789bf7fb0..5a11a8517fa5 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -15,6 +15,7 @@ #include <sound/hdaudio.h> #include <sound/soc.h> +#include <sound/control.h> #include <sound/sof.h> #include <sound/sof/stream.h> /* needs to be included before control.h */ @@ -310,6 +311,12 @@ struct snd_sof_pcm { bool prepared[2]; /* PCM_PARAMS set successfully */ }; +struct snd_sof_led_control { + unsigned int use_led; + unsigned int direction; + unsigned int led_value; +}; + /* ALSA SOF Kcontrol device */ struct snd_sof_control { struct snd_sof_dev *sdev; @@ -324,6 +331,8 @@ struct snd_sof_control { u32 *volume_table; /* volume table computed from tlv data*/ struct list_head list; /* list in sdev control list */ + + struct snd_sof_led_control led_ctl; }; /* ASoC SOF DAPM widget */ |