mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
ASoC: rockchip: spdif: Fixed the spdif channel probability reverse issue
Alternating playback of S16_LE and S32_LE audio may cause the channel order to be reversed. It need to clear MCLK domain logic before setting Fmclk/Fsdo. Change-Id: I7cbfa01f5136b8815e5e2c6dc5dcda28ce49d13a Signed-off-by: Zohn Ni <zohn.ni@rock-chips.com>
This commit is contained in:
@@ -170,6 +170,10 @@ static int rk_spdif_hw_params(struct snd_pcm_substream *substream,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
regmap_update_bits(spdif->regmap, SPDIF_CFGR, SPDIF_CFGR_CLR_MASK,
|
||||
SPDIF_CFGR_CLR_EN);
|
||||
|
||||
udelay(1);
|
||||
ret = regmap_update_bits(spdif->regmap, SPDIF_CFGR,
|
||||
SPDIF_CFGR_CLK_DIV_MASK |
|
||||
SPDIF_CFGR_HALFWORD_ENABLE |
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
#define SPDIF_CFGR_CLK_DIV_MASK (0xff << SPDIF_CFGR_CLK_DIV_SHIFT)
|
||||
#define SPDIF_CFGR_CLK_DIV(x) ((x - 1) << SPDIF_CFGR_CLK_DIV_SHIFT)
|
||||
|
||||
#define SPDIF_CFGR_CLR_MASK BIT(7)
|
||||
#define SPDIF_CFGR_CLR_EN BIT(7)
|
||||
#define SPDIF_CFGR_CLR_DIS 0
|
||||
|
||||
#define SPDIF_CFGR_CSE_MASK BIT(6)
|
||||
#define SPDIF_CFGR_CSE_EN BIT(6)
|
||||
#define SPDIF_CFGR_CSE_DIS 0
|
||||
|
||||
Reference in New Issue
Block a user