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

1 // SPDX-License-Identifier: GPL-2.0-only OR MIT
101 // The specced range is -71.25...24.00 dB with step size of 0.375 dB,
102 // and a mute item below that. This is represented by -71.62...24.00 dB
103 // with the mute item mapped onto the low end.
104 static DECLARE_TLV_DB_MINMAX_MUTE(ssm3515_dac_volume, -7162, 2400);
141 dev_err(component->dev, "device reports:%s%s%s%s%s%s%s\n", in ssm3515_read_faults()
145 FIELD_GET(SSM3515_STATUS_AMP_OC, ret) ? " amp over-current fault" : "", in ssm3515_read_faults()
161 /* Disable the 'master power-down' */ in ssm3515_probe()
170 static int ssm3515_mute(struct snd_soc_dai *dai, int mute, int direction) in ssm3515_mute() argument
174 ret = snd_soc_component_update_bits(dai->component, in ssm3515_mute()
185 struct snd_soc_dai *dai) in ssm3515_hw_params() argument
187 struct snd_soc_component *component = dai->component; in ssm3515_hw_params()
202 return -EINVAL; in ssm3515_hw_params()
225 return -EINVAL; in ssm3515_hw_params()
237 static int ssm3515_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) in ssm3515_set_fmt() argument
239 struct snd_soc_component *component = dai->component; in ssm3515_set_fmt()
240 bool fpol_inv = false; /* non-inverted: frame starts with low-to-high FSYNC */ in ssm3515_set_fmt()
261 return -EINVAL; in ssm3515_set_fmt()
271 /* Set the serial input to 'TDM mode' */ in ssm3515_set_fmt()
276 * We configure the codec in a 'TDM mode', in which the in ssm3515_set_fmt()
282 * the FSYNC polarity, so go with that. in ssm3515_set_fmt()
296 static int ssm3515_set_tdm_slot(struct snd_soc_dai *dai, in ssm3515_set_tdm_slot() argument
301 struct snd_soc_component *component = dai->component; in ssm3515_set_tdm_slot()
302 int slot, tdm_bclks_val, ret; in ssm3515_set_tdm_slot() local
305 return -EINVAL; in ssm3515_set_tdm_slot()
307 slot = __ffs(tx_mask); in ssm3515_set_tdm_slot()
309 if (tx_mask & ~BIT(slot)) in ssm3515_set_tdm_slot()
310 return -EINVAL; in ssm3515_set_tdm_slot()
329 return -EINVAL; in ssm3515_set_tdm_slot()
340 FIELD_PREP(SSM3515_SAI2_TDM_SLOT, slot)); in ssm3515_set_tdm_slot()
348 struct snd_soc_dai *dai) in ssm3515_hw_free() argument
355 ssm3515_read_faults(dai->component); in ssm3515_hw_free()
406 data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); in ssm3515_i2c_probe()
408 return -ENOMEM; in ssm3515_i2c_probe()
410 data->dev = &client->dev; in ssm3515_i2c_probe()
413 data->regmap = devm_regmap_init_i2c(client, &ssm3515_i2c_regmap); in ssm3515_i2c_probe()
414 if (IS_ERR(data->regmap)) in ssm3515_i2c_probe()
415 return dev_err_probe(data->dev, PTR_ERR(data->regmap), in ssm3515_i2c_probe()
419 ret = regmap_update_bits(data->regmap, SSM3515_PWR, in ssm3515_i2c_probe()
422 return dev_err_probe(data->dev, ret, in ssm3515_i2c_probe()
424 regmap_reinit_cache(data->regmap, &ssm3515_i2c_regmap); in ssm3515_i2c_probe()
426 return devm_snd_soc_register_component(data->dev, in ssm3515_i2c_probe()