Lines Matching full:ssc

3  * Driver for AT73C213 16-bit stereo DAC connected to Atmel SSC
27 #include <linux/atmel-ssc.h>
69 struct ssc_device *ssc; member
75 /* Protect SSC registers against concurrent access. */
131 unsigned long ssc_rate = clk_get_rate(chip->ssc->clk); in snd_at73c213_set_bitrate()
146 /* SSC clock / (bitrate * stereo * 16-bit). */ in snd_at73c213_set_bitrate()
166 /* SSC clock / (ssc divider * 16-bit * stereo). */ in snd_at73c213_set_bitrate()
192 /* Set divider in SSC device. */ in snd_at73c213_set_bitrate()
193 ssc_writel(chip->ssc->regs, CMR, ssc_div/2); in snd_at73c213_set_bitrate()
195 /* SSC clock / (ssc divider * 16-bit * stereo). */ in snd_at73c213_set_bitrate()
221 err = clk_enable(chip->ssc->clk); in snd_at73c213_pcm_open()
232 clk_disable(chip->ssc->clk); in snd_at73c213_pcm_close()
243 val = ssc_readl(chip->ssc->regs, TFMR); in snd_at73c213_pcm_hw_params()
245 ssc_writel(chip->ssc->regs, TFMR, val); in snd_at73c213_pcm_hw_params()
260 ssc_writel(chip->ssc->regs, PDC_TPR, in snd_at73c213_pcm_prepare()
262 ssc_writel(chip->ssc->regs, PDC_TCR, in snd_at73c213_pcm_prepare()
264 ssc_writel(chip->ssc->regs, PDC_TNPR, in snd_at73c213_pcm_prepare()
266 ssc_writel(chip->ssc->regs, PDC_TNCR, in snd_at73c213_pcm_prepare()
282 ssc_writel(chip->ssc->regs, IER, SSC_BIT(IER_ENDTX)); in snd_at73c213_pcm_trigger()
283 ssc_writel(chip->ssc->regs, PDC_PTCR, SSC_BIT(PDC_PTCR_TXTEN)); in snd_at73c213_pcm_trigger()
286 ssc_writel(chip->ssc->regs, PDC_PTCR, SSC_BIT(PDC_PTCR_TXTDIS)); in snd_at73c213_pcm_trigger()
287 ssc_writel(chip->ssc->regs, IDR, SSC_BIT(IDR_ENDTX)); in snd_at73c213_pcm_trigger()
308 bytes = ssc_readl(chip->ssc->regs, PDC_TPR) in snd_at73c213_pcm_pointer()
345 SNDRV_DMA_TYPE_DEV, &chip->ssc->pdev->dev, in snd_at73c213_pcm_new()
364 status = ssc_readl(chip->ssc->regs, IMR); in snd_at73c213_interrupt()
376 ssc_writel(chip->ssc->regs, PDC_TNPR, in snd_at73c213_interrupt()
378 ssc_writel(chip->ssc->regs, PDC_TNCR, in snd_at73c213_interrupt()
383 ssc_readl(chip->ssc->regs, IMR); in snd_at73c213_interrupt()
745 ssc_writel(chip->ssc->regs, TCMR, in snd_at73c213_ssc_init()
757 ssc_writel(chip->ssc->regs, TFMR, in snd_at73c213_ssc_init()
851 ssc_writel(chip->ssc->regs, CR, SSC_BIT(CR_TXEN)); in snd_at73c213_chip_init()
865 ssc_writel(chip->ssc->regs, CR, SSC_BIT(CR_TXDIS)); in snd_at73c213_dev_free()
883 irq = chip->ssc->irq; in snd_at73c213_dev_init()
892 retval = clk_enable(chip->ssc->clk); in snd_at73c213_dev_init()
934 clk_disable(chip->ssc->clk); in snd_at73c213_dev_init()
974 chip->ssc = ssc_request(board->ssc_id); in snd_at73c213_probe()
975 if (IS_ERR(chip->ssc)) { in snd_at73c213_probe()
976 dev_dbg(&spi->dev, "could not get ssc%d device\n", in snd_at73c213_probe()
978 retval = PTR_ERR(chip->ssc); in snd_at73c213_probe()
999 ssc_free(chip->ssc); in snd_at73c213_probe()
1013 retval = clk_enable(chip->ssc->clk); in snd_at73c213_remove()
1016 ssc_writel(chip->ssc->regs, CR, SSC_BIT(CR_TXDIS)); in snd_at73c213_remove()
1017 clk_disable(chip->ssc->clk); in snd_at73c213_remove()
1071 ssc_free(chip->ssc); in snd_at73c213_remove()
1080 ssc_writel(chip->ssc->regs, CR, SSC_BIT(CR_TXDIS)); in snd_at73c213_suspend()
1081 clk_disable(chip->ssc->clk); in snd_at73c213_suspend()
1096 retval = clk_enable(chip->ssc->clk); in snd_at73c213_resume()
1101 ssc_writel(chip->ssc->regs, CR, SSC_BIT(CR_TXEN)); in snd_at73c213_resume()
1121 MODULE_DESCRIPTION("Sound driver for AT73C213 with Atmel SSC");