/[openvortex]/alsa/alsa-kernel/pci/ice1712/ak4xxx.c
ViewVC logotype

Diff of /alsa/alsa-kernel/pci/ice1712/ak4xxx.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by vizard, Sat May 31 02:35:12 2003 UTC revision 1.2 by vizard, Mon Aug 11 00:06:40 2003 UTC
# Line 27  Line 27 
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];
# Line 97  static void snd_ice1712_akm4xxx_write(ak Line 103  static void snd_ice1712_akm4xxx_write(ak
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 */
# Line 127  static void snd_ice1712_akm4xxx_write(ak Line 122  static void snd_ice1712_akm4xxx_write(ak
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    
# Line 150  int __devinit snd_ice1712_akm4xxx_init(a Line 145  int __devinit snd_ice1712_akm4xxx_init(a
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)
# Line 166  void __devexit snd_ice1712_akm4xxx_free( Line 161  void __devexit snd_ice1712_akm4xxx_free(
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;
# Line 179  int __devinit snd_ice1712_akm4xxx_build_ Line 174  int __devinit snd_ice1712_akm4xxx_build_
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);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26