ak4104.c (cf0dbba515415bb19b11f9323d5f7bebd7f24fd6) | ak4104.c (b2c812e22de88bb79c290c0e718280f10b64a48d) |
---|---|
1/* 2 * AK4104 ALSA SoC (ASoC) driver 3 * 4 * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> 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 9 * option) any later version. 10 */ 11 12#include <linux/module.h> | 1/* 2 * AK4104 ALSA SoC (ASoC) driver 3 * 4 * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> 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 9 * option) any later version. 10 */ 11 12#include <linux/module.h> |
13#include <linux/slab.h> | |
14#include <sound/core.h> 15#include <sound/soc.h> 16#include <sound/initval.h> 17#include <linux/spi/spi.h> 18#include <sound/asoundef.h> 19 20#include "ak4104.h" 21 --- 195 unchanged lines hidden (view full) --- 217 INIT_LIST_HEAD(&codec->dapm_widgets); 218 INIT_LIST_HEAD(&codec->dapm_paths); 219 220 codec->dev = &spi->dev; 221 codec->name = DRV_NAME; 222 codec->owner = THIS_MODULE; 223 codec->dai = &ak4104_dai; 224 codec->num_dai = 1; | 13#include <sound/core.h> 14#include <sound/soc.h> 15#include <sound/initval.h> 16#include <linux/spi/spi.h> 17#include <sound/asoundef.h> 18 19#include "ak4104.h" 20 --- 195 unchanged lines hidden (view full) --- 216 INIT_LIST_HEAD(&codec->dapm_widgets); 217 INIT_LIST_HEAD(&codec->dapm_paths); 218 219 codec->dev = &spi->dev; 220 codec->name = DRV_NAME; 221 codec->owner = THIS_MODULE; 222 codec->dai = &ak4104_dai; 223 codec->num_dai = 1; |
225 codec->private_data = ak4104; | 224 snd_soc_codec_set_drvdata(codec, ak4104); |
226 codec->control_data = spi; 227 codec->reg_cache = ak4104->reg_cache; 228 codec->reg_cache_size = AK4104_NUM_REGS; 229 230 /* read all regs and fill the cache */ 231 ret = ak4104_fill_cache(codec); 232 if (ret < 0) { 233 dev_err(&spi->dev, "failed to fill register cache\n"); --- 121 unchanged lines hidden --- | 225 codec->control_data = spi; 226 codec->reg_cache = ak4104->reg_cache; 227 codec->reg_cache_size = AK4104_NUM_REGS; 228 229 /* read all regs and fill the cache */ 230 ret = ak4104_fill_cache(codec); 231 if (ret < 0) { 232 dev_err(&spi->dev, "failed to fill register cache\n"); --- 121 unchanged lines hidden --- |