Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: sound/soc/codecs/stac9766.c

Issue 6577007: CHROMIUM: ASoC: Import entire upstream ASoC tree (Closed)
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sound/soc/codecs/ssm2602.c ('k') | sound/soc/codecs/tlv320aic23.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * stac9766.c -- ALSA SoC STAC9766 codec support 2 * stac9766.c -- ALSA SoC STAC9766 codec support
3 * 3 *
4 * Copyright 2009 Jon Smirl, Digispeaker 4 * Copyright 2009 Jon Smirl, Digispeaker
5 * Author: Jon Smirl <jonsmirl@gmail.com> 5 * Author: Jon Smirl <jonsmirl@gmail.com>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify it 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 8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your 9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. 10 * option) any later version.
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 case SND_SOC_BIAS_ON: /* full On */ 229 case SND_SOC_BIAS_ON: /* full On */
230 case SND_SOC_BIAS_PREPARE: /* partial On */ 230 case SND_SOC_BIAS_PREPARE: /* partial On */
231 case SND_SOC_BIAS_STANDBY: /* Off, with power */ 231 case SND_SOC_BIAS_STANDBY: /* Off, with power */
232 stac9766_ac97_write(codec, AC97_POWERDOWN, 0x0000); 232 stac9766_ac97_write(codec, AC97_POWERDOWN, 0x0000);
233 break; 233 break;
234 case SND_SOC_BIAS_OFF: /* Off, without power */ 234 case SND_SOC_BIAS_OFF: /* Off, without power */
235 /* disable everything including AC link */ 235 /* disable everything including AC link */
236 stac9766_ac97_write(codec, AC97_POWERDOWN, 0xffff); 236 stac9766_ac97_write(codec, AC97_POWERDOWN, 0xffff);
237 break; 237 break;
238 } 238 }
239 » codec->bias_level = level; 239 » codec->dapm.bias_level = level;
240 return 0; 240 return 0;
241 } 241 }
242 242
243 static int stac9766_reset(struct snd_soc_codec *codec, int try_warm) 243 static int stac9766_reset(struct snd_soc_codec *codec, int try_warm)
244 { 244 {
245 if (try_warm && soc_ac97_ops.warm_reset) { 245 if (try_warm && soc_ac97_ops.warm_reset) {
246 soc_ac97_ops.warm_reset(codec->ac97); 246 soc_ac97_ops.warm_reset(codec->ac97);
247 if (stac9766_ac97_read(codec, 0) == stac9766_reg[0]) 247 if (stac9766_ac97_read(codec, 0) == stac9766_reg[0])
248 return 1; 248 return 1;
249 } 249 }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 static void __exit stac9766_exit(void) 417 static void __exit stac9766_exit(void)
418 { 418 {
419 platform_driver_unregister(&stac9766_codec_driver); 419 platform_driver_unregister(&stac9766_codec_driver);
420 } 420 }
421 module_exit(stac9766_exit); 421 module_exit(stac9766_exit);
422 422
423 MODULE_DESCRIPTION("ASoC stac9766 driver"); 423 MODULE_DESCRIPTION("ASoC stac9766 driver");
424 MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>"); 424 MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>");
425 MODULE_LICENSE("GPL"); 425 MODULE_LICENSE("GPL");
OLDNEW
« no previous file with comments | « sound/soc/codecs/ssm2602.c ('k') | sound/soc/codecs/tlv320aic23.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698