Lines Matching +full:rates +full:- +full:ru

1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * Author: Alexander Shiyan <shc_work@mail.ru>
48 struct snd_soc_component *component = dai->component; in cs4341_set_fmt()
55 return -EINVAL; in cs4341_set_fmt()
62 return -EINVAL; in cs4341_set_fmt()
69 cs4341->fmt = format & SND_SOC_DAIFMT_FORMAT_MASK; in cs4341_set_fmt()
72 return -EINVAL; in cs4341_set_fmt()
82 struct snd_soc_component *component = dai->component; in cs4341_hw_params()
94 dev_err(component->dev, "Unsupported PCM format 0x%08x.\n", in cs4341_hw_params()
96 return -EINVAL; in cs4341_hw_params()
99 switch (cs4341->fmt) { in cs4341_hw_params()
110 dev_err(component->dev, "Unsupported DAI format 0x%08x.\n", in cs4341_hw_params()
111 cs4341->fmt); in cs4341_hw_params()
112 return -EINVAL; in cs4341_hw_params()
121 struct snd_soc_component *component = dai->component; in cs4341_mute()
135 static DECLARE_TLV_DB_SCALE(out_tlv, -9000, 100, 0);
168 SOC_ENUM("De-Emphasis Control", deemph_enum),
170 SOC_SINGLE("Auto-Mute Switch", CS4341_REG_MODE2, 7, 1, 0),
182 .name = "cs4341a-hifi",
187 .rates = SNDRV_PCM_RATE_8000_96000,
219 regmap_write(cs4341->regmap, cs4341_reg_defaults[i].reg, in cs4341_probe()
231 cs4341 = devm_kzalloc(&i2c->dev, sizeof(*cs4341), GFP_KERNEL); in cs4341_i2c_probe()
233 return -ENOMEM; in cs4341_i2c_probe()
237 cs4341->regcfg.reg_bits = 8; in cs4341_i2c_probe()
238 cs4341->regcfg.val_bits = 8; in cs4341_i2c_probe()
239 cs4341->regcfg.max_register = CS4341_REG_VOLB; in cs4341_i2c_probe()
240 cs4341->regcfg.cache_type = REGCACHE_FLAT; in cs4341_i2c_probe()
241 cs4341->regcfg.reg_defaults = cs4341_reg_defaults; in cs4341_i2c_probe()
242 cs4341->regcfg.num_reg_defaults = ARRAY_SIZE(cs4341_reg_defaults); in cs4341_i2c_probe()
243 cs4341->regmap = devm_regmap_init_i2c(i2c, &cs4341->regcfg); in cs4341_i2c_probe()
244 if (IS_ERR(cs4341->regmap)) in cs4341_i2c_probe()
245 return PTR_ERR(cs4341->regmap); in cs4341_i2c_probe()
247 return cs4341_probe(&i2c->dev); in cs4341_i2c_probe()
258 .name = "cs4341-i2c",
277 cs4341 = devm_kzalloc(&spi->dev, sizeof(*cs4341), GFP_KERNEL); in cs4341_spi_probe()
279 return -ENOMEM; in cs4341_spi_probe()
281 if (!spi->bits_per_word) in cs4341_spi_probe()
282 spi->bits_per_word = 8; in cs4341_spi_probe()
283 if (!spi->max_speed_hz) in cs4341_spi_probe()
284 spi->max_speed_hz = 6000000; in cs4341_spi_probe()
291 cs4341->regcfg.reg_bits = 16; in cs4341_spi_probe()
292 cs4341->regcfg.val_bits = 8; in cs4341_spi_probe()
293 cs4341->regcfg.write_flag_mask = 0x20; in cs4341_spi_probe()
294 cs4341->regcfg.max_register = CS4341_REG_VOLB; in cs4341_spi_probe()
295 cs4341->regcfg.cache_type = REGCACHE_FLAT; in cs4341_spi_probe()
296 cs4341->regcfg.readable_reg = cs4341_reg_readable; in cs4341_spi_probe()
297 cs4341->regcfg.reg_defaults = cs4341_reg_defaults; in cs4341_spi_probe()
298 cs4341->regcfg.num_reg_defaults = ARRAY_SIZE(cs4341_reg_defaults); in cs4341_spi_probe()
299 cs4341->regmap = devm_regmap_init_spi(spi, &cs4341->regcfg); in cs4341_spi_probe()
300 if (IS_ERR(cs4341->regmap)) in cs4341_spi_probe()
301 return PTR_ERR(cs4341->regmap); in cs4341_spi_probe()
303 return cs4341_probe(&spi->dev); in cs4341_spi_probe()
314 .name = "cs4341-spi",
350 MODULE_AUTHOR("Alexander Shiyan <shc_work@mail.ru>");