.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * ALSA SoC Audio Layer - Rockchip SPDIF transceiver driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2015 Collabora Ltd. |
---|
5 | 6 | * 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. |
---|
10 | 7 | */ |
---|
11 | 8 | |
---|
12 | 9 | #ifndef _ROCKCHIP_SPDIF_H |
---|
.. | .. |
---|
18 | 15 | */ |
---|
19 | 16 | #define SPDIF_CFGR_CLK_DIV_SHIFT (16) |
---|
20 | 17 | #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) |
---|
22 | 19 | |
---|
23 | 20 | #define SPDIF_CFGR_CLR_MASK BIT(7) |
---|
24 | 21 | #define SPDIF_CFGR_CLR_EN BIT(7) |
---|