Lines Matching refs:ad1836
166 struct ad1836_priv *ad1836 = snd_soc_component_get_drvdata(dai->component); in ad1836_hw_params() local
185 regmap_update_bits(ad1836->regmap, AD1836_DAC_CTRL1, in ad1836_hw_params()
189 regmap_update_bits(ad1836->regmap, AD1836_ADC_CTRL2, in ad1836_hw_params()
232 struct ad1836_priv *ad1836 = snd_soc_component_get_drvdata(component); in ad1836_suspend() local
234 return regmap_update_bits(ad1836->regmap, AD1836_ADC_CTRL2, in ad1836_suspend()
240 struct ad1836_priv *ad1836 = snd_soc_component_get_drvdata(component); in ad1836_resume() local
242 return regmap_update_bits(ad1836->regmap, AD1836_ADC_CTRL2, in ad1836_resume()
252 struct ad1836_priv *ad1836 = snd_soc_component_get_drvdata(component); in ad1836_probe() local
258 num_dacs = ad183x_dais[ad1836->type].playback.channels_max / 2; in ad1836_probe()
259 num_adcs = ad183x_dais[ad1836->type].capture.channels_max / 2; in ad1836_probe()
263 regmap_write(ad1836->regmap, AD1836_DAC_CTRL1, 0x300); in ad1836_probe()
265 regmap_write(ad1836->regmap, AD1836_DAC_CTRL2, 0x0); in ad1836_probe()
267 regmap_write(ad1836->regmap, AD1836_ADC_CTRL1, 0x100); in ad1836_probe()
269 regmap_write(ad1836->regmap, AD1836_ADC_CTRL2, 0x180); in ad1836_probe()
272 regmap_write(ad1836->regmap, AD1836_DAC_L_VOL(i), 0x3FF); in ad1836_probe()
273 regmap_write(ad1836->regmap, AD1836_DAC_R_VOL(i), 0x3FF); in ad1836_probe()
276 if (ad1836->type == AD1836) { in ad1836_probe()
278 regmap_write(ad1836->regmap, AD1836_ADC_CTRL3, 0x3A); in ad1836_probe()
284 regmap_write(ad1836->regmap, AD1836_ADC_CTRL3, 0x00); in ad1836_probe()
317 struct ad1836_priv *ad1836 = snd_soc_component_get_drvdata(component); in ad1836_remove() local
319 regmap_update_bits(ad1836->regmap, AD1836_ADC_CTRL2, in ad1836_remove()
369 struct ad1836_priv *ad1836; in ad1836_spi_probe() local
372 ad1836 = devm_kzalloc(&spi->dev, sizeof(struct ad1836_priv), in ad1836_spi_probe()
374 if (ad1836 == NULL) in ad1836_spi_probe()
377 ad1836->regmap = devm_regmap_init_spi(spi, &ad1836_regmap_config); in ad1836_spi_probe()
378 if (IS_ERR(ad1836->regmap)) in ad1836_spi_probe()
379 return PTR_ERR(ad1836->regmap); in ad1836_spi_probe()
381 ad1836->type = spi_get_device_id(spi)->driver_data; in ad1836_spi_probe()
383 spi_set_drvdata(spi, ad1836); in ad1836_spi_probe()
386 &soc_component_dev_ad1836, &ad183x_dais[ad1836->type], 1); in ad1836_spi_probe()