27 |
#include <linux/interrupt.h> |
#include <linux/interrupt.h> |
28 |
#include <linux/init.h> |
#include <linux/init.h> |
29 |
#include <sound/core.h> |
#include <sound/core.h> |
30 |
|
#include <sound/initval.h> |
31 |
#include "ice1712.h" |
#include "ice1712.h" |
32 |
|
|
33 |
|
MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); |
34 |
|
MODULE_DESCRIPTION("ICEnsemble ICE17xx <-> AK4xxx AD/DA chip interface"); |
35 |
|
MODULE_LICENSE("GPL"); |
36 |
|
MODULE_CLASSES("{sound}"); |
37 |
|
|
38 |
static void snd_ice1712_akm4xxx_lock(akm4xxx_t *ak, int chip) |
static void snd_ice1712_akm4xxx_lock(akm4xxx_t *ak, int chip) |
39 |
{ |
{ |
40 |
ice1712_t *ice = ak->private_data[0]; |
ice1712_t *ice = ak->private_data[0]; |
103 |
udelay(1); |
udelay(1); |
104 |
} |
} |
105 |
|
|
|
/* save the data */ |
|
|
if (ak->type == SND_AK4524 || ak->type == SND_AK4528) { |
|
|
if ((addr != 0x04 && addr != 0x05) || (data & 0x80) == 0) |
|
|
ak->images[chip][addr] = data; |
|
|
else |
|
|
ak->ipga_gain[chip][addr-4] = data; |
|
|
} else { |
|
|
/* AK4529, or else */ |
|
|
ak->images[chip][addr] = data; |
|
|
} |
|
|
|
|
106 |
if (priv->cs_mask == priv->cs_addr) { |
if (priv->cs_mask == priv->cs_addr) { |
107 |
if (priv->cif) { |
if (priv->cif) { |
108 |
/* assert a cs pulse to trigger */ |
/* assert a cs pulse to trigger */ |
122 |
/* |
/* |
123 |
* initialize the akm4xxx_t record with the template |
* initialize the akm4xxx_t record with the template |
124 |
*/ |
*/ |
125 |
int __devinit snd_ice1712_akm4xxx_init(akm4xxx_t *ak, const akm4xxx_t *temp, |
int snd_ice1712_akm4xxx_init(akm4xxx_t *ak, const akm4xxx_t *temp, |
126 |
const struct snd_ak4xxx_private *_priv, ice1712_t *ice) |
const struct snd_ak4xxx_private *_priv, ice1712_t *ice) |
127 |
{ |
{ |
128 |
struct snd_ak4xxx_private *priv; |
struct snd_ak4xxx_private *priv; |
129 |
|
|
145 |
return 0; |
return 0; |
146 |
} |
} |
147 |
|
|
148 |
void __devexit snd_ice1712_akm4xxx_free(ice1712_t *ice) |
void snd_ice1712_akm4xxx_free(ice1712_t *ice) |
149 |
{ |
{ |
150 |
unsigned int akidx; |
unsigned int akidx; |
151 |
if (ice->akm == NULL) |
if (ice->akm == NULL) |
161 |
/* |
/* |
162 |
* build AK4xxx controls |
* build AK4xxx controls |
163 |
*/ |
*/ |
164 |
int __devinit snd_ice1712_akm4xxx_build_controls(ice1712_t *ice) |
int snd_ice1712_akm4xxx_build_controls(ice1712_t *ice) |
165 |
{ |
{ |
166 |
unsigned int akidx; |
unsigned int akidx; |
167 |
int err; |
int err; |
174 |
} |
} |
175 |
return 0; |
return 0; |
176 |
} |
} |
177 |
|
|
178 |
|
EXPORT_SYMBOL(snd_ice1712_akm4xxx_init); |
179 |
|
EXPORT_SYMBOL(snd_ice1712_akm4xxx_free); |
180 |
|
EXPORT_SYMBOL(snd_ice1712_akm4xxx_build_controls); |