Lines Matching refs:es8328

116 	struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component);  in es8328_set_deemph()  local
123 if (es8328->deemph) { in es8328_set_deemph()
126 if (abs(deemph_settings[i].rate - es8328->playback_fs) < in es8328_set_deemph()
127 abs(deemph_settings[best].rate - es8328->playback_fs)) in es8328_set_deemph()
146 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); in es8328_get_deemph() local
148 ucontrol->value.integer.value[0] = es8328->deemph; in es8328_get_deemph()
156 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); in es8328_put_deemph() local
163 if (es8328->deemph == deemph) in es8328_put_deemph()
170 es8328->deemph = deemph; in es8328_put_deemph()
465 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); in es8328_startup() local
467 if (es8328->provider && es8328->sysclk_constraints) in es8328_startup()
470 es8328->sysclk_constraints); in es8328_startup()
480 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); in es8328_hw_params() local
491 if (es8328->provider) { in es8328_hw_params()
492 if (!es8328->sysclk_constraints) { in es8328_hw_params()
497 for (i = 0; i < es8328->sysclk_constraints->count; i++) in es8328_hw_params()
498 if (es8328->sysclk_constraints->list[i] == in es8328_hw_params()
502 if (i == es8328->sysclk_constraints->count) { in es8328_hw_params()
508 ratio = es8328->mclk_ratios[i]; in es8328_hw_params()
511 es8328->mclkdiv2 = 0; in es8328_hw_params()
516 es8328->mclkdiv2 ? ES8328_MASTERMODE_MCLKDIV2 : 0); in es8328_hw_params()
543 es8328->playback_fs = params_rate(params); in es8328_hw_params()
557 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); in es8328_set_sysclk() local
569 es8328->sysclk_constraints = NULL; in es8328_set_sysclk()
570 es8328->mclk_ratios = NULL; in es8328_set_sysclk()
576 es8328->sysclk_constraints = &constraints_11289; in es8328_set_sysclk()
577 es8328->mclk_ratios = ratios_11289; in es8328_set_sysclk()
583 es8328->sysclk_constraints = &constraints_12288; in es8328_set_sysclk()
584 es8328->mclk_ratios = ratios_12288; in es8328_set_sysclk()
590 es8328->mclkdiv2 = mclkdiv2; in es8328_set_sysclk()
598 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); in es8328_set_dai_fmt() local
608 es8328->provider = true; in es8328_set_dai_fmt()
614 es8328->provider = false; in es8328_set_dai_fmt()
732 struct es8328_priv *es8328; in es8328_suspend() local
735 es8328 = snd_soc_component_get_drvdata(component); in es8328_suspend()
737 clk_disable_unprepare(es8328->clk); in es8328_suspend()
739 ret = regulator_bulk_disable(ARRAY_SIZE(es8328->supplies), in es8328_suspend()
740 es8328->supplies); in es8328_suspend()
751 struct es8328_priv *es8328; in es8328_resume() local
754 es8328 = snd_soc_component_get_drvdata(component); in es8328_resume()
756 ret = clk_prepare_enable(es8328->clk); in es8328_resume()
762 ret = regulator_bulk_enable(ARRAY_SIZE(es8328->supplies), in es8328_resume()
763 es8328->supplies); in es8328_resume()
781 struct es8328_priv *es8328; in es8328_component_probe() local
784 es8328 = snd_soc_component_get_drvdata(component); in es8328_component_probe()
786 ret = regulator_bulk_enable(ARRAY_SIZE(es8328->supplies), in es8328_component_probe()
787 es8328->supplies); in es8328_component_probe()
794 es8328->clk = devm_clk_get(component->dev, NULL); in es8328_component_probe()
795 if (IS_ERR(es8328->clk)) { in es8328_component_probe()
797 ret = PTR_ERR(es8328->clk); in es8328_component_probe()
801 ret = clk_prepare_enable(es8328->clk); in es8328_component_probe()
810 regulator_bulk_disable(ARRAY_SIZE(es8328->supplies), in es8328_component_probe()
811 es8328->supplies); in es8328_component_probe()
817 struct es8328_priv *es8328; in es8328_remove() local
819 es8328 = snd_soc_component_get_drvdata(component); in es8328_remove()
821 clk_disable_unprepare(es8328->clk); in es8328_remove()
823 regulator_bulk_disable(ARRAY_SIZE(es8328->supplies), in es8328_remove()
824 es8328->supplies); in es8328_remove()
857 struct es8328_priv *es8328; in es8328_probe() local
864 es8328 = devm_kzalloc(dev, sizeof(*es8328), GFP_KERNEL); in es8328_probe()
865 if (es8328 == NULL) in es8328_probe()
868 es8328->regmap = regmap; in es8328_probe()
870 for (i = 0; i < ARRAY_SIZE(es8328->supplies); i++) in es8328_probe()
871 es8328->supplies[i].supply = supply_names[i]; in es8328_probe()
873 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(es8328->supplies), in es8328_probe()
874 es8328->supplies); in es8328_probe()
880 dev_set_drvdata(dev, es8328); in es8328_probe()