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.comSigned-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment