Kirill Marinushkin 6feaaa7c19
ASoC: pcm512x: Fix not setting word length if DAIFMT_CBS_CFS
In `pcm512x_hw_params()`, the following switch-case:

~~~~
	switch (pcm512x->fmt & SND_SOC_DAIFMT_MASTER_MASK) {
	case SND_SOC_DAIFMT_CBS_CFS:
~~~~

returns 0, which was preventing word length from being written into codecs
register.

Fixed by writing it into register before checking
`SND_SOC_DAIFMT_MASTER_MASK`.
Tested with Raspberry Pi + sound card `hifiberry_dacplus` in CBS_CFS format

Signed-off-by: Kirill Marinushkin <kmarinushkin@birdec.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Matthias Reichl <hias@horus.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201115122306.18164-2-kmarinushkin@birdec.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16 20:03:23 +00:00
..
2020-08-24 13:59:45 +01:00
2018-02-27 10:41:34 +00:00
2020-08-06 14:27:31 -07:00
2019-10-25 11:06:57 +01:00
2020-01-07 22:29:38 +00:00
2020-11-10 14:30:05 +00:00
2020-11-10 14:30:05 +00:00
2018-04-26 12:44:15 +01:00
2020-03-23 18:17:22 +00:00
2019-06-12 13:52:26 +01:00
2020-10-15 11:07:44 -07:00
2020-01-10 13:31:49 +00:00
2020-11-12 15:15:53 +00:00
2020-01-09 21:22:36 +00:00
2020-10-15 11:07:44 -07:00
2020-09-10 12:49:44 +01:00
2020-05-07 13:18:04 +01:00
2020-05-07 13:18:04 +01:00
2019-07-26 13:10:09 +01:00
2018-05-18 11:20:11 +01:00
2018-06-01 12:05:30 +01:00
2020-07-20 15:34:29 +01:00
2020-10-02 21:05:29 +01:00
2020-05-04 19:23:59 +01:00
2020-05-26 10:55:37 +01:00