Lines Matching refs:codec
91 static unsigned int cx20442_read_reg_cache(struct snd_soc_codec *codec, in cx20442_read_reg_cache() argument
94 u8 *reg_cache = codec->reg_cache; in cx20442_read_reg_cache()
96 if (reg >= codec->driver->reg_cache_size) in cx20442_read_reg_cache()
155 static int cx20442_write(struct snd_soc_codec *codec, unsigned int reg, in cx20442_write() argument
158 struct cx20442_priv *cx20442 = snd_soc_codec_get_drvdata(codec); in cx20442_write()
159 u8 *reg_cache = codec->reg_cache; in cx20442_write()
163 if (reg >= codec->driver->reg_cache_size) in cx20442_write()
168 if (!codec->hw_write || !cx20442->control_data) in cx20442_write()
196 dev_dbg(codec->dev, "%s: %s\n", __func__, buf); in cx20442_write()
197 if (codec->hw_write(cx20442->control_data, buf, len) != len) in cx20442_write()
243 struct snd_soc_codec *codec = tty->disc_data; in v253_close() local
248 if (!codec) in v253_close()
251 cx20442 = snd_soc_codec_get_drvdata(codec); in v253_close()
254 codec->hw_write = NULL; in v253_close()
256 codec->component.card->pop_time = 0; in v253_close()
270 struct snd_soc_codec *codec = tty->disc_data; in v253_receive() local
273 if (!codec) in v253_receive()
276 cx20442 = snd_soc_codec_get_drvdata(codec); in v253_receive()
283 codec->hw_write = (hw_write_t)tty->ops->write; in v253_receive()
284 codec->component.card->pop_time = 1; in v253_receive()
328 static int cx20442_set_bias_level(struct snd_soc_codec *codec, in cx20442_set_bias_level() argument
331 struct cx20442_priv *cx20442 = snd_soc_codec_get_drvdata(codec); in cx20442_set_bias_level()
336 if (snd_soc_codec_get_bias_level(codec) != SND_SOC_BIAS_STANDBY) in cx20442_set_bias_level()
344 if (snd_soc_codec_get_bias_level(codec) != SND_SOC_BIAS_PREPARE) in cx20442_set_bias_level()
358 static int cx20442_codec_probe(struct snd_soc_codec *codec) in cx20442_codec_probe() argument
366 cx20442->por = regulator_get(codec->dev, "POR"); in cx20442_codec_probe()
368 dev_warn(codec->dev, "failed to get the regulator"); in cx20442_codec_probe()
371 snd_soc_codec_set_drvdata(codec, cx20442); in cx20442_codec_probe()
372 codec->hw_write = NULL; in cx20442_codec_probe()
373 codec->component.card->pop_time = 0; in cx20442_codec_probe()
379 static int cx20442_codec_remove(struct snd_soc_codec *codec) in cx20442_codec_remove() argument
381 struct cx20442_priv *cx20442 = snd_soc_codec_get_drvdata(codec); in cx20442_codec_remove()
393 snd_soc_codec_set_drvdata(codec, NULL); in cx20442_codec_remove()