aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8728.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-23 11:52:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-23 11:52:38 -0400
commit710421cc7d295cc59eb2676fe2ba3bc3252c124e (patch)
tree4aa11cd7ee64b394871195cb585f16700553f540 /sound/soc/codecs/wm8728.c
parentd7ef64a9f9987b29e3d911369a9d40122d5be2dd (diff)
parentf686c74cc3e78349d16d46fc72807354574b1516 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (346 commits) ASoC: core: Don't set "(null)" as a driver name ALSA: hda - Use LPIB for ATI/AMD chipsets as default Revert "ALSA: hda - Use position_fix=3 as default for AMD chipsets" ASoC: Tegra: Fix compile when debugfs not enabled ASoC: spdif-dit: Add missing MODULE_* SOUND: OSS: Remove Au1550 driver. ALSA: hda - add Intel Panther Point HDMI codec id ALSA: emu10k1 - Add dB range to Bass and Treble for SB Live! ALSA: hda - Remove PCM mixer elements from Virtual Master of realtek ALSA: hda - Fix input-src parse in patch_analog.c ASoC: davinci-mcasp: enable ping-pong SRAM buffers ASoC: add iPAQ hx4700 machine driver ASoC: Asahi Kasei AK4641 codec driver ALSA: hda - Enable Realtek ALC269 codec input layer beep ALSA: intel8x0m: enable AMD8111 modem ALSA: HDA: Add jack detection for HDMI ALSA: sound, core, pcm_lib: fix xrun_log ASoC: Max98095: Move existing NULL check before pointer dereference. ALSA: sound, core, pcm_lib: xrun_log: log also in_interrupt ALSA: usb-audio - Add support for USB X-Fi S51 Pro ...
Diffstat (limited to 'sound/soc/codecs/wm8728.c')
-rw-r--r--sound/soc/codecs/wm8728.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c
index 736b0352d0a7..86d4718d3a76 100644
--- a/sound/soc/codecs/wm8728.c
+++ b/sound/soc/codecs/wm8728.c
@@ -65,22 +65,11 @@ SND_SOC_DAPM_OUTPUT("VOUTL"),
65SND_SOC_DAPM_OUTPUT("VOUTR"), 65SND_SOC_DAPM_OUTPUT("VOUTR"),
66}; 66};
67 67
68static const struct snd_soc_dapm_route intercon[] = { 68static const struct snd_soc_dapm_route wm8728_intercon[] = {
69 {"VOUTL", NULL, "DAC"}, 69 {"VOUTL", NULL, "DAC"},
70 {"VOUTR", NULL, "DAC"}, 70 {"VOUTR", NULL, "DAC"},
71}; 71};
72 72
73static int wm8728_add_widgets(struct snd_soc_codec *codec)
74{
75 struct snd_soc_dapm_context *dapm = &codec->dapm;
76
77 snd_soc_dapm_new_controls(dapm, wm8728_dapm_widgets,
78 ARRAY_SIZE(wm8728_dapm_widgets));
79 snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
80
81 return 0;
82}
83
84static int wm8728_mute(struct snd_soc_dai *dai, int mute) 73static int wm8728_mute(struct snd_soc_dai *dai, int mute)
85{ 74{
86 struct snd_soc_codec *codec = dai->codec; 75 struct snd_soc_codec *codec = dai->codec;
@@ -255,7 +244,6 @@ static int wm8728_probe(struct snd_soc_codec *codec)
255 244
256 snd_soc_add_controls(codec, wm8728_snd_controls, 245 snd_soc_add_controls(codec, wm8728_snd_controls,
257 ARRAY_SIZE(wm8728_snd_controls)); 246 ARRAY_SIZE(wm8728_snd_controls));
258 wm8728_add_widgets(codec);
259 247
260 return ret; 248 return ret;
261} 249}
@@ -275,6 +263,10 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8728 = {
275 .reg_cache_size = ARRAY_SIZE(wm8728_reg_defaults), 263 .reg_cache_size = ARRAY_SIZE(wm8728_reg_defaults),
276 .reg_word_size = sizeof(u16), 264 .reg_word_size = sizeof(u16),
277 .reg_cache_default = wm8728_reg_defaults, 265 .reg_cache_default = wm8728_reg_defaults,
266 .dapm_widgets = wm8728_dapm_widgets,
267 .num_dapm_widgets = ARRAY_SIZE(wm8728_dapm_widgets),
268 .dapm_routes = wm8728_intercon,
269 .num_dapm_routes = ARRAY_SIZE(wm8728_intercon),
278}; 270};
279 271
280#if defined(CONFIG_SPI_MASTER) 272#if defined(CONFIG_SPI_MASTER)