Lines Matching refs:adav80x

141 struct adav80x {  struct
215 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_dapm_sysclk_check() local
218 switch (adav80x->clk_src) { in adav80x_dapm_sysclk_check()
239 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_dapm_pll_check() local
241 return adav80x->pll_src == ADAV80X_PLL_SRC_XTAL; in adav80x_dapm_pll_check()
285 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_set_deemph() local
288 if (adav80x->deemph) { in adav80x_set_deemph()
289 switch (adav80x->rate) { in adav80x_set_deemph()
310 return regmap_update_bits(adav80x->regmap, ADAV80X_DAC_CTRL2, in adav80x_set_deemph()
318 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_put_deemph() local
324 adav80x->deemph = deemph; in adav80x_put_deemph()
333 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_get_deemph() local
335 ucontrol->value.integer.value[0] = adav80x->deemph; in adav80x_get_deemph()
368 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_set_dai_fmt() local
407 regmap_update_bits(adav80x->regmap, adav80x_port_ctrl_regs[dai->id][0], in adav80x_set_dai_fmt()
410 regmap_write(adav80x->regmap, adav80x_port_ctrl_regs[dai->id][1], in adav80x_set_dai_fmt()
413 adav80x->dai_fmt[dai->id] = fmt & SND_SOC_DAIFMT_FORMAT_MASK; in adav80x_set_dai_fmt()
421 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_set_adc_clock() local
429 regmap_update_bits(adav80x->regmap, ADAV80X_ADC_CTRL1, in adav80x_set_adc_clock()
438 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_set_dac_clock() local
446 regmap_update_bits(adav80x->regmap, ADAV80X_DAC_CTRL2, in adav80x_set_dac_clock()
456 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_set_capture_pcm_format() local
476 regmap_update_bits(adav80x->regmap, adav80x_port_ctrl_regs[dai->id][0], in adav80x_set_capture_pcm_format()
485 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_set_playback_pcm_format() local
488 if (adav80x->dai_fmt[dai->id] != SND_SOC_DAIFMT_RIGHT_J) in adav80x_set_playback_pcm_format()
508 regmap_update_bits(adav80x->regmap, adav80x_port_ctrl_regs[dai->id][1], in adav80x_set_playback_pcm_format()
518 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_hw_params() local
521 if (rate * 256 != adav80x->sysclk) in adav80x_hw_params()
531 adav80x->rate = rate; in adav80x_hw_params()
541 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_set_sysclk() local
556 adav80x->sysclk = freq; in adav80x_set_sysclk()
558 if (adav80x->clk_src != clk_id) { in adav80x_set_sysclk()
561 adav80x->clk_src = clk_id; in adav80x_set_sysclk()
570 regmap_write(adav80x->regmap, ADAV80X_ICLK_CTRL1, in adav80x_set_sysclk()
572 regmap_write(adav80x->regmap, ADAV80X_ICLK_CTRL2, in adav80x_set_sysclk()
593 regmap_update_bits(adav80x->regmap, ADAV80X_PLL_OUTE, in adav80x_set_sysclk()
595 adav80x->sysclk_pd[clk_id] = true; in adav80x_set_sysclk()
597 regmap_update_bits(adav80x->regmap, ADAV80X_PLL_OUTE, in adav80x_set_sysclk()
599 adav80x->sysclk_pd[clk_id] = false; in adav80x_set_sysclk()
604 if (adav80x->sysclk_pd[0]) in adav80x_set_sysclk()
609 if (adav80x->sysclk_pd[1] || adav80x->sysclk_pd[2]) in adav80x_set_sysclk()
626 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_set_pll() local
676 regmap_update_bits(adav80x->regmap, ADAV80X_PLL_CTRL1, in adav80x_set_pll()
678 regmap_update_bits(adav80x->regmap, ADAV80X_PLL_CTRL2, in adav80x_set_pll()
681 if (source != adav80x->pll_src) { in adav80x_set_pll()
687 regmap_update_bits(adav80x->regmap, ADAV80X_PLL_CLK_SRC, in adav80x_set_pll()
690 adav80x->pll_src = source; in adav80x_set_pll()
701 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_set_bias_level() local
710 regmap_update_bits(adav80x->regmap, ADAV80X_DAC_CTRL1, mask, in adav80x_set_bias_level()
714 regmap_update_bits(adav80x->regmap, ADAV80X_DAC_CTRL1, mask, in adav80x_set_bias_level()
727 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_dai_startup() local
729 if (!snd_soc_component_active(component) || !adav80x->rate) in adav80x_dai_startup()
733 SNDRV_PCM_HW_PARAM_RATE, adav80x->rate); in adav80x_dai_startup()
740 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_dai_shutdown() local
743 adav80x->rate = 0; in adav80x_dai_shutdown()
806 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_probe() local
813 regmap_write(adav80x->regmap, ADAV80X_PLL_OUTE, 0x20); in adav80x_probe()
815 regmap_write(adav80x->regmap, ADAV80X_DAC_CTRL3, 0x6); in adav80x_probe()
822 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); in adav80x_resume() local
824 regcache_sync(adav80x->regmap); in adav80x_resume()
849 struct adav80x *adav80x; in adav80x_bus_probe() local
854 adav80x = devm_kzalloc(dev, sizeof(*adav80x), GFP_KERNEL); in adav80x_bus_probe()
855 if (!adav80x) in adav80x_bus_probe()
858 dev_set_drvdata(dev, adav80x); in adav80x_bus_probe()
859 adav80x->regmap = regmap; in adav80x_bus_probe()