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()
749 ssc_writel(chip->ssc->regs, TCMR, in snd_at73c213_ssc_init()
761 ssc_writel(chip->ssc->regs, TFMR, in snd_at73c213_ssc_init()
855 ssc_writel(chip->ssc->regs, CR, SSC_BIT(CR_TXEN)); in snd_at73c213_chip_init()
869 ssc_writel(chip->ssc->regs, CR, SSC_BIT(CR_TXDIS)); in snd_at73c213_dev_free()
887 irq = chip->ssc->irq; in snd_at73c213_dev_init()
896 retval = clk_enable(chip->ssc->clk); in snd_at73c213_dev_init()
938 clk_disable(chip->ssc->clk); in snd_at73c213_dev_init()
978 chip->ssc = ssc_request(board->ssc_id); in snd_at73c213_probe()
979 if (IS_ERR(chip->ssc)) { in snd_at73c213_probe()
980 dev_dbg(&spi->dev, "could not get ssc%d device\n", in snd_at73c213_probe()
982 retval = PTR_ERR(chip->ssc); in snd_at73c213_probe()
1003 ssc_free(chip->ssc); in snd_at73c213_probe()
1017 retval = clk_enable(chip->ssc->clk); in snd_at73c213_remove()
1020 ssc_writel(chip->ssc->regs, CR, SSC_BIT(CR_TXDIS)); in snd_at73c213_remove()
1021 clk_disable(chip->ssc->clk); in snd_at73c213_remove()
1075 ssc_free(chip->ssc); in snd_at73c213_remove()
1086 ssc_writel(chip->ssc->regs, CR, SSC_BIT(CR_TXDIS)); in snd_at73c213_suspend()
1087 clk_disable(chip->ssc->clk); in snd_at73c213_suspend()
1102 retval = clk_enable(chip->ssc->clk); in snd_at73c213_resume()
1107 ssc_writel(chip->ssc->regs, CR, SSC_BIT(CR_TXEN)); in snd_at73c213_resume()
1132 MODULE_DESCRIPTION("Sound driver for AT73C213 with Atmel SSC");