wm8940.c (cf0dbba515415bb19b11f9323d5f7bebd7f24fd6) | wm8940.c (b2c812e22de88bb79c290c0e718280f10b64a48d) |
---|---|
1/* 2 * wm8940.c -- WM8940 ALSA Soc Audio driver 3 * 4 * Author: Jonathan Cameron <jic23@cam.ac.uk> 5 * 6 * Based on wm8510.c 7 * Copyright 2006 Wolfson Microelectronics PLC. 8 * Author: Liam Girdwood <lrg@slimlogic.co.uk> --- 16 unchanged lines hidden (view full) --- 25#include <linux/moduleparam.h> 26#include <linux/kernel.h> 27#include <linux/init.h> 28#include <linux/delay.h> 29#include <linux/pm.h> 30#include <linux/i2c.h> 31#include <linux/platform_device.h> 32#include <linux/spi/spi.h> | 1/* 2 * wm8940.c -- WM8940 ALSA Soc Audio driver 3 * 4 * Author: Jonathan Cameron <jic23@cam.ac.uk> 5 * 6 * Based on wm8510.c 7 * Copyright 2006 Wolfson Microelectronics PLC. 8 * Author: Liam Girdwood <lrg@slimlogic.co.uk> --- 16 unchanged lines hidden (view full) --- 25#include <linux/moduleparam.h> 26#include <linux/kernel.h> 27#include <linux/init.h> 28#include <linux/delay.h> 29#include <linux/pm.h> 30#include <linux/i2c.h> 31#include <linux/platform_device.h> 32#include <linux/spi/spi.h> |
33#include <linux/slab.h> | |
34#include <sound/core.h> 35#include <sound/pcm.h> 36#include <sound/pcm_params.h> 37#include <sound/soc.h> 38#include <sound/soc-dapm.h> 39#include <sound/initval.h> 40#include <sound/tlv.h> 41 --- 534 unchanged lines hidden (view full) --- 576 577 return 0; 578} 579 580static int wm8940_set_dai_sysclk(struct snd_soc_dai *codec_dai, 581 int clk_id, unsigned int freq, int dir) 582{ 583 struct snd_soc_codec *codec = codec_dai->codec; | 33#include <sound/core.h> 34#include <sound/pcm.h> 35#include <sound/pcm_params.h> 36#include <sound/soc.h> 37#include <sound/soc-dapm.h> 38#include <sound/initval.h> 39#include <sound/tlv.h> 40 --- 534 unchanged lines hidden (view full) --- 575 576 return 0; 577} 578 579static int wm8940_set_dai_sysclk(struct snd_soc_dai *codec_dai, 580 int clk_id, unsigned int freq, int dir) 581{ 582 struct snd_soc_codec *codec = codec_dai->codec; |
584 struct wm8940_priv *wm8940 = codec->private_data; | 583 struct wm8940_priv *wm8940 = snd_soc_codec_get_drvdata(codec); |
585 586 switch (freq) { 587 case 11289600: 588 case 12000000: 589 case 12288000: 590 case 16934400: 591 case 18432000: 592 wm8940->sysclk = freq; --- 175 unchanged lines hidden (view full) --- 768 if (wm8940_codec) { 769 dev_err(codec->dev, "Another WM8940 is registered\n"); 770 return -EINVAL; 771 } 772 773 INIT_LIST_HEAD(&codec->dapm_widgets); 774 INIT_LIST_HEAD(&codec->dapm_paths); 775 | 584 585 switch (freq) { 586 case 11289600: 587 case 12000000: 588 case 12288000: 589 case 16934400: 590 case 18432000: 591 wm8940->sysclk = freq; --- 175 unchanged lines hidden (view full) --- 767 if (wm8940_codec) { 768 dev_err(codec->dev, "Another WM8940 is registered\n"); 769 return -EINVAL; 770 } 771 772 INIT_LIST_HEAD(&codec->dapm_widgets); 773 INIT_LIST_HEAD(&codec->dapm_paths); 774 |
776 codec->private_data = wm8940; | 775 snd_soc_codec_set_drvdata(codec, wm8940); |
777 codec->name = "WM8940"; 778 codec->owner = THIS_MODULE; 779 codec->bias_level = SND_SOC_BIAS_OFF; 780 codec->set_bias_level = wm8940_set_bias_level; 781 codec->dai = &wm8940_dai; 782 codec->num_dai = 1; 783 codec->reg_cache_size = ARRAY_SIZE(wm8940_reg_defaults); 784 codec->reg_cache = &wm8940->reg_cache; --- 126 unchanged lines hidden --- | 776 codec->name = "WM8940"; 777 codec->owner = THIS_MODULE; 778 codec->bias_level = SND_SOC_BIAS_OFF; 779 codec->set_bias_level = wm8940_set_bias_level; 780 codec->dai = &wm8940_dai; 781 codec->num_dai = 1; 782 codec->reg_cache_size = ARRAY_SIZE(wm8940_reg_defaults); 783 codec->reg_cache = &wm8940->reg_cache; --- 126 unchanged lines hidden --- |