Lines Matching refs:ctx
69 static inline unsigned long RD(struct au1xpsc_audio_data *ctx, int reg) in RD() argument
71 return __raw_readl(ctx->mmio + reg); in RD()
74 static inline void WR(struct au1xpsc_audio_data *ctx, int reg, unsigned long v) in WR() argument
76 __raw_writel(v, ctx->mmio + reg); in WR()
82 struct au1xpsc_audio_data *ctx = snd_soc_dai_get_drvdata(cpu_dai); in au1xi2s_set_fmt() local
87 c = ctx->cfg; in au1xi2s_set_fmt()
130 ctx->cfg = c; in au1xi2s_set_fmt()
138 struct au1xpsc_audio_data *ctx = snd_soc_dai_get_drvdata(dai); in au1xi2s_trigger() local
145 WR(ctx, I2S_ENABLE, EN_D | EN_CE); in au1xi2s_trigger()
146 WR(ctx, I2S_ENABLE, EN_CE); in au1xi2s_trigger()
147 ctx->cfg |= (stype == PCM_TX) ? CFG_TN : CFG_RN; in au1xi2s_trigger()
148 WR(ctx, I2S_CFG, ctx->cfg); in au1xi2s_trigger()
152 ctx->cfg &= ~((stype == PCM_TX) ? CFG_TN : CFG_RN); in au1xi2s_trigger()
153 WR(ctx, I2S_CFG, ctx->cfg); in au1xi2s_trigger()
154 WR(ctx, I2S_ENABLE, EN_D); /* power off */ in au1xi2s_trigger()
184 struct au1xpsc_audio_data *ctx = snd_soc_dai_get_drvdata(dai); in au1xi2s_hw_params() local
191 ctx->cfg &= ~CFG_SZ_MASK; in au1xi2s_hw_params()
192 ctx->cfg |= v; in au1xi2s_hw_params()
199 struct au1xpsc_audio_data *ctx = snd_soc_dai_get_drvdata(dai); in au1xi2s_startup() local
200 snd_soc_dai_set_dma_data(dai, substream, &ctx->dmaids[0]); in au1xi2s_startup()
235 struct au1xpsc_audio_data *ctx; in au1xi2s_drvprobe() local
237 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in au1xi2s_drvprobe()
238 if (!ctx) in au1xi2s_drvprobe()
250 ctx->mmio = devm_ioremap_nocache(&pdev->dev, iores->start, in au1xi2s_drvprobe()
252 if (!ctx->mmio) in au1xi2s_drvprobe()
258 ctx->dmaids[SNDRV_PCM_STREAM_PLAYBACK] = dmares->start; in au1xi2s_drvprobe()
263 ctx->dmaids[SNDRV_PCM_STREAM_CAPTURE] = dmares->start; in au1xi2s_drvprobe()
265 platform_set_drvdata(pdev, ctx); in au1xi2s_drvprobe()
273 struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev); in au1xi2s_drvremove() local
277 WR(ctx, I2S_ENABLE, EN_D); /* clock off, disable */ in au1xi2s_drvremove()
285 struct au1xpsc_audio_data *ctx = dev_get_drvdata(dev); in au1xi2s_drvsuspend() local
287 WR(ctx, I2S_ENABLE, EN_D); /* clock off, disable */ in au1xi2s_drvsuspend()