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

Side by Side Diff: sound/soc/atmel/playpaq_wm8510.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/Makefile ('k') | sound/soc/atmel/sam9g20_wm8731.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 /* sound/soc/at32/playpaq_wm8510.c 1 /* sound/soc/at32/playpaq_wm8510.c
2 * ASoC machine driver for PlayPaq using WM8510 codec 2 * ASoC machine driver for PlayPaq using WM8510 codec
3 * 3 *
4 * Copyright (C) 2008 Long Range Systems 4 * Copyright (C) 2008 Long Range Systems
5 * Geoffrey Wossum <gwossum@acm.org> 5 * Geoffrey Wossum <gwossum@acm.org>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 * 10 *
(...skipping 15 matching lines...) Expand all
26 #include <linux/errno.h> 26 #include <linux/errno.h>
27 #include <linux/clk.h> 27 #include <linux/clk.h>
28 #include <linux/timer.h> 28 #include <linux/timer.h>
29 #include <linux/interrupt.h> 29 #include <linux/interrupt.h>
30 #include <linux/platform_device.h> 30 #include <linux/platform_device.h>
31 31
32 #include <sound/core.h> 32 #include <sound/core.h>
33 #include <sound/pcm.h> 33 #include <sound/pcm.h>
34 #include <sound/pcm_params.h> 34 #include <sound/pcm_params.h>
35 #include <sound/soc.h> 35 #include <sound/soc.h>
36 #include <sound/soc-dapm.h>
37 36
38 #include <mach/at32ap700x.h> 37 #include <mach/at32ap700x.h>
39 #include <mach/portmux.h> 38 #include <mach/portmux.h>
40 39
41 #include "../codecs/wm8510.h" 40 #include "../codecs/wm8510.h"
42 #include "atmel-pcm.h" 41 #include "atmel-pcm.h"
43 #include "atmel_ssc_dai.h" 42 #include "atmel_ssc_dai.h"
44 43
45 44
46 /*-------------------------------------------------------------------------*\ 45 /*-------------------------------------------------------------------------*\
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 {"Mic Bias", NULL, "Int Mic"}, 310 {"Mic Bias", NULL, "Int Mic"},
312 {"MICN", NULL, "Mic Bias"}, 311 {"MICN", NULL, "Mic Bias"},
313 {"MICP", NULL, "Mic Bias"}, 312 {"MICP", NULL, "Mic Bias"},
314 }; 313 };
315 314
316 315
317 316
318 static int playpaq_wm8510_init(struct snd_soc_pcm_runtime *rtd) 317 static int playpaq_wm8510_init(struct snd_soc_pcm_runtime *rtd)
319 { 318 {
320 struct snd_soc_codec *codec = rtd->codec; 319 struct snd_soc_codec *codec = rtd->codec;
320 struct snd_soc_dapm_context *dapm = &codec->dapm;
321 int i; 321 int i;
322 322
323 /* 323 /*
324 * Add DAPM widgets 324 * Add DAPM widgets
325 */ 325 */
326 for (i = 0; i < ARRAY_SIZE(playpaq_dapm_widgets); i++) 326 for (i = 0; i < ARRAY_SIZE(playpaq_dapm_widgets); i++)
327 » » snd_soc_dapm_new_control(codec, &playpaq_dapm_widgets[i]); 327 » » snd_soc_dapm_new_control(dapm, &playpaq_dapm_widgets[i]);
328 328
329 329
330 330
331 /* 331 /*
332 * Setup audio path interconnects 332 * Setup audio path interconnects
333 */ 333 */
334 » snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); 334 » snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
335 335
336 336
337 337
338 /* always connected pins */ 338 /* always connected pins */
339 » snd_soc_dapm_enable_pin(codec, "Int Mic"); 339 » snd_soc_dapm_enable_pin(dapm, "Int Mic");
340 » snd_soc_dapm_enable_pin(codec, "Ext Spk"); 340 » snd_soc_dapm_enable_pin(dapm, "Ext Spk");
341 » snd_soc_dapm_sync(codec); 341 » snd_soc_dapm_sync(dapm);
342 342
343 343
344 344
345 /* Make CSB show PLL rate */ 345 /* Make CSB show PLL rate */
346 snd_soc_dai_set_clkdiv(rtd->codec_dai, WM8510_OPCLKDIV, 346 snd_soc_dai_set_clkdiv(rtd->codec_dai, WM8510_OPCLKDIV,
347 WM8510_OPCLKDIV_1 | 4); 347 WM8510_OPCLKDIV_1 | 4);
348 348
349 return 0; 349 return 0;
350 } 350 }
351 351
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 platform_device_unregister(playpaq_snd_device); 462 platform_device_unregister(playpaq_snd_device);
463 playpaq_snd_device = NULL; 463 playpaq_snd_device = NULL;
464 } 464 }
465 465
466 module_init(playpaq_asoc_init); 466 module_init(playpaq_asoc_init);
467 module_exit(playpaq_asoc_exit); 467 module_exit(playpaq_asoc_exit);
468 468
469 MODULE_AUTHOR("Geoffrey Wossum <gwossum@acm.org>"); 469 MODULE_AUTHOR("Geoffrey Wossum <gwossum@acm.org>");
470 MODULE_DESCRIPTION("ASoC machine driver for LRS PlayPaq"); 470 MODULE_DESCRIPTION("ASoC machine driver for LRS PlayPaq");
471 MODULE_LICENSE("GPL"); 471 MODULE_LICENSE("GPL");
OLDNEW
« no previous file with comments | « sound/soc/Makefile ('k') | sound/soc/atmel/sam9g20_wm8731.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698