]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: wm_adsp: Firmware controls should be added as codec controls
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Tue, 22 Nov 2016 16:58:57 +0000 (16:58 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 22 Nov 2016 17:24:43 +0000 (17:24 +0000)
commitd5773b4a838c4f7bd076caec5bf519df11339e2e
tree13a2064efcf262a16a2db0af4d8bcb310bcc6312
parentd7a0192b825b38d523eea1699a84cf50e98571c6
ASoC: wm_adsp: Firmware controls should be added as codec controls

We were adding firmware controls as card controls (using
snd_soc_add_codec_controls). The DSP is part of a specific codec so
we should be adding them as codec controls. Adding as codec controls
also means that if the codec has a name_prefix it will be added to
the control name, which won't happen when adding as a card control.

As that was the only use of the card pointer in struct wm_adsp it can
be removed.

For ADSP2 codecs a wm_adsp2_codec_probe() was added since the original
control handling was written, and that's the logical place to store a
pointer to the codec rather than delaying it until the codec is
powered-up.

For ADSP1 we don't use a codec_probe() stage so the codec pointer
initialization replaces the original card pointer initialization in
wm_adsp1_event().

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm_adsp.c
sound/soc/codecs/wm_adsp.h