~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/qcom/lpass-lpaif-reg.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/soc/qcom/lpass-lpaif-reg.h (Architecture alpha) and /sound/soc/qcom/lpass-lpaif-reg.h (Architecture mips)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*                                                  2 /*
  3  * Copyright (c) 2010-2011,2013-2015 The Linux      3  * Copyright (c) 2010-2011,2013-2015 The Linux Foundation. All rights reserved.
  4  */                                                 4  */
  5                                                     5 
  6 #ifndef __LPASS_LPAIF_REG_H__                       6 #ifndef __LPASS_LPAIF_REG_H__
  7 #define __LPASS_LPAIF_REG_H__                       7 #define __LPASS_LPAIF_REG_H__
  8                                                     8 
  9 /* LPAIF I2S */                                     9 /* LPAIF I2S */
 10                                                    10 
 11 #define LPAIF_I2SCTL_REG_ADDR(v, addr, port) \     11 #define LPAIF_I2SCTL_REG_ADDR(v, addr, port) \
 12         (v->i2sctrl_reg_base + (addr) + v->i2s     12         (v->i2sctrl_reg_base + (addr) + v->i2sctrl_reg_stride * (port))
 13                                                    13 
 14 #define LPAIF_I2SCTL_REG(v, port)       LPAIF_     14 #define LPAIF_I2SCTL_REG(v, port)       LPAIF_I2SCTL_REG_ADDR(v, 0x0, (port))
 15                                                    15 
 16 #define LPAIF_I2SCTL_LOOPBACK_DISABLE   0          16 #define LPAIF_I2SCTL_LOOPBACK_DISABLE   0
 17 #define LPAIF_I2SCTL_LOOPBACK_ENABLE    1          17 #define LPAIF_I2SCTL_LOOPBACK_ENABLE    1
 18                                                    18 
 19 #define LPAIF_I2SCTL_SPKEN_DISABLE      0          19 #define LPAIF_I2SCTL_SPKEN_DISABLE      0
 20 #define LPAIF_I2SCTL_SPKEN_ENABLE       1          20 #define LPAIF_I2SCTL_SPKEN_ENABLE       1
 21                                                    21 
 22 #define LPAIF_I2SCTL_MODE_NONE          0          22 #define LPAIF_I2SCTL_MODE_NONE          0
 23 #define LPAIF_I2SCTL_MODE_SD0           1          23 #define LPAIF_I2SCTL_MODE_SD0           1
 24 #define LPAIF_I2SCTL_MODE_SD1           2          24 #define LPAIF_I2SCTL_MODE_SD1           2
 25 #define LPAIF_I2SCTL_MODE_SD2           3          25 #define LPAIF_I2SCTL_MODE_SD2           3
 26 #define LPAIF_I2SCTL_MODE_SD3           4          26 #define LPAIF_I2SCTL_MODE_SD3           4
 27 #define LPAIF_I2SCTL_MODE_QUAD01        5          27 #define LPAIF_I2SCTL_MODE_QUAD01        5
 28 #define LPAIF_I2SCTL_MODE_QUAD23        6          28 #define LPAIF_I2SCTL_MODE_QUAD23        6
 29 #define LPAIF_I2SCTL_MODE_6CH           7          29 #define LPAIF_I2SCTL_MODE_6CH           7
 30 #define LPAIF_I2SCTL_MODE_8CH           8          30 #define LPAIF_I2SCTL_MODE_8CH           8
 31 #define LPAIF_I2SCTL_MODE_10CH          9          31 #define LPAIF_I2SCTL_MODE_10CH          9
 32 #define LPAIF_I2SCTL_MODE_12CH          10         32 #define LPAIF_I2SCTL_MODE_12CH          10
 33 #define LPAIF_I2SCTL_MODE_14CH          11         33 #define LPAIF_I2SCTL_MODE_14CH          11
 34 #define LPAIF_I2SCTL_MODE_16CH          12         34 #define LPAIF_I2SCTL_MODE_16CH          12
 35 #define LPAIF_I2SCTL_MODE_SD4           13         35 #define LPAIF_I2SCTL_MODE_SD4           13
 36 #define LPAIF_I2SCTL_MODE_SD5           14         36 #define LPAIF_I2SCTL_MODE_SD5           14
 37 #define LPAIF_I2SCTL_MODE_SD6           15         37 #define LPAIF_I2SCTL_MODE_SD6           15
 38 #define LPAIF_I2SCTL_MODE_SD7           16         38 #define LPAIF_I2SCTL_MODE_SD7           16
 39 #define LPAIF_I2SCTL_MODE_QUAD45        17         39 #define LPAIF_I2SCTL_MODE_QUAD45        17
 40 #define LPAIF_I2SCTL_MODE_QUAD47        18         40 #define LPAIF_I2SCTL_MODE_QUAD47        18
 41 #define LPAIF_I2SCTL_MODE_8CH_2         19         41 #define LPAIF_I2SCTL_MODE_8CH_2         19
 42                                                    42 
 43 #define LPAIF_I2SCTL_SPKMODE(mode)      mode       43 #define LPAIF_I2SCTL_SPKMODE(mode)      mode
 44                                                    44 
 45 #define LPAIF_I2SCTL_SPKMONO_STEREO     0          45 #define LPAIF_I2SCTL_SPKMONO_STEREO     0
 46 #define LPAIF_I2SCTL_SPKMONO_MONO       1          46 #define LPAIF_I2SCTL_SPKMONO_MONO       1
 47                                                    47 
 48 #define LPAIF_I2SCTL_MICEN_DISABLE      0          48 #define LPAIF_I2SCTL_MICEN_DISABLE      0
 49 #define LPAIF_I2SCTL_MICEN_ENABLE       1          49 #define LPAIF_I2SCTL_MICEN_ENABLE       1
 50                                                    50 
 51 #define LPAIF_I2SCTL_MICMODE(mode)      mode       51 #define LPAIF_I2SCTL_MICMODE(mode)      mode
 52                                                    52 
 53 #define LPAIF_I2SCTL_MICMONO_STEREO     0          53 #define LPAIF_I2SCTL_MICMONO_STEREO     0
 54 #define LPAIF_I2SCTL_MICMONO_MONO       1          54 #define LPAIF_I2SCTL_MICMONO_MONO       1
 55                                                    55 
 56 #define LPAIF_I2SCTL_WSSRC_INTERNAL     0          56 #define LPAIF_I2SCTL_WSSRC_INTERNAL     0
 57 #define LPAIF_I2SCTL_WSSRC_EXTERNAL     1          57 #define LPAIF_I2SCTL_WSSRC_EXTERNAL     1
 58                                                    58 
 59 #define LPAIF_I2SCTL_BITWIDTH_16        0          59 #define LPAIF_I2SCTL_BITWIDTH_16        0
 60 #define LPAIF_I2SCTL_BITWIDTH_24        1          60 #define LPAIF_I2SCTL_BITWIDTH_24        1
 61 #define LPAIF_I2SCTL_BITWIDTH_32        2          61 #define LPAIF_I2SCTL_BITWIDTH_32        2
 62                                                    62 
 63 #define LPAIF_I2SCTL_RESET_STATE        0x003C     63 #define LPAIF_I2SCTL_RESET_STATE        0x003C0004
 64 #define LPAIF_DMACTL_RESET_STATE        0x0020     64 #define LPAIF_DMACTL_RESET_STATE        0x00200000
 65                                                    65 
 66                                                    66 
 67 /* LPAIF IRQ */                                    67 /* LPAIF IRQ */
 68 #define LPAIF_IRQ_REG_ADDR(v, addr, port) \        68 #define LPAIF_IRQ_REG_ADDR(v, addr, port) \
 69         (v->irq_reg_base + (addr) + v->irq_reg     69         (v->irq_reg_base + (addr) + v->irq_reg_stride * (port))
 70                                                    70 
 71 #define LPAIF_IRQ_PORT_HOST             0          71 #define LPAIF_IRQ_PORT_HOST             0
 72                                                    72 
 73 #define LPAIF_IRQEN_REG(v, port)        LPAIF_     73 #define LPAIF_IRQEN_REG(v, port)        LPAIF_IRQ_REG_ADDR(v, 0x0, (port))
 74 #define LPAIF_IRQSTAT_REG(v, port)      LPAIF_     74 #define LPAIF_IRQSTAT_REG(v, port)      LPAIF_IRQ_REG_ADDR(v, 0x4, (port))
 75 #define LPAIF_IRQCLEAR_REG(v, port)     LPAIF_     75 #define LPAIF_IRQCLEAR_REG(v, port)     LPAIF_IRQ_REG_ADDR(v, 0xC, (port))
 76                                                    76 
 77 /* LPAIF RXTX IRQ */                               77 /* LPAIF RXTX IRQ */
 78 #define LPAIF_RXTX_IRQ_REG_ADDR(v, addr, port)     78 #define LPAIF_RXTX_IRQ_REG_ADDR(v, addr, port) \
 79                 (v->rxtx_irq_reg_base + (addr)     79                 (v->rxtx_irq_reg_base + (addr) + v->rxtx_irq_reg_stride * (port))
 80                                                    80 
 81 #define LPAIF_RXTX_IRQEN_REG(v, port) LPAIF_RX     81 #define LPAIF_RXTX_IRQEN_REG(v, port) LPAIF_RXTX_IRQ_REG_ADDR(v, 0x0, port)
 82 #define LPAIF_RXTX_IRQSTAT_REG(v, port) LPAIF_     82 #define LPAIF_RXTX_IRQSTAT_REG(v, port) LPAIF_RXTX_IRQ_REG_ADDR(v, 0x4, port)
 83 #define LPAIF_RXTX_IRQCLEAR_REG(v, port) LPAIF     83 #define LPAIF_RXTX_IRQCLEAR_REG(v, port) LPAIF_RXTX_IRQ_REG_ADDR(v, 0xC, port)
 84                                                    84 
 85 /* LPAIF VA IRQ */                                 85 /* LPAIF VA IRQ */
 86 #define LPAIF_VA_IRQ_REG_ADDR(v, addr, port) \     86 #define LPAIF_VA_IRQ_REG_ADDR(v, addr, port) \
 87                 (v->va_irq_reg_base + (addr) +     87                 (v->va_irq_reg_base + (addr) + v->va_irq_reg_stride * (port))
 88                                                    88 
 89 #define LPAIF_VA_IRQEN_REG(v, port) LPAIF_VA_I     89 #define LPAIF_VA_IRQEN_REG(v, port) LPAIF_VA_IRQ_REG_ADDR(v, 0x0, port)
 90 #define LPAIF_VA_IRQSTAT_REG(v, port) LPAIF_VA     90 #define LPAIF_VA_IRQSTAT_REG(v, port) LPAIF_VA_IRQ_REG_ADDR(v, 0x4, port)
 91 #define LPAIF_VA_IRQCLEAR_REG(v, port) LPAIF_V     91 #define LPAIF_VA_IRQCLEAR_REG(v, port) LPAIF_VA_IRQ_REG_ADDR(v, 0xC, port)
 92                                                    92 
 93 #define LPASS_HDMITX_APP_IRQ_REG_ADDR(v, addr)     93 #define LPASS_HDMITX_APP_IRQ_REG_ADDR(v, addr)  \
 94         ((v->hdmi_irq_reg_base) + (addr))          94         ((v->hdmi_irq_reg_base) + (addr))
 95                                                    95 
 96 #define LPASS_HDMITX_APP_IRQEN_REG(v)              96 #define LPASS_HDMITX_APP_IRQEN_REG(v)                   LPASS_HDMITX_APP_IRQ_REG_ADDR(v, 0x4)
 97 #define LPASS_HDMITX_APP_IRQSTAT_REG(v)            97 #define LPASS_HDMITX_APP_IRQSTAT_REG(v)                 LPASS_HDMITX_APP_IRQ_REG_ADDR(v, 0x8)
 98 #define LPASS_HDMITX_APP_IRQCLEAR_REG(v)           98 #define LPASS_HDMITX_APP_IRQCLEAR_REG(v)                LPASS_HDMITX_APP_IRQ_REG_ADDR(v, 0xC)
 99                                                    99 
100 #define LPAIF_IRQ_BITSTRIDE             3         100 #define LPAIF_IRQ_BITSTRIDE             3
101                                                   101 
102 #define LPAIF_IRQ_PER(chan)             (1 <<     102 #define LPAIF_IRQ_PER(chan)             (1 << (LPAIF_IRQ_BITSTRIDE * (chan)))
103 #define LPAIF_IRQ_XRUN(chan)            (2 <<     103 #define LPAIF_IRQ_XRUN(chan)            (2 << (LPAIF_IRQ_BITSTRIDE * (chan)))
104 #define LPAIF_IRQ_ERR(chan)             (4 <<     104 #define LPAIF_IRQ_ERR(chan)             (4 << (LPAIF_IRQ_BITSTRIDE * (chan)))
105                                                   105 
106 #define LPAIF_IRQ_ALL(chan)             (7 <<     106 #define LPAIF_IRQ_ALL(chan)             (7 << (LPAIF_IRQ_BITSTRIDE * (chan)))
107 #define LPAIF_IRQ_HDMI_REQ_ON_PRELOAD(chan)       107 #define LPAIF_IRQ_HDMI_REQ_ON_PRELOAD(chan)     (1 << (14 + chan))
108 #define LPAIF_IRQ_HDMI_SDEEP_AUD_DIS(chan)        108 #define LPAIF_IRQ_HDMI_SDEEP_AUD_DIS(chan)      (1 << (24 + chan))
109 #define LPAIF_IRQ_HDMI_METADONE         BIT(23    109 #define LPAIF_IRQ_HDMI_METADONE         BIT(23)
110                                                   110 
111 /* LPAIF DMA */                                   111 /* LPAIF DMA */
112 #define LPAIF_HDMI_RDMA_REG_ADDR(v, addr, chan    112 #define LPAIF_HDMI_RDMA_REG_ADDR(v, addr, chan) \
113         (v->hdmi_rdma_reg_base + (addr) + v->h    113         (v->hdmi_rdma_reg_base + (addr) + v->hdmi_rdma_reg_stride * (chan))
114                                                   114 
115 #define LPAIF_HDMI_RDMACTL_AUDINTF(id)  (id <<    115 #define LPAIF_HDMI_RDMACTL_AUDINTF(id)  (id << LPAIF_RDMACTL_AUDINTF_SHIFT)
116                                                   116 
117 #define LPAIF_HDMI_RDMACTL_REG(v, chan)           117 #define LPAIF_HDMI_RDMACTL_REG(v, chan)         LPAIF_HDMI_RDMA_REG_ADDR(v, 0x00, (chan))
118 #define LPAIF_HDMI_RDMABASE_REG(v, chan)          118 #define LPAIF_HDMI_RDMABASE_REG(v, chan)        LPAIF_HDMI_RDMA_REG_ADDR(v, 0x04, (chan))
119 #define LPAIF_HDMI_RDMABUFF_REG(v, chan)          119 #define LPAIF_HDMI_RDMABUFF_REG(v, chan)        LPAIF_HDMI_RDMA_REG_ADDR(v, 0x08, (chan))
120 #define LPAIF_HDMI_RDMACURR_REG(v, chan)          120 #define LPAIF_HDMI_RDMACURR_REG(v, chan)        LPAIF_HDMI_RDMA_REG_ADDR(v, 0x0C, (chan))
121 #define LPAIF_HDMI_RDMAPER_REG(v, chan)           121 #define LPAIF_HDMI_RDMAPER_REG(v, chan)         LPAIF_HDMI_RDMA_REG_ADDR(v, 0x10, (chan))
122 #define LPAIF_HDMI_RDMAPERCNT_REG(v, chan)        122 #define LPAIF_HDMI_RDMAPERCNT_REG(v, chan)      LPAIF_HDMI_RDMA_REG_ADDR(v, 0x14, (chan))
123                                                   123 
124 #define LPAIF_RDMA_REG_ADDR(v, addr, chan) \      124 #define LPAIF_RDMA_REG_ADDR(v, addr, chan) \
125         (v->rdma_reg_base + (addr) + v->rdma_r    125         (v->rdma_reg_base + (addr) + v->rdma_reg_stride * (chan))
126                                                   126 
127 #define LPAIF_RDMACTL_AUDINTF(id)       (id <<    127 #define LPAIF_RDMACTL_AUDINTF(id)       (id << LPAIF_RDMACTL_AUDINTF_SHIFT)
128                                                   128 
129 #define LPAIF_RDMACTL_REG(v, chan)      LPAIF_    129 #define LPAIF_RDMACTL_REG(v, chan)      LPAIF_RDMA_REG_ADDR(v, 0x00, (chan))
130 #define LPAIF_RDMABASE_REG(v, chan)     LPAIF_    130 #define LPAIF_RDMABASE_REG(v, chan)     LPAIF_RDMA_REG_ADDR(v, 0x04, (chan))
131 #define LPAIF_RDMABUFF_REG(v, chan)     LPAIF_    131 #define LPAIF_RDMABUFF_REG(v, chan)     LPAIF_RDMA_REG_ADDR(v, 0x08, (chan))
132 #define LPAIF_RDMACURR_REG(v, chan)     LPAIF_    132 #define LPAIF_RDMACURR_REG(v, chan)     LPAIF_RDMA_REG_ADDR(v, 0x0C, (chan))
133 #define LPAIF_RDMAPER_REG(v, chan)      LPAIF_    133 #define LPAIF_RDMAPER_REG(v, chan)      LPAIF_RDMA_REG_ADDR(v, 0x10, (chan))
134 #define LPAIF_RDMAPERCNT_REG(v, chan)   LPAIF_    134 #define LPAIF_RDMAPERCNT_REG(v, chan)   LPAIF_RDMA_REG_ADDR(v, 0x14, (chan))
135                                                   135 
136 #define LPAIF_WRDMA_REG_ADDR(v, addr, chan) \     136 #define LPAIF_WRDMA_REG_ADDR(v, addr, chan) \
137         (v->wrdma_reg_base + (addr) + \           137         (v->wrdma_reg_base + (addr) + \
138          v->wrdma_reg_stride * (chan - v->wrdm    138          v->wrdma_reg_stride * (chan - v->wrdma_channel_start))
139                                                   139 
140 #define LPAIF_WRDMACTL_REG(v, chan)     LPAIF_    140 #define LPAIF_WRDMACTL_REG(v, chan)     LPAIF_WRDMA_REG_ADDR(v, 0x00, (chan))
141 #define LPAIF_WRDMABASE_REG(v, chan)    LPAIF_    141 #define LPAIF_WRDMABASE_REG(v, chan)    LPAIF_WRDMA_REG_ADDR(v, 0x04, (chan))
142 #define LPAIF_WRDMABUFF_REG(v, chan)    LPAIF_    142 #define LPAIF_WRDMABUFF_REG(v, chan)    LPAIF_WRDMA_REG_ADDR(v, 0x08, (chan))
143 #define LPAIF_WRDMACURR_REG(v, chan)    LPAIF_    143 #define LPAIF_WRDMACURR_REG(v, chan)    LPAIF_WRDMA_REG_ADDR(v, 0x0C, (chan))
144 #define LPAIF_WRDMAPER_REG(v, chan)     LPAIF_    144 #define LPAIF_WRDMAPER_REG(v, chan)     LPAIF_WRDMA_REG_ADDR(v, 0x10, (chan))
145 #define LPAIF_WRDMAPERCNT_REG(v, chan)  LPAIF_    145 #define LPAIF_WRDMAPERCNT_REG(v, chan)  LPAIF_WRDMA_REG_ADDR(v, 0x14, (chan))
146                                                   146 
147 #define LPAIF_INTFDMA_REG(v, chan, reg, dai_id    147 #define LPAIF_INTFDMA_REG(v, chan, reg, dai_id)  \
148         ((dai_id ==  LPASS_DP_RX) ? \             148         ((dai_id ==  LPASS_DP_RX) ? \
149                 LPAIF_HDMI_RDMA##reg##_REG(v,     149                 LPAIF_HDMI_RDMA##reg##_REG(v, chan) : \
150                  LPAIF_RDMA##reg##_REG(v, chan    150                  LPAIF_RDMA##reg##_REG(v, chan))
151                                                   151 
152 #define __LPAIF_DMA_REG(v, chan, dir, reg, dai    152 #define __LPAIF_DMA_REG(v, chan, dir, reg, dai_id)  \
153         ((dir ==  SNDRV_PCM_STREAM_PLAYBACK) ?    153         ((dir ==  SNDRV_PCM_STREAM_PLAYBACK) ? \
154                 (LPAIF_INTFDMA_REG(v, chan, re    154                 (LPAIF_INTFDMA_REG(v, chan, reg, dai_id)) : \
155                 LPAIF_WRDMA##reg##_REG(v, chan    155                 LPAIF_WRDMA##reg##_REG(v, chan))
156                                                   156 
157 #define LPAIF_DMACTL_REG(v, chan, dir, dai_id)    157 #define LPAIF_DMACTL_REG(v, chan, dir, dai_id) \
158         (is_cdc_dma_port(dai_id) ? \              158         (is_cdc_dma_port(dai_id) ? \
159         __LPAIF_CDC_DMA_REG(v, chan, dir, CTL,    159         __LPAIF_CDC_DMA_REG(v, chan, dir, CTL, dai_id) : \
160         __LPAIF_DMA_REG(v, chan, dir, CTL, dai    160         __LPAIF_DMA_REG(v, chan, dir, CTL, dai_id))
161 #define LPAIF_DMABASE_REG(v, chan, dir, dai_id    161 #define LPAIF_DMABASE_REG(v, chan, dir, dai_id) \
162         (is_cdc_dma_port(dai_id) ? \              162         (is_cdc_dma_port(dai_id) ? \
163         __LPAIF_CDC_DMA_REG(v, chan, dir, BASE    163         __LPAIF_CDC_DMA_REG(v, chan, dir, BASE, dai_id) : \
164         __LPAIF_DMA_REG(v, chan, dir, BASE, da    164         __LPAIF_DMA_REG(v, chan, dir, BASE, dai_id))
165 #define LPAIF_DMABUFF_REG(v, chan, dir, dai_id    165 #define LPAIF_DMABUFF_REG(v, chan, dir, dai_id) \
166         (is_cdc_dma_port(dai_id) ? \              166         (is_cdc_dma_port(dai_id) ? \
167         __LPAIF_CDC_DMA_REG(v, chan, dir, BUFF    167         __LPAIF_CDC_DMA_REG(v, chan, dir, BUFF, dai_id) : \
168         __LPAIF_DMA_REG(v, chan, dir, BUFF, da    168         __LPAIF_DMA_REG(v, chan, dir, BUFF, dai_id))
169 #define LPAIF_DMACURR_REG(v, chan, dir, dai_id    169 #define LPAIF_DMACURR_REG(v, chan, dir, dai_id) \
170         (is_cdc_dma_port(dai_id) ? \              170         (is_cdc_dma_port(dai_id) ? \
171         __LPAIF_CDC_DMA_REG(v, chan, dir, CURR    171         __LPAIF_CDC_DMA_REG(v, chan, dir, CURR, dai_id) : \
172         __LPAIF_DMA_REG(v, chan, dir, CURR, da    172         __LPAIF_DMA_REG(v, chan, dir, CURR, dai_id))
173 #define LPAIF_DMAPER_REG(v, chan, dir, dai_id)    173 #define LPAIF_DMAPER_REG(v, chan, dir, dai_id)  \
174         (is_cdc_dma_port(dai_id) ? \              174         (is_cdc_dma_port(dai_id) ? \
175         __LPAIF_CDC_DMA_REG(v, chan, dir, PER,    175         __LPAIF_CDC_DMA_REG(v, chan, dir, PER, dai_id) : \
176         __LPAIF_DMA_REG(v, chan, dir, PER, dai    176         __LPAIF_DMA_REG(v, chan, dir, PER, dai_id))
177 #define LPAIF_DMAPERCNT_REG(v, chan, dir, dai_    177 #define LPAIF_DMAPERCNT_REG(v, chan, dir, dai_id) \
178         (is_cdc_dma_port(dai_id) ? \              178         (is_cdc_dma_port(dai_id) ? \
179         __LPAIF_CDC_DMA_REG(v, chan, dir, PERC    179         __LPAIF_CDC_DMA_REG(v, chan, dir, PERCNT, dai_id) : \
180         __LPAIF_DMA_REG(v, chan, dir, PERCNT,     180         __LPAIF_DMA_REG(v, chan, dir, PERCNT, dai_id))
181                                                   181 
182 #define LPAIF_CDC_RDMA_REG_ADDR(v, addr, chan,    182 #define LPAIF_CDC_RDMA_REG_ADDR(v, addr, chan, dai_id) \
183         (is_rxtx_cdc_dma_port(dai_id) ? \         183         (is_rxtx_cdc_dma_port(dai_id) ? \
184         (v->rxtx_rdma_reg_base + (addr) + v->r    184         (v->rxtx_rdma_reg_base + (addr) + v->rxtx_rdma_reg_stride * (chan)) : \
185         (v->va_rdma_reg_base + (addr) + v->va_    185         (v->va_rdma_reg_base + (addr) + v->va_rdma_reg_stride * (chan)))
186                                                   186 
187 #define LPAIF_CDC_RXTX_RDMACTL_REG(v, chan, da    187 #define LPAIF_CDC_RXTX_RDMACTL_REG(v, chan, dai_id) \
188                 LPAIF_CDC_RDMA_REG_ADDR(v, 0x0    188                 LPAIF_CDC_RDMA_REG_ADDR(v, 0x00, (chan), dai_id)
189 #define LPAIF_CDC_RXTX_RDMABASE_REG(v, chan, d    189 #define LPAIF_CDC_RXTX_RDMABASE_REG(v, chan, dai_id) \
190                 LPAIF_CDC_RDMA_REG_ADDR(v, 0x0    190                 LPAIF_CDC_RDMA_REG_ADDR(v, 0x04, (chan), dai_id)
191 #define LPAIF_CDC_RXTX_RDMABUFF_REG(v, chan, d    191 #define LPAIF_CDC_RXTX_RDMABUFF_REG(v, chan, dai_id) \
192                 LPAIF_CDC_RDMA_REG_ADDR(v, 0x0    192                 LPAIF_CDC_RDMA_REG_ADDR(v, 0x08, (chan), dai_id)
193 #define LPAIF_CDC_RXTX_RDMACURR_REG(v, chan, d    193 #define LPAIF_CDC_RXTX_RDMACURR_REG(v, chan, dai_id) \
194                 LPAIF_CDC_RDMA_REG_ADDR(v, 0x0    194                 LPAIF_CDC_RDMA_REG_ADDR(v, 0x0C, (chan), dai_id)
195 #define LPAIF_CDC_RXTX_RDMAPER_REG(v, chan, da    195 #define LPAIF_CDC_RXTX_RDMAPER_REG(v, chan, dai_id) \
196                 LPAIF_CDC_RDMA_REG_ADDR(v, 0x1    196                 LPAIF_CDC_RDMA_REG_ADDR(v, 0x10, (chan), dai_id)
197 #define LPAIF_CDC_RXTX_RDMA_INTF_REG(v, chan,     197 #define LPAIF_CDC_RXTX_RDMA_INTF_REG(v, chan, dai_id) \
198         LPAIF_CDC_RDMA_REG_ADDR(v, 0x50, (chan    198         LPAIF_CDC_RDMA_REG_ADDR(v, 0x50, (chan), dai_id)
199                                                   199 
200 #define LPAIF_CDC_VA_RDMACTL_REG(v, chan, dai_    200 #define LPAIF_CDC_VA_RDMACTL_REG(v, chan, dai_id) LPAIF_CDC_RDMA_REG_ADDR(v, 0x00, (chan), dai_id)
201 #define LPAIF_CDC_VA_RDMABASE_REG(v, chan, dai    201 #define LPAIF_CDC_VA_RDMABASE_REG(v, chan, dai_id) LPAIF_CDC_RDMA_REG_ADDR(v, 0x04, (chan), dai_id)
202 #define LPAIF_CDC_VA_RDMABUFF_REG(v, chan, dai    202 #define LPAIF_CDC_VA_RDMABUFF_REG(v, chan, dai_id) LPAIF_CDC_RDMA_REG_ADDR(v, 0x08, (chan), dai_id)
203 #define LPAIF_CDC_VA_RDMACURR_REG(v, chan, dai    203 #define LPAIF_CDC_VA_RDMACURR_REG(v, chan, dai_id) LPAIF_CDC_RDMA_REG_ADDR(v, 0x0C, (chan), dai_id)
204 #define LPAIF_CDC_VA_RDMAPER_REG(v, chan, dai_    204 #define LPAIF_CDC_VA_RDMAPER_REG(v, chan, dai_id) LPAIF_CDC_RDMA_REG_ADDR(v, 0x10, (chan), dai_id)
205 #define LPAIF_CDC_VA_RDMA_INTF_REG(v, chan, da    205 #define LPAIF_CDC_VA_RDMA_INTF_REG(v, chan, dai_id) \
206         LPAIF_CDC_RDMA_REG_ADDR(v, 0x50, (chan    206         LPAIF_CDC_RDMA_REG_ADDR(v, 0x50, (chan), dai_id)
207                                                   207 
208 #define LPAIF_CDC_WRDMA_REG_ADDR(v, addr, chan    208 #define LPAIF_CDC_WRDMA_REG_ADDR(v, addr, chan, dai_id) \
209         (is_rxtx_cdc_dma_port(dai_id) ? \         209         (is_rxtx_cdc_dma_port(dai_id) ? \
210         (v->rxtx_wrdma_reg_base + (addr) + \      210         (v->rxtx_wrdma_reg_base + (addr) + \
211                 v->rxtx_wrdma_reg_stride * (ch    211                 v->rxtx_wrdma_reg_stride * (chan - v->rxtx_wrdma_channel_start)) : \
212         (v->va_wrdma_reg_base + (addr) + \        212         (v->va_wrdma_reg_base + (addr) + \
213                 v->va_wrdma_reg_stride * (chan    213                 v->va_wrdma_reg_stride * (chan - v->va_wrdma_channel_start)))
214                                                   214 
215 #define LPAIF_CDC_RXTX_WRDMACTL_REG(v, chan, d    215 #define LPAIF_CDC_RXTX_WRDMACTL_REG(v, chan, dai_id) \
216         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x00, (cha    216         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x00, (chan), dai_id)
217 #define LPAIF_CDC_RXTX_WRDMABASE_REG(v, chan,     217 #define LPAIF_CDC_RXTX_WRDMABASE_REG(v, chan, dai_id) \
218         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x04, (cha    218         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x04, (chan), dai_id)
219 #define LPAIF_CDC_RXTX_WRDMABUFF_REG(v, chan,     219 #define LPAIF_CDC_RXTX_WRDMABUFF_REG(v, chan, dai_id) \
220         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x08, (cha    220         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x08, (chan), dai_id)
221 #define LPAIF_CDC_RXTX_WRDMACURR_REG(v, chan,     221 #define LPAIF_CDC_RXTX_WRDMACURR_REG(v, chan, dai_id) \
222         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x0C, (cha    222         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x0C, (chan), dai_id)
223 #define LPAIF_CDC_RXTX_WRDMAPER_REG(v, chan, d    223 #define LPAIF_CDC_RXTX_WRDMAPER_REG(v, chan, dai_id) \
224         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x10, (cha    224         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x10, (chan), dai_id)
225 #define LPAIF_CDC_RXTX_WRDMA_INTF_REG(v, chan,    225 #define LPAIF_CDC_RXTX_WRDMA_INTF_REG(v, chan, dai_id) \
226         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x50, (cha    226         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x50, (chan), dai_id)
227                                                   227 
228 #define LPAIF_CDC_VA_WRDMACTL_REG(v, chan, dai    228 #define LPAIF_CDC_VA_WRDMACTL_REG(v, chan, dai_id) \
229         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x00, (cha    229         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x00, (chan), dai_id)
230 #define LPAIF_CDC_VA_WRDMABASE_REG(v, chan, da    230 #define LPAIF_CDC_VA_WRDMABASE_REG(v, chan, dai_id) \
231         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x04, (cha    231         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x04, (chan), dai_id)
232 #define LPAIF_CDC_VA_WRDMABUFF_REG(v, chan, da    232 #define LPAIF_CDC_VA_WRDMABUFF_REG(v, chan, dai_id) \
233         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x08, (cha    233         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x08, (chan), dai_id)
234 #define LPAIF_CDC_VA_WRDMACURR_REG(v, chan, da    234 #define LPAIF_CDC_VA_WRDMACURR_REG(v, chan, dai_id) \
235         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x0C, (cha    235         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x0C, (chan), dai_id)
236 #define LPAIF_CDC_VA_WRDMAPER_REG(v, chan, dai    236 #define LPAIF_CDC_VA_WRDMAPER_REG(v, chan, dai_id) \
237         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x10, (cha    237         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x10, (chan), dai_id)
238 #define LPAIF_CDC_VA_WRDMA_INTF_REG(v, chan, d    238 #define LPAIF_CDC_VA_WRDMA_INTF_REG(v, chan, dai_id) \
239         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x50, (cha    239         LPAIF_CDC_WRDMA_REG_ADDR(v, 0x50, (chan), dai_id)
240                                                   240 
241 #define __LPAIF_CDC_RDDMA_REG(v, chan, dir, re    241 #define __LPAIF_CDC_RDDMA_REG(v, chan, dir, reg, dai_id) \
242                 (is_rxtx_cdc_dma_port(dai_id)     242                 (is_rxtx_cdc_dma_port(dai_id) ? LPAIF_CDC_RXTX_RDMA##reg##_REG(v, chan, dai_id) : \
243                         LPAIF_CDC_VA_RDMA##reg    243                         LPAIF_CDC_VA_RDMA##reg##_REG(v, chan, dai_id))
244                                                   244 
245 #define __LPAIF_CDC_WRDMA_REG(v, chan, dir, re    245 #define __LPAIF_CDC_WRDMA_REG(v, chan, dir, reg, dai_id) \
246                 (is_rxtx_cdc_dma_port(dai_id)     246                 (is_rxtx_cdc_dma_port(dai_id) ? LPAIF_CDC_RXTX_WRDMA##reg##_REG(v, chan, dai_id) : \
247                         LPAIF_CDC_VA_WRDMA##re    247                         LPAIF_CDC_VA_WRDMA##reg##_REG(v, chan, dai_id))
248                                                   248 
249 #define __LPAIF_CDC_DMA_REG(v, chan, dir, reg,    249 #define __LPAIF_CDC_DMA_REG(v, chan, dir, reg, dai_id) \
250                 ((dir ==  SNDRV_PCM_STREAM_PLA    250                 ((dir ==  SNDRV_PCM_STREAM_PLAYBACK) ? \
251                         __LPAIF_CDC_RDDMA_REG(    251                         __LPAIF_CDC_RDDMA_REG(v, chan, dir, reg, dai_id) : \
252                         __LPAIF_CDC_WRDMA_REG(    252                         __LPAIF_CDC_WRDMA_REG(v, chan, dir, reg, dai_id))
253                                                   253 
254 #define LPAIF_CDC_INTF_REG(v, chan, dir, dai_i    254 #define LPAIF_CDC_INTF_REG(v, chan, dir, dai_id) \
255                 ((dir ==  SNDRV_PCM_STREAM_PLA    255                 ((dir ==  SNDRV_PCM_STREAM_PLAYBACK) ? \
256                 LPAIF_CDC_RDMA_INTF_REG(v, cha    256                 LPAIF_CDC_RDMA_INTF_REG(v, chan, dai_id) : \
257                 LPAIF_CDC_WRDMA_INTF_REG(v, ch    257                 LPAIF_CDC_WRDMA_INTF_REG(v, chan, dai_id))
258                                                   258 
259 #define LPAIF_INTF_REG(v, chan, dir, dai_id) \    259 #define LPAIF_INTF_REG(v, chan, dir, dai_id) \
260                 (is_cdc_dma_port(dai_id) ? \      260                 (is_cdc_dma_port(dai_id) ? \
261                 LPAIF_CDC_INTF_REG(v, chan, di    261                 LPAIF_CDC_INTF_REG(v, chan, dir, dai_id) : \
262                 LPAIF_DMACTL_REG(v, chan, dir,    262                 LPAIF_DMACTL_REG(v, chan, dir, dai_id))
263                                                   263 
264 #define LPAIF_DMACTL_BURSTEN_SINGLE     0         264 #define LPAIF_DMACTL_BURSTEN_SINGLE     0
265 #define LPAIF_DMACTL_BURSTEN_INCR4      1         265 #define LPAIF_DMACTL_BURSTEN_INCR4      1
266                                                   266 
267 #define LPAIF_DMACTL_WPSCNT_ONE         0         267 #define LPAIF_DMACTL_WPSCNT_ONE         0
268 #define LPAIF_DMACTL_WPSCNT_TWO         1         268 #define LPAIF_DMACTL_WPSCNT_TWO         1
269 #define LPAIF_DMACTL_WPSCNT_THREE       2         269 #define LPAIF_DMACTL_WPSCNT_THREE       2
270 #define LPAIF_DMACTL_WPSCNT_FOUR        3         270 #define LPAIF_DMACTL_WPSCNT_FOUR        3
271 #define LPAIF_DMACTL_WPSCNT_SIX         5         271 #define LPAIF_DMACTL_WPSCNT_SIX         5
272 #define LPAIF_DMACTL_WPSCNT_EIGHT       7         272 #define LPAIF_DMACTL_WPSCNT_EIGHT       7
273 #define LPAIF_DMACTL_WPSCNT_TEN         9         273 #define LPAIF_DMACTL_WPSCNT_TEN         9
274 #define LPAIF_DMACTL_WPSCNT_TWELVE      11        274 #define LPAIF_DMACTL_WPSCNT_TWELVE      11
275 #define LPAIF_DMACTL_WPSCNT_FOURTEEN    13        275 #define LPAIF_DMACTL_WPSCNT_FOURTEEN    13
276 #define LPAIF_DMACTL_WPSCNT_SIXTEEN     15        276 #define LPAIF_DMACTL_WPSCNT_SIXTEEN     15
277                                                   277 
278 #define LPAIF_DMACTL_AUDINTF(id)        id        278 #define LPAIF_DMACTL_AUDINTF(id)        id
279                                                   279 
280 #define LPAIF_DMACTL_FIFOWM_1           0         280 #define LPAIF_DMACTL_FIFOWM_1           0
281 #define LPAIF_DMACTL_FIFOWM_2           1         281 #define LPAIF_DMACTL_FIFOWM_2           1
282 #define LPAIF_DMACTL_FIFOWM_3           2         282 #define LPAIF_DMACTL_FIFOWM_3           2
283 #define LPAIF_DMACTL_FIFOWM_4           3         283 #define LPAIF_DMACTL_FIFOWM_4           3
284 #define LPAIF_DMACTL_FIFOWM_5           4         284 #define LPAIF_DMACTL_FIFOWM_5           4
285 #define LPAIF_DMACTL_FIFOWM_6           5         285 #define LPAIF_DMACTL_FIFOWM_6           5
286 #define LPAIF_DMACTL_FIFOWM_7           6         286 #define LPAIF_DMACTL_FIFOWM_7           6
287 #define LPAIF_DMACTL_FIFOWM_8           7         287 #define LPAIF_DMACTL_FIFOWM_8           7
288 #define LPAIF_DMACTL_FIFOWM_9           8         288 #define LPAIF_DMACTL_FIFOWM_9           8
289 #define LPAIF_DMACTL_FIFOWM_10          9         289 #define LPAIF_DMACTL_FIFOWM_10          9
290 #define LPAIF_DMACTL_FIFOWM_11          10        290 #define LPAIF_DMACTL_FIFOWM_11          10
291 #define LPAIF_DMACTL_FIFOWM_12          11        291 #define LPAIF_DMACTL_FIFOWM_12          11
292 #define LPAIF_DMACTL_FIFOWM_13          12        292 #define LPAIF_DMACTL_FIFOWM_13          12
293 #define LPAIF_DMACTL_FIFOWM_14          13        293 #define LPAIF_DMACTL_FIFOWM_14          13
294 #define LPAIF_DMACTL_FIFOWM_15          14        294 #define LPAIF_DMACTL_FIFOWM_15          14
295 #define LPAIF_DMACTL_FIFOWM_16          15        295 #define LPAIF_DMACTL_FIFOWM_16          15
296 #define LPAIF_DMACTL_FIFOWM_17          16        296 #define LPAIF_DMACTL_FIFOWM_17          16
297 #define LPAIF_DMACTL_FIFOWM_18          17        297 #define LPAIF_DMACTL_FIFOWM_18          17
298 #define LPAIF_DMACTL_FIFOWM_19          18        298 #define LPAIF_DMACTL_FIFOWM_19          18
299 #define LPAIF_DMACTL_FIFOWM_20          19        299 #define LPAIF_DMACTL_FIFOWM_20          19
300 #define LPAIF_DMACTL_FIFOWM_21          20        300 #define LPAIF_DMACTL_FIFOWM_21          20
301 #define LPAIF_DMACTL_FIFOWM_22          21        301 #define LPAIF_DMACTL_FIFOWM_22          21
302 #define LPAIF_DMACTL_FIFOWM_23          22        302 #define LPAIF_DMACTL_FIFOWM_23          22
303 #define LPAIF_DMACTL_FIFOWM_24          23        303 #define LPAIF_DMACTL_FIFOWM_24          23
304 #define LPAIF_DMACTL_FIFOWM_25          24        304 #define LPAIF_DMACTL_FIFOWM_25          24
305 #define LPAIF_DMACTL_FIFOWM_26          25        305 #define LPAIF_DMACTL_FIFOWM_26          25
306 #define LPAIF_DMACTL_FIFOWM_27          26        306 #define LPAIF_DMACTL_FIFOWM_27          26
307 #define LPAIF_DMACTL_FIFOWM_28          27        307 #define LPAIF_DMACTL_FIFOWM_28          27
308 #define LPAIF_DMACTL_FIFOWM_29          28        308 #define LPAIF_DMACTL_FIFOWM_29          28
309 #define LPAIF_DMACTL_FIFOWM_30          29        309 #define LPAIF_DMACTL_FIFOWM_30          29
310 #define LPAIF_DMACTL_FIFOWM_31          30        310 #define LPAIF_DMACTL_FIFOWM_31          30
311 #define LPAIF_DMACTL_FIFOWM_32          31        311 #define LPAIF_DMACTL_FIFOWM_32          31
312                                                   312 
313 #define LPAIF_DMACTL_ENABLE_OFF         0         313 #define LPAIF_DMACTL_ENABLE_OFF         0
314 #define LPAIF_DMACTL_ENABLE_ON          1         314 #define LPAIF_DMACTL_ENABLE_ON          1
315                                                   315 
316 #define LPAIF_DMACTL_DYNCLK_OFF         0         316 #define LPAIF_DMACTL_DYNCLK_OFF         0
317 #define LPAIF_DMACTL_DYNCLK_ON          1         317 #define LPAIF_DMACTL_DYNCLK_ON          1
318                                                   318 
319 #endif /* __LPASS_LPAIF_REG_H__ */                319 #endif /* __LPASS_LPAIF_REG_H__ */
320                                                   320 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php