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)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 4 Feb 2015 10:13:33 +0000 (11:13 +0100)
commit47530d64aa927c5c24fc122af8db842c5cffbf7d
tree07cdce461156a98081760b07d5b94f01c41273d4
parent38c8a28043060ec4bf1137dda350ef696c79834c
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