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()
305 struct tegra20_ac97 *ac97; in tegra20_ac97_platform_probe() local
310 ac97 = devm_kzalloc(&pdev->dev, sizeof(struct tegra20_ac97), in tegra20_ac97_platform_probe()
312 if (!ac97) { in tegra20_ac97_platform_probe()
316 dev_set_drvdata(&pdev->dev, ac97); in tegra20_ac97_platform_probe()
318 ac97->reset = devm_reset_control_get_exclusive(&pdev->dev, "ac97"); in tegra20_ac97_platform_probe()
319 if (IS_ERR(ac97->reset)) { in tegra20_ac97_platform_probe()
321 return PTR_ERR(ac97->reset); in tegra20_ac97_platform_probe()
324 ac97->clk_ac97 = devm_clk_get(&pdev->dev, NULL); in tegra20_ac97_platform_probe()
325 if (IS_ERR(ac97->clk_ac97)) { in tegra20_ac97_platform_probe()
327 ret = PTR_ERR(ac97->clk_ac97); in tegra20_ac97_platform_probe()
338 ac97->regmap = devm_regmap_init_mmio(&pdev->dev, regs, in tegra20_ac97_platform_probe()
340 if (IS_ERR(ac97->regmap)) { in tegra20_ac97_platform_probe()
342 ret = PTR_ERR(ac97->regmap); in tegra20_ac97_platform_probe()
346 ac97->reset_gpio = of_get_named_gpio(pdev->dev.of_node, in tegra20_ac97_platform_probe()
348 if (gpio_is_valid(ac97->reset_gpio)) { in tegra20_ac97_platform_probe()
349 ret = devm_gpio_request_one(&pdev->dev, ac97->reset_gpio, in tegra20_ac97_platform_probe()
361 ac97->sync_gpio = of_get_named_gpio(pdev->dev.of_node, in tegra20_ac97_platform_probe()
363 if (!gpio_is_valid(ac97->sync_gpio)) { in tegra20_ac97_platform_probe()
369 ac97->capture_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_RX1; in tegra20_ac97_platform_probe()
370 ac97->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in tegra20_ac97_platform_probe()
371 ac97->capture_dma_data.maxburst = 4; in tegra20_ac97_platform_probe()
373 ac97->playback_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_TX1; in tegra20_ac97_platform_probe()
374 ac97->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in tegra20_ac97_platform_probe()
375 ac97->playback_dma_data.maxburst = 4; in tegra20_ac97_platform_probe()
377 ret = reset_control_assert(ac97->reset); in tegra20_ac97_platform_probe()
383 ret = clk_prepare_enable(ac97->clk_ac97); in tegra20_ac97_platform_probe()
391 ret = reset_control_deassert(ac97->reset); in tegra20_ac97_platform_probe()
418 workdata = ac97; in tegra20_ac97_platform_probe()
425 clk_disable_unprepare(ac97->clk_ac97); in tegra20_ac97_platform_probe()
434 struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev); in tegra20_ac97_platform_remove() local
439 clk_disable_unprepare(ac97->clk_ac97); in tegra20_ac97_platform_remove()