Lines Matching refs:wm8960
2 * wm8960.c -- WM8960 ALSA SoC Audio driver
26 #include <sound/wm8960.h>
28 #include "wm8960.h"
30 #define AUDIO_NAME "wm8960"
55 * wm8960 register cache
109 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
115 if (wm8960->deemph) {
118 if (abs(deemph_settings[i] - wm8960->playback_fs) <
119 abs(deemph_settings[best] - wm8960->playback_fs))
138 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
140 ucontrol->value.enumerated.item[0] = wm8960->deemph;
148 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
154 wm8960->deemph = deemph;
390 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
422 wm8960->lout1 = w;
424 wm8960->rout1 = w;
426 wm8960->out3 = w;
513 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
531 wm8960->playback_fs = params_rate(params);
622 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
641 if (wm8960->lout1 && wm8960->lout1->power)
643 if (wm8960->rout1 && wm8960->rout1->power)
645 if (wm8960->out3 && wm8960->out3->power)
967 static int wm8960_register(struct wm8960_priv *wm8960,
970 struct wm8960_data *pdata = wm8960->codec.dev->platform_data;
971 struct snd_soc_codec *codec = &wm8960->codec;
999 snd_soc_codec_set_drvdata(codec, wm8960);
1006 codec->reg_cache = &wm8960->reg_cache;
1067 kfree(wm8960);
1071 static void wm8960_unregister(struct wm8960_priv *wm8960)
1073 wm8960->codec.set_bias_level(&wm8960->codec, SND_SOC_BIAS_OFF);
1075 snd_soc_unregister_codec(&wm8960->codec);
1076 kfree(wm8960);
1083 struct wm8960_priv *wm8960;
1086 wm8960 = kzalloc(sizeof(struct wm8960_priv), GFP_KERNEL);
1087 if (wm8960 == NULL)
1090 codec = &wm8960->codec;
1092 i2c_set_clientdata(i2c, wm8960);
1097 return wm8960_register(wm8960, SND_SOC_I2C);
1102 struct wm8960_priv *wm8960 = i2c_get_clientdata(client);
1103 wm8960_unregister(wm8960);
1108 { "wm8960", 0 },
1115 .name = "wm8960",