wm8990.c (f652f6c5b7cfdf139f4155d78f397e99ae1c4acc) | wm8990.c (7ebcf5d6021a696680ee77d9162a2edec2d671dd) |
---|---|
1/* 2 * wm8990.c -- WM8990 ALSA Soc Audio driver 3 * 4 * Copyright 2008 Wolfson Microelectronics PLC. 5 * Author: Liam Girdwood <lrg@slimlogic.co.uk> 6 * 7 * This program is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU General Public License as published by the --- 1169 unchanged lines hidden (view full) --- 1178 WM8990_DIS_ROUT); 1179 1180 /* Enable POBCTRL, SOFT_ST, VMIDTOG and BUFDCOPEN */ 1181 snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | 1182 WM8990_BUFDCOPEN | WM8990_POBCTRL | 1183 WM8990_VMIDTOG); 1184 1185 /* Delay to allow output caps to discharge */ | 1/* 2 * wm8990.c -- WM8990 ALSA Soc Audio driver 3 * 4 * Copyright 2008 Wolfson Microelectronics PLC. 5 * Author: Liam Girdwood <lrg@slimlogic.co.uk> 6 * 7 * This program is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU General Public License as published by the --- 1169 unchanged lines hidden (view full) --- 1178 WM8990_DIS_ROUT); 1179 1180 /* Enable POBCTRL, SOFT_ST, VMIDTOG and BUFDCOPEN */ 1181 snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | 1182 WM8990_BUFDCOPEN | WM8990_POBCTRL | 1183 WM8990_VMIDTOG); 1184 1185 /* Delay to allow output caps to discharge */ |
1186 msleep(msecs_to_jiffies(300)); | 1186 msleep(300); |
1187 1188 /* Disable VMIDTOG */ 1189 snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | 1190 WM8990_BUFDCOPEN | WM8990_POBCTRL); 1191 1192 /* disable all output discharge bits */ 1193 snd_soc_write(codec, WM8990_ANTIPOP1, 0); 1194 1195 /* Enable outputs */ 1196 snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1b00); 1197 | 1187 1188 /* Disable VMIDTOG */ 1189 snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | 1190 WM8990_BUFDCOPEN | WM8990_POBCTRL); 1191 1192 /* disable all output discharge bits */ 1193 snd_soc_write(codec, WM8990_ANTIPOP1, 0); 1194 1195 /* Enable outputs */ 1196 snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1b00); 1197 |
1198 msleep(msecs_to_jiffies(50)); | 1198 msleep(50); |
1199 1200 /* Enable VMID at 2x50k */ 1201 snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f02); 1202 | 1199 1200 /* Enable VMID at 2x50k */ 1201 snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f02); 1202 |
1203 msleep(msecs_to_jiffies(100)); | 1203 msleep(100); |
1204 1205 /* Enable VREF */ 1206 snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f03); 1207 | 1204 1205 /* Enable VREF */ 1206 snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f03); 1207 |
1208 msleep(msecs_to_jiffies(600)); | 1208 msleep(600); |
1209 1210 /* Enable BUFIOEN */ 1211 snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | 1212 WM8990_BUFDCOPEN | WM8990_POBCTRL | 1213 WM8990_BUFIOEN); 1214 1215 /* Disable outputs */ 1216 snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x3); --- 28 unchanged lines hidden (view full) --- 1245 snd_soc_write(codec, WM8990_DAC_CTRL, val | WM8990_DAC_MUTE); 1246 1247 /* Enable any disabled outputs */ 1248 snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f03); 1249 1250 /* Disable VMID */ 1251 snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f01); 1252 | 1209 1210 /* Enable BUFIOEN */ 1211 snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | 1212 WM8990_BUFDCOPEN | WM8990_POBCTRL | 1213 WM8990_BUFIOEN); 1214 1215 /* Disable outputs */ 1216 snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x3); --- 28 unchanged lines hidden (view full) --- 1245 snd_soc_write(codec, WM8990_DAC_CTRL, val | WM8990_DAC_MUTE); 1246 1247 /* Enable any disabled outputs */ 1248 snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f03); 1249 1250 /* Disable VMID */ 1251 snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f01); 1252 |
1253 msleep(msecs_to_jiffies(300)); | 1253 msleep(300); |
1254 1255 /* Enable all output discharge bits */ 1256 snd_soc_write(codec, WM8990_ANTIPOP1, WM8990_DIS_LLINE | 1257 WM8990_DIS_RLINE | WM8990_DIS_OUT3 | 1258 WM8990_DIS_OUT4 | WM8990_DIS_LOUT | 1259 WM8990_DIS_ROUT); 1260 1261 /* Disable VREF */ --- 204 unchanged lines hidden --- | 1254 1255 /* Enable all output discharge bits */ 1256 snd_soc_write(codec, WM8990_ANTIPOP1, WM8990_DIS_LLINE | 1257 WM8990_DIS_RLINE | WM8990_DIS_OUT3 | 1258 WM8990_DIS_OUT4 | WM8990_DIS_LOUT | 1259 WM8990_DIS_ROUT); 1260 1261 /* Disable VREF */ --- 204 unchanged lines hidden --- |