Lines Matching refs:priv
338 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_ep_drv_event() local
343 priv->hs_power_mode_locked = 1; in twl6040_ep_drv_event()
346 priv->hs_power_mode_locked = 0; in twl6040_ep_drv_event()
347 ret = headset_power_mode(codec, priv->hs_power_mode); in twl6040_ep_drv_event()
358 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_hs_jack_report() local
361 mutex_lock(&priv->mutex); in twl6040_hs_jack_report()
370 mutex_unlock(&priv->mutex); in twl6040_hs_jack_report()
376 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_hs_jack_detect() local
377 struct twl6040_jack_data *hs_jack = &priv->hs_jack; in twl6040_hs_jack_detect()
388 struct twl6040_data *priv = container_of(work, in twl6040_accessory_work() local
390 struct snd_soc_codec *codec = priv->codec; in twl6040_accessory_work()
391 struct twl6040_jack_data *hs_jack = &priv->hs_jack; in twl6040_accessory_work()
400 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_audio_handler() local
402 schedule_delayed_work(&priv->hs_jack.work, msecs_to_jiffies(200)); in twl6040_audio_handler()
561 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_headset_power_get_enum() local
563 ucontrol->value.enumerated.item[0] = priv->hs_power_mode; in twl6040_headset_power_get_enum()
572 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_headset_power_put_enum() local
576 if (!priv->hs_power_mode_locked) in twl6040_headset_power_put_enum()
580 priv->hs_power_mode = high_perf; in twl6040_headset_power_put_enum()
589 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_pll_get_enum() local
591 ucontrol->value.enumerated.item[0] = priv->pll_power_mode; in twl6040_pll_get_enum()
600 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_pll_put_enum() local
602 priv->pll_power_mode = ucontrol->value.enumerated.item[0]; in twl6040_pll_put_enum()
631 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_get_clk_id() local
633 return priv->pll_power_mode; in twl6040_get_clk_id()
899 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_set_bias_level() local
908 if (priv->codec_powered) in twl6040_set_bias_level()
915 priv->codec_powered = 1; in twl6040_set_bias_level()
923 if (!priv->codec_powered) in twl6040_set_bias_level()
927 priv->codec_powered = 0; in twl6040_set_bias_level()
940 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_startup() local
944 &sysclk_constraints[priv->pll_power_mode]); in twl6040_startup()
954 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_hw_params() local
964 if (unlikely(priv->pll == TWL6040_SYSCLK_SEL_HPPLL)) { in twl6040_hw_params()
969 priv->sysclk = 17640000; in twl6040_hw_params()
976 priv->sysclk = 19200000; in twl6040_hw_params()
991 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_prepare() local
994 if (!priv->sysclk) { in twl6040_prepare()
1000 ret = twl6040_set_pll(twl6040, priv->pll, priv->clk_in, priv->sysclk); in twl6040_prepare()
1013 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_set_dai_sysclk() local
1018 priv->pll = clk_id; in twl6040_set_dai_sysclk()
1019 priv->clk_in = freq; in twl6040_set_dai_sysclk()
1122 struct twl6040_data *priv; in twl6040_probe() local
1127 priv = devm_kzalloc(codec->dev, sizeof(*priv), GFP_KERNEL); in twl6040_probe()
1128 if (priv == NULL) in twl6040_probe()
1131 snd_soc_codec_set_drvdata(codec, priv); in twl6040_probe()
1133 priv->codec = codec; in twl6040_probe()
1136 priv->plug_irq = platform_get_irq(pdev, 0); in twl6040_probe()
1137 if (priv->plug_irq < 0) { in twl6040_probe()
1142 INIT_DELAYED_WORK(&priv->hs_jack.work, twl6040_accessory_work); in twl6040_probe()
1144 mutex_init(&priv->mutex); in twl6040_probe()
1146 ret = devm_request_threaded_irq(codec->dev, priv->plug_irq, NULL, in twl6040_probe()