• Home
  • Raw
  • Download

Lines Matching refs:i2s

51 	struct tegra30_i2s *i2s = dev_get_drvdata(dev);  in tegra30_i2s_runtime_suspend()  local
53 regcache_cache_only(i2s->regmap, true); in tegra30_i2s_runtime_suspend()
55 clk_disable_unprepare(i2s->clk_i2s); in tegra30_i2s_runtime_suspend()
62 struct tegra30_i2s *i2s = dev_get_drvdata(dev); in tegra30_i2s_runtime_resume() local
65 ret = clk_prepare_enable(i2s->clk_i2s); in tegra30_i2s_runtime_resume()
71 regcache_cache_only(i2s->regmap, false); in tegra30_i2s_runtime_resume()
79 struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); in tegra30_i2s_set_fmt() local
128 regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, mask, val); in tegra30_i2s_set_fmt()
139 struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); in tegra30_i2s_hw_params() local
157 regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, mask, val); in tegra30_i2s_hw_params()
168 ret = clk_set_rate(i2s->clk_i2s, i2sclock); in tegra30_i2s_hw_params()
179 regmap_write(i2s->regmap, TEGRA30_I2S_TIMING, val); in tegra30_i2s_hw_params()
200 i2s->soc_data->set_audio_cif(i2s->regmap, reg, &cif_conf); in tegra30_i2s_hw_params()
204 regmap_write(i2s->regmap, TEGRA30_I2S_OFFSET, val); in tegra30_i2s_hw_params()
209 static void tegra30_i2s_start_playback(struct tegra30_i2s *i2s) in tegra30_i2s_start_playback() argument
211 tegra30_ahub_enable_tx_fifo(i2s->playback_fifo_cif); in tegra30_i2s_start_playback()
212 regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, in tegra30_i2s_start_playback()
217 static void tegra30_i2s_stop_playback(struct tegra30_i2s *i2s) in tegra30_i2s_stop_playback() argument
219 tegra30_ahub_disable_tx_fifo(i2s->playback_fifo_cif); in tegra30_i2s_stop_playback()
220 regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, in tegra30_i2s_stop_playback()
224 static void tegra30_i2s_start_capture(struct tegra30_i2s *i2s) in tegra30_i2s_start_capture() argument
226 tegra30_ahub_enable_rx_fifo(i2s->capture_fifo_cif); in tegra30_i2s_start_capture()
227 regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, in tegra30_i2s_start_capture()
232 static void tegra30_i2s_stop_capture(struct tegra30_i2s *i2s) in tegra30_i2s_stop_capture() argument
234 tegra30_ahub_disable_rx_fifo(i2s->capture_fifo_cif); in tegra30_i2s_stop_capture()
235 regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, in tegra30_i2s_stop_capture()
242 struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); in tegra30_i2s_trigger() local
249 tegra30_i2s_start_playback(i2s); in tegra30_i2s_trigger()
251 tegra30_i2s_start_capture(i2s); in tegra30_i2s_trigger()
257 tegra30_i2s_stop_playback(i2s); in tegra30_i2s_trigger()
259 tegra30_i2s_stop_capture(i2s); in tegra30_i2s_trigger()
270 struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); in tegra30_i2s_probe() local
272 dai->capture_dma_data = &i2s->capture_dma_data; in tegra30_i2s_probe()
273 dai->playback_dma_data = &i2s->playback_dma_data; in tegra30_i2s_probe()
379 struct tegra30_i2s *i2s; in tegra30_i2s_platform_probe() local
386 i2s = devm_kzalloc(&pdev->dev, sizeof(struct tegra30_i2s), GFP_KERNEL); in tegra30_i2s_platform_probe()
387 if (!i2s) { in tegra30_i2s_platform_probe()
392 dev_set_drvdata(&pdev->dev, i2s); in tegra30_i2s_platform_probe()
400 i2s->soc_data = (struct tegra30_i2s_soc_data *)match->data; in tegra30_i2s_platform_probe()
402 i2s->dai = tegra30_i2s_dai_template; in tegra30_i2s_platform_probe()
403 i2s->dai.name = dev_name(&pdev->dev); in tegra30_i2s_platform_probe()
411 i2s->playback_i2s_cif = cif_ids[0]; in tegra30_i2s_platform_probe()
412 i2s->capture_i2s_cif = cif_ids[1]; in tegra30_i2s_platform_probe()
414 i2s->clk_i2s = clk_get(&pdev->dev, NULL); in tegra30_i2s_platform_probe()
415 if (IS_ERR(i2s->clk_i2s)) { in tegra30_i2s_platform_probe()
417 ret = PTR_ERR(i2s->clk_i2s); in tegra30_i2s_platform_probe()
428 i2s->regmap = devm_regmap_init_mmio(&pdev->dev, regs, in tegra30_i2s_platform_probe()
430 if (IS_ERR(i2s->regmap)) { in tegra30_i2s_platform_probe()
432 ret = PTR_ERR(i2s->regmap); in tegra30_i2s_platform_probe()
435 regcache_cache_only(i2s->regmap, true); in tegra30_i2s_platform_probe()
444 i2s->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in tegra30_i2s_platform_probe()
445 i2s->playback_dma_data.maxburst = 4; in tegra30_i2s_platform_probe()
446 ret = tegra30_ahub_allocate_tx_fifo(&i2s->playback_fifo_cif, in tegra30_i2s_platform_probe()
447 i2s->playback_dma_chan, in tegra30_i2s_platform_probe()
448 sizeof(i2s->playback_dma_chan), in tegra30_i2s_platform_probe()
449 &i2s->playback_dma_data.addr); in tegra30_i2s_platform_probe()
454 ret = tegra30_ahub_set_rx_cif_source(i2s->playback_i2s_cif, in tegra30_i2s_platform_probe()
455 i2s->playback_fifo_cif); in tegra30_i2s_platform_probe()
461 i2s->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in tegra30_i2s_platform_probe()
462 i2s->capture_dma_data.maxburst = 4; in tegra30_i2s_platform_probe()
463 ret = tegra30_ahub_allocate_rx_fifo(&i2s->capture_fifo_cif, in tegra30_i2s_platform_probe()
464 i2s->capture_dma_chan, in tegra30_i2s_platform_probe()
465 sizeof(i2s->capture_dma_chan), in tegra30_i2s_platform_probe()
466 &i2s->capture_dma_data.addr); in tegra30_i2s_platform_probe()
471 ret = tegra30_ahub_set_rx_cif_source(i2s->capture_fifo_cif, in tegra30_i2s_platform_probe()
472 i2s->capture_i2s_cif); in tegra30_i2s_platform_probe()
479 &i2s->dai, 1); in tegra30_i2s_platform_probe()
487 &i2s->dma_config, i2s->playback_dma_chan, in tegra30_i2s_platform_probe()
488 i2s->capture_dma_chan); in tegra30_i2s_platform_probe()
499 tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif); in tegra30_i2s_platform_probe()
501 tegra30_ahub_free_rx_fifo(i2s->capture_fifo_cif); in tegra30_i2s_platform_probe()
503 tegra30_ahub_unset_rx_cif_source(i2s->playback_i2s_cif); in tegra30_i2s_platform_probe()
505 tegra30_ahub_free_tx_fifo(i2s->playback_fifo_cif); in tegra30_i2s_platform_probe()
512 clk_put(i2s->clk_i2s); in tegra30_i2s_platform_probe()
519 struct tegra30_i2s *i2s = dev_get_drvdata(&pdev->dev); in tegra30_i2s_platform_remove() local
528 tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif); in tegra30_i2s_platform_remove()
529 tegra30_ahub_free_rx_fifo(i2s->capture_fifo_cif); in tegra30_i2s_platform_remove()
531 tegra30_ahub_unset_rx_cif_source(i2s->playback_i2s_cif); in tegra30_i2s_platform_remove()
532 tegra30_ahub_free_tx_fifo(i2s->playback_fifo_cif); in tegra30_i2s_platform_remove()
534 clk_put(i2s->clk_i2s); in tegra30_i2s_platform_remove()
542 struct tegra30_i2s *i2s = dev_get_drvdata(dev); in tegra30_i2s_suspend() local
544 regcache_mark_dirty(i2s->regmap); in tegra30_i2s_suspend()
551 struct tegra30_i2s *i2s = dev_get_drvdata(dev); in tegra30_i2s_resume() local
559 ret = regcache_sync(i2s->regmap); in tegra30_i2s_resume()