Lines Matching +full:4 +full:- +full:lane
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
10 #include <sound/soc-dai.h>
12 #include "axg-tdm-formatter.h"
15 #define TDMOUT_CTRL0_BITNUM_MASK GENMASK(4, 0)
25 #define TDMOUT_CTRL1_TYPE_MASK GENMASK(6, 4)
26 #define TDMOUT_CTRL1_TYPE(x) ((x) << 4)
51 .reg_stride = 4,
62 if (!p->connect) in axg_tdmout_get_be()
65 if (p->sink->id == snd_soc_dapm_dai_in) in axg_tdmout_get_be()
66 return (struct snd_soc_dai *)p->sink->priv; in axg_tdmout_get_be()
68 be = axg_tdmout_get_be(p->sink); in axg_tdmout_get_be()
84 return be->playback_dma_data; in axg_tdmout_get_tdm_stream()
113 unsigned int val, skew = quirks->skew_offset; in axg_tdmout_prepare()
116 switch (ts->iface->fmt & SND_SOC_DAIFMT_FORMAT_MASK) { in axg_tdmout_prepare()
128 ts->iface->fmt & SND_SOC_DAIFMT_FORMAT_MASK); in axg_tdmout_prepare()
129 return -EINVAL; in axg_tdmout_prepare()
135 val |= TDMOUT_CTRL0_BITNUM(ts->iface->slot_width - 1); in axg_tdmout_prepare()
138 val |= TDMOUT_CTRL0_SLOTNUM(ts->iface->slots - 1); in axg_tdmout_prepare()
146 val = TDMOUT_CTRL1_MSB_POS(ts->width - 1); in axg_tdmout_prepare()
149 switch (ts->physical_width) { in axg_tdmout_prepare()
155 /* 4 samples of 16 bits - right justified */ in axg_tdmout_prepare()
159 /* 2 samples of 32 bits - right justified */ in axg_tdmout_prepare()
160 val |= TDMOUT_CTRL1_TYPE(4); in axg_tdmout_prepare()
164 ts->physical_width); in axg_tdmout_prepare()
165 return -EINVAL; in axg_tdmout_prepare()
169 if (axg_tdm_lrclk_invert(ts->iface->fmt)) in axg_tdmout_prepare()
183 SOC_DOUBLE("Lane 0 Volume", TDMOUT_GAIN0, 0, 8, 255, 0),
184 SOC_DOUBLE("Lane 1 Volume", TDMOUT_GAIN0, 16, 24, 255, 0),
185 SOC_DOUBLE("Lane 2 Volume", TDMOUT_GAIN1, 0, 8, 255, 0),
186 SOC_DOUBLE("Lane 3 Volume", TDMOUT_GAIN1, 16, 24, 255, 0),
255 SOC_DOUBLE("Lane 0 Volume", TDMOUT_GAIN0, 0, 8, 255, 0),
256 SOC_DOUBLE("Lane 1 Volume", TDMOUT_GAIN0, 16, 24, 255, 0),
257 SOC_DOUBLE("Lane 2 Volume", TDMOUT_GAIN1, 0, 8, 255, 0),
258 SOC_DOUBLE("Lane 3 Volume", TDMOUT_GAIN1, 16, 24, 255, 0),
264 "IN 0", "IN 1", "IN 2", "IN 3", "IN 4",
278 SND_SOC_DAPM_AIF_IN("IN 4", NULL, 0, SND_SOC_NOPM, 0, 0),
291 { "SRC SEL", "IN 4", "IN 4" },
316 .compatible = "amlogic,axg-tdmout",
319 .compatible = "amlogic,g12a-tdmout",
322 .compatible = "amlogic,sm1-tdmout",
331 .name = "axg-tdmout",