forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/rockchip/rockchip_spdif.h
....@@ -1,12 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * ALSA SoC Audio Layer - Rockchip SPDIF transceiver driver
34 *
45 * Copyright (c) 2015 Collabora Ltd.
56 * Author: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118
129 #ifndef _ROCKCHIP_SPDIF_H
....@@ -18,7 +15,7 @@
1815 */
1916 #define SPDIF_CFGR_CLK_DIV_SHIFT (16)
2017 #define SPDIF_CFGR_CLK_DIV_MASK (0xff << SPDIF_CFGR_CLK_DIV_SHIFT)
21
-#define SPDIF_CFGR_CLK_DIV(x) (x << SPDIF_CFGR_CLK_DIV_SHIFT)
18
+#define SPDIF_CFGR_CLK_DIV(x) ((x - 1) << SPDIF_CFGR_CLK_DIV_SHIFT)
2219
2320 #define SPDIF_CFGR_CLR_MASK BIT(7)
2421 #define SPDIF_CFGR_CLR_EN BIT(7)