Lines Matching +full:dai +full:- +full:tdm +full:- +full:tdm +full:- +full:slot +full:- +full:with

1 // SPDX-License-Identifier: GPL-2.0
15 * unit, and its pins are shared with the AC97 unit, among others.
23 * useful to support TDM mode codecs like the AD1939 which have a
24 * fixed TDM slot size, regardless of sample resolution.
62 #define SSIREG(reg) (*(unsigned long *)(ssi->mmio + (reg)))
86 * track usage of the SSI; it is simplex-only so prevent attempts of
90 struct snd_soc_dai *dai) in ssi_startup() argument
92 struct ssi_priv *ssi = &ssi_cpu_data[dai->id]; in ssi_startup()
93 if (ssi->inuse) { in ssi_startup()
95 return -EBUSY; in ssi_startup()
97 ssi->inuse = 1; in ssi_startup()
102 struct snd_soc_dai *dai) in ssi_shutdown() argument
104 struct ssi_priv *ssi = &ssi_cpu_data[dai->id]; in ssi_shutdown()
106 ssi->inuse = 0; in ssi_shutdown()
110 struct snd_soc_dai *dai) in ssi_trigger() argument
112 struct ssi_priv *ssi = &ssi_cpu_data[dai->id]; in ssi_trigger()
122 return -EINVAL; in ssi_trigger()
130 struct snd_soc_dai *dai) in ssi_hw_params() argument
132 struct ssi_priv *ssi = &ssi_cpu_data[dai->id]; in ssi_hw_params()
137 bits = params->msbits; in ssi_hw_params()
138 recv = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? 0 : 1; in ssi_hw_params()
153 return -EINVAL; in ssi_hw_params()
155 ssicr |= ((channels >> 1) - 1) << CR_CHNL_SHIFT; in ssi_hw_params()
170 return -EINVAL; in ssi_hw_params()
178 * like the AD1939 which only accept 32bit wide TDM slots. For in ssi_hw_params()
180 * Waiting for ASoC to get TDM support ;-) in ssi_hw_params()
199 return -EINVAL; in ssi_hw_params()
211 struct ssi_priv *ssi = &ssi_cpu_data[cpu_dai->id]; in ssi_set_sysclk()
213 ssi->sysclk = freq; in ssi_set_sysclk()
222 static int ssi_set_clkdiv(struct snd_soc_dai *dai, int did, int div) in ssi_set_clkdiv() argument
224 struct ssi_priv *ssi = &ssi_cpu_data[dai->id]; in ssi_set_clkdiv()
239 return -EINVAL; in ssi_set_clkdiv()
245 static int ssi_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) in ssi_set_fmt() argument
247 struct ssi_priv *ssi = &ssi_cpu_data[dai->id]; in ssi_set_fmt()
266 return -EINVAL; in ssi_set_fmt()
291 return -EINVAL; in ssi_set_fmt()
308 return -EINVAL; in ssi_set_fmt()
319 * rate with the right bitclk and divider settings.
324 /* the SSI can do 8-32 bit samples, with 8 possible channels */
344 .name = "ssi-dai.0",
361 .name = "ssi-dai.1",
380 .name = "sh4-ssi",
386 return devm_snd_soc_register_component(&pdev->dev, &sh4_ssi_component, in sh4_soc_dai_probe()
393 .name = "sh4-ssi-dai",