]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Allow DAI formats to be specified in the dai_link
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 27 Sep 2011 15:41:01 +0000 (16:41 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 28 Sep 2011 12:22:28 +0000 (13:22 +0100)
commit461dd42839d9380f34072f94eef160c4106039dd
tree6845900a84adf3f3073857e122706deec01f33da
parent78024b689370a553d57bb833bf9daca24d12439a
ASoC: Allow DAI formats to be specified in the dai_link

For almost all machines the DAI format is a constant, always set to the
same thing. This means that not only should we normally set it on init
rather than in hw_params() (where it has been for historical reasons) we
should also allow users to configure this by setting a variable in the
dai_link structure. The combination of these two will make many machine
drivers even more data driven.

Implement a new dai_fmt field in the dai_link doing just that. Since 0 is
a valid value for many format flags and we need to be able to tell if the
field is actually set also add one to all the values used to configure
formats.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
include/sound/soc-dai.h
include/sound/soc.h
sound/soc/soc-core.c