Skip to content

Commit 96781fd

Browse files
smaeulbroonie
authored andcommitted
ASoC: sun8i-codec: Fix setting DAI data format
Use the correct mask for this two-bit field. This fixes setting the DAI data format to RIGHT_J or DSP_A. Fixes: 36c6849 ("ASoC: Add sun8i digital audio codec") Signed-off-by: Samuel Holland <[email protected]> Acked-by: Chen-Yu Tsai <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3bc7b6c commit 96781fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sound/soc/sunxi/sun8i-codec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080

8181
#define SUN8I_SYS_SR_CTRL_AIF1_FS_MASK GENMASK(15, 12)
8282
#define SUN8I_SYS_SR_CTRL_AIF2_FS_MASK GENMASK(11, 8)
83+
#define SUN8I_AIF1CLK_CTRL_AIF1_DATA_FMT_MASK GENMASK(3, 2)
8384
#define SUN8I_AIF1CLK_CTRL_AIF1_WORD_SIZ_MASK GENMASK(5, 4)
8485
#define SUN8I_AIF1CLK_CTRL_AIF1_LRCK_DIV_MASK GENMASK(8, 6)
8586
#define SUN8I_AIF1CLK_CTRL_AIF1_BCLK_DIV_MASK GENMASK(12, 9)
@@ -241,7 +242,7 @@ static int sun8i_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
241242
return -EINVAL;
242243
}
243244
regmap_update_bits(scodec->regmap, SUN8I_AIF1CLK_CTRL,
244-
BIT(SUN8I_AIF1CLK_CTRL_AIF1_DATA_FMT),
245+
SUN8I_AIF1CLK_CTRL_AIF1_DATA_FMT_MASK,
245246
value << SUN8I_AIF1CLK_CTRL_AIF1_DATA_FMT);
246247

247248
return 0;

0 commit comments

Comments
 (0)