Lines Matching defs:cfg

148         I2S_PRINT_LOG_ERR("%s: cntlr priv or cfg is NULL", __func__);
157 I2S_PRINT_LOG_ERR("%s: cntlr priv or cfg is NULL", __func__);
183 static int32_t Hi35xxI2sGetCfg(struct I2sCntlr *cntlr, struct I2sCfg *cfg)
185 if (cntlr == NULL || cntlr->priv == NULL || cfg == NULL) {
186 I2S_PRINT_LOG_ERR("%s: cntlr priv or cfg is NULL", __func__);
192 cfg->sampleRate = i2sCfg->sampleRate;
193 cfg->width = i2sCfg->width;
194 cfg->writeChannel = i2sCfg->writeChannel;
195 cfg->channelIfMode = i2sCfg->channelIfMode;
196 cfg->channelMode = i2sCfg->channelMode;
197 AudioCodecGetCfgI2slFsSel(i2sCfg->i2slFsSel, &cfg->i2slFsSel);
199 cfg->bclk = i2sCfg->bclk;
200 cfg->mclk = i2sCfg->mclk;
201 cfg->type = i2sCfg->type;
202 cfg->samplePrecision = i2sCfg->samplePrecision;
206 cfg->writeChannel, cfg->i2slFsSel, cfg->mclk, cfg->bclk, cfg->sampleRate,
207 cfg->type, cfg->channelMode, cfg->channelIfMode, cfg->samplePrecision);
211 static int32_t Hi35xxI2sSetCfg(struct I2sCntlr *cntlr, struct I2sCfg *cfg)
215 if (cntlr == NULL || cntlr->priv == NULL || cfg == NULL) {
216 I2S_PRINT_LOG_ERR("%s: cntlr priv or cfg is NULL", __func__);
224 cfg->writeChannel, cfg->i2slFsSel, cfg->mclk, cfg->bclk, cfg->sampleRate,
225 cfg->type, cfg->channelMode, cfg->channelIfMode, cfg->samplePrecision);
228 i2sCfg->writeChannel = cfg->writeChannel;
229 if (AudioCodecSetCfgI2slFsSel(&i2sCfg->i2slFsSel, cfg->i2slFsSel) != HDF_SUCCESS) {
234 Hi35xxSetAudioCodec(i2sCfg, cfg->sampleRate, cfg->width);
235 i2sCfg->mclk = cfg->mclk;
236 i2sCfg->bclk = cfg->bclk;
237 int32_t rate = Hi35xxSampleRateShift(cfg->sampleRate);
242 if (Hi35xxSetCfgAiaoFsclkDiv(&i2sCfg->regCfg100.aiaoFsclkDiv, (cfg->bclk / rate)) != 0) {
246 if (Hi35xxSetCfgAiaoBclkDiv(&i2sCfg->regCfg100.aiaoBclkDiv, (cfg->mclk / cfg->bclk)) != 0) {
254 i2sCfg->type = cfg->type;
255 if (AiaoGetRxIfAttri(i2sCfg, cfg->type, cfg->channelMode, cfg->channelIfMode, cfg->samplePrecision)
262 CfgSetI2sCrgCfg000(i2sCfg, cfg->i2slFsSel, cfg->sampleRate);
267 CfgSetI2sCrgCfg008(i2sCfg, cfg->i2slFsSel, cfg->sampleRate);
277 I2S_PRINT_LOG_ERR("%s: cntlr priv or cfg is NULL", __func__);
304 I2S_PRINT_LOG_ERR("%s: cntlr priv or cfg is NULL", __func__);
347 I2S_PRINT_LOG_ERR("%s: cntlr priv or cfg is NULL", __func__);
374 I2S_PRINT_LOG_ERR("%s: cntlr priv or cfg is NULL", __func__);