ASoC: simple-card: overwrite cpu_dai->fmt with codec_dai->fmt
authorNicolin Chen <Guangyu.Chen@freescale.com>
Wed, 12 Mar 2014 03:02:11 +0000 (11:02 +0800)
committerSimon Horman <horms@verge.net.au>
Fri, 5 Dec 2014 00:21:45 +0000 (09:21 +0900)
commit514b621decb36bee8f330de4f2dfbca2bacf6326
tree97ab950ac0fc918f96a5d99e689311f14dd19bd2
parent08ab484082607207ac799242167421fa1df9a9c7
ASoC: simple-card: overwrite cpu_dai->fmt with codec_dai->fmt

The current simple-card driver separates the daimft for cpu_dai and codec_dai.
So we might get different values for them (0x4003 and 0x1003 for example):

asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 132000000
asoc-simple-card sound-cs42888.12: codec : cs42888 / 1003 / 24576000
asoc-simple-card sound-cs42888.12: cs42888 <-> 2024000.esai mapping ok

This is not allowed at all as we need to keep the DAIFMT settings identical
for both the ends of the link.

Thus this patch fixes it by overwriting the cpu_dai->fmt with codec_dai->fmt
since we defined the DAIFMT_MASTER basing on CODEC at the first place while
the other bits are same.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 46c39cae292fd691f32e573e6c2c854e36614c93)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Documentation/devicetree/bindings/sound/simple-card.txt
sound/soc/generic/simple-card.c