Lines Matching +full:fifo +full:- +full:width
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
15 #include <sound/soc-dai.h>
17 #include "axg-fifo.h"
40 struct axg_fifo *fifo = snd_soc_dai_get_drvdata(dai); in g12a_toddr_dai_prepare() local
43 regmap_update_bits(fifo->map, FIFO_CTRL1, in g12a_toddr_dai_prepare()
45 regmap_update_bits(fifo->map, FIFO_CTRL1, in g12a_toddr_dai_prepare()
47 regmap_update_bits(fifo->map, FIFO_CTRL1, in g12a_toddr_dai_prepare()
57 struct axg_fifo *fifo = snd_soc_dai_get_drvdata(dai); in axg_toddr_dai_hw_params() local
58 unsigned int type, width; in axg_toddr_dai_hw_params() local
65 type = 2; /* 4 samples of 16 bits - right justified */ in axg_toddr_dai_hw_params()
68 type = 4; /* 2 samples of 32 bits - right justified */ in axg_toddr_dai_hw_params()
71 return -EINVAL; in axg_toddr_dai_hw_params()
74 width = params_width(params); in axg_toddr_dai_hw_params()
76 regmap_update_bits(fifo->map, FIFO_CTRL0, in axg_toddr_dai_hw_params()
82 FIELD_PREP(CTRL0_TODDR_LSB_POS, TODDR_MSB_POS - (width - 1))); in axg_toddr_dai_hw_params()
90 struct axg_fifo *fifo = snd_soc_dai_get_drvdata(dai); in axg_toddr_dai_startup() local
93 /* Enable pclk to access registers and clock the fifo ip */ in axg_toddr_dai_startup()
94 ret = clk_prepare_enable(fifo->pclk); in axg_toddr_dai_startup()
98 /* Select orginal data - resampling not supported ATM */ in axg_toddr_dai_startup()
99 regmap_update_bits(fifo->map, FIFO_CTRL0, CTRL0_TODDR_SEL_RESAMPLE, 0); in axg_toddr_dai_startup()
102 regmap_update_bits(fifo->map, FIFO_CTRL0, CTRL0_TODDR_EXT_SIGNED, in axg_toddr_dai_startup()
106 regmap_update_bits(fifo->map, FIFO_CTRL0, CTRL0_TODDR_PP_MODE, 0); in axg_toddr_dai_startup()
114 struct axg_fifo *fifo = snd_soc_dai_get_drvdata(dai); in axg_toddr_dai_shutdown() local
116 clk_disable_unprepare(fifo->pclk); in axg_toddr_dai_shutdown()
197 struct axg_fifo *fifo = snd_soc_dai_get_drvdata(dai); in g12a_toddr_dai_startup() local
209 regmap_update_bits(fifo->map, FIFO_CTRL0, CTRL0_TODDR_SYNC_CH, in g12a_toddr_dai_startup()
330 .compatible = "amlogic,axg-toddr",
333 .compatible = "amlogic,g12a-toddr",
336 .compatible = "amlogic,sm1-toddr",
345 .name = "axg-toddr",
351 MODULE_DESCRIPTION("Amlogic AXG capture fifo driver");