Lines Matching refs:es8328

117 	struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component);  in es8328_set_deemph()  local
124 if (es8328->deemph) { in es8328_set_deemph()
127 if (abs(deemph_settings[i].rate - es8328->playback_fs) < in es8328_set_deemph()
128 abs(deemph_settings[best].rate - es8328->playback_fs)) in es8328_set_deemph()
147 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); in es8328_get_deemph() local
149 ucontrol->value.integer.value[0] = es8328->deemph; in es8328_get_deemph()
157 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); in es8328_put_deemph() local
168 es8328->deemph = deemph; in es8328_put_deemph()
463 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); in es8328_startup() local
465 if (es8328->master && es8328->sysclk_constraints) in es8328_startup()
468 es8328->sysclk_constraints); in es8328_startup()
478 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); in es8328_hw_params() local
489 if (es8328->master) { in es8328_hw_params()
490 if (!es8328->sysclk_constraints) { in es8328_hw_params()
495 for (i = 0; i < es8328->sysclk_constraints->count; i++) in es8328_hw_params()
496 if (es8328->sysclk_constraints->list[i] == in es8328_hw_params()
500 if (i == es8328->sysclk_constraints->count) { in es8328_hw_params()
506 ratio = es8328->mclk_ratios[i]; in es8328_hw_params()
509 es8328->mclkdiv2 = 0; in es8328_hw_params()
514 es8328->mclkdiv2 ? ES8328_MASTERMODE_MCLKDIV2 : 0); in es8328_hw_params()
541 es8328->playback_fs = params_rate(params); in es8328_hw_params()
555 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); in es8328_set_sysclk() local
560 es8328->sysclk_constraints = NULL; in es8328_set_sysclk()
561 es8328->mclk_ratios = NULL; in es8328_set_sysclk()
567 es8328->sysclk_constraints = &constraints_11289; in es8328_set_sysclk()
568 es8328->mclk_ratios = ratios_11289; in es8328_set_sysclk()
574 es8328->sysclk_constraints = &constraints_12288; in es8328_set_sysclk()
575 es8328->mclk_ratios = ratios_12288; in es8328_set_sysclk()
581 es8328->mclkdiv2 = mclkdiv2; in es8328_set_sysclk()
589 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); in es8328_set_dai_fmt() local
599 es8328->master = true; in es8328_set_dai_fmt()
605 es8328->master = false; in es8328_set_dai_fmt()
722 struct es8328_priv *es8328; in es8328_suspend() local
725 es8328 = snd_soc_component_get_drvdata(component); in es8328_suspend()
727 clk_disable_unprepare(es8328->clk); in es8328_suspend()
729 ret = regulator_bulk_disable(ARRAY_SIZE(es8328->supplies), in es8328_suspend()
730 es8328->supplies); in es8328_suspend()
741 struct es8328_priv *es8328; in es8328_resume() local
744 es8328 = snd_soc_component_get_drvdata(component); in es8328_resume()
746 ret = clk_prepare_enable(es8328->clk); in es8328_resume()
752 ret = regulator_bulk_enable(ARRAY_SIZE(es8328->supplies), in es8328_resume()
753 es8328->supplies); in es8328_resume()
771 struct es8328_priv *es8328; in es8328_component_probe() local
774 es8328 = snd_soc_component_get_drvdata(component); in es8328_component_probe()
776 ret = regulator_bulk_enable(ARRAY_SIZE(es8328->supplies), in es8328_component_probe()
777 es8328->supplies); in es8328_component_probe()
784 es8328->clk = devm_clk_get(component->dev, NULL); in es8328_component_probe()
785 if (IS_ERR(es8328->clk)) { in es8328_component_probe()
787 ret = PTR_ERR(es8328->clk); in es8328_component_probe()
791 ret = clk_prepare_enable(es8328->clk); in es8328_component_probe()
800 regulator_bulk_disable(ARRAY_SIZE(es8328->supplies), in es8328_component_probe()
801 es8328->supplies); in es8328_component_probe()
807 struct es8328_priv *es8328; in es8328_remove() local
809 es8328 = snd_soc_component_get_drvdata(component); in es8328_remove()
811 if (es8328->clk) in es8328_remove()
812 clk_disable_unprepare(es8328->clk); in es8328_remove()
814 regulator_bulk_disable(ARRAY_SIZE(es8328->supplies), in es8328_remove()
815 es8328->supplies); in es8328_remove()
849 struct es8328_priv *es8328; in es8328_probe() local
856 es8328 = devm_kzalloc(dev, sizeof(*es8328), GFP_KERNEL); in es8328_probe()
857 if (es8328 == NULL) in es8328_probe()
860 es8328->regmap = regmap; in es8328_probe()
862 for (i = 0; i < ARRAY_SIZE(es8328->supplies); i++) in es8328_probe()
863 es8328->supplies[i].supply = supply_names[i]; in es8328_probe()
865 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(es8328->supplies), in es8328_probe()
866 es8328->supplies); in es8328_probe()
872 dev_set_drvdata(dev, es8328); in es8328_probe()