]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: codecs: dmic: Make number of channels configurable
authorMatthias Kaehlcke <mka@chromium.org>
Fri, 5 Jan 2018 20:39:57 +0000 (12:39 -0800)
committerMark Brown <broonie@kernel.org>
Tue, 9 Jan 2018 16:46:24 +0000 (16:46 +0000)
commitcd6aa70029fb50c598c7f3bf3bef840f98115eb0
tree715bab6eb9cf55a3a25e642847ef1c13a5adaaad
parentf9e9d4ede33f20ad238fc11db0232eaede684940
ASoC: codecs: dmic: Make number of channels configurable

The DMIC DAI driver specifies a number of 1 to 8 channels for each DAI.
The actual number of mics can currently not be configured in the device
tree or audio glue, but is derived from the min/max channels of the CPU
and codec DAI. A typical CPU DAI has two or more channels, in consequence
a single mic is treated as a stereo/multi channel device, even though
only one channel carries audio data.

This change adds the option to specify the number of used DMIC channels
in the device tree. When specified this value overwrites the default
channels_max value of 8 in the snd_soc_dai_driver struct of the codec.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/sound/dmic.txt
sound/soc/codecs/dmic.c