Lines Matching refs:ac97

38 static void tegra20_ac97_codec_reset(struct snd_ac97 *ac97)  in tegra20_ac97_codec_reset()  argument
60 static void tegra20_ac97_codec_warm_reset(struct snd_ac97 *ac97) in tegra20_ac97_codec_warm_reset() argument
143 static inline void tegra20_ac97_start_playback(struct tegra20_ac97 *ac97) in tegra20_ac97_start_playback() argument
145 regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, in tegra20_ac97_start_playback()
149 regmap_update_bits(ac97->regmap, TEGRA20_AC97_CTRL, in tegra20_ac97_start_playback()
156 static inline void tegra20_ac97_stop_playback(struct tegra20_ac97 *ac97) in tegra20_ac97_stop_playback() argument
158 regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, in tegra20_ac97_stop_playback()
161 regmap_update_bits(ac97->regmap, TEGRA20_AC97_CTRL, in tegra20_ac97_stop_playback()
165 static inline void tegra20_ac97_start_capture(struct tegra20_ac97 *ac97) in tegra20_ac97_start_capture() argument
167 regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, in tegra20_ac97_start_capture()
172 static inline void tegra20_ac97_stop_capture(struct tegra20_ac97 *ac97) in tegra20_ac97_stop_capture() argument
174 regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, in tegra20_ac97_stop_capture()
181 struct tegra20_ac97 *ac97 = snd_soc_dai_get_drvdata(dai); in tegra20_ac97_trigger() local
188 tegra20_ac97_start_playback(ac97); in tegra20_ac97_trigger()
190 tegra20_ac97_start_capture(ac97); in tegra20_ac97_trigger()
196 tegra20_ac97_stop_playback(ac97); in tegra20_ac97_trigger()
198 tegra20_ac97_stop_capture(ac97); in tegra20_ac97_trigger()
213 struct tegra20_ac97 *ac97 = snd_soc_dai_get_drvdata(dai); in tegra20_ac97_probe() local
215 dai->capture_dma_data = &ac97->capture_dma_data; in tegra20_ac97_probe()
216 dai->playback_dma_data = &ac97->playback_dma_data; in tegra20_ac97_probe()
304 struct tegra20_ac97 *ac97; in tegra20_ac97_platform_probe() local
309 ac97 = devm_kzalloc(&pdev->dev, sizeof(struct tegra20_ac97), in tegra20_ac97_platform_probe()
311 if (!ac97) { in tegra20_ac97_platform_probe()
315 dev_set_drvdata(&pdev->dev, ac97); in tegra20_ac97_platform_probe()
317 ac97->reset = devm_reset_control_get_exclusive(&pdev->dev, "ac97"); in tegra20_ac97_platform_probe()
318 if (IS_ERR(ac97->reset)) { in tegra20_ac97_platform_probe()
320 return PTR_ERR(ac97->reset); in tegra20_ac97_platform_probe()
323 ac97->clk_ac97 = devm_clk_get(&pdev->dev, NULL); in tegra20_ac97_platform_probe()
324 if (IS_ERR(ac97->clk_ac97)) { in tegra20_ac97_platform_probe()
326 ret = PTR_ERR(ac97->clk_ac97); in tegra20_ac97_platform_probe()
337 ac97->regmap = devm_regmap_init_mmio(&pdev->dev, regs, in tegra20_ac97_platform_probe()
339 if (IS_ERR(ac97->regmap)) { in tegra20_ac97_platform_probe()
341 ret = PTR_ERR(ac97->regmap); in tegra20_ac97_platform_probe()
345 ac97->reset_gpio = of_get_named_gpio(pdev->dev.of_node, in tegra20_ac97_platform_probe()
347 if (gpio_is_valid(ac97->reset_gpio)) { in tegra20_ac97_platform_probe()
348 ret = devm_gpio_request_one(&pdev->dev, ac97->reset_gpio, in tegra20_ac97_platform_probe()
359 ac97->sync_gpio = of_get_named_gpio(pdev->dev.of_node, in tegra20_ac97_platform_probe()
361 if (!gpio_is_valid(ac97->sync_gpio)) { in tegra20_ac97_platform_probe()
366 ac97->capture_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_RX1; in tegra20_ac97_platform_probe()
367 ac97->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in tegra20_ac97_platform_probe()
368 ac97->capture_dma_data.maxburst = 4; in tegra20_ac97_platform_probe()
370 ac97->playback_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_TX1; in tegra20_ac97_platform_probe()
371 ac97->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in tegra20_ac97_platform_probe()
372 ac97->playback_dma_data.maxburst = 4; in tegra20_ac97_platform_probe()
374 ret = reset_control_assert(ac97->reset); in tegra20_ac97_platform_probe()
380 ret = clk_prepare_enable(ac97->clk_ac97); in tegra20_ac97_platform_probe()
388 ret = reset_control_deassert(ac97->reset); in tegra20_ac97_platform_probe()
415 workdata = ac97; in tegra20_ac97_platform_probe()
422 clk_disable_unprepare(ac97->clk_ac97); in tegra20_ac97_platform_probe()
431 struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev); in tegra20_ac97_platform_remove() local
436 clk_disable_unprepare(ac97->clk_ac97); in tegra20_ac97_platform_remove()