wm8974.c (e19553427c2e8fdb04fdd98e407164bb59a840ba) wm8974.c (759512fbacfbb6fd9b7f77f9806fb4995775848f)
1/*
2 * wm8974.c -- WM8974 ALSA Soc Audio driver
3 *
4 * Copyright 2006-2009 Wolfson Microelectronics PLC.
5 *
6 * Author: Liam Girdwood <linux@wolfsonmicro.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 4 unchanged lines hidden (view full) ---

13#include <linux/module.h>
14#include <linux/moduleparam.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/delay.h>
18#include <linux/pm.h>
19#include <linux/i2c.h>
20#include <linux/platform_device.h>
1/*
2 * wm8974.c -- WM8974 ALSA Soc Audio driver
3 *
4 * Copyright 2006-2009 Wolfson Microelectronics PLC.
5 *
6 * Author: Liam Girdwood <linux@wolfsonmicro.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 4 unchanged lines hidden (view full) ---

13#include <linux/module.h>
14#include <linux/moduleparam.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/delay.h>
18#include <linux/pm.h>
19#include <linux/i2c.h>
20#include <linux/platform_device.h>
21#include <linux/slab.h>
22#include <sound/core.h>
23#include <sound/pcm.h>
24#include <sound/pcm_params.h>
25#include <sound/soc.h>
26#include <sound/soc-dapm.h>
27#include <sound/initval.h>
28#include <sound/tlv.h>
29

--- 146 unchanged lines hidden (view full) ---

176SOC_SINGLE("DAC 128x Oversampling Switch", WM8974_DAC, 8, 1, 0),
177SOC_SINGLE("ADC 128x Oversampling Switch", WM8974_ADC, 8, 1, 0),
178};
179
180/* Speaker Output Mixer */
181static const struct snd_kcontrol_new wm8974_speaker_mixer_controls[] = {
182SOC_DAPM_SINGLE("Line Bypass Switch", WM8974_SPKMIX, 1, 1, 0),
183SOC_DAPM_SINGLE("Aux Playback Switch", WM8974_SPKMIX, 5, 1, 0),
21#include <sound/core.h>
22#include <sound/pcm.h>
23#include <sound/pcm_params.h>
24#include <sound/soc.h>
25#include <sound/soc-dapm.h>
26#include <sound/initval.h>
27#include <sound/tlv.h>
28

--- 146 unchanged lines hidden (view full) ---

175SOC_SINGLE("DAC 128x Oversampling Switch", WM8974_DAC, 8, 1, 0),
176SOC_SINGLE("ADC 128x Oversampling Switch", WM8974_ADC, 8, 1, 0),
177};
178
179/* Speaker Output Mixer */
180static const struct snd_kcontrol_new wm8974_speaker_mixer_controls[] = {
181SOC_DAPM_SINGLE("Line Bypass Switch", WM8974_SPKMIX, 1, 1, 0),
182SOC_DAPM_SINGLE("Aux Playback Switch", WM8974_SPKMIX, 5, 1, 0),
184SOC_DAPM_SINGLE("PCM Playback Switch", WM8974_SPKMIX, 0, 1, 1),
183SOC_DAPM_SINGLE("PCM Playback Switch", WM8974_SPKMIX, 0, 1, 0),
185};
186
187/* Mono Output Mixer */
188static const struct snd_kcontrol_new wm8974_mono_mixer_controls[] = {
189SOC_DAPM_SINGLE("Line Bypass Switch", WM8974_MONOMIX, 1, 1, 0),
190SOC_DAPM_SINGLE("Aux Playback Switch", WM8974_MONOMIX, 2, 1, 0),
191SOC_DAPM_SINGLE("PCM Playback Switch", WM8974_MONOMIX, 0, 1, 0),
192};

--- 479 unchanged lines hidden (view full) ---

672 dev_err(codec->dev, "Another WM8974 is registered\n");
673 return -EINVAL;
674 }
675
676 mutex_init(&codec->mutex);
677 INIT_LIST_HEAD(&codec->dapm_widgets);
678 INIT_LIST_HEAD(&codec->dapm_paths);
679
184};
185
186/* Mono Output Mixer */
187static const struct snd_kcontrol_new wm8974_mono_mixer_controls[] = {
188SOC_DAPM_SINGLE("Line Bypass Switch", WM8974_MONOMIX, 1, 1, 0),
189SOC_DAPM_SINGLE("Aux Playback Switch", WM8974_MONOMIX, 2, 1, 0),
190SOC_DAPM_SINGLE("PCM Playback Switch", WM8974_MONOMIX, 0, 1, 0),
191};

--- 479 unchanged lines hidden (view full) ---

671 dev_err(codec->dev, "Another WM8974 is registered\n");
672 return -EINVAL;
673 }
674
675 mutex_init(&codec->mutex);
676 INIT_LIST_HEAD(&codec->dapm_widgets);
677 INIT_LIST_HEAD(&codec->dapm_paths);
678
680 codec->private_data = wm8974;
679 snd_soc_codec_set_drvdata(codec, wm8974);
681 codec->name = "WM8974";
682 codec->owner = THIS_MODULE;
683 codec->bias_level = SND_SOC_BIAS_OFF;
684 codec->set_bias_level = wm8974_set_bias_level;
685 codec->dai = &wm8974_dai;
686 codec->num_dai = 1;
687 codec->reg_cache_size = WM8974_CACHEREGNUM;
688 codec->reg_cache = &wm8974->reg_cache;

--- 110 unchanged lines hidden ---
680 codec->name = "WM8974";
681 codec->owner = THIS_MODULE;
682 codec->bias_level = SND_SOC_BIAS_OFF;
683 codec->set_bias_level = wm8974_set_bias_level;
684 codec->dai = &wm8974_dai;
685 codec->num_dai = 1;
686 codec->reg_cache_size = WM8974_CACHEREGNUM;
687 codec->reg_cache = &wm8974->reg_cache;

--- 110 unchanged lines hidden ---