Lines Matching refs:codec
204 static unsigned int ac97_read(struct snd_soc_codec *codec, unsigned int reg) in ac97_read() argument
206 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_read()
207 u16 *cache = codec->reg_cache; in ac97_read()
224 static int ac97_write(struct snd_soc_codec *codec, unsigned int reg, in ac97_write() argument
227 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_write()
228 u16 *cache = codec->reg_cache; in ac97_write()
241 struct snd_soc_codec *codec = dai->codec; in ac97_prepare() local
245 vra = ac97_read(codec, AC97_EXTENDED_STATUS); in ac97_prepare()
246 ac97_write(codec, AC97_EXTENDED_STATUS, vra | 0x1); in ac97_prepare()
253 return ac97_write(codec, reg, substream->runtime->rate); in ac97_prepare()
296 static int wm9705_reset(struct snd_soc_codec *codec) in wm9705_reset() argument
298 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in wm9705_reset()
302 if (ac97_read(codec, 0) == wm9705_reg[0]) in wm9705_reset()
306 dev_err(codec->dev, "Failed to reset: AC97 link error\n"); in wm9705_reset()
312 static int wm9705_soc_suspend(struct snd_soc_codec *codec) in wm9705_soc_suspend() argument
314 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in wm9705_soc_suspend()
321 static int wm9705_soc_resume(struct snd_soc_codec *codec) in wm9705_soc_resume() argument
323 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in wm9705_soc_resume()
325 u16 *cache = codec->reg_cache; in wm9705_soc_resume()
327 ret = wm9705_reset(codec); in wm9705_soc_resume()
342 static int wm9705_soc_probe(struct snd_soc_codec *codec) in wm9705_soc_probe() argument
347 ac97 = snd_soc_alloc_ac97_codec(codec); in wm9705_soc_probe()
350 dev_err(codec->dev, "Failed to register AC97 codec\n"); in wm9705_soc_probe()
354 ret = wm9705_reset(codec); in wm9705_soc_probe()
362 snd_soc_codec_set_drvdata(codec, ac97); in wm9705_soc_probe()
371 static int wm9705_soc_remove(struct snd_soc_codec *codec) in wm9705_soc_remove() argument
373 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in wm9705_soc_remove()