27 #include <linux/slab.h>
29 #include <linux/module.h>
42 snd_ice1712_save_gpio_status(ice);
45 static void snd_ice1712_akm4xxx_unlock(
struct snd_akm4xxx *ak,
int chip)
49 snd_ice1712_restore_gpio_status(ice);
56 unsigned char addr,
unsigned char data)
60 unsigned int addrdata;
67 tmp = snd_ice1712_gpio_read(ice);
75 snd_ice1712_gpio_write(ice, tmp);
82 snd_ice1712_gpio_write(ice, tmp);
87 addrdata = (priv->
caddr << 6) | 0x20 | (addr & 0x1f);
88 addrdata = (addrdata << 8) | data;
89 for (idx = 15; idx >= 0; idx--) {
92 snd_ice1712_gpio_write(ice, tmp);
95 if (addrdata & (1 << idx))
99 snd_ice1712_gpio_write(ice, tmp);
103 snd_ice1712_gpio_write(ice, tmp);
111 snd_ice1712_gpio_write(ice, tmp);
119 snd_ice1712_gpio_write(ice, tmp);
144 ak->
ops.lock = snd_ice1712_akm4xxx_lock;
146 ak->
ops.unlock = snd_ice1712_akm4xxx_unlock;
148 ak->
ops.write = snd_ice1712_akm4xxx_write;
158 for (akidx = 0; akidx < ice->
akm_codecs; akidx++) {
173 for (akidx = 0; akidx < ice->
akm_codecs; akidx++) {
182 static int __init alsa_ice1712_akm4xxx_module_init(
void)
187 static void __exit alsa_ice1712_akm4xxx_module_exit(
void)