Lines Matching refs:max9867
56 struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); in max9867_adc_dac_event() local
71 max9867->adc_dac_active |= BIT(adc_dac); in max9867_adc_dac_event()
73 max9867->adc_dac_active &= ~BIT(adc_dac); in max9867_adc_dac_event()
82 struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); in max9867_filter_get() local
86 ret = regmap_read(max9867->regmap, MAX9867_CODECFLTR, ®); in max9867_filter_get()
102 struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); in max9867_filter_set() local
110 if (max9867->adc_dac_active) in max9867_filter_set()
114 ret = regmap_read(max9867->regmap, MAX9867_CODECFLTR, ®); in max9867_filter_set()
126 regmap_update_bits(max9867->regmap, MAX9867_PWRMAN, in max9867_filter_set()
130 regmap_update_bits(max9867->regmap, MAX9867_CODECFLTR, in max9867_filter_set()
134 regmap_update_bits(max9867->regmap, MAX9867_PWRMAN, in max9867_filter_set()
315 struct max9867_priv *max9867 = in max9867_startup() local
318 if (max9867->constraints) in max9867_startup()
320 SNDRV_PCM_HW_PARAM_RATE, max9867->constraints); in max9867_startup()
331 struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); in max9867_dai_hw_params() local
333 max9867->pclk); in max9867_dai_hw_params()
336 regmap_update_bits(max9867->regmap, MAX9867_AUDIOCLKHIGH, in max9867_dai_hw_params()
338 regmap_update_bits(max9867->regmap, MAX9867_AUDIOCLKLOW, in max9867_dai_hw_params()
340 if (max9867->provider) { in max9867_dai_hw_params()
341 if (max9867->dsp_a) { in max9867_dai_hw_params()
345 ratio = max9867->pclk / rate; in max9867_dai_hw_params()
376 regmap_update_bits(max9867->regmap, MAX9867_IFC1B, in max9867_dai_hw_params()
384 switch (max9867->pclk) { in max9867_dai_hw_params()
405 regmap_update_bits(max9867->regmap, MAX9867_SYSCLK, in max9867_dai_hw_params()
412 regmap_update_bits(max9867->regmap, MAX9867_AUDIOCLKLOW, in max9867_dai_hw_params()
414 regmap_update_bits(max9867->regmap, MAX9867_AUDIOCLKHIGH, in max9867_dai_hw_params()
423 struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); in max9867_mute() local
425 return regmap_update_bits(max9867->regmap, MAX9867_DACLEVEL, in max9867_mute()
433 struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); in max9867_set_dai_sysclk() local
439 max9867->pclk = freq; in max9867_set_dai_sysclk()
442 max9867->pclk = freq / 2; in max9867_set_dai_sysclk()
445 max9867->pclk = freq / 4; in max9867_set_dai_sysclk()
453 max9867->constraints = &max9867_constraints_48k; in max9867_set_dai_sysclk()
455 max9867->constraints = &max9867_constraints_44k1; in max9867_set_dai_sysclk()
460 max9867->sysclk = freq; in max9867_set_dai_sysclk()
462 regmap_update_bits(max9867->regmap, MAX9867_SYSCLK, in max9867_set_dai_sysclk()
471 struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); in max9867_dai_set_fmt() local
476 max9867->provider = true; in max9867_dai_set_fmt()
481 max9867->provider = false; in max9867_dai_set_fmt()
490 max9867->dsp_a = false; in max9867_dai_set_fmt()
494 max9867->dsp_a = true; in max9867_dai_set_fmt()
518 regmap_write(max9867->regmap, MAX9867_IFC1A, iface1A); in max9867_dai_set_fmt()
519 regmap_update_bits(max9867->regmap, MAX9867_IFC1B, in max9867_dai_set_fmt()
579 struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); in max9867_set_bias_level() local
583 err = clk_prepare_enable(max9867->mclk); in max9867_set_bias_level()
589 err = regcache_sync(max9867->regmap); in max9867_set_bias_level()
593 err = regmap_write(max9867->regmap, in max9867_set_bias_level()
600 err = regmap_write(max9867->regmap, MAX9867_PWRMAN, 0); in max9867_set_bias_level()
604 regcache_mark_dirty(max9867->regmap); in max9867_set_bias_level()
605 clk_disable_unprepare(max9867->mclk); in max9867_set_bias_level()
652 struct max9867_priv *max9867; in max9867_i2c_probe() local
655 max9867 = devm_kzalloc(&i2c->dev, sizeof(*max9867), GFP_KERNEL); in max9867_i2c_probe()
656 if (!max9867) in max9867_i2c_probe()
659 i2c_set_clientdata(i2c, max9867); in max9867_i2c_probe()
660 max9867->regmap = devm_regmap_init_i2c(i2c, &max9867_regmap); in max9867_i2c_probe()
661 if (IS_ERR(max9867->regmap)) { in max9867_i2c_probe()
662 ret = PTR_ERR(max9867->regmap); in max9867_i2c_probe()
666 ret = regmap_read(max9867->regmap, MAX9867_REVISION, ®); in max9867_i2c_probe()
679 max9867->mclk = devm_clk_get(&i2c->dev, NULL); in max9867_i2c_probe()
680 if (IS_ERR(max9867->mclk)) in max9867_i2c_probe()
681 return PTR_ERR(max9867->mclk); in max9867_i2c_probe()