wm8580.c (cf0dbba515415bb19b11f9323d5f7bebd7f24fd6) wm8580.c (b2c812e22de88bb79c290c0e718280f10b64a48d)
1/*
2 * wm8580.c -- WM8580 ALSA Soc Audio driver
3 *
4 * Copyright 2008, 2009 Wolfson Microelectronics PLC.
5 *
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
8 * Free Software Foundation; either version 2 of the License, or (at your

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

20#include <linux/moduleparam.h>
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/delay.h>
24#include <linux/pm.h>
25#include <linux/i2c.h>
26#include <linux/platform_device.h>
27#include <linux/regulator/consumer.h>
1/*
2 * wm8580.c -- WM8580 ALSA Soc Audio driver
3 *
4 * Copyright 2008, 2009 Wolfson Microelectronics PLC.
5 *
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
8 * Free Software Foundation; either version 2 of the License, or (at your

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

20#include <linux/moduleparam.h>
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/delay.h>
24#include <linux/pm.h>
25#include <linux/i2c.h>
26#include <linux/platform_device.h>
27#include <linux/regulator/consumer.h>
28#include <linux/slab.h>
29
30#include <sound/core.h>
31#include <sound/pcm.h>
32#include <sound/pcm_params.h>
33#include <sound/soc.h>
34#include <sound/soc-dapm.h>
35#include <sound/tlv.h>
36#include <sound/initval.h>

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

407 return 0;
408}
409
410static int wm8580_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
411 int source, unsigned int freq_in, unsigned int freq_out)
412{
413 int offset;
414 struct snd_soc_codec *codec = codec_dai->codec;
28
29#include <sound/core.h>
30#include <sound/pcm.h>
31#include <sound/pcm_params.h>
32#include <sound/soc.h>
33#include <sound/soc-dapm.h>
34#include <sound/tlv.h>
35#include <sound/initval.h>

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

406 return 0;
407}
408
409static int wm8580_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
410 int source, unsigned int freq_in, unsigned int freq_out)
411{
412 int offset;
413 struct snd_soc_codec *codec = codec_dai->codec;
415 struct wm8580_priv *wm8580 = codec->private_data;
414 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
416 struct pll_state *state;
417 struct _pll_div pll_div;
418 unsigned int reg;
419 unsigned int pwr_mask;
420 int ret;
421
422 /* GCC isn't able to work out the ifs below for initialising/using
423 * pll_div so suppress warnings.

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

835 ret = -EINVAL;
836 goto err;
837 }
838
839 mutex_init(&codec->mutex);
840 INIT_LIST_HEAD(&codec->dapm_widgets);
841 INIT_LIST_HEAD(&codec->dapm_paths);
842
415 struct pll_state *state;
416 struct _pll_div pll_div;
417 unsigned int reg;
418 unsigned int pwr_mask;
419 int ret;
420
421 /* GCC isn't able to work out the ifs below for initialising/using
422 * pll_div so suppress warnings.

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

834 ret = -EINVAL;
835 goto err;
836 }
837
838 mutex_init(&codec->mutex);
839 INIT_LIST_HEAD(&codec->dapm_widgets);
840 INIT_LIST_HEAD(&codec->dapm_paths);
841
843 codec->private_data = wm8580;
842 snd_soc_codec_set_drvdata(codec, wm8580);
844 codec->name = "WM8580";
845 codec->owner = THIS_MODULE;
846 codec->bias_level = SND_SOC_BIAS_OFF;
847 codec->set_bias_level = wm8580_set_bias_level;
848 codec->dai = wm8580_dai;
849 codec->num_dai = ARRAY_SIZE(wm8580_dai);
850 codec->reg_cache_size = ARRAY_SIZE(wm8580->reg_cache);
851 codec->reg_cache = &wm8580->reg_cache;

--- 147 unchanged lines hidden ---
843 codec->name = "WM8580";
844 codec->owner = THIS_MODULE;
845 codec->bias_level = SND_SOC_BIAS_OFF;
846 codec->set_bias_level = wm8580_set_bias_level;
847 codec->dai = wm8580_dai;
848 codec->num_dai = ARRAY_SIZE(wm8580_dai);
849 codec->reg_cache_size = ARRAY_SIZE(wm8580->reg_cache);
850 codec->reg_cache = &wm8580->reg_cache;

--- 147 unchanged lines hidden ---