Lines Matching +full:asrc +full:- +full:format

1 // SPDX-License-Identifier: GPL-2.0
13 #include "mt8365-afe-clk.h"
14 #include "mt8365-afe-common.h"
20 unsigned int format; member
27 regmap_update_bits(afe->regmap, PCM_INTF_CON1, in mt8365_dai_enable_pcm1()
33 regmap_update_bits(afe->regmap, PCM_INTF_CON1, in mt8365_dai_disable_pcm1()
41 struct mt8365_afe_private *afe_priv = afe->platform_priv; in mt8365_dai_configure_pcm1()
42 struct mt8365_pcm_intf_data *pcm_priv = afe_priv->dai_priv[MT8365_AFE_IO_PCM1]; in mt8365_dai_configure_pcm1()
43 bool slave_mode = pcm_priv->slave_mode; in mt8365_dai_configure_pcm1()
44 bool lrck_inv = pcm_priv->lrck_inv; in mt8365_dai_configure_pcm1()
45 bool bck_inv = pcm_priv->bck_inv; in mt8365_dai_configure_pcm1()
46 unsigned int fmt = pcm_priv->format; in mt8365_dai_configure_pcm1()
47 unsigned int bit_width = dai->sample_bits; in mt8365_dai_configure_pcm1()
66 /* TODO: add asrc setting */ in mt8365_dai_configure_pcm1()
77 switch (substream->runtime->rate) { in mt8365_dai_configure_pcm1()
91 return -EINVAL; in mt8365_dai_configure_pcm1()
101 regmap_update_bits(afe->regmap, PCM_INTF_CON1, in mt8365_dai_configure_pcm1()
140 dev_info(afe->dev, "%s '%s' active(%u-%u) already\n", in mt8365_dai_pcm1_prepare()
159 struct mt8365_afe_private *afe_priv = afe->platform_priv; in mt8365_dai_pcm1_set_fmt()
160 struct mt8365_pcm_intf_data *pcm_priv = afe_priv->dai_priv[MT8365_AFE_IO_PCM1]; in mt8365_dai_pcm1_set_fmt()
164 pcm_priv->format = MT8365_PCM_FORMAT_I2S; in mt8365_dai_pcm1_set_fmt()
167 return -EINVAL; in mt8365_dai_pcm1_set_fmt()
172 pcm_priv->bck_inv = false; in mt8365_dai_pcm1_set_fmt()
173 pcm_priv->lrck_inv = false; in mt8365_dai_pcm1_set_fmt()
176 pcm_priv->bck_inv = false; in mt8365_dai_pcm1_set_fmt()
177 pcm_priv->lrck_inv = true; in mt8365_dai_pcm1_set_fmt()
180 pcm_priv->bck_inv = true; in mt8365_dai_pcm1_set_fmt()
181 pcm_priv->lrck_inv = false; in mt8365_dai_pcm1_set_fmt()
184 pcm_priv->bck_inv = true; in mt8365_dai_pcm1_set_fmt()
185 pcm_priv->lrck_inv = true; in mt8365_dai_pcm1_set_fmt()
188 return -EINVAL; in mt8365_dai_pcm1_set_fmt()
193 pcm_priv->slave_mode = true; in mt8365_dai_pcm1_set_fmt()
196 pcm_priv->slave_mode = false; in mt8365_dai_pcm1_set_fmt()
199 return -EINVAL; in mt8365_dai_pcm1_set_fmt()
265 struct mt8365_afe_private *afe_priv = afe->platform_priv; in init_pcmif_priv_data()
268 pcmif_priv = devm_kzalloc(afe->dev, sizeof(struct mt8365_pcm_intf_data), in init_pcmif_priv_data()
271 return -ENOMEM; in init_pcmif_priv_data()
273 afe_priv->dai_priv[MT8365_AFE_IO_PCM1] = pcmif_priv; in init_pcmif_priv_data()
281 dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); in mt8365_dai_pcm_register()
283 return -ENOMEM; in mt8365_dai_pcm_register()
285 list_add(&dai->list, &afe->sub_dais); in mt8365_dai_pcm_register()
286 dai->dai_drivers = mtk_dai_pcm_driver; in mt8365_dai_pcm_register()
287 dai->num_dai_drivers = ARRAY_SIZE(mtk_dai_pcm_driver); in mt8365_dai_pcm_register()
288 dai->dapm_widgets = mtk_dai_pcm_widgets; in mt8365_dai_pcm_register()
289 dai->num_dapm_widgets = ARRAY_SIZE(mtk_dai_pcm_widgets); in mt8365_dai_pcm_register()
290 dai->dapm_routes = mtk_dai_pcm_routes; in mt8365_dai_pcm_register()
291 dai->num_dapm_routes = ARRAY_SIZE(mtk_dai_pcm_routes); in mt8365_dai_pcm_register()