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

Side by Side Diff: sound/soc/pxa/e750_wm9705.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/pxa/e740_wm9705.c ('k') | sound/soc/pxa/e800_wm9712.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 * e750-wm9705.c -- SoC audio for e750 2 * e750-wm9705.c -- SoC audio for e750
3 * 3 *
4 * Copyright 2007 (c) Ian Molton <spyro@f2s.com> 4 * Copyright 2007 (c) Ian Molton <spyro@f2s.com>
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the 7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; version 2 ONLY. 8 * Free Software Foundation; version 2 ONLY.
9 * 9 *
10 */ 10 */
11 11
12 #include <linux/module.h> 12 #include <linux/module.h>
13 #include <linux/moduleparam.h> 13 #include <linux/moduleparam.h>
14 #include <linux/gpio.h> 14 #include <linux/gpio.h>
15 15
16 #include <sound/core.h> 16 #include <sound/core.h>
17 #include <sound/pcm.h> 17 #include <sound/pcm.h>
18 #include <sound/soc.h> 18 #include <sound/soc.h>
19 #include <sound/soc-dapm.h>
20 19
21 #include <mach/audio.h> 20 #include <mach/audio.h>
22 #include <mach/eseries-gpio.h> 21 #include <mach/eseries-gpio.h>
23 22
24 #include <asm/mach-types.h> 23 #include <asm/mach-types.h>
25 24
26 #include "../codecs/wm9705.h" 25 #include "../codecs/wm9705.h"
27 #include "pxa2xx-ac97.h" 26 #include "pxa2xx-ac97.h"
28 27
29 static int e750_spk_amp_event(struct snd_soc_dapm_widget *w, 28 static int e750_spk_amp_event(struct snd_soc_dapm_widget *w,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 66
68 {"Speaker Amp", NULL, "MONOOUT"}, 67 {"Speaker Amp", NULL, "MONOOUT"},
69 {"Speaker", NULL, "Speaker Amp"}, 68 {"Speaker", NULL, "Speaker Amp"},
70 69
71 {"MIC1", NULL, "Mic (Internal)"}, 70 {"MIC1", NULL, "Mic (Internal)"},
72 }; 71 };
73 72
74 static int e750_ac97_init(struct snd_soc_pcm_runtime *rtd) 73 static int e750_ac97_init(struct snd_soc_pcm_runtime *rtd)
75 { 74 {
76 struct snd_soc_codec *codec = rtd->codec; 75 struct snd_soc_codec *codec = rtd->codec;
76 struct snd_soc_dapm_context *dapm = &codec->dapm;
77 77
78 » snd_soc_dapm_nc_pin(codec, "LOUT"); 78 » snd_soc_dapm_nc_pin(dapm, "LOUT");
79 » snd_soc_dapm_nc_pin(codec, "ROUT"); 79 » snd_soc_dapm_nc_pin(dapm, "ROUT");
80 » snd_soc_dapm_nc_pin(codec, "PHONE"); 80 » snd_soc_dapm_nc_pin(dapm, "PHONE");
81 » snd_soc_dapm_nc_pin(codec, "LINEINL"); 81 » snd_soc_dapm_nc_pin(dapm, "LINEINL");
82 » snd_soc_dapm_nc_pin(codec, "LINEINR"); 82 » snd_soc_dapm_nc_pin(dapm, "LINEINR");
83 » snd_soc_dapm_nc_pin(codec, "CDINL"); 83 » snd_soc_dapm_nc_pin(dapm, "CDINL");
84 » snd_soc_dapm_nc_pin(codec, "CDINR"); 84 » snd_soc_dapm_nc_pin(dapm, "CDINR");
85 » snd_soc_dapm_nc_pin(codec, "PCBEEP"); 85 » snd_soc_dapm_nc_pin(dapm, "PCBEEP");
86 » snd_soc_dapm_nc_pin(codec, "MIC2"); 86 » snd_soc_dapm_nc_pin(dapm, "MIC2");
87 87
88 » snd_soc_dapm_new_controls(codec, e750_dapm_widgets, 88 » snd_soc_dapm_new_controls(dapm, e750_dapm_widgets,
89 ARRAY_SIZE(e750_dapm_widgets)); 89 ARRAY_SIZE(e750_dapm_widgets));
90 90
91 » snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 91 » snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
92 92
93 » snd_soc_dapm_sync(codec); 93 » snd_soc_dapm_sync(dapm);
94 94
95 return 0; 95 return 0;
96 } 96 }
97 97
98 static struct snd_soc_dai_link e750_dai[] = { 98 static struct snd_soc_dai_link e750_dai[] = {
99 { 99 {
100 .name = "AC97", 100 .name = "AC97",
101 .stream_name = "AC97 HiFi", 101 .stream_name = "AC97 HiFi",
102 .cpu_dai_name = "pxa-ac97.0", 102 .cpu_dai_name = "pxa-ac97.0",
103 .codec_dai_name = "wm9705-hifi", 103 .codec_dai_name = "wm9705-hifi",
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 gpio_free(GPIO_E750_HP_AMP_OFF); 176 gpio_free(GPIO_E750_HP_AMP_OFF);
177 } 177 }
178 178
179 module_init(e750_init); 179 module_init(e750_init);
180 module_exit(e750_exit); 180 module_exit(e750_exit);
181 181
182 /* Module information */ 182 /* Module information */
183 MODULE_AUTHOR("Ian Molton <spyro@f2s.com>"); 183 MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
184 MODULE_DESCRIPTION("ALSA SoC driver for e750"); 184 MODULE_DESCRIPTION("ALSA SoC driver for e750");
185 MODULE_LICENSE("GPL v2"); 185 MODULE_LICENSE("GPL v2");
OLDNEW
« no previous file with comments | « sound/soc/pxa/e740_wm9705.c ('k') | sound/soc/pxa/e800_wm9712.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698