diff options
author | Sugar Zhang <sugar.zhang@rock-chips.com> | 2021-09-03 21:23:28 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-09-13 01:44:10 +0100 |
commit | 13e6e042a6f9c2be676f421935e026308de3303c (patch) | |
tree | a64f2c6dd71f318695ccc5f60f4225e965db8344 /sound/soc/rockchip/rockchip_pdm.h | |
parent | f80e5a14ac2730b441c71d191e6538a74706cab3 (diff) | |
download | linux-stable-13e6e042a6f9c2be676f421935e026308de3303c.tar.gz linux-stable-13e6e042a6f9c2be676f421935e026308de3303c.tar.bz2 linux-stable-13e6e042a6f9c2be676f421935e026308de3303c.zip |
ASoC: rockchip: pdm: Add support for path map
This patch adds property 'rockchip,path-map' for path mapping.
e.g.
"rockchip,path-map = <3 2 1 0>" means the mapping as follows:
path0 <-- sdi3
path1 <-- sdi2
path2 <-- sdi1
path3 <-- sdi0
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1630675410-3354-5-git-send-email-sugar.zhang@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/rockchip/rockchip_pdm.h')
-rw-r--r-- | sound/soc/rockchip/rockchip_pdm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/rockchip/rockchip_pdm.h b/sound/soc/rockchip/rockchip_pdm.h index 13bfbc286276..cab977272ee6 100644 --- a/sound/soc/rockchip/rockchip_pdm.h +++ b/sound/soc/rockchip/rockchip_pdm.h @@ -53,6 +53,9 @@ #define PDM_FD_DENOMINATOR_MSK GENMASK(15, 0) /* PDM CLK CTRL */ +#define PDM_PATH_SHIFT(x) (8 + (x) * 2) +#define PDM_PATH_MASK(x) (0x3 << PDM_PATH_SHIFT(x)) +#define PDM_PATH(x, v) ((v) << PDM_PATH_SHIFT(x)) #define PDM_CLK_FD_RATIO_MSK BIT(6) #define PDM_CLK_FD_RATIO_40 (0X0 << 6) #define PDM_CLK_FD_RATIO_35 BIT(6) |