Lines Matching refs:priv
158 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_set_deemph() local
161 if (priv->deemph) in tas5086_set_deemph()
163 if (tas5086_deemph[i] == priv->rate) in tas5086_set_deemph()
166 return regmap_update_bits(priv->regmap, TAS5086_SYS_CONTROL_1, in tas5086_set_deemph()
174 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_get_deemph() local
176 ucontrol->value.enumerated.item[0] = priv->deemph; in tas5086_get_deemph()
185 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_put_deemph() local
187 priv->deemph = ucontrol->value.enumerated.item[0]; in tas5086_put_deemph()
197 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_set_dai_sysclk() local
201 priv->mclk = freq; in tas5086_set_dai_sysclk()
204 priv->sclk = freq; in tas5086_set_dai_sysclk()
215 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_set_dai_fmt() local
224 priv->format = format; in tas5086_set_dai_fmt()
253 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_hw_params() local
257 priv->rate = params_rate(params); in tas5086_hw_params()
261 ARRAY_SIZE(tas5086_sample_rates), priv->rate); in tas5086_hw_params()
268 ret = regmap_update_bits(priv->regmap, TAS5086_CLOCK_CONTROL, in tas5086_hw_params()
276 priv->mclk / priv->rate); in tas5086_hw_params()
282 ret = regmap_update_bits(priv->regmap, TAS5086_CLOCK_CONTROL, in tas5086_hw_params()
289 ret = regmap_update_bits(priv->regmap, TAS5086_CLOCK_CONTROL, in tas5086_hw_params()
291 (priv->sclk == 48 * priv->rate) ? in tas5086_hw_params()
304 switch (priv->format & SND_SOC_DAIFMT_FORMAT_MASK) { in tas5086_hw_params()
335 ret = regmap_write(priv->regmap, TAS5086_SERIAL_DATA_IF, val); in tas5086_hw_params()
340 ret = regmap_update_bits(priv->regmap, TAS5086_CLOCK_CONTROL, in tas5086_hw_params()
351 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_mute_stream() local
357 return regmap_write(priv->regmap, TAS5086_SOFT_MUTE, val); in tas5086_mute_stream()
401 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_soc_resume() local
404 return regcache_sync(priv->regmap); in tas5086_soc_resume()
427 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_probe() local
438 regmap_write(priv->regmap, TAS5086_SPLIT_CAP_CHARGE, 0); in tas5086_probe()
444 regmap_write(priv->regmap, TAS5086_SPLIT_CAP_CHARGE, in tas5086_probe()
453 ret = regmap_write(priv->regmap, TAS5086_OSC_TRIM, 0x00); in tas5086_probe()
458 ret = regmap_write(priv->regmap, TAS5086_SYS_CONTROL_2, 0x20); in tas5086_probe()
463 ret = regmap_write(priv->regmap, TAS5086_MASTER_VOL, 0x30); in tas5086_probe()
468 ret = regmap_write(priv->regmap, TAS5086_SOFT_MUTE, in tas5086_probe()
478 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_remove() local
480 if (gpio_is_valid(priv->gpio_nreset)) in tas5086_remove()
482 gpio_set_value(priv->gpio_nreset, 0); in tas5086_remove()
516 struct tas5086_private *priv; in tas5086_i2c_probe() local
521 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); in tas5086_i2c_probe()
522 if (!priv) in tas5086_i2c_probe()
525 priv->regmap = devm_regmap_init_i2c(i2c, &tas5086_regmap); in tas5086_i2c_probe()
526 if (IS_ERR(priv->regmap)) { in tas5086_i2c_probe()
527 ret = PTR_ERR(priv->regmap); in tas5086_i2c_probe()
532 i2c_set_clientdata(i2c, priv); in tas5086_i2c_probe()
553 priv->gpio_nreset = gpio_nreset; in tas5086_i2c_probe()
556 ret = regmap_read(priv->regmap, TAS5086_DEV_ID, &i); in tas5086_i2c_probe()